micasense / imageprocessing

MicaSense RedEdge and Altum image processing tutorials
https://www.micasense.com
MIT License
247 stars 147 forks source link

LibRawFileUnsupportedError: b'Unsupported file format or not RAW file' #194

Open EelkeFolmer opened 1 year ago

EelkeFolmer commented 1 year ago

I'm using the code in this repo to load and analyze Altum data. I can load and process the example data and also the data provided here: https://www.micasense.com/altum-sample-data/. But when trying to plot images collected by a colleague I get the error LibRawFileUnsupportedError: b'Unsupported file format or not RAW file'.

img = Image(imageName) img.plot_all();

I can load and display the images using Agisoft Metashape. Here is the output from exiftools. I'd appreciate a hint about the cause of the error.

ExifTool Version Number : 12.55 File Name : IMG_0001_2_P03.tif Directory : . File Size : 4.8 MB File Modification Date/Time : 2023:02:10 22:07:00+01:00 File Access Date/Time : 2023:02:13 11:50:10+01:00 File Inode Change Date/Time : 2023:02:13 11:49:38+01:00 File Permissions : -rw-rw-r-- File Type : DNG File Type Extension : dng MIME Type : image/x-adobe-dng Exif Byte Order : Little-endian (Intel, II) Subfile Type : Full-resolution image Image Width : 2064 Image Height : 1544 Bits Per Sample : 12 Compression : Uncompressed Photometric Interpretation : BlackIsZero Fill Order : Normal Make : MicaSense Camera Model Name : Altum Strip Offsets : (Binary data 118 bytes, use -b option to extract) Orientation : Horizontal (normal) Samples Per Pixel : 1 Rows Per Strip : 100 Strip Byte Counts : (Binary data 111 bytes, use -b option to extract) Planar Configuration : Chunky Software : v2.1.1 Modify Date : 2022:06:26 23:07:43 XMP Toolkit : XMP Core 4.4.0 About : Pix4D Camera Information Rig Name : Altum Band Name : Green Central Wavelength : 560 Wavelength FWHM : 27 Model Type : perspective Principal Point : 3.56278,2.70154 Perspective Focal Length : 7.8059843175000001 Perspective Focal Length Units : mm Perspective Distortion : -0.1345151, 0.26304250000000001, -0.20758579999999999, -2.548122e-06, -9.6569889999999998e-05 Vignetting Center : 1036.9016999999999, 770.3723 Vignetting Polynomial : 0.00042786449999999998, -2.8392950000000001e-06, 5.8780980000000004e-09, -7.6590080000000002e-12, 5.0153600000000003e-15, -1.2581069999999999e-18 Band Sensitivity : 0.13888992114747592 Rig Relatives : 0.000000, 0.000000, 0.000000 Rig Camera Index : 1 Rig Relatives Reference Rig Camera Index: 1 GPSXY Accuracy : 4294967.5 GPSZ Accuracy : 3750000.25 Irradiance : 13.627062081493545 Irradiance Yaw : -111.52722609029951 Irradiance Pitch : -0.46265103457485834 Irradiance Roll : 177.20084237738524 Boot Timestamp : 187 Radiometric Calibration : 0.0001133038, 4.2489580000000004e-09, -1.1908520000000001e-06 Imager Temperature C : 31.690000000000001 Flight Id : oZ8Gp2QK3f60ggtnD5MN Capture Id : HVP15Y0AS5hMUEc0SaZJ Trigger Method : 1 Pressure Alt : 0 Dark Row Value : 239, 239, 239, 239 Serial : DA03-2002194-MS Sw Version : v1.2.4 Center Wavelength : 560 Bandwidth : 27 Time Stamp : 199431 Spectral Irradiance : 13.627062081493545 Horizontal Irradiance : -6.9280227701500339 Direct Irradiance : 18.46068361917915 Scattered Irradiance : 9.5338007010780128 Solar Elevation : -1.1011158013781095 Solar Azimuth : 5.7773031303765832 Estimated Direct Light Vector : 0.32201830482430677, -0.88116030343008589, -0.34620908569400449 Yaw : -1.9465173008918493 Pitch : -0.0080747838410894016 Roll : 3.0927381367928684 Exposure Time : 1/1793 F Number : 1.8 Exposure Program : Program AE ISO Speed : 100 Exif Version : 0230 Date/Time Original : 2022:06:26 23:07:43 Create Date : 2022:06:26 23:07:43 Metering Mode : Multi-spot Focal Length : 8.0 mm Sub Sec Time : 608161320 Focal Plane X Resolution : 289.855072 Focal Plane Y Resolution : 289.855072 Focal Plane Resolution Unit : mm Serial Number : AL05-1934195-SC GPS Version ID : 2.2.0.0 GPS Latitude Ref : North GPS Longitude Ref : East GPS Altitude Ref : Above Sea Level GPS Dilution Of Precision : 0 DNG Version : 1.2.0.0 DNG Backward Version : 1.2.0.0 Unique Camera Model : Micasense RedEdge Black Level Repeat Dim : 2 2 Black Level : 300 300 300 300 Color Matrix 1 : 3.2406 undef undef undef 1.8758 0.0415 0.0557 undef 1.057 As Shot Neutral : 0.43948 1 0.67949 Opcode List 3 : [opcode 48739], [opcode 41327] Aperture : 1.8 Image Size : 2064x1544 Megapixels : 3.2 Scale Factor To 35 mm Equivalent: 4.9 Shutter Speed : 1/1793 Modify Date : 2022:06:26 23:07:43.608161320 GPS Altitude : 0 m Above Sea Level GPS Latitude : 0 deg 0' 0.00" N GPS Longitude : 0 deg 0' 0.00" E Circle Of Confusion : 0.006 mm Field Of View : 49.6 deg Focal Length : 8.0 mm (35 mm equivalent: 38.9 mm) GPS Position : 0 deg 0' 0.00" N, 0 deg 0' 0.00" E Hyperfocal Distance : 5.76 m