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
 how to remove lines
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

rswyman@docuxplorer.com

USA
156 Posts

Posted - Dec 03 2017 :  21:50:38  Show Profile  Reply
Is there a way to remove vertical and horizontal line from a black and white image?

Thanks
Ron

xequte

39144 Posts

Posted - Dec 04 2017 :  04:33:08  Show Profile  Reply
Hi Ron

Automatically?

Can you attach an example of what you mean?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

rswyman@docuxplorer.com

USA
156 Posts

Posted - Dec 05 2017 :  19:05:58  Show Profile  Reply
Attached is a sample invoice, usually their B&W but this was the only example I could fine. When performing OCR the horizontal and vertical line interfere with the process. Some more advanced Capture system have a process to improve the OCR process like despeckle and line removal.

Any sugestions?

attach/rswyman%40docuxplorer.com/20171251917_10002889.TIF

Thanks
Ron
Go to Top of Page

xequte

39144 Posts

Posted - Dec 06 2017 :  05:09:00  Show Profile  Reply
Hi Ron

No, I'm afraid I don't have any suggestions to improve that.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Dec 06 2017 :  15:12:05  Show Profile  Reply
Hi Ron,

IMHO, the best way to do this is to perform
Hough transform to detect the lines on gray-scaled image and then
remove those lines from image (either by drawing white lines, or by removing respective rows/columns from bitmap).

Here are some links that may help you:
https://sourceforge.net/projects/houghtransforma/
http://www.efg2.com/Lab/Library/UseNet/1999/1119a.txt

HTH,
Siniša

Go to Top of Page

xequte

39144 Posts

Posted - Dec 06 2017 :  22:57:50  Show Profile  Reply
Thanks for the suggestion, Sinisa,

Ron, you could try the Hough Liones detection in IEVision:

https://www.imageen.com/help/TIEVisionImage.houghLines.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

rswyman@docuxplorer.com

USA
156 Posts

Posted - Dec 09 2017 :  10:32:56  Show Profile  Reply
That's guys I'll give it a try.

thank you both.
Go to Top of Page

rswyman@docuxplorer.com

USA
156 Posts

Posted - Dec 09 2017 :  20:23:32  Show Profile  Reply
Hi Nigel,

The Hough Liones detection is just what I was looking for and after adjusting the settings I was able to get the effect I was looking for but...

The lines it creates lay just to the next the images lines. How can I adjust it so they lay on top?

Thx
Ron
Go to Top of Page

w2m

USA
1990 Posts

Posted - Dec 10 2017 :  08:04:07  Show Profile  Reply
I do not know for sure, but maybe you need to use XScr2Bmp or ConvXScr2Bmp to adjust the line position:
ImageEnView1.Layers[ImageEnView1.LayersCurrent].ConvXScr2Bmp(X);
ImageEnView.Layers[ImageEnView1.LayersCurrent].ConvYScr2Bmp(Y);
ImageEnView1.XScr2Bmp(X);
ImageEnView1.YScr2Bmp(Y);

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