File Exchange

image thumbnail

Click3dPoint

version 1.5.0.0 (3.15 KB) by Babak Taati
Select a point from a 3D point cloud by clicking on it.

31 Downloads

Updated 10 Nov 2009

View License

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.

Comments and Ratings (23)

Thank you very much.

waqas ali

st zhang

Ivo

Ivo (view profile)

Amin Memari

So useful for me. thanks compatriot

Bin Hu

Bin Hu (view profile)

Very useful. Thanks!

Excellent work, very useful.... thanks

Masoud

Masoud (view profile)

Nice work!

Jawahir

Anton Semechko

Shane

Shane (view profile)

Shane

Shane (view profile)

Vladislavs

Exactly what was needed. Great work.

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

simple and useful

David

David (view profile)

great job

Jveer

Jveer (view profile)

thank you. that worked great. re-rating.

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.

Jveer

Jveer (view profile)

useful but once activated, how can you disactivate it?

Ditza Fargeon

This is really nice function

Adam Nolan

handy template for working with 3D Plot selection

Updates

1.5.0.0

minor change (typo fix)

1.2.0.0

minor changes (style, wording, etc)

1.0.0.0

update: use 'dsearchn' for nearest neighbour search.

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

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

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

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor