How to Geotag images using Dataflash logs

Hi, I have been trying to geotag images using the data flash logs downloaded from the APM, but I have not been able to get the correct locations to be tagged in the pictures. I suspect that I need to change the Log Offsets line? but I do not know the values. Can anyone tell me how this should be done? Thanks!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • MR60

    Alternatively to synchronizing with specific log messages, I also use a time synchro.

    This works like this:

    -With the camera you will use for your pictures, take a picture of a GPS application on your smartphone that will display the GPS time.

    -The difference between the time of your camera at the moment the picture is taken and the GPS time will be your offset.

  • Hello,

    I'm also having this problem with Geo Ref Images tool. I used the CAM Message Synchro option to look for cam messages in the log file but I've got the error :

    Using AMSL Altitude False
    Reading log for CAM Messages
    Log Read with - 91 - CAM Messages found
    Read images
    Images read : 91
    Error System.FormatException: Vstupní řetězec nemá správný formát.
       v System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
       v System.Double.Parse(String s)
       v MissionPlanner.Georefimage.doworkCAM(String logFile, String dirWithImages) v c:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\georefimage.cs:řádek 990
       v MissionPlanner.Georefimage.BUT_doit_Click(Object sender, EventArgs e) v c:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\georefimage.cs:řádek 2046

    I suspect that the tool is not fully developed yet or it has a bug.. It's a shame..

    • Developer
      Hello Michal, there was a very recent chanGE to the tool to add this CAM message function. Therry still be some bugs, I will let the responsible person know so he can take a look at this issue.
      • Hi, just flew a small mission in the pixhawk triggered 9 photos but looking at the log, there are no cam messages present.  I wish to geotag tah the photos.  Does anyone have a solution for this?

        • Hi,

          I had the same problem. Mission Planner says "0 - cam messages found". You need to enable the camera log:

          Go to the terminal windows in Mission Planner, klick "Connect", type "logs" (enter) then you should see what logs are enabled. If not "CAMERA" shows up, type "enable camera" (enter). This should do it...

  • @Jaime,

    Thx for the tip.

    So in the CTRL F input box, do you chose the .log file or the .txt file.

    The .log file seems to be a GPX which should not be the right file

    So I am left with .txt file, but then headers must be wrong since I have an error msg :

    Error System.FormatException: Input string was not in a correct format.
    at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
    at System.Double.Parse(String s)
    at MissionPlanner.Georefimage.dowork(String logFile, String dirWithImages, Single offsetseconds, Boolean dooffset) in c:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\georefimage.cs:line 507
    at MissionPlanner.Georefimage.BUT_doit_Click(Object sender, EventArgs e) in c:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\georefimage.cs:line 1288

     

    I am using MP 1.2.99 and arduplane 3.0.1

    What do you think ?

    • You should use the .log file. This is the log that contains the GPS track for the vehicle. This log is also better that the tlog, as you may loose comms and the tlog may be incomplete.

  • Hi. I'd just like to invite everyone here to also check out my related discussion on this topic which I started yesterday. My main point was that if your UAV is set up in such a way that the camera is triggered by the autopilot (either using an IR remote, a servo to press the shutter button, or directly through the USB interface), there should be no need to estimate time offsets at all since the autopilot can insert "CAM" lines into the dataflash log each time the autopilot triggers the camera which contain all the geotagging data you need. Automating the geotagging process should then be a simple matter of extracting the data from those CAM lines throughout the dataflash log and matching them with a folder containing the corresponding photos in the correct sequence.

    It appears the last time the Geo Ref Images tool in Mission Planner was updated was before the CAM logging feature was introduced, which explains why there's no option to do it that way. However, I posted the same comment in the APM forum and it looks like I may have convinced one of the developers to look into updating the Geo Ref Images tool to add that capacity, so stay tuned.

    • thats a really nice feature, another thing I am looking forward is the option to have pitch, roll and baro altitude in stead of gps altitude. Has anyone achieved this? I was just comparing and when we have 5 meters in baro, there was about 25 in gps. way off..

    • That would be so easy if the camera actually triggered every time that the APM told it. But since there is no actual feedback from the camera the APM may tell it to trigger and it does not actually trigger. I have tried both ways and I always find that the APM does not trigger the camera reliably. Plus there is always an offset in time between when the APM tells it to trigger and the actual time the picture is taken due to the camera process of focusing and capturing the image. This lag may be of up to 2-3 seconds which depending on the speed of the vehicle will yield an error of several meters. So I still prefer to use the EXIF time in the picture file.

      Other systems use a logging device which attached to the cameras flash hot shoe to detect when the camera actually fires a picture. This results in a log entry at the exact time the picture was taken. This also works but again you sometimes get more pictures than log entries and you still have to check the pic times to know what entry matches which picture. 

      In short there is no perfect way of doing this yet. 

      Do you have a link to your discussion?

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…