Wanted to know about Morphological Profiles for different scale values.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Akzeptierte Antwort
Naman
am 10 Jul. 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 !
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!