How to find region of interest using region props for multiple skin dermoscopic images
조회 수: 4 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Image Analyst
2022년 4월 3일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!