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
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Threshold range
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  


53 Posts

Posted - May 01 2021 :  01:58:32  Show Profile  Reply
Could somebody tell me whether Is it possible to set a threshold range, such as 100-200, all the pixels <100 and the pixels >200 will be black.
I tried ImageEnVect1.Proc.ConvertToBWThreshold(100), while it can only set the pixels <100 be black.


6040 Posts

Posted - May 03 2021 :  21:30:38  Show Profile  Reply

If this is a grayscale image, you should be able to do it using

CastColorRange( CreateRGB( 0,0,0 ),
CreateRGB( 100, 100, 100 ),
CreateRGB( 0,0,0 ));
CastColorRange( CreateRGB( 200, 200, 200 ),
CreateRGB( 255, 255, 255),
CreateRGB( 0,0,0 ));

Otherwise just work directly with the scanlines:

Xequte Software
Go to Top of Page


53 Posts

Posted - May 05 2021 :  06:13:22  Show Profile  Reply
Hi Nigel, Thanks!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: