This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, February 16, 2009 4:34:00 AM(UTC)
Groups: Registered
Posts: 6
Hello,
I am doing a C#.net project. Now trying to get the pixels of the same color, I want to know which pixeles are. Is there any function for it?
I am using the 16V of Leadtools
Thank you
#2
Posted
:
Monday, February 16, 2009 6:12:32 AM(UTC)
Groups: Tech Support
Posts: 366
Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Try RasterImage.GetPixelColor(int row, int col); It will return a RasterColor value.
For more information, please check out the help file regarding this method.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Monday, February 16, 2009 10:57:54 PM(UTC)
Groups: Registered
Posts: 6
Hello,
Is there any method to know which pixels are in a range of color apart from scanning all the pixels of the image.
If I use the "AddColorRgbRangeToRegion", how can I know which pixels are in that region?
Thank you
#4
Posted
:
Tuesday, February 17, 2009 8:31:42 AM(UTC)
Groups: Tech Support
Posts: 366
Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Hello,
Could you give me more detailed information on exactly what you're looking to do?
AddColorRgbRangeToRegion is going to create or modify a region within the bitmap based upon the color range given. Any colors in the range will be added to or subtracted from the region (depending upon the RasterRegionCombineMode).
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
#5
Posted
:
Tuesday, February 17, 2009 9:11:55 PM(UTC)
Groups: Registered
Posts: 6
Thank you for the answer,
I want to know which pixels are in the region. Exactly the position of all the pixels that contain that region, in short, know the (x,y) of all the pixels in the region.
Than you
#6
Posted
:
Thursday, February 19, 2009 5:36:09 AM(UTC)
Groups: Tech Support
Posts: 366
Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Hello,
To figure out which pixels are in the region, you'll need to loop through the image and test to see if the pixel is in the region. You can do this by using the RegionContains method.
Parsing the whole image is not always necessary though. I would suggest using a method like GetRegionBounds to narrow down the area you need to loop through. Hopefully the color being looked for will not be located on all of the outer bounds of the image, thus producing a smaller search area.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
#7
Posted
:
Thursday, February 19, 2009 6:19:03 AM(UTC)
Groups: Registered
Posts: 6
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.