how to extract morphological features from a image

9 views (last 30 days)
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?

Accepted Answer

Image Analyst
Image Analyst on 8 Nov 2014
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);
  2 Comments
Image Analyst
Image Analyst on 16 Dec 2014
Jihang Wang's "Flag" moved here to be a comment:
not useful to pull out features
Image Analyst
Image Analyst on 16 Dec 2014
Jihang, I was showing an example of how to do morphological operations. To "pull out features" you'd need to know what features to pull out , and then use regionprops() to do so, like in my Image Segmentation Tutorial http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 There are hundreds of features you could measure so you have to know which ones you need. Some of them might need different preprocessing steps than others. You can't just make one generic algorithm that is suitable and appropriate for all possible features.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!