Code covered by the BSD License  

Highlights from
Click3dPoint

5.0

5.0 | 10 ratings Rate this file 38 Downloads (last 30 days) File Size: 3.15 KB File ID: #7594
image thumbnail

Click3dPoint

by Babak Taati

 

04 May 2005 (Updated 10 Nov 2009)

Select a point from a 3D point cloud by clicking on it.

| Watch this File

File Information
Description

Lets the user select a point from a 3D point cloud by clicking on it. The selected point is highlighted and its index is printed.

This is a useful tool if you work with 3D point clouds. You can change the mouse click callback function so instead of highlighting the selected point other operations are done.

The math is pretty simple:

First, the transformation between the viewing frame and the point cloud frame is calculated using the camera viewing direction and the 'up' vector. Then, the point cloud is transformed into the viewing frame. Finally, The z coordinate in this frame is ignored and the x and y coordinates of all the points are compared with the mouse click location and the closest point is selected.

Acknowledgements
This submission has inspired the following:
estimateRigidTransform
MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (11)
03 Apr 2006 Adam Nolan

handy template for working with 3D Plot selection

31 May 2007 Ditza Fargeon

This is really nice function

19 Jan 2009 Jveer

useful but once activated, how can you disactivate it?

28 Jan 2009 Babak Taati

to Jveer:

>> set(gcf,'WindowButtonDownFcn','');

better: change ClickA3DPoint.m so it returns a handle to the figure and use that instea of gcf.

29 Mar 2009 Jveer

thank you. that worked great. re-rating.

16 Jun 2009 David

great job

16 Dec 2009 Alberto Gallina

simple and useful

19 Nov 2010 Kourosh Khoshelham

This is very useful. I need to output the coordinates of the point to use elsewhere, do you know how I can do that? I tried guidata but it didn't work.

thanks,
Kourosh

21 May 2011 Vladislavs

Exactly what was needed. Great work.

23 May 2011 Shane  
23 May 2011 Shane  
Please login to add a comment or rating.
Updates
01 Jul 2005

I added file RowNorm.m to the zip file. It's a one line m file!

06 Jul 2005

adding the file RowNorm.m to the zip file (required)

31 Oct 2007

update: the callback function now takes an input argument. So PointCloud no longer needs to be global.

03 Jun 2008

update: use 'dsearchn' for nearest neighbour search.

19 May 2009

minor changes (style, wording, etc)

10 Nov 2009

minor change (typo fix)

Tag Activity for this File
Tag Applied By Date/Time
gui tools Babak Taati 22 Oct 2008 07:47:52
mouse Babak Taati 22 Oct 2008 07:47:52
click Babak Taati 22 Oct 2008 07:47:52
3d Babak Taati 22 Oct 2008 07:47:52
point Babak Taati 22 Oct 2008 07:47:52
cloud Babak Taati 22 Oct 2008 07:47:52
callbak Babak Taati 22 Oct 2008 07:47:52
angle Babak Taati 22 Oct 2008 07:47:52
rotation Babak Taati 22 Oct 2008 07:47:52
viewing Babak Taati 22 Oct 2008 07:47:52
transformation Babak Taati 19 May 2009 13:49:03
callback Babak Taati 19 May 2009 13:49:03
frame Babak Taati 19 May 2009 13:49:03
view Babak Taati 19 May 2009 13:49:03
range image Babak Taati 04 Jun 2009 10:55:51
range data Babak Taati 04 Jun 2009 10:55:51
stereo Babak Taati 04 Jun 2009 10:55:51
lidar Babak Taati 04 Jun 2009 10:55:51
point cloud Babak Taati 04 Jun 2009 10:56:11
point cloud nguyen Tung 26 Jul 2011 05:48:56

Contact us at files@mathworks.com