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!