Forum

Author Topic: Projecting image space corners on dense cloud boundary  (Read 5596 times)

kcm

  • Newbie
  • *
  • Posts: 12
    • View Profile
Projecting image space corners on dense cloud boundary
« on: January 22, 2021, 09:12:12 PM »
Hi,

In our application we are using Metashape to project a variety of UAV acquired image space features into world space using the dense cloud results. (The heart of the code that performs the projections is discussed in this post: https://www.agisoft.com/forum/index.php?topic=12781.0). The approach works well, but we are working to trap a few boundary conditions. Among the features we are projecting are the image corners. For images that are literally on the geographic boundary of the site and have a valid `camera.transform` we can get degenerate points returned for one or more of the image corners, like this (in UTM):
Code: [Select]
"type": "Polygon",
      "coordinates": [
        [
          [
            0,
            0
          ],
          [
            0,
            0
          ],
          [
            572650.2037708747,
            5102280.396009785
          ],
          [
            0,
            0
          ],
          [
            0,
            0
          ]
        ]
      ]

Is there a way to extend the dense cloud boundary, or change other model creation params, so that we are not returning zeros from `chunk.dense_cloud.pickPoint()` for image points on the boundary? We are hoping that reliably extending the interpolation boundary may also result in fewer non-valid `camera.transform`s for images on the boundary, for which we cannot project any points of course.

KCM

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15240
    • View Profile
Re: Projecting image space corners on dense cloud boundary
« Reply #1 on: January 22, 2021, 11:04:08 PM »
Hello KCM,

You can expand the bounding box size and generate the mesh model with extrapolation. Then use this extended model for pickPoint operation is point picking based on the original dense cloud returns None.
Best regards,
Alexey Pasumansky,
Agisoft LLC

kcm

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Projecting image space corners on dense cloud boundary
« Reply #2 on: January 23, 2021, 02:53:46 AM »
Will do and report back...

Paulo

  • Hero Member
  • *****
  • Posts: 1383
    • View Profile
Re: Projecting image space corners on dense cloud boundary
« Reply #3 on: January 23, 2021, 10:38:30 AM »
 Hi all,

i notice that using extrapolated mesh generation will introduce a bowl effect at the edges, rendering the image projection at such edges wrong... see example where sparse cloud is colored by elevation and extraolated mesh rendered by TIN. It is clear that mesh at edges is distorted from reality....

PS. I just realized that extrapolated mesh using sparse cloud as source does create the bowl effect, but generating an extrapolated mesh fron dense cloud does not introduce this effect. See 2nd screen capure.

Sorry for inconvenience,
« Last Edit: January 23, 2021, 12:58:08 PM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15240
    • View Profile
Re: Projecting image space corners on dense cloud boundary
« Reply #4 on: January 23, 2021, 01:42:03 PM »
Hello Paul,

Extrapolated geometry may be inaccurate if the area is far from the actual source data, but it may be sufficient for this particular case.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Paulo

  • Hero Member
  • *****
  • Posts: 1383
    • View Profile
Re: Projecting image space corners on dense cloud boundary
« Reply #5 on: January 23, 2021, 02:43:51 PM »
Hi Alexey,

yes!  it seems using dense cloud or depth maps as source for the extrapolated mesh is quite adequate but using sparse cloud is not.
« Last Edit: January 23, 2021, 06:57:32 PM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

kcm

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Projecting image space corners on dense cloud boundary
« Reply #6 on: January 26, 2021, 02:20:15 AM »
So here are some shots of what I am seeing after building the mesh out with "extrapolation" option to a bounding box (by hand in the UI). Some pretty severe extrapolation artifacts at the edge of the dense cloud used to build the mesh. Not usable for our purposes here obviously. The site is a flat agriculture field where we are running accuracy experiments for our map gen tool set. This is the most severe I have seen the issue on the edge of the dense cloud.

I wonder if those low confidence un-filtered points on the edges are what are dragging it down?

K
« Last Edit: January 26, 2021, 02:28:44 AM by kcm »

Paulo

  • Hero Member
  • *****
  • Posts: 1383
    • View Profile
Re: Projecting image space corners on dense cloud boundary
« Reply #7 on: January 26, 2021, 02:36:34 AM »
Hi kcm,

yes you should delete all the floating points at the edge of your dense cloud. They are clearly noise and definitely falsing the extrapolition. After deleting these noisy points, resulting mesh should be much better.... or you can also filter / select all dense points with confidence 0 to 1 and delete them.... Should eliminate most or all noisy floating points....
« Last Edit: January 26, 2021, 01:27:23 PM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor