capture screen and osr
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello everyone,
Recently I have found the ScreenCapture function in the FileExchange http://uk.mathworks.com/matlabcentral/fileexchange/24323-screencapture-get-a-screen-capture-of-a-figure-frame-or-component
What I want is to capture certain rectangular area of screen from webbrowser and then using Optical Character Recognition (OCR) to recognize the text. http://uk.mathworks.com/help/vision/examples/recognize-text-using-optical-character-recognition-ocr.html
So what I have done so far:
I = screencapture(gca);
% Perform OCR
BW = im2bw(I);
marker = imerode(BW , strel('line',500,0));
Iclean = imreconstruct(marker, BW );imshow(Iclean);
results = ocr(Iclean, 'TextLayout', 'Block');
results.Text
Where the input image was
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156757/image.jpeg)
And the output I got was quite impressive: 2.311.592 /
But the only problem I have is how to select specific region outside Matlab?
댓글 수: 2
Jan
2016년 9월 30일
편집: Jan
2016년 9월 30일
How is the region specified? Are you looking for a window with a specific name? Is the window created at a specific position on the screen? We cannot guess this detail and Matlab cannot also.
Which operating system are you working with?
Why don't you download the image directly using webread? Is the indirection over the browser useful?
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Language Support에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!