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
 Threshold range
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

zhengyuanyi27

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.
Thanks!!

xequte

6040 Posts

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

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 ));

https://www.imageen.com/help/TImageEnProc.CastColorRange.html

Otherwise just work directly with the scanlines:

https://www.imageen.com/help/TIEBitmap.ScanLine.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

zhengyuanyi27

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: