OpenDroneMap / posm-gcpi

Ground Control Point interface (GCPi) for OpenDroneMap
15 stars 8 forks source link

Z values in GCP list #45

Closed lfsantosgeo closed 6 years ago

lfsantosgeo commented 6 years ago

Hello!

I have a GCP list done when there was no user interface on WebODM. Got the image coordinates using QGis. I used it to input in recent GCP Interface from WebODM.

My original list. With a southern hemisphere header.

WGS84 UTM 23S
316675.449 7405032.799 939.968 1560.86 294.55 DJI_0021.jpg
316675.449 7405032.799 939.968 1507.84 592.80 DJI_0022.jpg
316644.657 7405070.101 930.179 285.08 156.74 DJI_0022.jpg
316675.449 7405032.799 939.968 1401.42 916.47 DJI_0023.jpg
316644.657 7405070.101 930.179 57.47 389.73 DJI_0023.jpg
316675.449 7405032.799 939.968 1271.57 1339.24 DJI_0024.jpg
316675.449 7405032.799 939.968 1029.00 1950.00 DJI_0025.jpg
316675.449 7405032.799 939.968 638.86 2971.86 DJI_0026.jpg
316689.126 7405083.739 918.390 725.50 171.53 DJI_0026.jpg
316689.126 7405083.739 918.390 471.86 577.58 DJI_0027.jpg
316689.126 7405083.739 918.390 208.85 1131.16 DJI_0028.jpg
316689.126 7405083.739 918.390 2713.49 317.54 DJI_0035.jpg
316689.126 7405083.739 918.390 2552.85 1209.67 DJI_0036.jpg
316689.126 7405083.739 918.390 2437.46 1856.71 DJI_0037.jpg
316689.126 7405083.739 918.390 2346.47 2377.52 DJI_0038.jpg
316689.126 7405083.739 918.390 2260.00 2781.51 DJI_0039.jpg
316675.449 7405032.799 939.968 1674.96 156.61 DJI_0039.jpg
316675.449 7405032.799 939.968 1695.53 1060.48 DJI_0040.jpg
316644.657 7405070.101 930.179 3712.63 1977.56 DJI_0040.jpg

I've uploaded that into GCP Interface along with the aerial images giving me the following updated GCP list:

+proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs   
316675.45   7405032.80  0   1560.86 294.55  DJI_0021.jpg
316675.45   7405032.80  0   1507.84 592.80  DJI_0022.jpg
316675.45   7405032.80  0   1401.42 916.47  DJI_0023.jpg
316644.66   7405070.10  0   285.08  156.74  DJI_0022.jpg
316644.66   7405070.10  0   57.47   389.73  DJI_0023.jpg
316675.45   7405032.80  0   1271.57 1339.24 DJI_0024.jpg
316675.45   7405032.80  0   1029.00 1950.00 DJI_0025.jpg
316675.45   7405032.80  0   638.86  2971.86 DJI_0026.jpg
316689.13   7405083.74  0   725.50  171.53  DJI_0026.jpg
316689.13   7405083.74  0   471.86  577.58  DJI_0027.jpg
316689.13   7405083.74  0   208.85  1131.16 DJI_0028.jpg
316689.13   7405083.74  0   2713.49 317.54  DJI_0035.jpg
316689.13   7405083.74  0   2552.85 1209.67 DJI_0036.jpg
316689.13   7405083.74  0   2437.46 1856.71 DJI_0037.jpg
316689.13   7405083.74  0   2346.47 2377.52 DJI_0038.jpg
316689.13   7405083.74  0   2260.00 2781.51 DJI_0039.jpg
316675.45   7405032.80  0   1674.96 156.61  DJI_0039.jpg
316675.45   7405032.80  0   1695.53 1060.48 DJI_0040.jpg
316644.66   7405070.10  0   3712.63 1977.56 DJI_0040.jpg

I got zero values for the Z coordinates. And by using both GCP lists I get an error when processing my image set. This error doesn't happen when processing without GCP lists (so far).

[INFO]    Running ODM Load Dataset Cell
[DEBUG]   Loading dataset from: /var/www/data/cf41bad5-b370-45cb-8612-723732b6a9b4/images
[DEBUG]   /var/www/data/cf41bad5-b370-45cb-8612-723732b6a9b4/images
[DEBUG]   Loaded DJI_0045.jpg | camera: dji fc330 | dimensions: 3992 x 2992 | focal: 3.61 | ccd: 6.25 | lat: -23.4547777778 | lon: -46.7950444444 | alt: 1010.26299694
.
.
.
[DEBUG]   Loaded DJI_0055.jpg | camera: dji fc330 | dimensions: 3992 x 2992 | focal: 3.61 | ccd: 6.25 | lat: -23.4556833333 | lon: -46.795675 | alt: 1064.66292135
[INFO]    Found 155 usable images
[DEBUG]   Line: +proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs
Traceback (most recent call last):
File "/code/run.py", line 47, in <module>
plasm.execute(niter=1)
File "/code/scripts/dataset.py", line 86, in process
outputs.reconstruction = types.ODM_Reconstruction(photos, coords_file=tree.odm_georeferencing_gcp)
File "/code/opendm/types.py", line 140, in __init__
self.projection = self.parse_coordinate_system(coords_file)
File "/code/opendm/types.py", line 166, in parse_coordinate_system
return Proj(line.strip('\''))
File "/usr/lib/python2.7/dist-packages/pyproj/__init__.py", line 358, in __new__
return _proj.Proj.__new__(self, projstring)
File "_proj.pyx", line 77, in _proj.Proj.__cinit__ (_proj.c:1099)
File "_proj.pyx", line 370, in _proj._strencode (_proj.c:3939)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

I saw on the ODM community forum someone in trouble with the processing of a southern hemisphere set but seems that it was a fixed/closed bug/issue relating it to ODM not GCPi. I've updated WebODM today with the latest updates! Nevertheless I guess the 0 values for Z are (even when uploading from a GCP text list).

ebrelsford commented 6 years ago

Yes this is a bug, will be diving into it soon.

MattiasTancred commented 6 years ago

gcp_z

I have also noticed that I get the gcpnames in the updated export file from the GCP interface. They are shown in the last column in the table (marked in red in my picture). I noticed the gcp_list above did not have this column, also I do not know if this column of gcpnames will affect anything when using later in the processing step.

ebrelsford commented 6 years ago

@lfsantosgeo I just pushed a change that ensures that z values are included in the exported GCP list.

lfsantosgeo commented 6 years ago

@ebrelsford thank you! Should I update WebODM or wait a lil longer?

ebrelsford commented 6 years ago

I think you'll want to check with @pierotofy about when webodm-posm-gcpi will have the updates.

lfsantosgeo commented 6 years ago

Ok! Thank you @ebrelsford !

pierotofy commented 6 years ago

@lfsantosgeo all changes have been updated in WebODM. Update and enjoy! Thanks @ebrelsford for the fix!

lfsantosgeo commented 6 years ago

Thank you @pierotofy !! I'll update now!

Edit: working properly now! Thanks!