Forum

Author Topic: Geographic type not available in Build Orthomosaic Dialog  (Read 3764 times)

willcodeforfoo

  • Newbie
  • *
  • Posts: 13
    • View Profile
Geographic type not available in Build Orthomosaic Dialog
« on: April 09, 2016, 05:07:04 PM »
I'm attempting to generate a georeferenced orthomosaic of historic aerial photos, scanned from film. I have approximate center points of each file which I used for the align stage and GCP markers throughout the scene which I hoped would better align the output.

I was able to build a geographic orthomosaic before I introduced the GCP markers, now that option is disabled. Any idea why?

Thanks!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14965
    • View Profile
Re: Geographic type not available in Build Orthomosaic Dialog
« Reply #1 on: April 11, 2016, 12:25:43 PM »
Hello willcodeforfoo,

Please try pressing Update button on the Reference pane, as probably the coordinate information is not yet applied to the model. Also pay attention to the fact that you have zero altitudes both for cameras and markers, it could lead to the incorrect model scaling and referencing, unless you are using very low accuracy value in the vertical direction.
Best regards,
Alexey Pasumansky,
Agisoft LLC

willcodeforfoo

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Geographic type not available in Build Orthomosaic Dialog
« Reply #2 on: April 14, 2016, 08:54:05 PM »
Alexey,

Thanks for the reply. Hitting Update then Build Orthomosaic still doesn't let me select geographic. If I select all the cameras then update they do show up, but I'd like to use the marker data rather than the camera data... as the camera data is quite inaccurate.

I haven't bothered much with altitudes and didn't seem to notice much of a difference in the output. I'm not necessarily interested in any DEM or models, just really stitching many photos together and georeferencing the result. But I can try adding that information if it'll increase the quality of matching.

Could I use the altitude from a tool like http://www.mapcoordinates.net/en for the markers and then that number plus estimated flight altitude for the camera altitudes?

Thanks!
Kevin

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14965
    • View Profile
Re: Geographic type not available in Build Orthomosaic Dialog
« Reply #3 on: April 14, 2016, 08:56:49 PM »
Hello Kevin,

To use markers in georeferencing purposes you need to specify at least two projections for each marker you wish to take into account. On the screenshot it seems that all the markers have only single projection.
Best regards,
Alexey Pasumansky,
Agisoft LLC

willcodeforfoo

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Geographic type not available in Build Orthomosaic Dialog
« Reply #4 on: April 14, 2016, 09:03:44 PM »
Interesting! Didn't know that... I suppose it's a result of using the script you posted on http://www.agisoft.com/forum/index.php?topic=2213.msg23964#msg23964

The script didn't work as posted so I modified it to what I thought was correct, but maybe I'm missing something that would cause each marker to only have a single projection?

Code: [Select]
#compatibility Agisoft PhotoScan Professional 1.2.1
#markers import script
#input file format:
#marker_label, camera_label, x-pixel, y_pixel,x-coord, y-coord, z-coord
#(TAB separator)

import PhotoScan

doc = PhotoScan.app.document
chunk = doc.chunk

path = PhotoScan.app.getOpenFileName("Specify input file with marker coordinates:")
print("Import started...")  #informational message
file = open(path, "rt") #input file

photos_total = len(chunk.cameras) #number of photos in chunk
markers_total = len(chunk.markers) #number of markers in chunk

eof = False
line = file.readline()
if len(line) == 0:
eof = True

while not eof:

#print(line)

sp_line = line.split(",", 6)   #splitting read line by four parts

y = float(sp_line[3]) #x- coordinate of the current projection in pixels
x = float(sp_line[2]) #y- coordinate of the current projection in pixels
x_coord = float(sp_line[4]) #x- coordinate of the marker
y_coord = float(sp_line[5]) #y- coordinate of the marker
z_coord = float(sp_line[6]) #x- coordinate of the marker

camera_label = sp_line[1] #camera label
marker_name = sp_line[0] #marker label

flag = 0
for camera in chunk.cameras:

if camera.label.upper() == camera_label.upper(): #searching for the image (comparing with all the photo paths in chunk)

for marker in chunk.markers: #searching for the marker (comparing with all the marker labels in chunk)
if marker.label == marker_name:
marker.projections[camera] = (x, y) #setting up marker projection of the correct photo)
flag = 1
break

if not flag: #adding new marker if no correspondence found
chunk.addMarker()
chunk.markers[-1].label = marker_name
chunk.markers[-1].projections[camera] = (x, y)  #setting up marker projection of the correct photo)
chunk.markers[-1].reference.location = PhotoScan.Vector([x_coord, y_coord, z_coord])

# if not marker.reference.location:
# marker

break

line = file.readline() #reading the line in input file
if not len(line):
eof = True
break # End of File


print("Script finished")  #information message