Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: point clouds
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Navaneetha Kannan Viswanathan

Posts: 14
Registered: 1/19/11
point clouds
Posted: Mar 16, 2011 10:58 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi ,

This is my prog on isolating laser stripe from the set of images. My result for this script gives me the isolated laser stripe as an image. But, I want point cloud in 3D space.
Help me out.

source pics:

https://picasaweb.google.com/lh/sredir?uname=v.navaneethakannan&target=ALBUM&id=5579922441378566865&authkey=Gv1sRgCNCYsYik8c7obQ&feat=email

Script:


clear;
clc;
jpgFiles = dir('*.jpg');
for k = 1:length(jpgFiles)
filename = jpgFiles(k).name;
data1 = imread(filename);
%imshow(data1);
[p1,q1]=find(250<=data1(:,:,1));
[p2,q2]=find(250<=data1(:,:,2));
[p3,q3]=find(250<=data1(:,:,2));
r1=[p1 q1];
r2=[p2 q2];
r3=[p3 q3];
s1=intersect(r1,r2,'rows');
s2=intersect(s1,r3,'rows');
t1=setdiff(r1,s2,'rows');

b=zeros(size(data1));
u1=mean(t1,1);
u2=std(t1,1)*0.6;
ul=round(u1+u2);
ll=round(u1-u2);
t1(t1(:,1)>ul(1),:)=[];
t1(t1(:,1)<ll(1),:)=[];
for i=1:length(t1)
b(t1(i,1),t1(i,2),1)=data1(t1(i,1),t1(i,2),1);
b(t1(i,1),t1(i,2),2)=data1(t1(i,1),t1(i,2),2);
b(t1(i,1),t1(i,2),3)=data1(t1(i,1),t1(i,2),3);
end
%figure
%imshow(b)
c=im2bw(b);
c=uint8(c);
data1(:,:,1)=data1(:,:,1).*c;
data1(:,:,2)=data1(:,:,2).*c;
data1(:,:,3)=data1(:,:,3).*c;
%figure(1),subplot(4,8,k),subimage(data1);
imshow(data1)
end;



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.