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
 Margin

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
izaque Posted - Jul 18 2012 : 05:13:18
Good morning!
Is there any way to detect where the characters start of a text in an image? The functionality of SkewDetection is to analyze and correct the angle. Would have similar functionality to get the margins before the text (Left, Right, Top, Bottom)?
2   L A T E S T    R E P L I E S    (Newest First)
izaque Posted - Jul 19 2012 : 14:01:49
Thank you very much!
It worked wonderfully!
fab Posted - Jul 18 2012 : 14:11:15
You should try AutoCrop method. It returns the text bounding rectangle (it doesn't crop the image if you set DoCrop optional parameter = false). Example:

var rect:TRect;
..
rect := ImageEnView.Proc.AutoCrop(10, clWhite, false);

Now you have top, left, right and bottom coordinates of what is not considered background.
Please take in mind the limitations of this method (ie noise could confuse the algorithm).
To remove isolated pixels you could try:

rect := ImageEnView.Proc.AutoCrop(10, clWhite, false);
ImageEnView1.Proc.RemoveIsolatedPixels(0, 4);