Forum

Author Topic: Clarification of Reconstruction uncertainty  (Read 10596 times)

Marcel

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #15 on: June 23, 2014, 03:29:17 AM »
I don't understand how the angle of the cameras matters for the accuracy of the point? I would think only the position of the cameras matters? Parallel or convergent changes the position of the point in the photo, but the relative position in 3D space stays the same. I need to sketch this out on paper :)

If the cameras are convergent then you have more overlap, but that just means you have more matching points between the two cameras?

I've seen the radial gradient as well,  but it was definitely the points at the edges of the photo that had worse accuracy. I'm also not certain if it was when I was using Reprojection Error or Reconstruction Uncertainty selection. I think it was Reprojection error,  and my guess was that it was an effect of lens softness at the edges of the frame. Unfortunately I can't test it at the moment.

ozbigben

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #16 on: June 23, 2014, 04:04:07 AM »
You have more matching points but if you project back from a point to it's theoretical position in an image, a small error in the angle will result in a larger error for more distant points. The wider the fov of the lens, the greater the distance of points at the edges tends to be, so you would expect to see higher uncertainty errors at the edges. This is certainly apparent with the GoPro image sets I've been using. As you get to very low values for uncertainty it acts like a depth filter as you can see in my screen grabs. This might be useful for refining the camera positions for an object if you haven't masked the object. It also picks out points that are relatively distant above/below surfaces.

I'm only using the standard version at the moment so it just removes some of the cameras that have a high proportion of bad points, but it's a noticeable improvement. Now for the notes I was writing while people were also replying...

Didn't have time to do some screengrabs before heading off to work but the models had finished.
The differences were subtle at times, but significant enough.
Raw dense point cloud used 90% of cameras. Other combinations of settings I used only lowered this by another 10%. Dense point clouds only varied by about 10% in number of points, but this would have also been due to a reduction in noise.

The addition a low reconstruction uncertainty threshold along with a low reprojection error: reduced noise in underexposed areas, reduced the number of small floating artefacts, removed areas of high noise in flat surfaces, better definition of small protrusions of the object (e.g. tips of the owl's ears)

I also had a brief look at gradual selection based on the image count, but that ended up removing too many cameras when used in conjunction the other two settings but there are probably other circumstances where this would be useful.

Now it's going to be a case of fine tuning the balance of settings, although I think the values for uncertainty used will vary a bit for objects depending on the relative camera positions and fov of the lens but this could possibly be determined by starting with just a few images.
« Last Edit: June 23, 2014, 05:17:28 AM by ozbigben »

Marcel

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #17 on: June 23, 2014, 05:58:35 AM »
Quote
The wider the fov of the lens, the greater the distance of points at the edges tends to be, so you would expect to see higher uncertainty errors at the edges. This is certainly apparent with the GoPro image sets I've been using. As you get to very low values for uncertainty it acts like a depth filter as you can see in my screen grabs.


I would blame the image quality of the photo at the edges for this effect, rather than the points being further away. Especially with a GoPro which doesn't have a very good lens (no offence intended).

ozbigben

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #18 on: June 23, 2014, 07:20:18 AM »
I was basing this on the points that were selected after removing reprojection error > 0.5   It's probably a combination of both in the case of the GoPro, and possibly more appropriate to say that the uncertainty seems to be higher when the matching points are near the edges of all matching images. You'll see this with pretty much any lens once you select a low enough uncertainty threshold. especially around the edges of a scene (or the outer edges of an aerial grid).


James

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #19 on: June 23, 2014, 05:28:32 PM »
I need to sketch this out on paper :)
Definitely, me too! I struggle to imagine more than one camera in my head at a time :)

James

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #20 on: June 23, 2014, 06:33:49 PM »
I hope the attachment below helps a bit. It covers just a small number of the very many permutations!

There are 4 basic setups, and assume an extremely low res camera model, so you can see the fov of an individual pixel.

Sketching this really helped because it shows that the reconstruction uncertainty value (as i thought i understood it - maybe i was wrong!) is not completely reliable.

#1. Cameras close together. almost parallel cameras looking at a point on a ground plane more or less dead ahead. XY uncertainty is 1.38 and Z uncertainty is 12.706, so the overall reconstruction uncertainty is 9.207.

#2. Cameras far apart, angled to look at the same point as in #1 in the center of the camera fov. XY uncertainty is slightly higher than #1, but Z uncertainty is much better, and so is overall reconstruction uncertainty.

#3. Cameras far apart, same distance as #2, looking parallel to each other. The same point as in #1 and #2 is now in a small area of overlap at the edge of the cameras fov, which has barely any effect on uncertainties and the reconstruction uncertainty is just very slightly higher.

#4 Cameras back close together again, same distance as in #1, but with the point of interest near the edge of the fov of both cameras. The uncertainty here is actually lower than in #1 for identical camera positions and orientations. This may be misleading though, because the XY uncertainty is greater than #1, and so is the Z uncertainty, so should be more uncertain overall, but it is the ratio between them that I thought was reported in photoscan.

#5 Identical to #4 except taking the 'Z' uncertainty as the maximum distance rather than perpendicular to ground, I'm not sure which is actually the correct one in this case, but still shows more or less the same result.

Now I am much more confused than I was to start with :)

ozbigben

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #21 on: June 24, 2014, 01:55:39 AM »
Thanks for the effort James  :)  To some extent I like to understand the technical bits so that I can understand how to use them, and in the absence of exact answers I also go by observation. Using similar image counts and settings for generating sparse point clouds I'm finding that I'm using similar thresholds for uncertainty regardless of the camera used. Given the wide range of values for this error I was initially reluctant to drag it so far across to the low end. With image sets in the range of 120-200 for objects I'm finding 30-50 to be practical.
Looking at the points that get removed, I'm thinking it would be nice to be able to filter the dense cloud in the same way.

ozbigben

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #22 on: June 24, 2014, 02:42:34 AM »
Here's my first test on a DSLR image set (Canon 5D mkIII, 50mm macro, 160 images) for an object, an armillary sphere.  There are a few gaps I have to go back and fill in (must stop rushing these in my lunch break) but it's looking awesome so far.  Generating a mesh was problematic even with a medium dense cloud, had to go up to high giving me 49M points.

Marcel

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #23 on: June 24, 2014, 03:16:56 PM »
Nice work James, I like how you added numbers to your sketches, that really shows whats happening.

Are you sure about the XY/Z relationship for the Reconstruction Uncertainty? Because from the explanation by Alexey in past forum posts, I have a slightly different interpretation. I'll try to sketch it out when I am back home (July). The conclusion is the same though, enough distance between the cameras is important and the camera angle is not relevant (as long as there's overlap).

This discussion has been very helpful, I think I have a better understanding on how to place the camera in some situations. Thanks!

Nice scan Ozbigben! It never ceases to amaze me when Photoscan accurately builds objects with thin or hollow parts like this.

James

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #24 on: June 24, 2014, 03:56:56 PM »
No I'm not sure of anything much any more :)

I am certain I've seen diagrams like that in books talking about similar things in photogrammetry, but I may have just put 2 and 2 together and got 5 or so!

It is bound to be more complex than I suggest in any case, since this is such a simplistic 2D scenario with just a single stereo pair. Ideally I should test these wild theories out with some actual experimentation but just too busy at the moment.

Yeah that is a beautiful scan ozbigben! What kind of scale is that?

James

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #25 on: June 24, 2014, 03:58:43 PM »
To some extent I like to understand the technical bits so that I can understand how to use them, and in the absence of exact answers I also go by observation.

I think I'm the same, I'm no good at remembering rules for things, so make more effort to try and understand what's going on so I can work out what I'm supposed to be doing!

ozbigben

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Clarification of Reconstruction uncertainty
« Reply #26 on: June 25, 2014, 01:04:54 AM »

Yeah that is a beautiful scan ozbigben! What kind of scale is that?

Thanks. It's about 1.5m high. I've made a number of attempts including 123D Catch but this is the first time I've managed to get the sphere to work.  The metal rings are just under 1cm thick and without sufficient points on opposite surfaces you get holes, which has usually meant losing the top 2/3 of the sphere.