How to get Object to Background pixel ratio OBR) of an image
Mostrar comentarios más antiguos
I am new in matlab,I am confused how to get value Object to background pixel ratio(OBR) of an image.This is my code.Please Help me.Thank you..
Image = imread('1.jpg');
BW = im2bw(Image);
[labeled,num] = bwlabel(BW,4);
nBlack = sum(BW(:));
nWhite = numel(BW) - nBlack;
OBR=num/nBlack;
Respuestas (0)
Categorías
Más información sobre Image Segmentation and Analysis en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!