Version 98 (modified by asm, 7 years ago) (diff)

--

Tagging Digital Camera Images

Generate Events File (Phase One only)

The PhaseOne camera doesn't generate CSV file with the location of each image so one needs to be created manually for subsequent processing. To do this use the following command:

create_phaseone_events_file.py -o processing/phaseone/20170613_ImageEvents1.csv \
             -n posatt/ipas20/proc/2017164_ipas20.sol \
            --time_diff 2 processing/phaseone/proc_images/*.tif

Where the events file is named based on the day of the flight (YYYYMMDD_ImageEvents1.csv), you can use the julian command to get this from the day of year.

  1. Get a camera .sol file
    • Check there is a *_camera.sol file in the IPAS/proc directory. If there is not, then you will need to create one. See details here
  2. Create a new image event file with post-processed positional data and omega,phi,kappa values
    • Open IPAS CO (on the windows machine)
    • Load in the *_camera.sol file and from rcd/logs the *!ImageEvents1.csv and *!PhotoId1.csv file
    • Camera Orientation Direction: -90
    • Event Offset: 0.006
    • Output file as *!ImageEvents1-processed.csv, file format ASCII Output
  3. Check the event log file for erroneous entries
    • If there is no log file then you will need to look here for information on tagging without log files.
    • Anything with a -1 in GPS time will not be able to be tagged fully, but only with project information data. If possible, you might be able to use the SensorStats log file to estimate the GPS time of the erroneous events. Use the time differences in the log file to estimate the GPS time. Note down any image names you do this to so that it can be put in the Read Me. This is probably no longer worth doing - seems to be too imprecise

If the flight is split into parts, with multiple navigation files, event files, etc; process each event file seperately using it's matching *_camera.sol file then combine the processed event files into one file. The flight line logs in /lidar/als50/logs/ also need to be combined into one file, as they're used to find the flight line names when creating the delivery readme.

Create thumbnails to check images

  1. Run digital_camera_images_in_pdf.py from within the project directory.
    • If there is no LiDAR data or the LiDAR failed pass in the --nolidar flag so the script will not check LiDAR lines
    • The script will create thumbnails and a pdf preview page. Also, any tif images which do not correspond to a flightline will be moved to proc_images/outbounds and any images with corrupted eventfile information will be moved to proc_images/nogps.
    • If thumbnails have already been generated pass in --images to avoid recreating.
  2. Look through the pdf and remove all the over/under exposed tif images (leave the raws) from proc_images/ and nogps/.
  3. If any nogps images fall between the outbounds images then remove the tif image. e.g. if images 1, 2, 3 and 6 are in outbounds the nogps images 4 and 5 will be outbound as well.
  4. Note down any images left in the nogps folder because these images will not be fully tagged and need to be mentioned in the Read Me, then move them into proc_images with the other tif files.
  5. Remove the outbound and (now empty) nogps directories

Image Tagging

Image tagging inserts exiftags into the TIFF files that contain information such as: project details, camera parameters and photograph pos/att information.

Fix IPASCO CSV (Leica RCD105 only)

Assuming a CSV file as output from IPASCO - the first thing to do is to fix the header in the csv file (space delimited file with spaces in the header names!):

digital_camera_tif_tagging.py --eventfile <eventfilename> --fixipascoheader <fixedeventfilename>

This creates a new event file with a parseable header. Note that the DEFAULT header is HARD CODED in the script. If it is not the same as the below then you can call the function rcdclasses.FixIPASCOEventFileHeader(filename,newfilename,origheader,newheader) from within python to convert the origheader to the newheader.

Default header:

     ID Event#    GPS Time(s) Easting(degrees) Northing(degrees) Ell Ht(metres) Omega(deg)   Phi(deg)   Kap(deg)    Lat(deg)     Lon(deg)    Xstd(m)    Ystd(m)    Zstd(m)  Ostd(deg)  Pstd(deg)  Kstd(deg)

Tag files

You are now ready to tag the tiffs, the script digital_camera_tif_tagging.py has a lot of options to help in the tagging of images, but for usual NERC-ARF processing you should only need to specify the solfile, eventfile and project location:

digital_camera_tif_tagging.py --eventfile <eventfilename> --solfile <solfilename> --projectlocation <toplevelprojectpath>

where <eventfilename> is the event file, for the RCD105 this will be the one with the fixed headers generated in the step above.

If the script outputs are OK (no errors etc) then add --final to the command to actually perform the tagging.

Attachments (1)

Download all attachments as: .zip