How can I get a XY Coordinate, XZ coordinate from images and combine these into one matrix?

2 ビュー (過去 30 日間)
HOSUNG LEE
HOSUNG LEE 2019 年 4 月 18 日
編集済み: Andreas Bernatzky 2019 年 4 月 18 日
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)

回答 (1 件)

Andreas Bernatzky
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.

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by