필터 지우기
필터 지우기

How to convert pixel coordinate(returned back by imread function) to Cartesian x-coordinate and y-coordinate.

조회 수: 3 (최근 30일)
I am using matlab version 7.10.0.499 (R2010a). I am taking input as .jpg file to imread function, I am getting the pixel coordinates. I need a function which can convert pixel coordinate to Cartesian x-coordinate and y-coordinate. A=imread('file.jpg'); How to convert value present in A matrix into Cartesian x-coordinate and y-coordinate.
  댓글 수: 3
saurabh
saurabh 2015년 8월 20일
I am using MATLAB version 7.10.0.499 (R2010a).I have taken following x=1 : 1 : 10; y=2 : 2 : 20; plot(x,y); I got the Figure file. I save the figure file in fig1.fig. I need a method which will take fig1.fig as a input file and it will produce corresponding x-coordinate and y-coordinate of plotted figure in x and y vector as x =1 2 3 4 5 6 7 8 9 10 y = 2 4 6 8 10 12 14 16 18 20
dpb
dpb 2015년 8월 20일
That would be returning the 'xdata' and 'ydata' properties from the figure. See
doc get % and set and friends
doc axes % for axes properties

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

답변 (1개)

Image Analyst
Image Analyst 2015년 8월 19일
See my attached spatial calibration demo to convert pixels into real world distances.

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by