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 :)
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!