create a 3D view from a 2D section
1 view (last 30 days)
Show older comments
hello everybody. I have 2D image are the measure of diameter of a pipe, this measure is carried out are of a variable distance, how I can build a 3D view from these 2D sections respecting the height, and especially the rotation thereof following the xy plane? I add my code thank you all
%
clear all
close all
M=importdata('Scanner.txt');
[R,C] = find(M>0);
Ma=max(R);
for i=1:Ma
V=find(R==i);
x=(C(V))';
y=M(i,x);
%élimination des points abérants
MEDIAN=mean(y);
I=find(y>MEDIAN-10 & y<MEDIAN+10);
xcalcul=x(I);ycalcul=y(I);
[Xcalcul,Ycalcul] = pol2cart(xcalcul/1800*pi,ycalcul);
[X,Y] = pol2cart(x/1800*pi,y);
MAT(i) = fit_ellipse( Xcalcul,Ycalcul,gca);
end
and i use fit_ellipse fonction to create my 2D image
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!