Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Composite object builder from locations
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi.
I have an image in which I have detected the spots and have the coordinates, some of them are listed below.
Coord =
6 5
7 8
7 23
9 10
10 13
10 32
10 36
13 5
I want to take each location and then add the pixels representing the object and just add them all together. Then I can divide by how many they are to get a sort of average single object representation of all the objects. Im looking to just take a 4x4 square around each location.
Im not sure where to start - is there a way to do this without using a for loop?
This was my approach:
cmpT=false(5)
cx=Coords(:,1)
cy=Coords(:,2)
for i=1:length(cx)
xx=cx(i)
yy=cy(i)
cmp=Raw(yy-2:yy+2,xx-2:xx+2)
cmpT=cmpT+cmp;
end
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!