Forum

Author Topic: Problems with generating Orthophoto  (Read 10156 times)

Cotopaxi

  • Newbie
  • *
  • Posts: 2
    • View Profile
Problems with generating Orthophoto
« on: May 09, 2013, 12:36:20 PM »
Hello everybody

I am trying to generate an orthophoto of a snowed in slope with PhotoScan, i.e. the orthophoto should be parallel to the slope for my master thesis. For that reason I shot 53 of photos of different angles the slope (test field dimensions: 2*2 meters). As I am not interested in the global coordinates of the orthophoto, I defined a local coordinate system by the help of metering rules and measured 6 local coordinate GCPs on the photos (please refer to the screenshot in the attachment). I set the coordinates of the GCPs as follows:
1: 0, 0, 0
2: 2, 0, 0
3: 2, 2, 0
4: 0, 2, 0
5: 1, 0, 0
6: 0, 1, 0
Before aligning the photos I masked all the area outside of the test field because of problems of footprints. The results are not very good, the GCPs were lying randomly in the field and not in the corners as expected.

I guess it is a hard setting for the matching but I did not expect it to be so bad. So do I do something fundamentally wrong (for example with setting the z values of the GCPs all to 0 (which I do because I want an orthophoto parallel to the slope))?

Any help would be VERY much appreciated as we do not have much experience with Agisoft  here (got the program two weeks ago)

Thank you in advance,
Martin

RalfH

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: Problems with generating Orthophoto
« Reply #1 on: May 09, 2013, 12:46:12 PM »
Strange result. Could be due to your coordinates seem to be defined in a counterclockwise rather than a clockwise coordinate system (but then I'd simply expect the model to be flipped top/bottom). I'd suggest trying with a clockwise oriented coordiante system and see if things look better then.

Cotopaxi

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Problems with generating Orthophoto
« Reply #2 on: May 09, 2013, 02:52:54 PM »
Well, defining the GCPs clockwise doesn't change it either... any suggestions?

bisenberger

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
    • Digital Mapping & Graphics
Re: Problems with generating Orthophoto
« Reply #3 on: May 10, 2013, 05:36:07 PM »
I'm assuming your coordinates are ordered x,y,z. Is unlikely that all six of the points lie in one plane (z). Three points can be used to define a plane. Try using three coordinates for you control points. Probably three corners would work best.
« Last Edit: May 10, 2013, 05:38:14 PM by bisenberger »
Digital Mapping & Graphics LLC
https://digital-mapping.net/

James

  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Problems with generating Orthophoto
« Reply #4 on: May 10, 2013, 06:27:12 PM »
I would expect that, regardless of photo alignment, if the coordinates had been entered correctly for the 6 GCPs they should appear in a perfect square plane in the 3d view, even if they bore no relation to the surface geometry, which makes me think there is a problem with the way the coordinates have been entered.

Could we see a shot of the Ground Control pane?

And since my post above is mostly completely useless to you, my best suggestion would be to try with only two or three photos and three markers at first as suggested by bisenberger and then the error may be easier to spot.

Ludwig Hilger

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Problems with generating Orthophoto
« Reply #5 on: May 13, 2013, 06:46:36 PM »
Hello everybody,

I am working with cotopaxi on the same project and I guess we did not make sth. very clear:
The pane as you can see it in the "test-site_mask" Screenshot is in fact a slope, that is in reality points 2, 5, and 1 lie lower than 6 and 3 and 4. We set the z Coordinates of the makers all to 0 as we want a orthophoto that is not orthogonal to an hypothesized Nadir but orthogonal to the plane that makes up the surface of of the slope. So maybe we do sth completely wrong here?

A shot of the GCP pane is attached to this message. Thank you all for your commitment!

Ludwig


Kiesel

  • Sr. Member
  • ****
  • Posts: 276
    • View Profile
Re: Problems with generating Orthophoto
« Reply #6 on: May 13, 2013, 08:18:32 PM »
Hello Ludwig,

if I understand you right, you want an ortogonal photo of the area of slope. So all your GCP's can't have a  z-value equal to zero, which means a perfect plane. I think you should at first do a plane fitting for your GCP's for example with "Graticule 3D" http://derletztekick.com/software/formanalyse. Then you get the right z values, which are slightly different to zero. These values should be used in Photoscan.

Regards,

Karsten

RalfH

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: Problems with generating Orthophoto
« Reply #7 on: May 13, 2013, 09:16:42 PM »
Karsten,

yes, that would be an option - but I thought that Photoscan would also do a similar adjustment? The fact that error values are given (and they don't look too terrible in Ludwig's screenshot) seem to imply this.

Kiesel

  • Sr. Member
  • ****
  • Posts: 276
    • View Profile
Re: Problems with generating Orthophoto
« Reply #8 on: May 13, 2013, 10:51:54 PM »
Ralph,

Yes I also think that the errors given in the screenshot show the dicrepancy to the model that all GCP's have the same z value (zero). Thats why I thought it isn't right to set them all to zero, because they couldn't have the same value. I think Photoscan try to find the best solution for the given (wrong) GCP's.

Regards,

Karsten

RalfH

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: Problems with generating Orthophoto
« Reply #9 on: May 13, 2013, 11:41:16 PM »
Karsten,

yes, looks like that's what's happening. But really strange that they are so far off and the error values reported by Photoscan still don't go way up. Would be really interesting what JavaGraticule3D would do with this.

Cotopaxi,

could you send the model xyz coordinates of the control points. I could then try to see how JavaGraticule3D transforms them. Or try it yourself.

James

  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Problems with generating Orthophoto
« Reply #10 on: May 14, 2013, 12:17:18 PM »
I think there is something basic wrong here!

I have just recreated the setup using 4 photos of a concrete slab i had anyway, image attached.

I added the exact same 6 markers in the same order with the same coordinartes but made no attempt to place them at exact coordinates, just that they were in the right sort of configuration and correctly matched in all photos.

I then gave the markers the same simplistic coordinates and clicked the update button.

I was wrong to state earlier that the markers should appear in the 3d viewport at the coordinates given to them in the ground control pane, but they do at least appear to all lie exactly on the surface/pointcloud.

I would strongly suggest trying with fewer photos and making sure all markers are correctly positioned in every photo (which is easier with fewer photos), and i don't believe you need 53 photos anyway.

Otherwise it appears your logic is correct and the orthoimage came out in the correct plane, attached
« Last Edit: May 14, 2013, 01:04:50 PM by James »

James

  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Problems with generating Orthophoto
« Reply #11 on: May 14, 2013, 01:48:30 PM »
Actually looking at your second screenshot it seems some cameras are badly aligned as they are partially below the generated surface.

Ludwig Hilger

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Problems with generating Orthophoto
« Reply #12 on: May 14, 2013, 02:44:07 PM »
Dear James, Ralph, Kiesel,

this is GREAT input for us! Thank you very much! We will try out everthing you said. As we will e in the field for the rest of the week we will give an update in one week or so. Thank you so much again!

Ludwig

@ Kiesel: I will post the GCP coordinate in model system as soon as I get access to the PC again (so many people working with Agisoft here and we only got one license). Thank you for your offer, I will try it myself as well to learn it

Kiesel

  • Sr. Member
  • ****
  • Posts: 276
    • View Profile
Re: Problems with generating Orthophoto
« Reply #13 on: May 14, 2013, 06:56:40 PM »
Ludwig, Cotopaxi,

nice if you post the coordinates of the GCP's, so we can try (the original offer to test it in Graticule 3D came from Ralph btw., but Graticule 3D is really funny - so no problem to test it for you or you do it by yourselve)!

Btw. snow is one of the worst subjects to scan in near makro mode when you can see the crystals, the far away the better. I have tried it only once.

Good luck with testing the suggestions!

Regards,

Karsten