Dynamic range histogram combing issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynamic range histogram combing issue

838 Views
mcarlen
Contributor I

I'm using a 10 bit greyscale camera with 10-bit parallell data connected to an imx6dl for image capturing. Running a late yocto release with the IPU_PIX_FMT_GREY implemented. We're only meaning to use the lower 8-bits of the data for each pixel.

Seeing combing effects on the dynamic range histogram we're suspecting there's some mapping of data between 16 bit or 10-bit and 8-bit or vice verse taking place somewhere in the IPU.

Could you advice in how to trace this issue? 

Here's some output:

[ 0.104350] imx-ipuv3 2400000.ipu: <ipu_probe>
[ 0.104369] imx-ipuv3 2400000.ipu: revision is IPUv3H
[ 0.104550] IPU CM Regs = 88826000
[ 0.104560] IPU IC Regs = 8882e000
[ 0.104567] IPU IDMAC Regs = 88836000
[ 0.104574] IPU DP Regs = 8883e000
[ 0.104580] IPU DC Regs = 88846000
[ 0.104586] IPU DMFC Regs = 8884e000
[ 0.104593] IPU DI0 Regs = 88854000
[ 0.104599] IPU DI1 Regs = 88856000
[ 0.104605] IPU SMFC Regs = 8885e000
[ 0.104612] IPU CSI0 Regs = 8887c000
[ 0.104618] IPU CSI1 Regs = 8887e000
[ 0.104624] IPU CPMem = 88880000
[ 0.104631] IPU TPMem = 888c0000
[ 0.104637] IPU DC Template Mem = 88900000
[ 0.104643] IPU VDI Regs = 888a2000
[ 0.119748] imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
[ 0.119763] ipu_clk = 270000000

[ 63.025534] imx-ipuv3 2400000.ipu: CSI_SENS_CONF = 0x00008B00
[ 63.031288] imx-ipuv3 2400000.ipu: CSI_ACT_FRM_SIZE = 0x01DF02EF

[ 35.080404] init channel = 15
[ 35.080415] Setting destination of csi
[ 35.080435] imx-ipuv3 2400000.ipu: initializing idma ch 0 @ 88880000
[ 35.080460] imx-ipuv3 2400000.ipu: ch 0 word 0 - 00000000 00000000 00000000 E0002800 00077C5D
[ 35.080476] imx-ipuv3 2400000.ipu: ch 0 word 1 - 03850000 0070A000 00CFC000 0000BBC0 00000000
[ 35.080486] imx-ipuv3 2400000.ipu: PFS 0x6,
[ 35.080496] imx-ipuv3 2400000.ipu: BPP 0x5,
[ 35.080506] imx-ipuv3 2400000.ipu: NPB 0x3f
[ 35.080516] imx-ipuv3 2400000.ipu: FW 751,
[ 35.080526] imx-ipuv3 2400000.ipu: FH 479,
[ 35.080536] imx-ipuv3 2400000.ipu: EBA0 0x1c280000
[ 35.080546] imx-ipuv3 2400000.ipu: EBA1 0x1c280000
[ 35.080556] imx-ipuv3 2400000.ipu: Stride 751
[ 35.080566] imx-ipuv3 2400000.ipu: scan_order 0
[ 35.080576] imx-ipuv3 2400000.ipu: uv_stride 0
[ 35.080585] imx-ipuv3 2400000.ipu: u_offset 0x0
[ 35.080595] imx-ipuv3 2400000.ipu: v_offset 0x0
[ 35.080604] imx-ipuv3 2400000.ipu: Width0 0+1,
[ 35.080614] imx-ipuv3 2400000.ipu: Width1 0+1,
[ 35.080623] imx-ipuv3 2400000.ipu: Width2 0+1,
[ 35.080632] imx-ipuv3 2400000.ipu: Width3 0+1,
[ 35.080642] imx-ipuv3 2400000.ipu: Offset0 0,
[ 35.080651] imx-ipuv3 2400000.ipu: Offset1 0,
[ 35.080661] imx-ipuv3 2400000.ipu: Offset2 0,
[ 35.080671] imx-ipuv3 2400000.ipu: Offset3 0
[ 35.080683] csi: eba 1c080000
[ 35.080692] csi: eba 1c100000

Labels (2)
0 Kudos
Reply
4 Replies

691 Views
b36401
NXP Employee
NXP Employee

You can refer this discussion regarding to configuring IPU for 10-bit camera input:

https://community.nxp.com/thread/336930

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

691 Views
sunilchomal
Contributor I

Hi Victor,

I am in need for the same information, and I am too getting "Unauthorized" error. Can you please help.

Sunil

0 Kudos
Reply

691 Views
mcarlen
Contributor I

Thanks for the link Victor but I get an un-authorized message when trying to access it. Can you authorize me?

0 Kudos
Reply

691 Views
Rodrigue
NXP Employee
NXP Employee

Hi Mattias,

With 10-bit greyscale cameras, like with bayer cameras, you have to use IPU_PIX_FMT_GENERIC_16, it means the IPU does not know anything about the format.

The histogram combing effect comes from this 10 to 16-bit conversion happening when using GENERIC_16, because 16 bits of data are being used when you input only 10. The remaining 6 are therefore set to 0.

If you use GENERIC (8-bits) then it will work but again chopping off 2 bits and therefore leading to clipping effects.

 

To avoid this issue, you need to fill the remaining 6 bits with some random data, so that you emulate the missing color tone of your original picture. Maybe there are some better algorithm on how to fill the data, but I do not know them.

best regards,

Rodrigue 

0 Kudos
Reply