Eswyn
Posts: 1
Joined: Sat Sep 19, 2020 7:52 am

Geotagging a BGR Object (either Raspiyuv or PiCamera)

Sat Sep 19, 2020 10:08 am

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!

User avatar
topguy
Posts: 6689
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

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

Sat Sep 19, 2020 7:17 pm

Save the image to a fileformat with exif-data and then modify the exif. Will that work ?

User avatar
DougieLawson
Posts: 39813
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

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

Sat Sep 19, 2020 8:39 pm

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
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9555
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

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

Sun Sep 20, 2020 8:05 am

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.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

therealdavidp
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 78
Joined: Tue Jan 07, 2020 9:15 am

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

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.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9555
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

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

Sun Sep 20, 2020 10:09 am

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.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Camera board”