Import csv of coordinates for "Align" tool

Feel free to ask any question here
Post Reply
marc.peruz
Posts: 6
Joined: Tue May 22, 2018 8:40 am

Import csv of coordinates for "Align" tool

Post by marc.peruz »

Dear all,

I want to georectify a point cloud spanning a large area, in a way that is as reproductible as possible. Basically, I'm looking for a way to do it by processing directly two csv files containing Ground Control Points (GCPs) "to align" and "reference" coordinates. There's a degree of uncertainty in the GCPs picking, such that I may have to do several tests before accepting the final rectification. So, if I want to change only one of the GCPs, I don't want to be obliged to pick again all other GCPs. To put it differently, I want the picking process to be independent of the rectification process.

This is how I do it:
  1. In a GIS software, I define aset of GCPs and export in a CSV the real coordinates and altitudes
  2. In Cloud Compare, I pick manually a set of points with the "point list picking tool", and export the coordinates in a csv file.
  3. In Cloud Comapre, I import the two csv files to generate two point clouds.
  4. Then, I use the "Align (point pair picking)" tool to align the imported points clouds. Picking is fairly easy, as I only have about 10 points.
  5. Finally, I apply the transformation computed at the previous step to the complete point cloud.
This framework allows me to change only one of the GCPs without having to repeat to whole picking process for the other GCPs, as I would have to if I used the "Align" tool directly on the complete point cloud (If I'm not wrong). Though the previous method works, here are my questions:
  1. Is it possible to use the "Align" tool directly on the complete point cloud, and import the "to align" and "reference" entities from a text/csv file? That would be very helpfull. I know the coordinates can be entered manually, but that is time consuming. I can copy/past each coordinate from another text file, but that's not very practical either.
  2. If not, is there a way to do it in command line, to automate the process, with Cloudcompare or another software? I saw that grass and v.ply.rectify supposedly do the job, but I have some difficulties getting a .ply file that can be read in grass.
Thank you for your time and your commitment to Cloudcompare!

Marc

PS: Several years ago I posted a message on this forum for a bug with CloudCompare on Linux. I have not been able to find a solution for this bug since. Is the Linux version of Cloudcompare still maintained?
daniel
Site Admin
Posts: 7712
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Import csv of coordinates for "Align" tool

Post by daniel »

1. No, I don't think that's currently possible

2. Well, the pity is that if you already have your set of point pairs, finding the transformation is a single call to the one-step registration algorithm (Horn or Umeyama for instance). But that's not a use case for CloudCompare right now ;). What I mean is that with a few lines of C++ code, it would be easy to do it (or equivalently of course by creating a new command line option in CC, but that would also be a few lines of C++ code).

P.S.: you'd better declare the bug on github, are bugs reported on the forum are easily lost in the too long message history
Daniel, CloudCompare admin
marc.peruz
Posts: 6
Joined: Tue May 22, 2018 8:40 am

Re: Import csv of coordinates for "Align" tool

Post by marc.peruz »

Hello,

Thank you for your reply!

Well, if some developments are considered, importing csv directly in "align" tool would be usefull (or integrating in another tool the one-step registration algorithm). But I'll see how to do it in C++ or python.

OK for the bug, I'll declare it on git hub.

Best,

Marc
Post Reply