finding systematic misalignment in points from PTX files, when angles/range calculated.

Please post discussions that do not fit into any other category.
psiplace
I have made 10-20 posts
I have made 10-20 posts
Posts: 17
Joined: Thu Apr 09, 2009 11:44 pm
Full Name: simon place
Company Details: withheld
Company Position Title: withheld
Country: UK
Linkedin Profile: No
Has thanked: 6 times
Contact:

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by psiplace »

FYI

i've discovered that e57 files have explicit support for holding scans as spherical coordinates.

and the pump (ptx) example i found has various e57 versions, with one that is doing this, so i'm going to try to extract that and check against what i have from the same scan.

presumably some software was used to convert to the 'spherical' version, or vice versa.

VXGrid
Forum Supporter
Forum Supporter
Posts: 128
Joined: Fri Feb 24, 2017 10:47 am
Full Name: Martin Graner
Company Details: PointCab GmbH
Company Position Title: Research and Development
Country: Germany
Linkedin Profile: No
Has thanked: 12 times
Been thanked: 15 times

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by VXGrid »

I was following this thread and think this is a great question.

Don't know if I understood everything correctly and if my explanation makes sense:
(I have a perfectly drawn paint image attached).
The scanner head rotates from top to bottom, while the scanner body rotates from left to right (so points are measured along Z, while there is a small shift in the XY plane direction).
If you measure a wall, then the spacing is somewhat similar (no/small distance change).
But if there are jumps in depth, the signal needs longer to travel, and then the measured point should fall into a different pixel in the scanning panorama. Normally the scanner writes these points all in the same row, but due to conversions (XYZ->RPhiKappa, cart->sphear coords), these might be shifted.
Another point is that you can only transform measured points, while not measured points (where perhaps a reflectivity/colour value was estimated), are relying on their row/column value.
Furthermore are the scanners not scanning 360° to 180° but more like 361° to 160°.


Conclusion: You might have row/column <---> XYZ values, but they are not correlated perfectly.
A point left to a point in image space is as well left in the world space, but don't make any assumptions about the angle and step width of the scanner by a given row/column/XYZ value.
You do not have the required permissions to view the files attached to this post.

psiplace
I have made 10-20 posts
I have made 10-20 posts
Posts: 17
Joined: Thu Apr 09, 2009 11:44 pm
Full Name: simon place
Company Details: withheld
Company Position Title: withheld
Country: UK
Linkedin Profile: No
Has thanked: 6 times
Contact:

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by psiplace »

i think you do understand to 'effect' right

but...

speed of light is such that time could not be a factor.

having said that; i have wondered it its just possible that the electronics take longer to process the more distance reflections, (since the error that people use is absolute, the scanner may be being more careful processing more distance returns.) but this seems a 'stretch' and since the azimuthal progress is in steps, why would the scanner ever report partial steps, they should always be a whole number of these.

i think it has to be in the calculation, i have written a e57 parser (just about) and can now extract the spherical coordinates from the e57 example file.

i will post any conclusion to this.

VXGrid
Forum Supporter
Forum Supporter
Posts: 128
Joined: Fri Feb 24, 2017 10:47 am
Full Name: Martin Graner
Company Details: PointCab GmbH
Company Position Title: Research and Development
Country: Germany
Linkedin Profile: No
Has thanked: 12 times
Been thanked: 15 times

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by VXGrid »

psiplace wrote:
Mon Mar 30, 2020 6:47 pm
i think you do understand to 'effect' right

but...

speed of light is such that time could not be a factor.

having said that; i have wondered it its just possible that the electronics take longer to process the more distance reflections, (since the error that people use is absolute, the scanner may be being more careful processing more distance returns.) but this seems a 'stretch' and since the azimuthal progress is in steps, why would the scanner ever report partial steps, they should always be a whole number of these.

i think it has to be in the calculation, i have written a e57 parser (just about) and can now extract the spherical coordinates from the e57 example file.

i will post any conclusion to this.

I think it is a combination of the already made assumpations:
  • Fixed grid production (fixed angle step size of the scanner in image coordinate system, produces world angle offset), I made another pefectly drawn image...
  • Resolution x sampling mismatch
  • Reflection wave form (multiple peaks of received signal) + edge discontinuity, mean value calculated or biggest signal usage?
  • Scanning head movement while laser head movement, image row col to world space mismatch
Regarding point 1: fixed grid production <--- my image
If there is no jump in depth, then we would have the grey beam, resulting in the same point spacing, since we have the depth discontinuity the hitting spot of the beam is earlier, resulting in a smaller step (red arrow). The step width of the machine along XY is fixed due to the rotation speed, which is defined by resolution. Step width machine (local camera system) is fixed, therefore the world frame (point cloud) is misalgined in the angle on edges.
You should see the same effect on horizontal depth changes as well, if there are any in your ptx.


How many metres is your depth jump?
Depending on the hitting angle along horizontal and vertical axis you could calculate your mismatch in spacing
You do not have the required permissions to view the files attached to this post.

psiplace
I have made 10-20 posts
I have made 10-20 posts
Posts: 17
Joined: Thu Apr 09, 2009 11:44 pm
Full Name: simon place
Company Details: withheld
Company Position Title: withheld
Country: UK
Linkedin Profile: No
Has thanked: 6 times
Contact:

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by psiplace »

i think there is a misunderstanding..

the images i posted are in SPHERICAL coordinates, both x and y are ANGLE values, that is; X == horizontal (azimuthal), Y == vertical,.

so unlike Cartesian coordinates both are absolutely limited to a maximum of one rotation, 2 * pi. (although they are actually only a small fraction of this.)

plotted in Cartesian, a flat surface would have spacings that diminished, to a minimum, at the closest point, in Spherical coordinates the spacings remain constant. plotting this way enables the misalignment to be easily seen.

you can't really have a misalignment in Cartesian space, range effects the spacing, so there isn't anything to align with.

psiplace
I have made 10-20 posts
I have made 10-20 posts
Posts: 17
Joined: Thu Apr 09, 2009 11:44 pm
Full Name: simon place
Company Details: withheld
Company Position Title: withheld
Country: UK
Linkedin Profile: No
Has thanked: 6 times
Contact:

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by psiplace »

FYI i'm currently pursuing this idea;

i assumed when registration occurs the scan origins were being updated to the new 'better' location.

but...

what would explain this issue would be if; the points were being moved but not the origin.

so the software is recalculating all the point locations, relative to the 'uncorrected' origin. this is a shame and initially seems a bit odd, until you realise the software would already have to be calculating these values and the file couldn't just be edited, so there isn't any 'cost' in doing it this way, if nobody, (but me) was interested in highly accurate scanner locations (they were just wanting to convert to point-clouds without scanner location information. like PTS ) then it makes no difference.

having said that;

there would be a small inherent precision loss, (and it would be cumulative) in the calculation, but doing the calculation at a significantly higher precision than the point location precision would make this also insignificant.

i am now trying to find unregistered ptx files, (which, if I'm right, should never have this effect.) but there doesn't seem to be a way to tell, even single scan ptx files could have been extracted from a multi-scan original that was registered.

VXGrid
Forum Supporter
Forum Supporter
Posts: 128
Joined: Fri Feb 24, 2017 10:47 am
Full Name: Martin Graner
Company Details: PointCab GmbH
Company Position Title: Research and Development
Country: Germany
Linkedin Profile: No
Has thanked: 12 times
Been thanked: 15 times

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by VXGrid »

psiplace wrote:
Wed Apr 01, 2020 5:00 pm
i think there is a misunderstanding..

the images i posted are in SPHERICAL coordinates, both x and y are ANGLE values, that is; X == horizontal (azimuthal), Y == vertical,.

so unlike Cartesian coordinates both are absolutely limited to a maximum of one rotation, 2 * pi. (although they are actually only a small fraction of this.)

plotted in Cartesian, a flat surface would have spacings that diminished, to a minimum, at the closest point, in Spherical coordinates the spacings remain constant. plotting this way enables the misalignment to be easily seen.

you can't really have a misalignment in Cartesian space, range effects the spacing, so there isn't anything to align with.

Seems like I'm still not getting it :D
How can you show us the images in spherical coordinates? I mean for the visualization it doesn't matter if it is in cartesian or spherical coordinates, the resulting point which is visualized will be at the same location, hence the difference in distance.
If you think the point spacing in the angle is wrong visually, you need to set all distance values identically, otherwise the resulting point will look like the angles are wrong.


Let me try to paraphrase your question (to see if I understood it):
You imported a PTX file, (which is a structured scan format, with values mapped from the image frame uv to euclidean coordinates XYZ)
Now you recalculated these XYZ values into spherical values: Distance, horizontal angle, vertical angle.
When visualizing this one scan location, then the horizontal point spacing seems to be off (angle changes).

Did you generate 2D plots of the angle steps for certain rows?
Did you check if the same effect is happening with newer scans which were not registered (raw scans)?

psiplace
I have made 10-20 posts
I have made 10-20 posts
Posts: 17
Joined: Thu Apr 09, 2009 11:44 pm
Full Name: simon place
Company Details: withheld
Company Position Title: withheld
Country: UK
Linkedin Profile: No
Has thanked: 6 times
Contact:

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by psiplace »

> If you think the point spacing in the angle is wrong visually, you need to set all distance values identically, otherwise the resulting point will look like the angles are wrong.

i am setting the range as the brightness, all the z coordinates are indeed the same, zero in this case, but doesn't matter. maybe because i'm visualising in 3d it is confusing, it could as well be 2d. (this is because i'm using the same software for looking at the points in cartenian plots, to see whats there.)


> Now you recalculated these XYZ values into spherical values: Distance, horizontal angle, vertical angle.
When visualizing this one scan location, then the horizontal point spacing seems to be off (angle changes).

yes. an individual column is showing changes in angle that correlate with distance, as if the laser line isn't along the view from the scanner, like the scanner position is wrong.

> Did you check if the same effect is happening with newer scans which were not registered (raw scans)?

that is what i am attempting now, but its hard to know if a scan has, or has not, been registered, and currently i don't have raw files or the software to extract points from them for different scanners, ptx is a common access point.

VXGrid
Forum Supporter
Forum Supporter
Posts: 128
Joined: Fri Feb 24, 2017 10:47 am
Full Name: Martin Graner
Company Details: PointCab GmbH
Company Position Title: Research and Development
Country: Germany
Linkedin Profile: No
Has thanked: 12 times
Been thanked: 15 times

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by VXGrid »

psiplace wrote:
Wed Apr 01, 2020 9:05 pm
> If you think the point spacing in the angle is wrong visually, you need to set all distance values identically, otherwise the resulting point will look like the angles are wrong.

i am setting the range as the brightness, all the z coordinates are indeed the same, zero in this case, but doesn't matter. maybe because i'm visualising in 3d it is confusing, it could as well be 2d. (this is because i'm using the same software for looking at the points in cartenian plots, to see whats there.)
So your range is always 1.0 or something (0.0 doesn't make sense), and the range value is interpreted as colour.


psiplace wrote:
Wed Apr 01, 2020 9:05 pm
> Now you recalculated these XYZ values into spherical values: Distance, horizontal angle, vertical angle.
When visualizing this one scan location, then the horizontal point spacing seems to be off (angle changes).

yes. an individual column is showing changes in angle that correlate with distance, as if the laser line isn't along the view from the scanner, like the scanner position is wrong.

> Did you check if the same effect is happening with newer scans which were not registered (raw scans)?

that is what i am attempting now, but its hard to know if a scan has, or has not, been registered, and currently i don't have raw files or the software to extract points from them for different scanners, ptx is a common access point.
I guess it is possible that the scanner is making a grid shift based on distance, but I don't know. A bigger distance has a bigger impact on the angle spot accuracy.

Ask and you shall be given:
Faro scan not registered (inclinometer not used) no resampling
I will delete the link in one week.

psiplace
I have made 10-20 posts
I have made 10-20 posts
Posts: 17
Joined: Thu Apr 09, 2009 11:44 pm
Full Name: simon place
Company Details: withheld
Company Position Title: withheld
Country: UK
Linkedin Profile: No
Has thanked: 6 times
Contact:

Re: finding systematic misalignment in points from PTX files, when angles/range calculated.

Post by psiplace »

> Faro scan not registered (inclinometer not used) no resampling

i have taken a copy.

Post Reply

Return to “Any Other Issues”