필터 지우기
필터 지우기

Coordinates pixel (cpselect)

조회 수: 2 (최근 30일)
Edward P
Edward P 2011년 10월 29일
댓글: Image Analyst 2017년 2월 11일
Hello,
Im using this cpselect function to select control points on two images. I can get those coordinates of each control point,which is great. The problem is that those coordinates aren't pixel coordinates. how can i get my pixel coordinates from an image using an interactive method?

채택된 답변

Amith Kamath
Amith Kamath 2011년 10월 30일
I would recommend using the function ginput instead, for example:
I = imread('rice.png');
imshow(I) %This is necessary for the ginput function expects a figure window to be open.
[x y] = ginput(n) %Where n is the number of points you need to interactively select.
and the x and y coordinates (of the pixel selected) will be stored in the vectors x and y.
Hope this helps!
  댓글 수: 3
David Pereira
David Pereira 2017년 2월 11일
Hello. In my case, I have an USB monochromo camera(only detects white and black) connected to the computer. The video will show a circle and 2 points. One does not move, and the other one does. I would like to get the coordinates from each point and then compare it. This information would be later processed, so I want to save the coordinates in vectores. Which functions would you recommend? Thank you
Image Analyst
Image Analyst 2017년 2월 11일
David, start a new question and attach your image with the circle and fixed point and other, second point, and the other image with the other, second point at a different location.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by