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
 Shrinking a selection
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

spetric

Croatia
308 Posts

Posted - Jan 26 2016 :  16:50:35  Show Profile  Reply
Hi,

Is it possible to shrink a selection (lasso) by some amount of pixels?

xequte

38947 Posts

Posted - Jan 28 2016 :  18:19:24  Show Profile  Reply
Hi

There is not a built in method to do this (probably should be), but you should be able to do it by iterating through all the TImageEnView.PolySelPoints. The specific algorithm would be a matter of taste, but you could try decreasing X if X < selection horz center, and increasing if X > selection horz center, with the same in the Y dimension. That should give an agreeable result.

http://www.imageen.com/help/TImageEnView.PolySelPoints.html

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

spetric

Croatia
308 Posts

Posted - Jan 29 2016 :  04:42:36  Show Profile  Reply
Thanks Nigel,

That will do the job.
Go to Top of Page

rmklever

Norway
52 Posts

Posted - Jan 29 2016 :  14:14:06  Show Profile  Reply
Hi,

Maybe you could use a thinning procedure on the selection mask bitmap. Since Imageen has Canny Edge detection it shold also have a thinning procedure built in.

Just a thought


Roy M Klever
Klever on Delphi - www.rmklever.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: