how to extract morphological features from a image

Illustration
Elysi Cochin - 2022-02-15T10:30:44+00:00
Question: how to extract morphological features from a image

How to extract "morphological features", based on the following information.   Apply contextual filters based on mathematical morphology to image, in particular, four very common morphological filters are considered:   opening (O), closing (C), opening by reconstruction (OR), and closing by reconstruction (CR).   For each of these filters, we used a structuring element (SE) whose dimensions increased from 9 to 25 pixels with steps of 2 pixels, resulting in nine morphological features.   The process of reconstruction for OR and CR operators is performed using a small (3-pixel diameter) SE. The entire process of morphological filtering increases the dimensionality of the datasets from four to 40 features.   Please can someone help me to do this....   i didnt understand how to do it.... should i do all the morphological operations to one image?? so totally how many features will i get? i am confused... please can someone tell me how to do it?  

Expert Answer

Profile picture of Prashant Kumar Prashant Kumar answered . 2025-11-20

Read in a grayscale image, for example one of the MATLAB demo images like 'cameraman.tif'. Then set up a window with true() or strel(), then call the morphological function they told you to, for example:

 

 

grayImage = imread('cameraman.tif');
subplot(1, 2, 1);
imshow(grayImage, []);
title('Original Image', 'FontSize', 30);
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Now do an opening.
openedImage = imopen(grayImage, true(11));
subplot(1, 2, 2);
imshow(openedImage, []);
title('Opened Image', 'FontSize', 30);

morphological features


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!