i have one doubt please clarify me if we do thresholding for segmenting an area in image then will total counts reduce or decrease
Mostrar comentarios más antiguos
this is the image where i need to take individual frames and apply segmentation to every frame will total counts reduce

Respuestas (1)
Image Analyst
el 26 de Dic. de 2016
Just do simple indexing to extract them.
[rows, columns, numberOfColorChannels] = size(grayImage);
% I'm going to assume numberOfColorChannels is 1 and your images are gray scale not color.
tileRows = floor(rows/8);
tileColumns = floor(columns/9);
r = 1 : tileRows : rows
c = 1 : tileColumns : columns
for row = 1 : length(r)-1
for col = 1 : length(c)-1
row1 = r(row);
row2 = r(row+1);
col1 = c(col);
col2 = c(col+1);
thisImage = grayImage(row1:row2, col1:col2);
% Now use it, save it, display it or whatever you want.
end
end
7 comentarios
andhavarapu lokesh
el 27 de Dic. de 2016
Image Analyst
el 27 de Dic. de 2016
OK, now you do.
Why don't you just try it and see? If each of those images is thresholded at a different, or even the same, threshold there is no telling the number of blobs. As you apply thresholds to different images you can get different number of blobs in each image, and you can't say that that number will monotonically increase or decrease as you go from one image to the next.
andhavarapu lokesh
el 27 de Dic. de 2016
andhavarapu lokesh
el 27 de Dic. de 2016
Image Analyst
el 27 de Dic. de 2016
Try this:
binaryImage = grayImage > someThresholdValue;
andhavarapu lokesh
el 28 de Dic. de 2016
Image Analyst
el 28 de Dic. de 2016
I'm puzzled as to why my line of code above giving you the binary image is not what you want. If you want to modify that image, go ahead. I have no idea how you want to modify it.
If you want to use the final binary image in another program, then either write it out to a file with save() or imwrite() or pass it in via the input argument list of the other program.
Try looking at these:
Categorías
Más información sobre Images en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!