How to get Areas of Specified Objects in an Image?
Show older comments
I have been trying to take an image and divide it up into regions, and then calculate various properties of those regions. A sample image is linked: <http://tinypic.com/view.php?pic=esq2it&s=7>
I have been running the following code:
close all;
clear all;
RGB = imread('vir1036.tif');
threshold = graythresh(RGB);
BW = im2bw(RGB,threshold);
L = bwlabel(BW);
imshow(BW)
figure
imagesc(L)
I am new at MATLAB and still learning about all of these commands. As you can see, there is some noise, but bwlabel has identified most of the regions I was targeting (the regions in various colors of blue). I would like to be able to find the area of each of those regions separately. Is there a way to clean up this image so that it find all of the regions I was targeting, and do you have any suggestions for how to find the areas of each of those regions?
Thank you in advance for any help!
Accepted Answer
More Answers (2)
MUHAMMED EROL
on 4 Jan 2020
0 votes
MUHAMMED EROL
on 4 Jan 2020
0 votes
PERİMETER?
2 Comments
Image Analyst
on 4 Jan 2020
In short
props = regionprops(binaryImage, 'Perimeter');
allPerimeters = [props.Perimeter]
MUHAMMED EROL
on 4 Jan 2020
THANKS
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!