How can I mark several features in an image with 'insertMarker' and save the image at full resolution?

1 visualizzazione (ultimi 30 giorni)
I am trying to identify geese in a 8688x5792-pixel image and mark the identified features (geese) with a circle then save the image with the marks at full resolution for editing. Only the last feature in my processing loop is marked and shown the saved image.
dotpic = myImage; for BLOBS = 1:10 if BLOBS == 2 dotpic = 'G:\Iz Pics\Survey 2 Canon\dotpic.jpg'; end pos = [centroids(BLOBS,1),centroids(BLOBS,2)]%position of identified "geese" in photo dotpic = insertMarker(myImage,pos,'o','color','red','size',30); imwrite(dotpic,'G:\Iz Pics\Survey 2 Canon\dotpic.jpg') end imshow(dotpic);

Risposta accettata

Bernhard Suhm
Bernhard Suhm il 11 Mag 2018
That looks like you are on the right track, and should work if pos corresponds to a vector of (x y) positions for the markers. We don't know what exactly centroids contains - if it was a vector of (x y) coordinates of centroids from a clustering, it should work. If you still need more help, follow the guidelines described in How to ask a MATLAB question

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by