Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when using UIImagePickerControllerOriginalImage (large images #47

Closed
reivax opened this issue Aug 30, 2014 · 5 comments
Closed

Issue when using UIImagePickerControllerOriginalImage (large images #47

reivax opened this issue Aug 30, 2014 · 5 comments
Labels

Comments

@reivax
Copy link

reivax commented Aug 30, 2014

It seems the lib is having issues with large images. If I use the original size pict (2448x3244) the lib just returns garbage. Resizing the image to something more human (like <1024) seems to return good results. Maybe this is by design but I could not find any explications anywhere so I'm just reporting the issue in case someone else wonders why getting the UIImage using UIImagePickerControllerOriginalImage return garbage..) thanks!

@ws233
Copy link
Collaborator

ws233 commented Sep 1, 2014

I've tested even bigger images, panorama images, and everything worked well.
Do you do any image preprocessing before recognition?
It seems like there is just a lot of noise in the bigger image, which is blurred during scaling.
You could simply check it, scaling down an image and scaling up it back before recognition.

@reivax
Copy link
Author

reivax commented Sep 1, 2014

Thanks for the reply Cyril - The only preprocessing I was doing was just a black and white conversion. But you’re right, the photo must have been too noisy, scaling down and back to the original size seems to do the trick, I get a better recognition rate as well on strings that have fractions (such as 1/4). anyway let me know if there is (or if you have) a special list of special image transforms I should apply to enhance the recognition. thanks again for the help!
On Sep 1, 2014, at 6:43 AM, Cyril notifications@github.com wrote:

I've tested even bigger images, panorama images, and everything worked well.
Do you do any image preprocessing before recognition?
It seems like there is just a lot of noise in the bigger image, which is blurred during scaling.
You could simply check it, scaling down an image and scaling up it back before recognition.


Reply to this email directly or view it on GitHub.

@ws233
Copy link
Collaborator

ws233 commented Sep 3, 2014

Take a look here: #42.
In my case, I try to filter images to remove as much noise as possible. Simple combination of Adaptive Threshold Filter and Median filter removes the small noise and makes an images in binary format (this step is also named as binarization).
The second step, I would like to implement, is to find a text areas in the images to remove shadows and other quiete big noise around the text, which could produce some comma and dot output. It could be possible (perhaps, at least I've read some papers about it) using combinations of Opening and Closening morphological operations. But so far I didn't have a luck to implement the second phase, which could operation on any image.

@reivax
Copy link
Author

reivax commented Sep 3, 2014

ah! excellent! Doing an adaptive Threshold Filter did the trick. Lower res photos have issues (I have a couple that are 600px wide) but changing the contrast, some adaptive threasholding and most of the camera taken photos get great recognition rate now. Thanks for the help!
On Sep 3, 2014, at 5:14 AM, Cyril notifications@github.com wrote:

Take a look here: #42.
In my case, I try to filter images to remove as much noise as possible. Simple combination of Adaptive Threshold Filter and Median filter removes the small noise and makes an images in binary format (this step is also named as binarization).
The second step, I would like to implement, is to find a text areas in the images to remove shadows and other quiete big noise around the text, which could produce some comma and dot output. It could be possible (perhaps, at least I've read some papers about it) using combinations of Opening and Closening morphological operations. But so far I didn't have a luck to implement the second phase, which could operation on any image.


Reply to this email directly or view it on GitHub.

@ws233
Copy link
Collaborator

ws233 commented Oct 1, 2014

I guess, it could be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants