![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/214709/image.jpeg)
How can I get a XY Coordinate, XZ coordinate from images and combine these into one matrix?
조회 수: 2 (최근 30일)
이전 댓글 표시
I'm trying to make a point cloud image of a fruit.
First, using a picture taken at the front of a fruit I want to get a X,Y coordinates
and from a picture taken at the top of a fruit I want to get a X,Z coordinates.
Then, I would like to combine these two into one matrix and use it for making point cloud image.
Consider that a fruit was taken at a white canvas and it look almost round when it is seen at the top, but somewhat long at the front.
So, I don't know how to get coordinates by a image and how to make a 3 row matrix from these coordinates.
The codes I know are only these codes.
imread('fruit.jpg');
load('xyzPoints');
ptCloud = pointCloud(xyzPoints);
pcshow(ptCloud)
댓글 수: 0
답변 (1개)
Andreas Bernatzky
2019년 4월 18일
편집: Andreas Bernatzky
2019년 4월 18일
Hey Lee,
I am not really familiar with image processing, but it sounds quiet simple for me.
My example:
just look at google for it :)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/214709/image.jpeg)
Thats my suggestion for a simple approach:
img=imread('Apfel.jpg');
colorMap = squeeze( img(:,:,1) ); %1= red colorcode, 2= green color code, 3= blue color code
threshold = 240;%adjust your threshold
XZPlane= find(colormap<threshold); % All relevant points
Do this for your 3 planes and fit them together.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!