Hey there
Is there a way to count the number of black pixels in an area? For example: In a 400 X 300 B/W image, I would like to count the number of black pixels in an area that's 15 by 15 pixels and in the bottom right corner. Is this possible? I have been looking in the Pixel Access methods but found nothing. I did try the GetPixelIntegerArray() or something like that but I can't figure out the values it puts in the array.
Method to analyze pixels
Re: Method to analyze pixels
Hi Ben,
You can easiliy do that using the CountColor method.
Just set the region of interest using the SetROI method, then call CountColor() method which will returns the number if pixel with the specified color.
See: https://www.gdpicture.com/guides/gdpicture/v7/html/con ... Color.html
Kind regards.
You can easiliy do that using the CountColor method.
Just set the region of interest using the SetROI method, then call CountColor() method which will returns the number if pixel with the specified color.
See: https://www.gdpicture.com/guides/gdpicture/v7/html/con ... Color.html
Kind regards.
Re: Method to analyze pixels
Oke, thanks. Totally overlooked that method.
Who is online
Users browsing this forum: No registered users and 2 guests