Version 33 (modified by mark1, 14 years ago) (diff) |
---|
Leica digital camera processing
The RCD produces raw files that need to be processed in order to create TIFF files. The processing basically uses a gain and offset scaling and (probably) corrects for lens distortion. See the RCD page for more details, including filename convention.
Note this is currently not working under wine so all photo processing needs to be done on the windows box.
Processing the raws
- Load the Leica photo processing software
- Under Windows, select start->programs->leica->calibration->Calibration Post Processing
- If using wine, run "leica_photo_processing"
- Select the appropriate camera config (Parameters)
- As of late 2009, this is CH39_021_060
- There may be updates to this as the camera is recalibrated
- Select the input files
- Typically this will be something like ~airborne/workspace/IPY09_11-2009_219_Helheim/leica/rcd/images
- You can click and shift-click to select a list from the open file dialog, but be aware that it appears to take about 5 seconds per file under wine, so expect a long wait while it's thinking (it hasn't crashed!)
- Ensure both Auto Contrast and Adaptive Left-Right Balance are selected.
- Select the output directory
- Typically this will be something like ~airborne/workspace/IPY09_11-2009_219_Helheim/leica/rcd/proc_images
- Select 16 bit TIFF output (this is important! )
- Hit the start button and go for coffee (allow about 20-30secs per file)
A typical processing setup looks like:
Tagging the Images, creating thumbnails and delivery folder
Fully scripted processing approach
If you are lucky you should be able to do the whole processing chain through running one script. To improve the chances of this working follow the stages below to set up the data and remove as many anomalies as possible.
- Process the IPAS data and create a SOL file
- Create a KML file and view it in Google Earth.
- Run kmlise_project.py <main_project_dir> > kml_file.kml - this create a kml file using the !ImageEvents1.csv file
- Open the kml file in google earth
- Note which blocks of photographs do not overlap with any Eagle/Hawk data. Usually consists of a group of photographs at the start of the survey where they set up the exposure rates etc for the camera. Often the log sheet notes which images too.
- Delete these tif files (not the raws) since they are not required.
- Delete the kml file created above as it is no longer needed. An updated one will be created by the delivery script.
- Check the event log file for erroneous entries
- If there is no log file then this approach can not be used. See below section 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
- Try running the script. Pipe the output to a text file in case you wish to review it afterwards.
Example command:
make_delivery_folder.sh -c -d ~airborne/workspace/project_dir -y 2010 -j 297 -p EX01_01 -a "Example Site" -e ~airborne/workspace/project_dir/leica/rcd/logs/ImageEvent1.csv -s ~airborne/workspace/project_dir/leica/ipas/proc/solfile.sol -n "PI Name" | tee camera_delivery.log
If the script fails then you will have to fix the problem and follow the individual stages below. Possible causes of failure, excluding the ones previously mentioned above, could be:
- SOL file GPS times do not overlap with photograph log file times. Either fix the SOL (if possible) else use the logfile to tag the images (and mention in the Read_Me)
Individual processing stages - if above script does not work
Tagging images which have camera log files
The eventfile needs to be updated before tagging the images. This will apply a 0.006s offset to the times in the csv and also replace the pos/nav data with post-processed data from a supplied SOL file. The resulting csv file will be written to new_eventfile.
image_events_file_fixer.py -v -t -s <solfile> <eventfile> <new_eventfile>
tag_tiffs.py is a python script that uses the exiftool command line tool too add tags to a tiff. It draws this data from an image event file (this should be the updated one from the above step). In addition to the data in the image event file the user can use several arguments to supplement the information.
for information on the script use the -h option
TBC:
tag_tiffs.py -v -d dd/mm/yyyy -p <projcode> -l <sitename> <eventfile> <photographs_directory>
to check the changes use
exiftool /users/rsg/airborne/workspace/IPY09_11-2009_219_Helheim/leica/rcd/proc_images/07120958100001G4.tif
A second script is used to then rename the files with useful names containing the project code, year and day. this script also takes the image events file and the folder containing the images as arguments and renames the files and creates a new image events file with the file names updated.
for more information on the script use -h option
rename_photos_update_events_file.py -v -d dd/mm/yyyy -c <projcode> <eventfile> <photographs_directory>
Tagging images which do not have camera log files
Only minimal tagging can be performed: original filename, project code, flight day and site name. This is because without the timestamp of the image event we cannot match up any navigation information. Ask mark1 for a clunky script to do this (will get updated to a better script soon).
Renaming the files can take place once they have been tagged with the original filename information. Ask mark1 for a clunky script to do this (will get updated to a better script soon).
Creating Thumbnails
We need to create thumbnail images for the delivery and for getting an overview of the images for the checking procedure. To do this use the photo2thumb.sh script.
Example:
photo2thumb.sh -d proc_images -o proc_thumbnails
Will create JPG thumbnails of all the TIF images in the proc_images directory and save them into a directory called thumbnails. For further usage run photo2thumb.sh -h
Subsequent processing
There are several other steps that could be undertaken:
- orthorectification (map the photos with respect to the ground/aircraft position)
- ? geocorrection (map the photos with respect to the ground + a DEM) - possibly only Bill's azgcorr mods could do this
- compositing orthorectified photos and seam-line adjustment
- compositing is easy, but will have ugly problems when you get different views on an object with vertical structure
- to improve the look of this, you have to manually edit the positioning of the joins - this is currently a very manual process and we do not currently have software for it
Attachments (1)
-
photo_processing_screenie.png
(92.3 KB) -
added by mggr 15 years ago.
Example processing screen
Download all attachments as: .zip