# How to convert the points with respect to co-ordinate system?

조회 수: 4(최근 30일)
Swapnil Rane 2018년 3월 30일
댓글: Walter Roberson 2018년 3월 30일
I have huge three 90*85 matrices with x,y,z values calculated from the left upper corner of the matrix. I would like to change the points with respect to new coordinate system.
How can I convert the points? Do you need more explanation?
##### 댓글 수: 2표시 이전 댓글 수: 1숨기기 이전 댓글 수: 1
Swapnil Rane 2018년 3월 30일
I have imported a image to find the pixel values. As per my knowledge the location of (0,0) of the matrix in the left upper corner. But the local coordinate system is at the centre of the body. How can I create a transformation matrix? to convert all the points according to the new coordinate system

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

### 채택된 답변

Walter Roberson 2018년 3월 30일
Usually you would create a transformation matrix, either 3 x 3 or 4 x 4, and you would take the three matrices and reshape them and concatenate them to create columns of a vector, and then use matrix multiplication by the transformation matrix. Take the N x 3 or N x 4 matrix that results and reshape the columns back to the original size of your input matrices.
##### 댓글 수: 4표시 이전 댓글 수: 3숨기기 이전 댓글 수: 3
Walter Roberson 2018년 3월 30일
Just subtract off the location of the center from the coordinates.
x_center = mean(x(:));
y_center = mean(y(:));
z_center = mean(z(:));
newx = x - x_center;
newy = y - y_center;
newz = z - z_center;

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

### 추가 답변(1개)

Abhishek Ballaney 2018년 3월 30일
https://in.mathworks.com/help/matlab/cartesian-coordinate-system-conversion.html
##### 댓글 수: 1표시 없음숨기기 없음
Swapnil Rane 2018년 3월 30일
I just want to transform the coordinate system and get the location of points according to new coordinate system

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

### 범주

Find more on Image Arithmetic in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by