How to use OpenCV imopen in Matlab?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I see that the documentation for it is at: http://kyamagu.github.io/mexopencv/matlab/morphologyEx.html
However, it's not working for me. If I try any of the following:
im_open = cv.morphologyEx(im, open, [5 5]);
im_open = cv.morphologyEx(im, "open", [5 5]);
im_open = cv.morphologyEx(im, cv.Open, [5 5]);
im_open = cv.morphologyEx(im, cv.MORPH_OPEN, [5 5]);
im_open = cv.morphologyEx(im, MORPH_OPEN, [5 5]);
Then I get errors like `wrong number of arguments` or `undefined variable 'cv' or class 'cv.open'`
If I try
dst = open(im, [5 5]);
Then I get
wrong number of arguments
If I try
elem = cv.getStructuringElement(cv2.MORPH_RECT, (5,5))
then I get
error: invalid expression. When calling a function or indexing a variable, use parenthesis. Otherwise, check for mismatched delimiters
I just want to perform the equivalent of
im_open = imopen(im, strel('disk', 5));
But using OpenCV within Matlab. How can I do this?
0 commentaires
Réponses (1)
Constantino Carlos Reyes-Aldasoro
le 5 Août 2022
Why don't you use matlab's native imopen function?
https://uk.mathworks.com/help/images/ref/imopen.html
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!