How to find region of interest using region props for multiple skin dermoscopic images
2 views (last 30 days)
Show older comments
I need to use region props to find region of interest in multiple skin lesion images. I am using Otsus segmentation method. Kindly help me use region props to find region of interest for multiple images. The lesion can be anywhere in the image thus the code should be able to identify which region has the lesion
.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/951584/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/951584/image.jpeg)
0 Comments
Answers (1)
Image Analyst
on 3 Apr 2022
A full demo is given here in my Image Segmentation Tutorial:
Just convert your image to gray scale and it should work. In short
% Make sure the image is gray scale.
if ndims(rgbImage) == 3
% Is color. Need to convert it to gray scale.
grayImage = rgb2gray(rgbImage);
else
grayImage = rgbImage; % Was not really RGB after all.
end
% Binarize using Otsu's method to find the dark blob.
mask = imbinarize(grayImage);
% Take largest blob only.
mask = bwareafilt(mask, 1);
% Make measurements.
props = regionprops(mask, grayImage, 'Area', 'Perimeter', 'MeanIntensity'); % List whatever measurements you want.
area = props.Area
perimeter = props.Perimeter
meanGrayLevel = props.MeanIntensity
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!