LEADTOOLS Support
Imaging
Imaging SDK Questions
HOW TO: Use RasterImage.GetRegionClipSegments
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, December 14, 2009 10:39:53 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
LEADTOOLS images only define a single region. However, these regions can be a complex combination of multiple logical regions due to our combine modes. For example, you create one rectangular region with the Set mode and then another region with the Or mode. The image may appear to have two distinct regions when in fact there is only one. Or it may be one region with no easily discernible structure. In cases like this, you may need to get very detailed information that separates the logical regions or gives you the coordinates of the complex region.
You can do this with the RasterImage.GetRegionClipSegments function. Basically, you can parse the image row by row and get segments of pixels that are either in or outside of the region. I have attached a simple C# 2005 example that uses LEADTOOLS 16.5 that fills the segments within the region with black and segments outside of the region with red to demonstrate how the segments work.
LEADTOOLS Support
Imaging
Imaging SDK Questions
HOW TO: Use RasterImage.GetRegionClipSegments
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.