1 Attachment(s)
Auto Crop Picture From Scanned Document?
Greetings,
hope all member of this forum are fine..
i am working on a project where i have to scan a lot of pages (application form) where each form is attached (pasted with glue) with application picture. So, i need to get the picture (crop only the picture) from that scanned page/document.
I have attached a sample..
i can set the exact location on the document/image but few issues with that:
1. attached/pasted image is not on same size..
2. it may be not be pasted on same place on each form
3. it may be rotated slightly..
so, i am looking for some automated process that can take out the picture correctly regardless the above issues. i assume face detection may be the tool, but i am not sure about that..
so, it would be great if any one can help me with that?
thanks in advance
any help will be highly appreciated...
take care (every one)
may Allah bless all of you
best regards
Re: Auto Crop Picture From Scanned Document?
Short of having someone do the cropping manually, the only way I can think of is to scan the item the following ways:
TOP->BOTTOM
LEFT->RIGHT
RIGHT->LEFT
BOTTOM->TOP
I would scan each way above until you find a series of pixels that are non-white for X number of pixels in a specific direction. Then you could pull back the initial location you found that pixel at. That sounds like quite a task, I have no experience with that, so I can only give you a general idea of how I would start researching..
Re: Auto Crop Picture From Scanned Document?
Re: Auto Crop Picture From Scanned Document?
Did you read my post or what? I do not think what you are asking for is a simple solution. This will require plenty of research.
Re: Auto Crop Picture From Scanned Document?
You are into image manipulation, and effectively character recognition. Not a vb-specific application or skill.
As Jay says, this is quite a task. There will be a lot of math and matrix manipulation involved, I expect. Nothing that VB cannot handle, but it's the sort of manipulation which is generally done by those with the skills in other languages (maybe C, C++ or C#). Search for image manipulation techniques, rather than anything VB specific.
Re: Auto Crop Picture From Scanned Document?
Quote:
Originally Posted by
SJWhiteley
You are into image manipulation, and effectively character recognition. Not a vb-specific application or skill.
As Jay says, this is quite a task. There will be a lot of math and matrix manipulation involved, I expect. Nothing that VB cannot handle, but it's the sort of manipulation which is generally done by those with the skills in other languages (maybe C, C++ or C#). Search for image manipulation techniques, rather than anything VB specific.
thanks for your reply sir..
yes i think/know that is quite a task but i think that's is already done earlier by some one else (open source) like openCV or face detection technique, so, i think all i need to know the source/wrapper that i can use? right?
thanks in advance...
best regards
Re: Auto Crop Picture From Scanned Document?
Re: Auto Crop Picture From Scanned Document?
What more do you need? You need to either need to find something that has been done by some else as you mention (i.e. something open source) or you need to code it yourself like jayinthe813 and SJWhiteley are saying. If neither of those appeal to you, then your only other choices are to pay someone to do it, or to not do it.
Kevin