OpenDroneMap / ODM

A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. 📷
https://opendronemap.org
GNU Affero General Public License v3.0
4.82k stars 1.1k forks source link

How can I process DJI Phantom 2 vision+ photos (or: Remove pyexiv2) #356

Closed herschmi closed 4 years ago

herschmi commented 8 years ago

Hello!

When I try to process DJI photos, I got the next error message:

herschmi-Lenovo-G510 OpenDroneMap # sh run.sh --project-path /home/herschmi/sfmproba run.sh: 3: run.sh: Bad substitution [INFO] Initializing OpenDroneMap app - Wed Aug 10 09:36:33 2016 [INFO] Running ODM Load Dataset Cell [DEBUG] Loading dataset from: /home/herschmi/sfmproba/images Traceback (most recent call last): File "/home/herschmi/OpenDroneMap/run.py", line 38, in plasm.execute(niter=1) File "/home/herschmi/OpenDroneMap/scripts/dataset.py", line 57, in process self.params.force_ccd) File "/home/herschmi/OpenDroneMap/opendm/types.py", line 32, in init self.parse_pyexiv2_values(self.path_file, force_focal, force_ccd) File "/home/herschmi/OpenDroneMap/opendm/types.py", line 62, in parse_pyexiv2_values val = metadata[key].value File "/usr/lib/python2.7/dist-packages/pyexiv2/xmp.py", line 210, in _get_value self._compute_value() File "/usr/lib/python2.7/dist-packages/pyexiv2/xmp.py", line 204, in _compute_value self._value = self._convert_to_python(self._raw_value, self.type) File "/usr/lib/python2.7/dist-packages/pyexiv2/xmp.py", line 374, in _convert_to_python raise NotImplementedError('XMP conversion for type [%s]' % type) NotImplementedError: XMP conversion for type [ResourceRef]

What's the problem?

Thank you!

dakotabenjamin commented 8 years ago

https://github.com/OpenDroneMap/OpenDroneMap/issues/352 is a similar issue. Can you try the patch from there and post the results?

GCorbel commented 7 years ago

I have the exact same problem on the master branch with a self made Docker image.

I'm trying to work with an image with this info :

<?xml version="1.0" encoding="UTF-8"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:xmp="http://ns.adobe.com/xap/1.0/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:drone-dji="http://www.dji.com/drone-dji/1.0/"
    xmlns:aux="http://ns.adobe.com/exif/1.0/aux/"
    xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
    xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
    xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
    xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/"
    xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
    xmlns:exif="http://ns.adobe.com/exif/1.0/"
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
   xmp:ModifyDate="2016-07-06T11:29:48-04:00"
   xmp:CreateDate="2016-07-05T14:51:10"
   xmp:CreatorTool="Adobe Photoshop Lightroom 6.6 (Windows)"
   xmp:MetadataDate="2016-07-06T11:29:48-04:00"
   dc:format="image/jpeg"
   drone-dji:AbsoluteAltitude="+82.70"
   drone-dji:RelativeAltitude="+8.50"
   drone-dji:GimbalRollDegree="+0.00"
   drone-dji:GimbalYawDegree="-8.50"
   drone-dji:GimbalPitchDegree="-90.00"
   drone-dji:FlightRollDegree="-11.30"
   drone-dji:FlightYawDegree="-9.30"
   drone-dji:FlightPitchDegree="+2.60"
   aux:SerialNumber="2014031100"
   aux:LensInfo="207000/10000 207000/10000 0/0 0/0"
   aux:Lens="20.7 mm"
   aux:ApproximateFocusDistance="0/100"
   xmpMM:DocumentID="xmp.did:029c424d-ccd5-9d47-b1d2-304592992500"
   xmpMM:OriginalDocumentID="A847A46AC2A70F1186D984B3EE745051"
   xmpMM:InstanceID="xmp.iid:029c424d-ccd5-9d47-b1d2-304592992500"
   crs:Version="9.6"
   crs:ProcessVersion="6.7"
   crs:WhiteBalance="As Shot"
   crs:AutoWhiteVersion="134348800"
   crs:Temperature="4250"
   crs:Tint="+24"
   crs:Saturation="0"
   crs:Sharpness="25"
   crs:LuminanceSmoothing="0"
   crs:ColorNoiseReduction="25"
   crs:VignetteAmount="0"
   crs:ShadowTint="0"
   crs:RedHue="0"
   crs:RedSaturation="0"
   crs:GreenHue="0"
   crs:GreenSaturation="0"
   crs:BlueHue="0"
   crs:BlueSaturation="0"
   crs:Vibrance="0"
   crs:HueAdjustmentRed="0"
   crs:HueAdjustmentOrange="0"
   crs:HueAdjustmentYellow="0"
   crs:HueAdjustmentGreen="0"
   crs:HueAdjustmentAqua="0"
   crs:HueAdjustmentBlue="0"
   crs:HueAdjustmentPurple="0"
   crs:HueAdjustmentMagenta="0"
   crs:SaturationAdjustmentRed="0"
   crs:SaturationAdjustmentOrange="0"
   crs:SaturationAdjustmentYellow="0"
   crs:SaturationAdjustmentGreen="0"
   crs:SaturationAdjustmentAqua="0"
   crs:SaturationAdjustmentBlue="0"
   crs:SaturationAdjustmentPurple="0"
   crs:SaturationAdjustmentMagenta="0"
   crs:LuminanceAdjustmentRed="0"
   crs:LuminanceAdjustmentOrange="0"
   crs:LuminanceAdjustmentYellow="0"
   crs:LuminanceAdjustmentGreen="0"
   crs:LuminanceAdjustmentAqua="0"
   crs:LuminanceAdjustmentBlue="0"
   crs:LuminanceAdjustmentPurple="0"
   crs:LuminanceAdjustmentMagenta="0"
   crs:SplitToningShadowHue="0"
   crs:SplitToningShadowSaturation="0"
   crs:SplitToningHighlightHue="0"
   crs:SplitToningHighlightSaturation="0"
   crs:SplitToningBalance="0"
   crs:ParametricShadows="0"
   crs:ParametricDarks="0"
   crs:ParametricLights="0"
   crs:ParametricHighlights="0"
   crs:ParametricShadowSplit="25"
   crs:ParametricMidtoneSplit="50"
   crs:ParametricHighlightSplit="75"
   crs:SharpenRadius="+1.0"
   crs:SharpenDetail="25"
   crs:SharpenEdgeMasking="0"
   crs:PostCropVignetteAmount="0"
   crs:GrainAmount="0"
   crs:ColorNoiseReductionDetail="50"
   crs:ColorNoiseReductionSmoothness="50"
   crs:LensProfileEnable="0"
   crs:LensManualDistortionAmount="0"
   crs:PerspectiveVertical="0"
   crs:PerspectiveHorizontal="0"
   crs:PerspectiveRotate="0.0"
   crs:PerspectiveScale="100"
   crs:PerspectiveAspect="0"
   crs:PerspectiveUpright="0"
   crs:PerspectiveX="0.00"
   crs:PerspectiveY="0.00"
   crs:AutoLateralCA="0"
   crs:Exposure2012="0.00"
   crs:Contrast2012="-29"
   crs:Highlights2012="-84"
   crs:Shadows2012="0"
   crs:Whites2012="0"
   crs:Blacks2012="-41"
   crs:Clarity2012="+72"
   crs:DefringePurpleAmount="0"
   crs:DefringePurpleHueLo="30"
   crs:DefringePurpleHueHi="70"
   crs:DefringeGreenAmount="0"
   crs:DefringeGreenHueLo="40"
   crs:DefringeGreenHueHi="60"
   crs:Dehaze="0"
   crs:ToneMapStrength="0"
   crs:ConvertToGrayscale="False"
   crs:ToneCurveName="Linear"
   crs:ToneCurveName2012="Linear"
   crs:CameraProfile="Embedded"
   crs:LensProfileSetup="LensDefaults"
   crs:UprightVersion="151388160"
   crs:UprightCenterMode="0"
   crs:UprightCenterNormX="0.5"
   crs:UprightCenterNormY="0.5"
   crs:UprightFocalMode="0"
   crs:UprightFocalLength35mm="35"
   crs:UprightPreview="False"
   crs:UprightTransformCount="6"
   crs:UprightFourSegmentsCount="0"
   crs:HasSettings="True"
   crs:HasCrop="False"
   crs:AlreadyApplied="True"
   tiff:XResolution="240/1"
   tiff:YResolution="240/1"
   tiff:ResolutionUnit="2"
   tiff:DateTime="2016-07-06T11:29:48"
   tiff:Make="DJI"
   tiff:Model="FC300X"
   tiff:Software="Adobe Photoshop Lightroom 6.6 (Windows)"
   exif:ExifVersion="0230"
   exif:ColorSpace="1"
   exif:DateTimeOriginal="2016-07-05T14:51:10"
   exif:DateTimeDigitized="2016-07-05T14:51:10"
   exif:ExposureTime="1/180"
   exif:FNumber="28/10"
   exif:ExposureProgram="58655"
   exif:ShutterSpeedValue="7491853/1000000"
   exif:ApertureValue="2970854/1000000"
   exif:ExposureBiasValue="21/32"
   exif:MaxApertureValue="200/100"
   exif:SubjectDistance="0/100"
   exif:MeteringMode="2"
   exif:LightSource="0"
   exif:FocalLength="361/100"
   exif:FileSource="3"
   exif:SceneType="1"
   exif:CustomRendered="0"
   exif:ExposureMode="0"
   exif:WhiteBalance="0"
   exif:DigitalZoomRatio="0/1024"
   exif:FocalLengthIn35mmFilm="20"
   exif:SceneCaptureType="0"
   exif:GainControl="0"
   exif:Contrast="0"
   exif:Saturation="0"
   exif:Sharpness="0"
   exif:SubjectDistanceRange="0"
   exif:GPSVersionID="2.3.0.0"
   exif:GPSLatitude="50,14.0769000N"
   exif:GPSLongitude="66,21.5497000W"
   exif:GPSAltitudeRef="0"
   exif:GPSAltitude="82700/1000"
   photoshop:DateCreated="2016-07-05">
   <xmpMM:History>
    <rdf:Seq>
     <rdf:li
      stEvt:action="converted"
      stEvt:parameters="from image/tiff to image/dng"/>
     <rdf:li
      stEvt:action="derived"
      stEvt:parameters="converted from image/dng to image/jpeg, saved to new location"/>
     <rdf:li
      stEvt:action="saved"
      stEvt:instanceID="xmp.iid:029c424d-ccd5-9d47-b1d2-304592992500"
      stEvt:when="2016-07-06T11:29:48-04:00"
      stEvt:softwareAgent="Adobe Photoshop Lightroom 6.6 (Windows)"
      stEvt:changed="/"/>
    </rdf:Seq>
   </xmpMM:History>
   <xmpMM:DerivedFrom
    stRef:documentID="A847A46AC2A70F1186D984B3EE745051"
    stRef:originalDocumentID="A847A46AC2A70F1186D984B3EE745051"/>
   <crs:ToneCurve>
    <rdf:Seq>
     <rdf:li>0, 0</rdf:li>
     <rdf:li>255, 255</rdf:li>
    </rdf:Seq>
   </crs:ToneCurve>
   <crs:ToneCurveRed>
    <rdf:Seq>
     <rdf:li>0, 0</rdf:li>
     <rdf:li>255, 255</rdf:li>
    </rdf:Seq>
   </crs:ToneCurveRed>
   <crs:ToneCurveGreen>
    <rdf:Seq>
     <rdf:li>0, 0</rdf:li>
     <rdf:li>255, 255</rdf:li>
    </rdf:Seq>
   </crs:ToneCurveGreen>
   <crs:ToneCurveBlue>
    <rdf:Seq>
     <rdf:li>0, 0</rdf:li>
     <rdf:li>255, 255</rdf:li>
    </rdf:Seq>
   </crs:ToneCurveBlue>
   <crs:ToneCurvePV2012>
    <rdf:Seq>
     <rdf:li>0, 0</rdf:li>
     <rdf:li>255, 255</rdf:li>
    </rdf:Seq>
   </crs:ToneCurvePV2012>
   <crs:ToneCurvePV2012Red>
    <rdf:Seq>
     <rdf:li>0, 0</rdf:li>
     <rdf:li>255, 255</rdf:li>
    </rdf:Seq>
   </crs:ToneCurvePV2012Red>
   <crs:ToneCurvePV2012Green>
    <rdf:Seq>
     <rdf:li>0, 0</rdf:li>
     <rdf:li>255, 255</rdf:li>
    </rdf:Seq>
   </crs:ToneCurvePV2012Green>
   <crs:ToneCurvePV2012Blue>
    <rdf:Seq>
     <rdf:li>0, 0</rdf:li>
     <rdf:li>255, 255</rdf:li>
    </rdf:Seq>
   </crs:ToneCurvePV2012Blue>
   <exif:ISOSpeedRatings>
    <rdf:Seq>
     <rdf:li>100</rdf:li>
    </rdf:Seq>
   </exif:ISOSpeedRatings>
   <exif:Flash
    exif:Fired="False"
    exif:Return="0"
    exif:Mode="0"
    exif:Function="True"
    exif:RedEyeMode="False"/>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>

I tried the patch and I have this result :

ws_stitch_1 | [DEBUG]   Loading dataset from: /tmp/1477685634/images
ws_stitch_1 | [DEBUG]   Parsing Exif.Image.Make for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Image.Model for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Image.XResolution for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Image.YResolution for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Image.ResolutionUnit for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Image.Software for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Image.DateTime for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Image.ExifTag for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.ExposureTime for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.FNumber for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.ExposureProgram for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.ISOSpeedRatings for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.ExifVersion for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.DateTimeOriginal for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.DateTimeDigitized for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.ShutterSpeedValue for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.ApertureValue for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.ExposureBiasValue for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.MaxApertureValue for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.SubjectDistance for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.MeteringMode for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.LightSource for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.Flash for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.FocalLength for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.ColorSpace for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.FileSource for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.SceneType for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.CustomRendered for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.ExposureMode for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.WhiteBalance for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.DigitalZoomRatio for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.FocalLengthIn35mmFilm for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.SceneCaptureType for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.GainControl for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.Contrast for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.Saturation for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.Sharpness for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.SubjectDistanceRange for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.BodySerialNumber for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.LensSpecification for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Photo.LensModel for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Image.GPSTag for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.GPSInfo.GPSVersionID for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.GPSInfo.GPSLatitudeRef for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.GPSInfo.GPSLatitude for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.GPSInfo.GPSLongitudeRef for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.GPSInfo.GPSLongitude for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.GPSInfo.GPSAltitudeRef for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.GPSInfo.GPSAltitude for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Thumbnail.Compression for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Thumbnail.XResolution for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Thumbnail.YResolution for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Thumbnail.ResolutionUnit for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Thumbnail.JPEGInterchangeFormat for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Exif.Thumbnail.JPEGInterchangeFormatLength for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Iptc.Envelope.CharacterSet for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Iptc.Application2.RecordVersion for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Iptc.Application2.DateCreated for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Iptc.Application2.TimeCreated for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Iptc.Application2.DigitizationDate for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Iptc.Application2.DigitizationTime for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmp.ModifyDate for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmp.CreateDate for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmp.CreatorTool for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmp.MetadataDate for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.dc.format for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.drone-dji.AbsoluteAltitude for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.drone-dji.RelativeAltitude for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.drone-dji.GimbalRollDegree for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.drone-dji.GimbalYawDegree for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.drone-dji.GimbalPitchDegree for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.drone-dji.FlightRollDegree for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.drone-dji.FlightYawDegree for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.drone-dji.FlightPitchDegree for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.aux.SerialNumber for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.aux.LensInfo for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.aux.Lens for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.aux.ApproximateFocusDistance for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.photoshop.DateCreated for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.DocumentID for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.OriginalDocumentID for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.InstanceID for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[1] for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[1]/stEvt:action for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[1]/stEvt:parameters for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[2] for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[2]/stEvt:action for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[2]/stEvt:parameters for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[3] for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[3]/stEvt:action for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[3]/stEvt:instanceID for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[3]/stEvt:when for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[3]/stEvt:softwareAgent for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.History[3]/stEvt:changed for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | [DEBUG]   Parsing Xmp.xmpMM.DerivedFrom for /tmp/1477685634/images/DJI_0083.jpg
ws_stitch_1 | Traceback (most recent call last):
ws_stitch_1 |   File "/opt/OpenDroneMap/run.py", line 38, in <module>
ws_stitch_1 |     plasm.execute(niter=1)
ws_stitch_1 |   File "/opt/OpenDroneMap/scripts/dataset.py", line 57, in process
ws_stitch_1 |     self.params.force_ccd)
ws_stitch_1 |   File "/opt/OpenDroneMap/opendm/types.py", line 32, in __init__
ws_stitch_1 |     self.parse_pyexiv2_values(self.path_file, force_focal, force_ccd)
ws_stitch_1 |   File "/opt/OpenDroneMap/opendm/types.py", line 63, in parse_pyexiv2_values
ws_stitch_1 |     val = metadata[key].value
ws_stitch_1 |   File "/usr/lib/python2.7/dist-packages/pyexiv2/xmp.py", line 210, in _get_value
ws_stitch_1 |     self._compute_value()
ws_stitch_1 |   File "/usr/lib/python2.7/dist-packages/pyexiv2/xmp.py", line 204, in _compute_value
ws_stitch_1 |     self._value = self._convert_to_python(self._raw_value, self.type)
ws_stitch_1 |   File "/usr/lib/python2.7/dist-packages/pyexiv2/xmp.py", line 374, in _convert_to_python
ws_stitch_1 |     raise NotImplementedError('XMP conversion for type [%s]' % type)
ws_stitch_1 | NotImplementedError: XMP conversion for type [ResourceRef]

Would it be better to just ignore this error ? The whole problem fail just because an error we probably don't care.

What you think ?

GCorbel commented 7 years ago

I don't know if it's easy or not but is possible to change for gexiv2 , pyexiv2 seems to be deprecated.

dakotabenjamin commented 7 years ago

Right now OpenSfM is dependent on pyexiv2 so it doesn't make sense yet. I'll open an issue over there though to hear their opinions on the matter.

edit: https://github.com/mapillary/OpenSfM/issues/111

dakotabenjamin commented 7 years ago

Also, this error is fixed in the development branch, which I'm hoping to merge with master this week. You can wait for that release or checkout the branch yourself and see if it fixes this problem.

paulinus commented 7 years ago

@dakotabenjamin, OpenSfM uses pyexiv2 only when converting video to still images, which is a feature not used in ODM. So it is possible to migrate ODM to gexiv2 independently of OpenSfM.