ethanol100
Posts: 637
Joined: Wed Oct 02, 2013 12:28 pm

Exif lens related tags for HQ Camera

Sat May 09, 2020 4:13 pm

What is the recommend way to set lens parameters for raspistill?
Currently, the jpeg encoder adds a focal length of 3.0 mm and an aperture of 2 as a default parameter.

User avatar
HermannSW
Posts: 2551
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Exif lens related tags for HQ Camera

Sat May 09, 2020 4:17 pm

From other thread showing what ethanol100 stated:
Image
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26418
Joined: Sat Jul 30, 2011 7:41 pm

Re: Exif lens related tags for HQ Camera

Sat May 09, 2020 7:33 pm

Hmm, I seem to remember putting in code to allow you to set your own exif tags, but whether you can change the focal length tag I don't remember. Something like:

raspistill --exif FocalLength=10

I'll take a closer look on Monday if that doesn't work. It was a long time ago!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

ethanol100
Posts: 637
Joined: Wed Oct 02, 2013 12:28 pm

Re: Exif lens related tags for HQ Camera

Sat May 09, 2020 8:07 pm

Yes, I had tried the add exif command, but this did not seem to work for with setting FocalLength.
It would be nice if you could have a look next week, but it is not urgent.
We can use for example

Code: Select all

exiftool -fnumber=1.4 -aperturevalue=1.4 -focallength=50 image.jpg
to manually change the exif data of an image after capture.

gordon77
Posts: 4981
Joined: Sun Aug 05, 2012 3:12 pm

Re: Exif lens related tags for HQ Camera

Sat May 09, 2020 8:41 pm

Raspicam documentation appears to show

--exif --EXIF.FocalLengthIn35mmFilm

but l've never tried it.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26418
Joined: Sat Jul 30, 2011 7:41 pm

Re: Exif lens related tags for HQ Camera

Sun May 10, 2020 9:46 am

gordon77 wrote:
Sat May 09, 2020 8:41 pm
Raspicam documentation appears to show

--exif --EXIF.FocalLengthIn35mmFilm

but l've never tried it.
Ah, maybe it should be

--exif EXIF.FocalLength=<blah>
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

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

Re: Exif lens related tags for HQ Camera

Sun May 10, 2020 2:17 pm

It's the weekend so I'm not looking up source code.
I'm cheating and looking at the strings in the firmware

Code: Select all

pi@raspberrypi:/boot $ strings start_x.elf | grep EXIF
EXIF.Flash
EXIF.Fnumber
EXIF.MakerNote
EXIF.FocalLength
EXIF.ExposureTime
EXIF.MeteringMode
EXIF.ExposureMode
EXIF.WhiteBalance
EXIF.ExposureIndex
EXIF.ApertureValue
EXIF.BrightnessValue
EXIF.ISOSpeedRatings
EXIF.ExposureProgram
EXIF.MaxApertureValue
EXIF.DateTimeOriginal
EXIF.ShutterSpeedValue
EXIF.DateTimeDigitized
EXIF.
EXIF.
EXIF.
EXIF.#TagsPresent
pi@raspberrypi:/boot $ strings start_x.elf | grep IFD
IFD0.Model
IFD0.DateTime
IFD0.
IFD1.
IFD0.
IFD1.
IFD0.
IFD1.
IFD0.#TagsPresent
IFD1.#TagsPresent
So "EXIF.FocalLength=" would appear to be the winner.
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.

ethanol100
Posts: 637
Joined: Wed Oct 02, 2013 12:28 pm

Re: Exif lens related tags for HQ Camera

Sun May 10, 2020 5:03 pm

Still it does not seem to work. I used

Code: Select all

raspistill -o test.jpg --exif EXIF.FocalLength=50
If I look at exiftool -v3 test.jpg I get:

Code: Select all

  ExifToolVersion = 11.16
  FileName = test.jpg
  Directory = .
  FileSize = 2464394
  FileModifyDate = 1589129453
  FileAccessDate = 1589129452
  FileInodeChangeDate = 1589129453
  FilePermissions = 33188
  FileType = JPEG
  FileTypeExtension = JPG
  MIMEType = image/jpeg
JPEG APP1 (25624 bytes):
    0006: 45 78 69 66 00 00 4d 4d 00 2a 00 00 00 08 00 0a [Exif..MM.*......]
    0016: 01 00 00 04 00 00 00 01 00 00 0f d8 01 01 00 04 [................]
    0026: 00 00 00 01 00 00 0b e0 01 0f 00 02 00 00 00 0c [................]
    0036: 00 00 00 86 01 10 00 02 00 00 00 09 00 00 00 92 [................]
    0046: 01 1a 00 05 00 00 00 01 00 00 00 9c 01 1b 00 05 [................]
    0056: 00 00 00 01 00 00 00 a4 01 28 00 03 00 00 00 01 [.........(......]
    0066: 00 02 00 00 01 32 00 02 00 00 00 14 00 00 00 ac [.....2..........]
    [snip 25512 bytes]
  ExifByteOrder = MM
  + [IFD0 directory with 10 entries]
  | 0)  ImageWidth = 4056
  |     - Tag 0x0100 (4 bytes, int32u[1]):
  |         001e: 00 00 0f d8                                     [....]
  | 1)  ImageHeight = 3040
  |     - Tag 0x0101 (4 bytes, int32u[1]):
  |         002a: 00 00 0b e0                                     [....]
  | 2)  Make = RaspberryPi
  |     - Tag 0x010f (12 bytes, string[12]):
  |         0092: 52 61 73 70 62 65 72 72 79 50 69 00             [RaspberryPi.]
  | 3)  Model = RP_testc
  |     - Tag 0x0110 (9 bytes, string[9]):
  |         009e: 52 50 5f 74 65 73 74 63 00                      [RP_testc.]
  | 4)  XResolution = 72 (72/1)
  |     - Tag 0x011a (8 bytes, rational64u[1]):
  |         00a8: 00 00 00 48 00 00 00 01                         [...H....]
  | 5)  YResolution = 72 (72/1)
  |     - Tag 0x011b (8 bytes, rational64u[1]):
  |         00b0: 00 00 00 48 00 00 00 01                         [...H....]
  | 6)  ResolutionUnit = 2
  |     - Tag 0x0128 (2 bytes, int16u[1]):
  |         0066: 00 02                                           [..]
  | 7)  ModifyDate = 2020:05:10 18:50:52
  |     - Tag 0x0132 (20 bytes, string[20]):
  |         00b8: 32 30 32 30 3a 30 35 3a 31 30 20 31 38 3a 35 30 [2020:05:10 18:50]
  |         00c8: 3a 35 32 00                                     [:52.]
  | 8)  YCbCrPositioning = 1
  |     - Tag 0x0213 (2 bytes, int16u[1]):
  |         007e: 00 01                                           [..]
  | 9)  ExifOffset (SubDirectory) -->
  |     - Tag 0x8769 (4 bytes, int32u[1]):
  |         008a: 00 00 00 c0                                     [....]
  | + [ExifIFD directory with 22 entries]
  | | 0)  ExposureTime = 0.124984 (124984/1000000)
  | |     - Tag 0x829a (8 bytes, rational64u[1]):
  | |         01da: 00 01 e8 38 00 0f 42 40                         [...8..B@]
  | | 1)  ExposureProgram = 3
  | |     - Tag 0x8822 (2 bytes, int16u[1]):
  | |         00e2: 00 03                                           [..]
  | | 2)  ISO = 250
  | |     - Tag 0x8827 (2 bytes, int16u[1]):
  | |         00ee: 00 fa                                           [..]
  | | 3)  ExifVersion = 0220
  | |     - Tag 0x9000 (4 bytes, undef[4]):
  | |         00fa: 30 32 32 30                                     [0220]
  | | 4)  DateTimeOriginal = 2020:05:10 18:50:52
  | |     - Tag 0x9003 (20 bytes, string[20]):
  | |         01e2: 32 30 32 30 3a 30 35 3a 31 30 20 31 38 3a 35 30 [2020:05:10 18:50]
  | |         01f2: 3a 35 32 00                                     [:52.]
  | | 5)  CreateDate = 2020:05:10 18:50:52
  | |     - Tag 0x9004 (20 bytes, string[20]):
  | |         01f6: 32 30 32 30 3a 30 35 3a 31 30 20 31 38 3a 35 30 [2020:05:10 18:50]
  | |         0206: 3a 35 32 00                                     [:52.]
  | | 6)  ComponentsConfiguration = 1 2 3 0
  | |     - Tag 0x9101 (4 bytes, undef[4] read as int8u[4]):
  | |         011e: 01 02 03 00                                     [....]
  | | 7)  ShutterSpeedValue = 3.000184 (3000184/1000000)
  | |     - Tag 0x9201 (8 bytes, rational64s[1]):
  | |         020a: 00 2d c7 78 00 0f 42 40                         [.-.x..B@]
  | | 8)  ApertureValue = 2 (20000/10000)
  | |     - Tag 0x9202 (8 bytes, rational64u[1]):
  | |         0212: 00 00 4e 20 00 00 27 10                         [..N ..'.]
  | | 9)  BrightnessValue = 0.01 (1/100)
  | |     - Tag 0x9203 (8 bytes, rational64s[1]):
  | |         021a: 00 00 00 01 00 00 00 64                         [.......d]
  | | 10) MaxApertureValue = 2 (20000/10000)
  | |     - Tag 0x9205 (8 bytes, rational64u[1]):
  | |         0222: 00 00 4e 20 00 00 27 10                         [..N ..'.]
  | | 11) MeteringMode = 2
  | |     - Tag 0x9207 (2 bytes, int16u[1]):
  | |         015a: 00 02                                           [..]
  | | 12) Flash = 0
  | |     - Tag 0x9209 (2 bytes, int16u[1]):
  | |         0166: 00 00                                           [..]
  | | 13) FocalLength = 3.039 (30390/10000)
  | |     - Tag 0x920a (8 bytes, rational64u[1]):
  | |         022a: 00 00 76 b6 00 00 27 10                         [..v...'.]
  | | 14) MakerNoteUnknownText = ev=-1 mlux=-1 exp=124984 ag=1507 focus=255 gain_r=2.90[snip]
  | |     - Tag 0x927c (356 bytes, undef[356]):
  | |         0232: 65 76 3d 2d 31 20 6d 6c 75 78 3d 2d 31 20 65 78 [ev=-1 mlux=-1 ex]
  | |         0242: 70 3d 31 32 34 39 38 34 20 61 67 3d 31 35 30 37 [p=124984 ag=1507]
  | |         0252: 20 66 6f 63 75 73 3d 32 35 35 20 67 61 69 6e 5f [ focus=255 gain_]
  | |         0262: 72 3d 32 2e 39 30 36 20 67 61 69 6e 5f 62 3d 31 [r=2.906 gain_b=1]
  | |         0272: 2e 39 31 30 20 67 72 65 65 6e 6e 65 73 73 3d 30 [.910 greenness=0]
  | |         [snip 276 bytes]
  | | 15) FlashpixVersion = 0100
  | |     - Tag 0xa000 (4 bytes, undef[4]):
  | |         018a: 30 31 30 30                                     [0100]
  | | 16) ColorSpace = 1
  | |     - Tag 0xa001 (2 bytes, int16u[1]):
  | |         0196: 00 01                                           [..]
  | | 17) ExifImageWidth = 4056
  | |     - Tag 0xa002 (4 bytes, int32u[1]):
  | |         01a2: 00 00 0f d8                                     [....]
  | | 18) ExifImageHeight = 3040
  | |     - Tag 0xa003 (4 bytes, int32u[1]):
  | |         01ae: 00 00 0b e0                                     [....]
  | | 19) InteropOffset (SubDirectory) -->
  | |     - Tag 0xa005 (4 bytes, int32u[1]):
  | |         01ba: 00 00 03 8a                                     [....]
  | | + [InteropIFD directory with 1 entries]
  | | | 0)  InteropIndex = R98
  | | |     - Tag 0x0001 (4 bytes, string[4]):
  | | |         03a0: 52 39 38 00                                     [R98.]
  | | 20) ExposureMode = 0
  | |     - Tag 0xa402 (2 bytes, int16u[1]):
  | |         01c6: 00 00                                           [..]
  | | 21) WhiteBalance = 0
  | |     - Tag 0xa403 (2 bytes, int16u[1]):
  | |         01d2: 00 00                                           [..]
  + [IFD1 directory with 8 entries]
  | 0)  ImageWidth = 64
  |     - Tag 0x0100 (4 bytes, int32u[1]):
  |         03b2: 00 00 00 40                                     [...@]
  | 1)  ImageHeight = 48
  |     - Tag 0x0101 (4 bytes, int32u[1]):
  |         03be: 00 00 00 30                                     [...0]
  | 2)  Compression = 6
  |     - Tag 0x0103 (2 bytes, int16u[1]):
  |         03ca: 00 06                                           [..]
  | 3)  XResolution = 72 (72/1)
  |     - Tag 0x011a (8 bytes, rational64u[1]):
  |         040e: 00 00 00 48 00 00 00 01                         [...H....]
  | 4)  YResolution = 72 (72/1)
  |     - Tag 0x011b (8 bytes, rational64u[1]):
  |         0416: 00 00 00 48 00 00 00 01                         [...H....]
  | 5)  ResolutionUnit = 2
  |     - Tag 0x0128 (2 bytes, int16u[1]):
  |         03ee: 00 02                                           [..]
  | 6)  ThumbnailOffset = 1042
  |     - Tag 0x0201 (4 bytes, int32u[1]):
  |         03fa: 00 00 04 12                                     [....]
  | 7)  ThumbnailLength = 24576
  |     - Tag 0x0202 (4 bytes, int32u[1]):
  |         0406: 00 00 60 00                                     [..`.]
JPEG DQT (130 bytes):
    6422: 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6432: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6442: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6452: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6462: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6472: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6482: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    [snip 18 bytes]
JPEG SOF0 (15 bytes):
    64a8: 08 0b e0 0f d8 03 01 22 00 02 11 01 03 11 01    [.......".......]
  ImageWidth = 4056
  ImageHeight = 3040
  EncodingProcess = 0
  BitsPerSample = 8
  ColorComponents = 3
JPEG DHT (416 bytes):
    64bb: 00 00 01 05 01 01 01 01 01 01 00 00 00 00 00 00 [................]
    64cb: 00 00 01 02 03 04 05 06 07 08 09 0a 0b 10 00 02 [................]
    64db: 01 03 03 02 04 03 05 05 04 04 00 00 01 7d 01 02 [.............}..]
    64eb: 03 00 04 11 05 12 21 31 41 06 13 51 61 07 22 71 [......!1A..Qa."q]
    64fb: 14 32 81 91 a1 08 23 42 b1 c1 15 52 d1 f0 24 33 [.2....#B...R..$3]
    650b: 62 72 82 09 0a 16 17 18 19 1a 25 26 27 28 29 2a [br........%&'()*]
    651b: 34 35 36 37 38 39 3a 43 44 45 46 47 48 49 4a 53 [456789:CDEFGHIJS]
    [snip 304 bytes]
JPEG SOS
JPEG EOI
So, yes, FocalLength is tag 0x920a in subdirectory ExifIFD. I also tried EXIF.FocalLength=50/1, and all possible combinations for lower/upper case, but the value keeps to be (30390/10000).

By the way, thanks for answering questions on the weekend!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26418
Joined: Sat Jul 30, 2011 7:41 pm

Re: Exif lens related tags for HQ Camera

Sun May 10, 2020 7:22 pm

ethanol100 wrote:
Sun May 10, 2020 5:03 pm
Still it does not seem to work. I used

Code: Select all

raspistill -o test.jpg --exif EXIF.FocalLength=50
If I look at exiftool -v3 test.jpg I get:

Code: Select all

  ExifToolVersion = 11.16
  FileName = test.jpg
  Directory = .
  FileSize = 2464394
  FileModifyDate = 1589129453
  FileAccessDate = 1589129452
  FileInodeChangeDate = 1589129453
  FilePermissions = 33188
  FileType = JPEG
  FileTypeExtension = JPG
  MIMEType = image/jpeg
JPEG APP1 (25624 bytes):
    0006: 45 78 69 66 00 00 4d 4d 00 2a 00 00 00 08 00 0a [Exif..MM.*......]
    0016: 01 00 00 04 00 00 00 01 00 00 0f d8 01 01 00 04 [................]
    0026: 00 00 00 01 00 00 0b e0 01 0f 00 02 00 00 00 0c [................]
    0036: 00 00 00 86 01 10 00 02 00 00 00 09 00 00 00 92 [................]
    0046: 01 1a 00 05 00 00 00 01 00 00 00 9c 01 1b 00 05 [................]
    0056: 00 00 00 01 00 00 00 a4 01 28 00 03 00 00 00 01 [.........(......]
    0066: 00 02 00 00 01 32 00 02 00 00 00 14 00 00 00 ac [.....2..........]
    [snip 25512 bytes]
  ExifByteOrder = MM
  + [IFD0 directory with 10 entries]
  | 0)  ImageWidth = 4056
  |     - Tag 0x0100 (4 bytes, int32u[1]):
  |         001e: 00 00 0f d8                                     [....]
  | 1)  ImageHeight = 3040
  |     - Tag 0x0101 (4 bytes, int32u[1]):
  |         002a: 00 00 0b e0                                     [....]
  | 2)  Make = RaspberryPi
  |     - Tag 0x010f (12 bytes, string[12]):
  |         0092: 52 61 73 70 62 65 72 72 79 50 69 00             [RaspberryPi.]
  | 3)  Model = RP_testc
  |     - Tag 0x0110 (9 bytes, string[9]):
  |         009e: 52 50 5f 74 65 73 74 63 00                      [RP_testc.]
  | 4)  XResolution = 72 (72/1)
  |     - Tag 0x011a (8 bytes, rational64u[1]):
  |         00a8: 00 00 00 48 00 00 00 01                         [...H....]
  | 5)  YResolution = 72 (72/1)
  |     - Tag 0x011b (8 bytes, rational64u[1]):
  |         00b0: 00 00 00 48 00 00 00 01                         [...H....]
  | 6)  ResolutionUnit = 2
  |     - Tag 0x0128 (2 bytes, int16u[1]):
  |         0066: 00 02                                           [..]
  | 7)  ModifyDate = 2020:05:10 18:50:52
  |     - Tag 0x0132 (20 bytes, string[20]):
  |         00b8: 32 30 32 30 3a 30 35 3a 31 30 20 31 38 3a 35 30 [2020:05:10 18:50]
  |         00c8: 3a 35 32 00                                     [:52.]
  | 8)  YCbCrPositioning = 1
  |     - Tag 0x0213 (2 bytes, int16u[1]):
  |         007e: 00 01                                           [..]
  | 9)  ExifOffset (SubDirectory) -->
  |     - Tag 0x8769 (4 bytes, int32u[1]):
  |         008a: 00 00 00 c0                                     [....]
  | + [ExifIFD directory with 22 entries]
  | | 0)  ExposureTime = 0.124984 (124984/1000000)
  | |     - Tag 0x829a (8 bytes, rational64u[1]):
  | |         01da: 00 01 e8 38 00 0f 42 40                         [...8..B@]
  | | 1)  ExposureProgram = 3
  | |     - Tag 0x8822 (2 bytes, int16u[1]):
  | |         00e2: 00 03                                           [..]
  | | 2)  ISO = 250
  | |     - Tag 0x8827 (2 bytes, int16u[1]):
  | |         00ee: 00 fa                                           [..]
  | | 3)  ExifVersion = 0220
  | |     - Tag 0x9000 (4 bytes, undef[4]):
  | |         00fa: 30 32 32 30                                     [0220]
  | | 4)  DateTimeOriginal = 2020:05:10 18:50:52
  | |     - Tag 0x9003 (20 bytes, string[20]):
  | |         01e2: 32 30 32 30 3a 30 35 3a 31 30 20 31 38 3a 35 30 [2020:05:10 18:50]
  | |         01f2: 3a 35 32 00                                     [:52.]
  | | 5)  CreateDate = 2020:05:10 18:50:52
  | |     - Tag 0x9004 (20 bytes, string[20]):
  | |         01f6: 32 30 32 30 3a 30 35 3a 31 30 20 31 38 3a 35 30 [2020:05:10 18:50]
  | |         0206: 3a 35 32 00                                     [:52.]
  | | 6)  ComponentsConfiguration = 1 2 3 0
  | |     - Tag 0x9101 (4 bytes, undef[4] read as int8u[4]):
  | |         011e: 01 02 03 00                                     [....]
  | | 7)  ShutterSpeedValue = 3.000184 (3000184/1000000)
  | |     - Tag 0x9201 (8 bytes, rational64s[1]):
  | |         020a: 00 2d c7 78 00 0f 42 40                         [.-.x..B@]
  | | 8)  ApertureValue = 2 (20000/10000)
  | |     - Tag 0x9202 (8 bytes, rational64u[1]):
  | |         0212: 00 00 4e 20 00 00 27 10                         [..N ..'.]
  | | 9)  BrightnessValue = 0.01 (1/100)
  | |     - Tag 0x9203 (8 bytes, rational64s[1]):
  | |         021a: 00 00 00 01 00 00 00 64                         [.......d]
  | | 10) MaxApertureValue = 2 (20000/10000)
  | |     - Tag 0x9205 (8 bytes, rational64u[1]):
  | |         0222: 00 00 4e 20 00 00 27 10                         [..N ..'.]
  | | 11) MeteringMode = 2
  | |     - Tag 0x9207 (2 bytes, int16u[1]):
  | |         015a: 00 02                                           [..]
  | | 12) Flash = 0
  | |     - Tag 0x9209 (2 bytes, int16u[1]):
  | |         0166: 00 00                                           [..]
  | | 13) FocalLength = 3.039 (30390/10000)
  | |     - Tag 0x920a (8 bytes, rational64u[1]):
  | |         022a: 00 00 76 b6 00 00 27 10                         [..v...'.]
  | | 14) MakerNoteUnknownText = ev=-1 mlux=-1 exp=124984 ag=1507 focus=255 gain_r=2.90[snip]
  | |     - Tag 0x927c (356 bytes, undef[356]):
  | |         0232: 65 76 3d 2d 31 20 6d 6c 75 78 3d 2d 31 20 65 78 [ev=-1 mlux=-1 ex]
  | |         0242: 70 3d 31 32 34 39 38 34 20 61 67 3d 31 35 30 37 [p=124984 ag=1507]
  | |         0252: 20 66 6f 63 75 73 3d 32 35 35 20 67 61 69 6e 5f [ focus=255 gain_]
  | |         0262: 72 3d 32 2e 39 30 36 20 67 61 69 6e 5f 62 3d 31 [r=2.906 gain_b=1]
  | |         0272: 2e 39 31 30 20 67 72 65 65 6e 6e 65 73 73 3d 30 [.910 greenness=0]
  | |         [snip 276 bytes]
  | | 15) FlashpixVersion = 0100
  | |     - Tag 0xa000 (4 bytes, undef[4]):
  | |         018a: 30 31 30 30                                     [0100]
  | | 16) ColorSpace = 1
  | |     - Tag 0xa001 (2 bytes, int16u[1]):
  | |         0196: 00 01                                           [..]
  | | 17) ExifImageWidth = 4056
  | |     - Tag 0xa002 (4 bytes, int32u[1]):
  | |         01a2: 00 00 0f d8                                     [....]
  | | 18) ExifImageHeight = 3040
  | |     - Tag 0xa003 (4 bytes, int32u[1]):
  | |         01ae: 00 00 0b e0                                     [....]
  | | 19) InteropOffset (SubDirectory) -->
  | |     - Tag 0xa005 (4 bytes, int32u[1]):
  | |         01ba: 00 00 03 8a                                     [....]
  | | + [InteropIFD directory with 1 entries]
  | | | 0)  InteropIndex = R98
  | | |     - Tag 0x0001 (4 bytes, string[4]):
  | | |         03a0: 52 39 38 00                                     [R98.]
  | | 20) ExposureMode = 0
  | |     - Tag 0xa402 (2 bytes, int16u[1]):
  | |         01c6: 00 00                                           [..]
  | | 21) WhiteBalance = 0
  | |     - Tag 0xa403 (2 bytes, int16u[1]):
  | |         01d2: 00 00                                           [..]
  + [IFD1 directory with 8 entries]
  | 0)  ImageWidth = 64
  |     - Tag 0x0100 (4 bytes, int32u[1]):
  |         03b2: 00 00 00 40                                     [...@]
  | 1)  ImageHeight = 48
  |     - Tag 0x0101 (4 bytes, int32u[1]):
  |         03be: 00 00 00 30                                     [...0]
  | 2)  Compression = 6
  |     - Tag 0x0103 (2 bytes, int16u[1]):
  |         03ca: 00 06                                           [..]
  | 3)  XResolution = 72 (72/1)
  |     - Tag 0x011a (8 bytes, rational64u[1]):
  |         040e: 00 00 00 48 00 00 00 01                         [...H....]
  | 4)  YResolution = 72 (72/1)
  |     - Tag 0x011b (8 bytes, rational64u[1]):
  |         0416: 00 00 00 48 00 00 00 01                         [...H....]
  | 5)  ResolutionUnit = 2
  |     - Tag 0x0128 (2 bytes, int16u[1]):
  |         03ee: 00 02                                           [..]
  | 6)  ThumbnailOffset = 1042
  |     - Tag 0x0201 (4 bytes, int32u[1]):
  |         03fa: 00 00 04 12                                     [....]
  | 7)  ThumbnailLength = 24576
  |     - Tag 0x0202 (4 bytes, int32u[1]):
  |         0406: 00 00 60 00                                     [..`.]
JPEG DQT (130 bytes):
    6422: 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6432: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6442: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6452: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6462: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6472: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    6482: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 [................]
    [snip 18 bytes]
JPEG SOF0 (15 bytes):
    64a8: 08 0b e0 0f d8 03 01 22 00 02 11 01 03 11 01    [.......".......]
  ImageWidth = 4056
  ImageHeight = 3040
  EncodingProcess = 0
  BitsPerSample = 8
  ColorComponents = 3
JPEG DHT (416 bytes):
    64bb: 00 00 01 05 01 01 01 01 01 01 00 00 00 00 00 00 [................]
    64cb: 00 00 01 02 03 04 05 06 07 08 09 0a 0b 10 00 02 [................]
    64db: 01 03 03 02 04 03 05 05 04 04 00 00 01 7d 01 02 [.............}..]
    64eb: 03 00 04 11 05 12 21 31 41 06 13 51 61 07 22 71 [......!1A..Qa."q]
    64fb: 14 32 81 91 a1 08 23 42 b1 c1 15 52 d1 f0 24 33 [.2....#B...R..$3]
    650b: 62 72 82 09 0a 16 17 18 19 1a 25 26 27 28 29 2a [br........%&'()*]
    651b: 34 35 36 37 38 39 3a 43 44 45 46 47 48 49 4a 53 [456789:CDEFGHIJS]
    [snip 304 bytes]
JPEG SOS
JPEG EOI
So, yes, FocalLength is tag 0x920a in subdirectory ExifIFD. I also tried EXIF.FocalLength=50/1, and all possible combinations for lower/upper case, but the value keeps to be (30390/10000).

By the way, thanks for answering questions on the weekend!
It's the weekend?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26418
Joined: Sat Jul 30, 2011 7:41 pm

Re: Exif lens related tags for HQ Camera

Mon May 11, 2020 11:39 am

OK, think there is a minor bug in the firmware which means the camera is reporting it has a focal length of 3.04 (hangover from the driver it was based off) which I suspect is overwriting the incoming data from raspistill. I've got an internal fix in progress.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

ethanol100
Posts: 637
Joined: Wed Oct 02, 2013 12:28 pm

Re: Exif lens related tags for HQ Camera

Mon May 11, 2020 12:22 pm

Great, thank you for looking into this.
Could you also check if the same applies for the EXIF.ApertureValue?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26418
Joined: Sat Jul 30, 2011 7:41 pm

Re: Exif lens related tags for HQ Camera

Mon May 11, 2020 1:16 pm

ethanol100 wrote:
Mon May 11, 2020 12:22 pm
Great, thank you for looking into this.
Could you also check if the same applies for the EXIF.ApertureValue?
It probably does, just checking.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

ethanol100
Posts: 637
Joined: Wed Oct 02, 2013 12:28 pm

Re: Exif lens related tags for HQ Camera

Thu May 21, 2020 6:47 am

Thank you, setting focal length and F-number now works with last rpi-update!

Code: Select all

raspistill -o test.jpg --exif EXIF.FocalLength=50/1 --exif EXIF.FNumber=8/3
Just as a side note: These values need to be given as fractions, else the FocalLength shows as 0.00mm (it writes for example [50/0] into the exif tag).

Return to “Camera board”