Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

A problem with 3d visualization on MATLAB

Status
Not open for further replies.

Luckybuilding

Member level 1
Member level 1
Joined
Oct 8, 2005
Messages
40
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
banaie.persiangig.com
Activity points
1,615
Hi,
I wanna create a 3d surface for my data representing an object.

I have obtained the data for borders of each slice.

However, I can't create any surface!


Used code is:


Code:
for a=1:length(D(1,1,:))
    X=D(:,:,a);
    BW = im2bw(X,mp,0.75);
    CC = bwconncomp(BW);
    for b=1:CC.NumObjects
        clear TMP;
        TMP=cell2mat(CC.PixelIdxList(b));
        if isempty(find(TMP==fix(p_f)))
            BW(CC.PixelIdxList{b}) = 0;
        end
    end
    O(:,:,a)=imfill(BW,'holes');
end
figure;
phandles = contourslice(O,[],[],[20:57],1);
view(3); axis tight
set(phandles,'LineWidth',2)

Os = smooth3(O);
hiso = patch(isosurface(Os,1),...
    'FaceColor',[1,.75,.65],...
    'EdgeColor','none');


The output image is shown below:

1.jpg
2.jpg


How can I create the surface out of these borders?


Thanks
 

I believe you need a more sophisticated rendering engine. It will connect neighboring data points to create a surface.

It will have features such as shading, hidden surface hiding, etc.
 

I believe you need a more sophisticated rendering engine. It will connect neighboring data points to create a surface.

It will have features such as shading, hidden surface hiding, etc.


Thanks for your reply.
However, can you be specific and suggest an engine for this?
 

If MATLAB has a 3D rendering module available somewhere, then you're all set.

Otherwise you'll need to use a different programming package.

List of various 3D software rendering engines:

**broken link removed**

Also look into modules such as OpenGL, TBGL, and DirectX. These go with certain programming languages.

Or for a simple surface drawing method...
Draw vertical lines between a data point on one level, to a related data point on another level. Do this several times and it won't be too hard to visualize a solid object.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top