This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi experts
Can setting appropriate LUT in the LDC module achieve a 90 degree rotation of the screen.
for example,Images with a resolution of 1920 * 1280 can be displayed at a resolution of 1280 * 1920 after passing through the LDC module.
In addition, does the MSC module have the function of rotating the screen in addition to the zoom function?
Hello Qiang,
Yes, LDC can rotate images by 90 degree, but MSC doesn't do that.
Regards,
Jianzhong
Hi peng,
Can setting appropriate LUT in the LDC module achieve a 90 degree rotation of the screen.
For these in-plane 2D transform, it is easier to use the 2D matrix in LDC (no need to use the LUT).
For these in-plane 2D transform, it is easier to use the 2D matrix in LDC (no need to use the LUT)
Hi Gang
Does the two-dimensional matrix of LDC you mentioned refer to the parameters in the following figure。
I have consulted the manual. The first six parameters are affine transform coefficient.
The last two parameters are perspective warp transform coefficient.
Is there a more detailed introduction about two-dimensional matrices.
Hi Peng,
Yes, that is the one.
For 2D affine transform, you only need to use A,B,C,D,E,F.
It is a simple transform as below (you can ignore z, g, h).
(h_u, v_u) starts from (0,0) to output image (width-1, height-1).
Same for (h_afff, v_aff) for input image location.
You shall be able to find some previous discussion on e2e for this topic.
Hi Gang
I made modifications to the XML file;
a = 0;b= 4096;c = 0
d = 4096;e = 0;f = 0
The image has not changed.
Is there a problem with setting up where to use it?
<?xml version="1.0" encoding="utf-8"?> <LDC_ODC xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!--this is comment--> <dcc_name>ldc_odc</dcc_name> <dcc_header> <camera_module_id> 233</camera_module_id> <dcc_descriptor_id> 5</dcc_descriptor_id> <algorithm_vendor_id> 1</algorithm_vendor_id> <tunning_tool_version> 0</tunning_tool_version> </dcc_header> <!--=======================================================================--> <typedef> <cfg_ldc_vars type="struct"> <ldc_en type="uint16"> </ldc_en> <ldc_ldmapen type="uint16"> </ldc_ldmapen> <ldc_datamode type="uint16"> </ldc_datamode> <ldc_opdatamode type="uint16"> </ldc_opdatamode> <ldc_ip_dfmt type="uint16"> </ldc_ip_dfmt> <ldc_pwarpen type="uint16"> </ldc_pwarpen> <ldc_yint_typ type="uint16"> </ldc_yint_typ> <ldc_regmode_en type="uint16"> </ldc_regmode_en> <ldc_meshtable_m type="uint16"> </ldc_meshtable_m> <ldc_mesh_frsz_w type="uint16"> </ldc_mesh_frsz_w> <ldc_mesh_frsz_h type="uint16"> </ldc_mesh_frsz_h> <ldc_compute_frsz_w type="uint16"> </ldc_compute_frsz_w> <ldc_compute_frsz_h type="uint16"> </ldc_compute_frsz_h> <ldc_initx type="uint16"> </ldc_initx> <ldc_inity type="uint16"> </ldc_inity> <ldc_input_frsz_w type="uint16"> </ldc_input_frsz_w> <ldc_input_frsz_h type="uint16"> </ldc_input_frsz_h> <ldc_obw type="uint16"> </ldc_obw> <ldc_obh type="uint16"> </ldc_obh> <ldc_pixpad type="uint16"> </ldc_pixpad> <ldc_a type="int16"> </ldc_a> <ldc_b type="int16"> </ldc_b> <ldc_c type="int16"> </ldc_c> <ldc_d type="int16"> </ldc_d> <ldc_e type="int16"> </ldc_e> <ldc_f type="int16"> </ldc_f> <ldc_g type="int16"> </ldc_g> <ldc_h type="int16"> </ldc_h> <ldc_sf_width type="uint16[3]"> </ldc_sf_width> <ldc_sf_height type="uint16[3]"> </ldc_sf_height> <ldc_sf_en type="uint16[3][3]"> </ldc_sf_en> <ldc_sf_obw type="uint16[3][3]"> </ldc_sf_obw> <ldc_sf_obh type="uint16[3][3]"> </ldc_sf_obh> <ldc_sf_pad type="uint16[3][3]"> </ldc_sf_pad> <ldc_ylut_en type="uint16"> </ldc_ylut_en> <ldc_yin_bitdpth type="uint16"> </ldc_yin_bitdpth> <ldc_yout_bitdpth type="uint16"> </ldc_yout_bitdpth> <ldc_clut_en type="uint16"> </ldc_clut_en> <ldc_cin_bitdpth type="uint16"> </ldc_cin_bitdpth> <ldc_cout_bitdpth type="uint16"> </ldc_cout_bitdpth> <ldc_y_lut type="uint16[513]"> </ldc_y_lut> <ldc_c_lut type="uint16[513]"> </ldc_c_lut> <mesh_table_pitch_in_bytes type="uint32"> </mesh_table_pitch_in_bytes> <mesh_table_size type="uint32"> </mesh_table_size> <mesh_lut type="uint16*"> </mesh_lut> </cfg_ldc_vars> </typedef> <!--=======================================================================--> <use_case val="65535"> <usecase_general> <ldc_dcc type="cfg_ldc_vars" main="general"> { 1 // LDC_CTRL LDC_EN(0) LDC Enable, 0: Disable, 1: Enable 1 // LDC_CTRL LDMAPEN(1) LD Mapping enable, 0: disable, 1: enable 2 // LDC_CTRL DATAMODE(4:3) Input data mode, 0:YUV422, 1:Y only, 2:YUV420, 3:YUV420 UV 1 // LDC_CTRL OP_DATAMODE Output data mode, 0: keep UYVY; 1: convert to 420 0 // LDC_CTRL IP_DFMT(6:5) Input pixel format, 0:8b, 1:12b packed, 2:12b unpacked 1 // LDC_CTRL PWARPEN(7) Perspective warp 0: Disable . 1: Enable 1 // LDC_CFG YINT_TYP(6) Interpolation type for Y . 0: Bicubic, 1: Bilinear 0 // LDC_CFG REGMODE_EN Region mode, 0: disable, 1: enable 3 // LDC_MESHTABLE_CFG M(2:0) Mesh table subsampling factor (0-7) 1920 // LDC_MESH_FRSZ W(13:0) Mesh frame width (0-8192) 1080 // LDC_MESH_FRSZ H(29:16) Mesh frame height (0-8192) 1920 // LDC_COMPUTE_FRSZ W(13:0) Compute width (0-8192) 1080 // LDC_COMPUTE_FRSZ H(29:16) Compute height (0-8192) 0 // LDC_INITXY INITX(13:0) Output starting horizontal coordinate (0-8192) 0 // LDC_INITXY INITY(29:16) Output starting vertical coordinate (0-8192) 1920 // LDC_INPUT_FRSZ W(29:16) Input frame width 1080 // LDC_INPUT_FRSZ H(13:0) Input frame height 128 // LDC_BLOCK_SIZE OBW(7:0) Output block width (0-255) 64 // LDC_BLOCK_SIZE OBH(15:8) Output block height (0-255) 1 // LDC_BLOCK_SIZE PIXPAD(19:16) Pixel pad (0-15) 0 // LDC_AB A(15:0) Affine Transform warp, A S16Q12 4096 // LDC_AB B(31:16) Affine Transform warp, B S16Q12 0 // LDC_CD C(15:0) Affine Transform warp, C S16Q3 -4096 // LDC_CD D(31:16) Affine Transform warp, D S16Q12 0 // LDC_EF E(15:0) Affine Transform warp, E S16Q12 0 // LDC_EF F(31:16) Affine Transform warp, F S16Q3 0 // LDC_GH G(15:0) Affine Transform warp, G S16Q23 0 // LDC_GH H(31:16) Affine Transform warp, H S16Q23 {0, 0, 0} //ldc_sf_width [3] {0, 0, 0} //ldc_sf_height[3] {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} //ldc_sf_en [3][3] {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} //ldc_sf_obw[3][3] {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} //ldc_sf_obh[3][3] {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}} //ldc_sf_pad[3][3] 0 // LDC_DUALOUT_CFG YLUT_EN Luma LUT enable (0-1) 8 // LDC_DUALOUT_CFG YIN_BITDPTH Luma input bit depth (8-12) 8 // LDC_DUALOUT_CFG YOUT_BITDPTH Luma output bit depth (8-12) 0 // LDC_DUALOUT_CFG CLUT_EN Chroma LUT enable (0-1) 8 // LDC_DUALOUT_CFG CIN_BITDPTH Chroma input bit depth (8-12) 8 // LDC_DUALOUT_CFG COUT_BITDPTH Chroma output bit depth (8-12) {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,}, 1, 1, {0} } </ldc_dcc> </usecase_general> </use_case> </LDC_ODC>
this is an xml file.
The image has not changed.
Hi peng,
You may try it out in tuning tool first to get the correct parameters.
(h_u, v_u) starts from (0,0) to output image (width-1, height-1).
Same for (h_afff, v_aff) for input image location.
Hi Gang
Is the input to LDC on the left side of the formula?
Normally, it's easier to understand input on the right side
Hi peng,
Is the input to LDC on the left side of the formula?
It is the normal y = f(x) notation with x for input and y for output.
Hi Gang
I asked a question unrelated to this case.
What is the use of this parameter in ae?
What is the coordinate system for affine transformation in the LDC module?Is it shown in the following picture?
Hi Peng,
What is the use of this parameter in ae?
This is for changing exposure time in steps.
I asked a question unrelated to this case.
BTW, please feel free to open a new thread with proper title for any new questions.
That is better for tracking.
Hi Peng,
What is the coordinate system for affine transformation in the LDC module?Is it shown in the following picture?
Yes, that is the right one.
LDC uses integer pixel counters starting from 0.
After rotating clockwise by 90 °, the position relationship should be as shown in the diagram。
The corresponding affine transformation matrix is
At this time, the x-coordinate should be shifted 1280(1920*1280) pixels in the positive direction。The corresponding radiative transformation matrix is.
But in reality, the affine transformation matrix that can obtain correct results in LDC is.
What is the reason for this?
This one above is definitely wrong as the first output would be in [1280, 1280+1920] and second in [-1279, 0].
This one above is definitely wrong as the first output would be in [1280, 1280+1920] and second in [-1279, 0].
Is the first output X?if it is,the first output would be in [1280, 1280+1280] and second in [-1920, 0].
X = y + 1280;
Y = -x;
y in [0,1280],x in [0 1920]
I don't understand how the two ranges you mentioned were calculated.
Y = -x;
Y is in [-1279, 0] since x is in [0, 1279].
X = y + 1280;
X is in [1280+1280, 0] since y is in [0, 1919].
Is the first output X?
X, Y are for your input image.
x is horizontal counter for your output image [0,1279].
y is vertical counter for your output image [0,1919].