Page 1 of 1

Geotagging a BGR Object (either Raspiyuv or PiCamera)

Posted: Sat Sep 19, 2020 10:08 am
by Eswyn
Hi all, I plan to capture BGR objects for image processing purposes and I'm looking for a way to geotag them.

The official documentation says that Raspiyuv doesn't support --exif, but it didn't say anything about --gpsdexif... is it possible to use --gpsdexif with Raspiyuv?

As for PiCamera, I know how to capture directly to a numpy array but I still haven't figured out how to add GPS data. Any help or tips would be greatly appreciated.

Thank you!

Re: Geotagging a BGR Object (either Raspiyuv or PiCamera)

Posted: Sat Sep 19, 2020 7:17 pm
by topguy
Save the image to a fileformat with exif-data and then modify the exif. Will that work ?

Re: Geotagging a BGR Object (either Raspiyuv or PiCamera)

Posted: Sat Sep 19, 2020 8:39 pm
by DougieLawson
raspistill does EXIF tags.
raspiYUV doesn't.

You may be able to hack the code from raspistill into the raspiYUV program.

That stuff is all open source at https://github.com/raspberrypi/userland

Re: Geotagging a BGR Object (either Raspiyuv or PiCamera)

Posted: Sun Sep 20, 2020 8:05 am
by 6by9
There is no file format that I'm aware of for raw RGB or YUV data that includes a metadata option in the way that JPEG provides EXIF tags. Finding any standard for raw images is tricky enough.

TIFF may be an option (it supports EXIF) if you can work out how to feed the raw image data into libtiff or similar library.

Re: Geotagging a BGR Object (either Raspiyuv or PiCamera)

Posted: Sun Sep 20, 2020 9:43 am
by therealdavidp
A DNG file is actually just a TIFF file, with some particular tags defined for raw images. Making a DNG file from a Pi JPG+RAW is not difficult (search for PyDNG) and in the past I've used exiftool to mess around with the EXIF information in them.

Re: Geotagging a BGR Object (either Raspiyuv or PiCamera)

Posted: Sun Sep 20, 2020 10:09 am
by 6by9
therealdavidp wrote:
Sun Sep 20, 2020 9:43 am
A DNG file is actually just a TIFF file, with some particular tags defined for raw images. Making a DNG file from a Pi JPG+RAW is not difficult (search for PyDNG) and in the past I've used exiftool to mess around with the EXIF information in them.
Wouldnt that be the bayer data, not the processed image as yuv or rgb.
Aiui tiff can do rgb or yuv, and will then support exif amf other tags, but you're not going to do that from the jpeg+raw.

Note that gps is part of an extra private ifd tag rather than the exif tag. https://www.awaresystems.be/imaging/tiff/tifftags.html is a useful reference for understanding tiff tags.