LEADTOOLS Support
Imaging
Imaging SDK Questions
Convert a Color image to black and white image, and retain the red color
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, March 28, 2012 7:43:22 AM(UTC)
Groups: Registered
Posts: 6
I want to convert a Color image to black /white,and keep the red color,is there a function to do this? thanks
my leadtools is V16.5
#2
Posted
:
Thursday, March 29, 2012 7:10:22 AM(UTC)
Groups: Registered
Posts: 256
Hello,
This can be done by doing the following:
1) Define a region for all non-red pixels in the image.
If you're using .NET, this can be done with the AddColorToRegion(), AddColorRgbRangeToRegion() or AddColorHsvRangeToRegion() functions, with the RasterRegionCombineMode.SetNot flag.
2) Apply the Auto Binarize function to the image, which will only affect the region, making all non-red pixels either black or white.
LEADTOOLS Support
Imaging
Imaging SDK Questions
Convert a Color image to black and white image, and retain the red color
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.