How to get the positions and put a marker (rectangle or oval) on the image?
Afficher commentaires plus anciens
How to get the positions of only white pixel values and put a marker (rectangle or oval) in the images attached. When searched I found this link https://in.mathworks.com/matlabcentral/answers/110230-drawing-a-rectangle-on-top-of-an-image. But the position I have to get automatically. Can you help me.?
Reference images have attached. The seconf image I got using edge operator.
I = imread('im.jpg');
E1 = edge(I,'Sobel');
imshowpair(I,E1,'montage')
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 11 Juin 2019
0 votes
Threshold, to find the background.
Call bwareafilt() to get the second biggest blob.
Mask everything else to zero, then threshold again to find the characters, and finally call regionprops() and ask for the Centroids. Attach your attempt at code if you can't get it done.
Catégories
En savoir plus sur Image Processing Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
