How can I mark several features in an image with 'insertMarker' and save the image at full resolution?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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);
0 Kommentare
Akzeptierte Antwort
Bernhard Suhm
am 11 Mai 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
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!