Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, February 16, 2009 4:34:00 AM(UTC)

sviti  
sviti

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
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, February 16, 2009 6:12:32 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 367

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.
LEAD Logo
 
#3 Posted : Monday, February 16, 2009 10:57:54 PM(UTC)

sviti  
sviti

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)

Walter  
Walter

Groups: Tech Support
Posts: 367

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.
LEAD Logo
 
#5 Posted : Tuesday, February 17, 2009 9:11:55 PM(UTC)

sviti  
sviti

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)

Walter  
Walter

Groups: Tech Support
Posts: 367

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.
LEAD Logo
 
#7 Posted : Thursday, February 19, 2009 6:19:03 AM(UTC)

sviti  
sviti

Groups: Registered
Posts: 6


Thanks for the help!
 
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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.156 seconds.