how can i find the ratio of area of white color and black color area in binary image or the output images of edge detection filters
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have done edge detection on an image and output image we get in binary or b&w image. I want to calculate the ratio of area covered by white color to black color. I also want to know the area of white color( I have calculated it but the number i get is like '1.4187e+04' , I need the unit to define it).
0 comentarios
Respuestas (1)
Santhana Raj
el 31 de Mzo. de 2017
When you get a binary image, You just add all the pixels in the image. Then you get the no of pixels with white. Subtract it with the total no of pixels (length x breadth), you get the no of black. You can take percentage, ratio or whatever you want now.
As for the area of the white pixels of the image, considering you have just counted the number of pixels, the unit will be (1)pixels (for a simple analysis) (2) if you want in SI units, then you have to multiply with the image sensor resolution which will give you the area in square meter.
Hope it helps.
0 comentarios
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!