フィルターのクリア

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