I want to use detectSURFFeatures function and get the result in the form of coordinates x,y ?
조회 수: 1 (최근 30일)
이전 댓글 표시
How can I get the result of detectSURFFeatures in the form of (x1,Y1, x2,y2,.......),ie in coordinates form. can any one help me thank you in advance
댓글 수: 0
채택된 답변
Walter Roberson
2017년 5월 7일
points = detectSURFFeatures(I);
xxyy = points.Location;
xyxy = reshape( xxyy.', 1, []);
That is, xxyy is an M x 2 array in which the x are the first column and the y are the second column. But you want a row vector in which the x and y alternate, so it is necessary to transform the 2D array to get the vector you want. (Personally I think the 2D array is a lot easier to work with...)
댓글 수: 5
Walter Roberson
2017년 5월 9일
Try
for j = 1 : Nfeat
pts_3d(j, :) = I(xxyy(j, 2), xxyy(j, 1), :);
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!