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

DIY Robocars via Twitter
RT @TinkerGen_: "The Tinkergen MARK ($199) is my new favorite starter robocar. It’s got everything — computer vision, deep learning, sensor…
Monday
DIY Robocars via Twitter
Monday
DIY Robocars via Twitter
RT @roboton_io: Join our FREE Sumo Competition 🤖🏆 👉 https://roboton.io/ranking/vsc2020 #sumo #robot #edtech #competition #games4ed https://t.co/WOx…
Nov 16
DIY Drones via Twitter
First impressions of Tinkergen MARK robocar https://ift.tt/36IeZHc
Nov 16
DIY Robocars via Twitter
Our review of the @TinkerGen_ MARK robocar, which is the best on the market right now https://diyrobocars.com/2020/11/15/first-impressions-of-tinkergen-mark-robocar/ https://t.co/ENIlU5SfZ2
Nov 15
DIY Robocars via Twitter
RT @Ingmar_Stapel: I have now explained the OpenBot project in great detail on my blog with 12 articles step by step. I hope you enjoy read…
Nov 15
DIY Robocars via Twitter
RT @DAVGtech: This is a must attend. Click the link, follow link to read the story, sign up. #chaos2020 #digitalconnection #digitalworld ht…
Nov 15
DIY Robocars via Twitter
RT @a1k0n: Got a new chassis for outdoor races (hobbyking Quantum Vandal) but I totally didn't expect that it might cause problems for my g…
Nov 11
DIY Drones via Twitter
First impressions of the Intel OpenBot https://ift.tt/36qkVV4
Nov 10
DIY Robocars via Twitter
Nov 9
DIY Robocars via Twitter
Excellent use of cardboard instead of 3D printing! https://twitter.com/Ingmar_Stapel/status/1324960595318333441
Nov 7
DIY Robocars via Twitter
RT @chr1sa: We've got a record 50 teams competing in this month's @DIYRobocars @donkey_car virtual AI car race. Starting today at 10:00am…
Nov 7
DIY Robocars via Twitter
Nov 6
DIY Robocars via Twitter
RT @a1k0n: Car's view, using a fisheye camera. The ceiling light tracking algorithm gave me some ideas to improve ConeSLAM, and having grou…
Nov 5
DIY Robocars via Twitter
RT @a1k0n: To get ground truth I measured the rug, found the pixel coordinates of its corners, calibrated my phone camera with my standard…
Nov 5
DIY Robocars via Twitter
RT @a1k0n: @DIYRobocars is back in December, but outside. Time to reinvestigate ConeSLAM! I rigged up a quick and dirty ground-truth captur…
Nov 5
More…