필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Composite object builder from locations

조회 수: 1 (최근 30일)
Jason
Jason 2016년 12월 12일
마감: MATLAB Answer Bot 2021년 8월 20일
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개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by