ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Drop Out Ink
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Harald

Germany
8 Posts

Posted - Dec 12 2015 :  04:47:37  Show Profile  Reply
Hello. I have to scan and detect medical forms.
The drop out color "red" must be removed before OCR execution.
I testet RemoveChromaKey and CastColorRange, but still not get a reliable result.
Does anyone have tips? What is best practice?
Thanks, Harald

Example scan: https://www.officemanager.de/tmp/foren/hmv13.jpg

w2m

USA
1990 Posts

Posted - Dec 12 2015 :  16:34:15  Show Profile  Reply
I inspected your image with high zoom and looked at the color values of the "red pixels". What I found was is that the red colors compose at least 4-5 shades of red. In my opinion, all of the colors are not pure red (clRed), so when you try to eliminate the red it is quite difficult to do with ImageEn by any means. This becomes even more problematic with scanners that produce even more red pixel values.

You can not use CastColorRange(clRed, clRed) to achieve this because you have to set all the shades red color from min to max and you are not including all the possible shades of red in the min and max value. If you can figure out the minimum red and maximum red pixel values CastColorRange will indeed function as you expect. The hard part is finding out the minimum and maximum values for all the red colors in your image so that CastColorRange produces the desired result.

The alternative is to edit the forms lines so that all the lines contain only one value... clRed... then CastColorRange(clRed, clRed) will function to remove all the red from the image.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

xequte

38947 Posts

Posted - Dec 15 2015 :  21:59:10  Show Profile  Reply
Hi Harald

Did you just try running through the scanlines and obliterating any pixels where R > 128 and R > B and R > G (with some further tweaking)?


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: