Azzera filtri
Azzera filtri

Wanted to know about Morphological Profiles for different scale values.

2 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Naman
Naman il 10 Lug 2023
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 !

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by