Grayscale erosion and Grayscale dilation simulink block
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I was trying to find the minimum and maximum of the 3 x 3 neighbourhood for the video signal. I have used grayscale erosion and grayscale dilation simulation block. For some of the instances the maximum values is found to be less than the minimum value.
It would be great if example for using these two blocks posted in mathwork community.
Can someone tell me how to overcome this situation?
Thanks in advance
0 commentaires
Réponses (1)
Akshat
le 30 Avr 2024
Hi Gayathri,
It would have been easier for me to help you out with this task if you would've provided a code you are using. But I will try my best to guide you through the process.
As you want to perform an erosion and dilation task, you need to first generate a "structuring element" using the "strel"/"offsetstrel" function. Post that, you can simply erode or dilate using the "imerode" or "imdilate" respectively. Following is the code you can use:
frame = rgb2gray(imread('example.jpg'));
se = strel('square', 3);
minFrame = imerode(frame, se);
maxFrame = imdilate(frame, se);
You need to make sure that the image is grayscale before you perform the erosion or dilation.
Now, to the second part of you question, examples for the same are here"
Feel free to follow up, in case you have any doubts!
0 commentaires
Voir également
Catégories
En savoir plus sur Computer Vision with Simulink dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!