Scripting Power: Unleashing the Potential of the Point Cloud

At the end of last year, Leica Geosystems announced the ability to perform python scripting within Cyclone 8.0. Previous versions of Cyclone had limited scripting capabilities for scan acquisition, which were very helpful to optimize data collection efforts, particularly with older scanners. Many CAD and GIS packages have had powerful scripting capabilities for a long time; however, most laser scan software currently does not have this capability, or it has been very limited. (I believe that Innovemetrics PolyWorks was one of the first to have macro capabilities). Some scan manufacturers do provide C++ libraries or APIs to interface with their hardware, which I believe is very helpful in this evolving industry.

I will admit I have not had the time to experiment with the new scripting capabilities as much as I had hoped, so this article will focus on my general thoughts on the potential for scripting rather than what can currently be done. However, I will be exploring it in more detail in OSUs 3D Scanning and Imaging course this fall as I incorporate it into a new project. So stay tuned!

Although I prefer to write actual code (e.g., C++) over scripting for several reasons (I do not plan on getting on that soap box here), I think that scripting capabilities are an essential component within a successful software product in almost any field, but this functionality is particularly important within geomatics. Here are just a few key reasons why it is important for end users to know how to script and vendors to provide it in their package.

1. Stay current. Laser scan technology is evolving rapidly and significant hardware advances occur on a very frequent basis. It is a difficult task for software developers to keep up with handling the endless volumes of data and the core functions in their software efficiently, which consumers expect to be able to keep up with the larger and larger datasets being produced. As such, it can be difficult for developers to focus on customization needed by end users. Scripting enables users to get what they want with less frustration while software developers can focus on the more critical issues, new algorithms, and other fun stuff.

2. Flexibility. A developer cannot always understand what you want to do or what you would like to do. Most are willing to listen to and try to implement feedback, but they arent always in the trenches! They may not understand what you actually want or you may have no idea how to explain it. Or, you may be different than the majority of users. Scripting gives you that flexibility to try new things and adapt to your circumstances. You can do things the way you want and that follow your way of thinking and problem solving.

3. Efficiency. Often in the time (or pretty close) it takes you to do something once manually, you can write a script and save that time to do it again. In particular, when software supports recording macros, it truly only requires the time to do it once and the user does not need to know how to write code.

4. Sanity. Repetitive tasks are often necessary in the world of scanning (unfortunately) but are no fun! A script not only makes you more efficient, but saves you from a lot of boredom and tediousness so you can focus on the more exciting elements of the job.

5. Customization. Scripting can be easily integrated into customized workflows and can reduce bottlenecks in those workflows.

6. Consistency. Scripting provides consistency of method and more reliable results. You dont have to worry about someone forgetting to do a processing step, doing things out of order, etc. Output scripts can also ensure that files and reports are formatted the same, avoiding headaches down the road when the data are taken to another package.

7. Reporting and validation. Scripting makes it easy to get information that is hard to find or not available in the GUI. For example, obtaining properties and metrics such as RMS fits or the number of points used when fitting geometric primitives within a point cloud requires one to go through a lot of information windows for each object in the scene. However, a simple script could quickly obtain that information for all objects in the scene and publish a report or provide feedback to tell the user which objects do not meet the necessary tolerances and require further inspection.

8. Efficiency. You get a lot more done with scripting. If you can balance your day such that you are able to let a script run to tackle long tasks overnight, you can be much more productive during the day and are able to get more value out of your computing resources. (Question for those in the business world, is that automated processing time billable in some way?)

Sure, there are some downsides with scripting. Scripting languages can be very particular, break with new releases, are sometimes confusing, and may result in you throwing your fancy lidar processing computer at the wall. I always tell my students four lessons they learn when programming, which I think are relevant to scripting as well:

I. You learn how smart computers are it is amazing to see what a computer can do!

II. You learn how smart you are it is amazing to see what you can accomplish with a little code and ingenuity!

III. You learn how stupid computers are it can be frustrating that the computer cant catch your simple mistakes and has to be told every little step!

IV. You learn how stupid you are it is hard to avoid countless hours lost because you put the comma in the wrong spot!

However, the good news is that scripts are generally short to write (compared to code), so as long as someone stays on top of things, they can be easily updated frequently, as needed. Stay tuned this fall as we play around with this feature more and write some scripts in our 3D scanning and imaging class!

About the Author

Michael Olsen

Michael Olsen ... Michael is an Assistant Professor of Geomatics in the School of Civil and Construction Engineering at Oregon State University. He chairs the ASCE Geomatics Spatial Data Applications Committee and is on the editorial board for the ASCE Journal of Surveying Engineering. He has BS and MS degrees in Civil Engineering from the University of Utah and a Ph.D. from the University of California, San Diego. He has also worked as an Engineer in Training for West Valley City. His current areas of research include terrestrial laser scanning, remote sensing, GIS, geotechnical engineering, earthquake engineering, hazard mitigation, and 3D visualization. He teaches geomatics and geotechnical engineering courses at OSU where he has developed new, ground-breaking courses in Digital Terrain Modeling course and Building Information Modeling. Recent projects he has been involved with include: earthquake reconnaissance (following the American Samoa and Chile earthquakes and tsunamis), landslide analysis for the US 20 realignment, seacliff erosion mapping using LIDAR for San Diego County and Oregon, liquefaction hazard mapping for Utah, and modeling and studying historical buildings such as the Palazzo Medici and Palazzo Vecchio in Florence, Italy.
Contact Michael Article List Below