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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Drop Out Ink

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Harald Posted - Dec 12 2015 : 04:47:37
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
2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 15 2015 : 21:59:10
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
w2m Posted - Dec 12 2015 : 16:34:15
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