How to get embedded data located after the frame?

Hi,

I am using a camera that provided embedded metadata after and before the active pixel area

At the top, 4 data rows, 18 VB rows, then image data.
At the bottom, Bottom of the image, then 17 VB rows then 4 statistics rows.

I think if I set embedded_metadata_height = "4"; I should get the 4 data rows located before the frame.

The Xavier AGX can get the statistics rows located after the frame? maybe applying a patch.

Regards.

1 Like

hello ManuelLeiva,

it’s not supported. we only support embedded metadata before active pixels.
may I know what’s the actual use-case? what’s the difference between those head/tail embedded metadata.

Hi JerryChang

The camera provided 2 types of embedded data, then each section has different information:

  • Embedded data: This includes all register settings used to capture the current frame
  • Embedded Statistics: contains identifiers and histogram information of the image in the frame.

The embedded data is located before the frame and the embedded statistics are located after the frame.

Question: Can the metadata be extracted by changing the code? or is it a limitation in the hardware?

Regards.

@JerryChang just following up on this, is this still the case? We also have a camera that has embedded metadata that can be configured at the heal/tail and also embedded statistics (which would mean varying number of rows in the head vs tail)

Hi, @JerryChang

I’m also having trouble getting my sensor with metadata after the active pixel area to work with Jetson.
Is there a way around this, like ignoring the tail metadata?

hi all,

the status remain the same, we only support embedded metadata before active pixels at the moment.
may I know how many rows is that tail metadata, are you able to workaround by increasing the active_h?

Hi @JerryChang

I tried increasing active_h, but the error could not be avoided.
My current test conditions are:

  • metadata_head: 2 lines
  • active_pixel_line: 864 lines
  • metadata_head: 2 lines

The device tree is set as follows:

embedded_metadata_height = "2";
active_h = "864";

The resulting trace log is:

kworker/2:0-25      [002] ....    85.265841: rtcpu_vinotify_event: tstamp:3499762984 cch:0 vi:1 tag:FS channel:0x00 frame:1 vi_tstamp:111984024224 data:0x0000000100000012
     kworker/2:0-25      [002] ....    85.265842: rtcpu_vinotify_event: tstamp:3499763248 cch:0 vi:1 tag:ATOMP_FS channel:0x00 frame:1 vi_tstamp:111984024320 data:0x0000000800000000
     kworker/2:0-25      [002] ....    85.265842: rtcpu_vinotify_event: tstamp:3499763534 cch:0 vi:1 tag:CHANSEL_EMBED_SOF channel:0x23 frame:1 vi_tstamp:111984024768 data:0x0000000000000004
     kworker/2:0-25      [002] ....    85.265842: rtcpu_vinotify_event: tstamp:3499763777 cch:0 vi:1 tag:CHANSEL_EMBED_EOF channel:0x23 frame:1 vi_tstamp:111984042272 data:0x0000000000010008
     kworker/2:0-25      [002] ....    85.265842: rtcpu_vinotify_event: tstamp:3499764061 cch:0 vi:1 tag:ATOMP_EMB_DATA_DONE channel:0x23 frame:1 vi_tstamp:111984043552 data:0x0000000000000000
     kworker/2:0-25      [002] ....    85.265843: rtcpu_vinotify_event: tstamp:3499764302 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:1 vi_tstamp:111984086176 data:0x0000000003020001
     kworker/2:0-25      [002] ....    85.265843: rtcpu_vinotify_event: tstamp:3499764584 cch:0 vi:1 tag:CHANSEL_PXL_SOF channel:0x23 frame:1 vi_tstamp:111984117888 data:0x0000000000000001
     kworker/2:0-25      [002] ....    85.265843: rtcpu_vinotify_event: tstamp:3499764826 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:1 vi_tstamp:111984128736 data:0x0000000008020001
     kworker/2:0-25      [002] ....    85.265843: rtcpu_vinotify_event: tstamp:3499765118 cch:0 vi:1 tag:CHANSEL_PXL_EOF channel:0x23 frame:1 vi_tstamp:111992073632 data:0x00000000035f0002
     kworker/2:0-25      [002] ....    85.265844: rtcpu_vinotify_event: tstamp:3499765362 cch:0 vi:1 tag:CHANSEL_FAULT channel:0x23 frame:1 vi_tstamp:111992074432 data:0x0000000000020800
     kworker/2:0-25      [002] ....    85.265844: rtcpu_vinotify_event: tstamp:3499765647 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:1 vi_tstamp:111992127936 data:0x0000000001020001
     kworker/2:0-25      [002] ....    85.265844: rtcpu_vinotify_event: tstamp:3499765892 cch:0 vi:1 tag:ATOMP_FRAME_DONE channel:0x23 frame:1 vi_tstamp:111992074848 data:0x0000000000000000
     kworker/2:0-25      [002] ....    85.321770: rtcpu_vinotify_event: tstamp:3500109986 cch:0 vi:1 tag:FE channel:0x00 frame:1 vi_tstamp:111992101344 data:0x0000000100000022

The embedded metadata(head) is 0x0001(2 lines), and the pixel data is 0x035f(864 lines), as expected.
But then CHANSEL_FAULT EMBED_RUNAWAY.
dmesg also has the same error and the image cannot be acquired.

tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 1, flags: 0, err_data 2048

I followed the advice and tried active_h all the way up to 868 from 864, but there was no change in the trace log.

… I’m sorry to write this far, but when I suddenly thought about it and set embedded_metadata_height = "4";, I was able to acquire the image.

There is no CHANSEL_FAULT in the trace log as follows:

     kworker/2:3-124     [002] ....   125.553095: rtcpu_vinotify_event: tstamp:4758767285 cch:0 vi:1 tag:FS channel:0x00 frame:1 vi_tstamp:152272184640 data:0x0000000100000012
     kworker/2:3-124     [002] ....   125.553097: rtcpu_vinotify_event: tstamp:4758767547 cch:0 vi:1 tag:ATOMP_FS channel:0x00 frame:1 vi_tstamp:152272184768 data:0x0000000800000000
     kworker/2:3-124     [002] ....   125.553098: rtcpu_vinotify_event: tstamp:4758767833 cch:0 vi:1 tag:CHANSEL_EMBED_SOF channel:0x23 frame:1 vi_tstamp:152272185248 data:0x0000000000000004
     kworker/2:3-124     [002] ....   125.553098: rtcpu_vinotify_event: tstamp:4758768078 cch:0 vi:1 tag:CHANSEL_PXL_SOF channel:0x23 frame:1 vi_tstamp:152272278304 data:0x0000000000000001
     kworker/2:3-124     [002] ....   125.553098: rtcpu_vinotify_event: tstamp:4758768357 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:1 vi_tstamp:152272289120 data:0x0000000008020001
     kworker/2:3-124     [002] ....   125.553098: rtcpu_vinotify_event: tstamp:4758768602 cch:0 vi:1 tag:CHANSEL_PXL_EOF channel:0x23 frame:1 vi_tstamp:152280234080 data:0x00000000035f0002
     kworker/2:3-124     [002] ....   125.553098: rtcpu_vinotify_event: tstamp:4758768877 cch:0 vi:1 tag:ATOMP_FRAME_DONE channel:0x23 frame:1 vi_tstamp:152280235328 data:0x0000000000000000
     kworker/2:3-124     [002] ....   125.553099: rtcpu_vinotify_event: tstamp:4758769122 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:1 vi_tstamp:152280255392 data:0x0000000002020001
     kworker/2:3-124     [002] ....   125.553099: rtcpu_vinotify_event: tstamp:4758769396 cch:0 vi:1 tag:CHANSEL_EMBED_EOF channel:0x23 frame:1 vi_tstamp:152280252320 data:0x0000000000030008
     kworker/2:3-124     [002] ....   125.553099: rtcpu_vinotify_event: tstamp:4758769638 cch:0 vi:1 tag:ATOMP_EMB_DATA_DONE channel:0x23 frame:1 vi_tstamp:152280253568 data:0x0000000000000000
     kworker/2:3-124     [002] ....   125.553099: rtcpu_vinotify_event: tstamp:4758769912 cch:0 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:1 vi_tstamp:152280291936 data:0x0000000003020001
     kworker/2:3-124     [002] ....   125.553099: rtcpu_vinotify_event: tstamp:4758770156 cch:0 vi:1 tag:FE channel:0x00 frame:1 vi_tstamp:152280261792 data:0x0000000100000022
     kworker/2:3-124     [002] ....   125.553100: rtcpu_vinotify_event: tstamp:4759114376 cch:0 vi:1 tag:ATOMP_FE channel:0x00 frame:1 vi_tstamp:152280261888 data:0x0000000800000000

This time, I just want the video, and it doesn’t matter if I can’t get the embedded data. my problem is solved.
I don’t think I would have gotten here so quickly without the suggestion to add more rows.
Thank you very much!

thanks for sharing, this is a valuable test results.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.