Wanted to know about Morphological Profiles for different scale values.

4 次查看(过去 30 天)
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