How can I mark several features in an image with 'insertMarker' and save the image at full resolution?
조회 수: 3 (최근 30일)
이전 댓글 표시
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
채택된 답변
Bernhard Suhm
2018년 5월 11일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!