laser scanning  with Rhinoceros 3d
"errando con precisione"
Last updated on 20 oct 2014
 Copyright 2014 franco Slomp
Rhino v5 has many commands and methods useful for anyone who works with data from laser scanner (and usually with point clouds). And it has two scripting environments to write programs to be run during the work session (VBscript and Python): Each has its advantages (and disadvantages).
Python has not implemented all the methods of VBs, but has a list (array) management  much more simple (at least for me).
Depending on the situation I choose the environment that i prefer.
Minimalia about point clouds :
scripts to process point clouds data with rhino 3d
Since many years I use Rhino to process the data coming from the laser scanners (and usually by survey instruments). The work of rpreparation of the data to be delivered to the customer is often long and tedious. With time I developed some scripts to facilitate my work.  I put them , little by little, available in the hope to grow the number of customers who just want to process directly the pre processed data, finalizing the result to their usefulness . The customer save time ande and money   and we avoid the long postprocessing.
These scripts are simple sequences of operations..
They are not particularly efficient, well-ordered or commented, but they work, and we use them profitably.

Franco Slomp
Normally scanners collect points in an orderly manner (f rows and columns): This results in a data matrix known as  "grid". For each point we collect the coordinates (usually X, Y, Z) and reflectance (i.e. the percentage of energy that is reflected from the obstacle). With a photographic procedure every point can be colored in RGB.
The reflectance is represented by a decimal number between 0 and 1 or between 0 and 255. The color by three R, G, B of integers between 0 and 255.

IThe  "grid"  format is especially important in the early stages of filtering data. Since the points are well ordered it is relatively easy to see whether a point is "noise"  examining its neighbors in the grid, which can be identified immediately acting on the indices of the matrix.

The scanner records the points referring them to the center of the instrument. The various scans registered using targets, homologous points, known coordinates etc. The rototranslations necessary to put the clouds in their place are defined by "roto-translation matrix" of 4 rows x 4 columns: here is an example:
-0.1326360467 -0.9911647539 -0.0003312993 4.038
0.9911646579 -0.1326362038 0.0005083189 9.595
-0.0005477700 -0.0002609508 0.9999998159 0.202
0.0000000000 0.0000000000 0.0000000000 1.0000000000
The work of filtering, cleaning, registration of the clouds is usually done by experts using special softwares related to the scanner. For these people it is important to always have the "grid" with the roto-translation matrix in part, to be applied after filtering, when necessary.

EXPORT: the filtered clouds can be exported as long lists of  colored point. They may be referred to the center of the instrument (matrix separately) or with the coordinates already modified by applying the matrix:
The individual lines of each file may be similar to these:

356.789 456.888 -67.865  250 10 21  ( a "foxy" point: R is heigh)

356.789 456.888 -67.865 0.250 (reflectance (0-1): low: dark gray )
356.789 456.888 -67.865 64      (reflectance (0-255):
low: dark gray )

356.789 456.888 -67.865 ( No Colors )


(made for  RH v5 )  

Python script:
RH5 imports directly clouds of points without   color. This script imports Rhino one or more ascii file with colored points , making a colored cloud: An initial  Box give help...
download test clouds

Vb-script for Rh5: applies  the trasformation-matrix  to the the selected objects