필터 지우기
필터 지우기

Wanted to know about Morphological Profiles for different scale values.

조회 수: 2 (최근 30일)
Pranav
Pranav 2023년 7월 10일
댓글: Pranav 2023년 7월 10일
I am currenently working on morphological Profiles for multiple scale values. I have written the code for morphological Profiles but not able to convert it for multiple scales. Please Help. Thanks in advance
% Perform Morphological closing operation
closed_image = imclose(hyperimage,s) ; % here s is the structuring element
% Perform Morphological opening operation
opened_image = imopen(hyperimage,s) ;
% calculate morphological Profile
morpho_P = closed_image - opened_image

채택된 답변

Naman
Naman 2023년 7월 10일
Hi Pranav,
There are some changes required in your code to compute Morphological Profiles Feature Extraction for Multiple scale values.
Below is the updated code :
% Define scales for multiscale morphological profile(MMP) computation
scales = [1, 2, 3];
% Initialize cell array
morpho_P = cell(1, numel(scales));
% Compute MMP for each scale
for i = 1:numel(scales)
% Perform Morphological closing operation
closed_image = imclose(hyperimage,s) ; % here s is the structuring element
% Perform Morphological opening operation
opened_image = imopen(hyperimage,s) ;
% Calculate Morphological Profile
morpho_P{i} = closed_image - opended_image;
% Downsample the hyperspectral image for the next scale
hyperimage = imresize(hyperimage, 0.5);
end
Hope it Helps !

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by