The CoKOA(Correction of Keystone and Optical Aberrations) is a powerful feature of RDC which compensates a perspective distortion such as keystone and optical distortion, pincushion, chromatic aberration and so on.
This post describes two ways of using CoKOA in Vista Studio™ GUI tool and in linux console application of Vista Cube™ SDK. If you do not use both, you should make use of API code in Vista Cube™ (Refer to VistaCube_User_Guid_RDC200.pdf for details).
Our demo aims to transform a square-shaped screen to a trapezoid-shaped one like below.
Vista Studio™ Case :
- Open Vista Studio™ and then click a CoKOA Feature tap.
- Type Keystone parameters as the above image.
- Left Top X : 150
- Right Top X : 150
- (Optional) You can view the simulated image by clicking a Simulate button.
- (Optional) You can also save the image by clicking a Save button and the LUT values that is used for its transformation
- Click a Burn button. It causes CoKOA LUT values to be calculated and then to be downloaded into flash memory in RDC.
- After a download finish, click a Show button to see the result.
- (Optional) Instead of clicking a Burn button, you can use a Direct Show button. (It makes the almost same result with the very fast speed)
- If you want to keep this CoKOA turn-on even after reboot, you should set cokoa_en_boot bit to “1”.
<- e.g in RDC200 init file.
- In your RDC init file, modify the 0x75 address to be 0x80 (that is cokoa_en_boot = 1 ).
- If you do not use Chromatic aberration function means the same R/G/B of them, set a cokoa_en_ca(
0x74 0x80 1 0
) bit to be “0”(There will be operation reduction). - Download it into flash of RDC.
- Click a Download button on main menu of Vista Studio™.
-
- In a Download dialog, select the modified init file only.
-
- Click a Start button.
- Reboot and then check the result.
Vista Cube™ Case :
- Execute linux console application of Vista Cube™.
- This console application is provided in source level, so you should build it with your i2c interface according to your target system (Refer to this blog).
- As run it, you will see a lot of prompt messages.
- Type
l
in order to create CoKOA LUT. - Type
1
( If you just only make a CoKOA LUT file, type2
). - Follow the prompt messages to insert CoKOA parameters.
- Type
1920 1080
- Type
150 0
- Type
150 0
- Type
0 0
- Type
0 0
- Type
0 0 0
- Type
0 0 0
- Type
1.0
- Type
- If the entered-parameters like the above image is correct, type
y
. CoKOA LUT will be automatically calculated and then be downloaded it into flash of RDC.- Note : Even if you finish download without error, CoKOA won’t enable.
- To activate the CoKOA LUT you just download, you should use a cokoa_en_boot bit like Vista Studio™ case.
- Edit your RDC200 init file so that the 0x75 address has 0x80. (
0x75 0x80 1 0
) - The cokoa_en_ca(
0x74 0x80 1 0
) bit is the same as Vista Studio™ case. - Download the init file by using RDC init on the prompts of linux console application.
- Reboot and check the result.
- Edit your RDC200 init file so that the 0x75 address has 0x80. (
- (Optional) You can use Direct CoKOA you saw in Vista Studio™ case.
- Type
o
- Type
0
- Follower the next prompt messages to write CoKOA parameters
- NOTE : This time, only Keystone function for Direct CoKOA is supported in linux console application of VistaCube™.
- Lastly, after checking the values you entered, type
y
. You can see the results immediately.
- Type
CoKOA paramters:
- ks_lt_x: X position at left-top corner for keystone effect, represented by 2’s complement and its range is -256 ~ 255
- ks_lt_y: Y position at left-top corner for keystone effect, represented by 2’s complement and its range is -64 ~ 63
- ks_rt_x: X position at right-top corner for keystone effect, represented by 2’s complement and its range is -256 ~ 255
- ks_rt_y: Y position at right-top corner for keystone effect, represented by 2’s complement and its range is -64 ~ 63
- ks_lb_x: X position at left-bottom corner for keystone effect, represented by 2’s complement and its range is -256 ~ 255
- ks_lb_y : Y position at left-bottom corner for keystone effect, represented by 2’s complement and its range is -64 ~ 63
- ks_rb_x: X position at right-bottom corner for keystone effect, represented by 2’s complement and its range is -256 ~ 255
- ks_rb_y: Y position at right-bottom corner for keystone effect, represented by 2’s complement and its range is -64 ~ 63
- k1: 1st radial distortion coefficient, represented by multiplying 1000 and its range is ~0.5 ~ 0.5
- k2 : 2nd radial distortion coefficient, represented by multiplying 1000 and its range is ~0.5 ~ 0.5
- k3 : 3rd radial distortion coefficient, represented by multiplying 1000 and its range is ~0.5 ~ 0.5
- chrm_r : Ratio for red chromatic distortion, represented by unsigned integer and its range is 0 ~ 100
- chrm_b: Ratio for green chromatic distortion, represented by unsigned integer and its range is 0 ~ 100
- chrm_g: Ratio for blue chromatic distortion, represented by unsigned integer and its range is 0 ~ 100
- interp : Interpolation ratio, represented by multiplying 1000 and its range is 0.5 ~ 1.5
- cokoa_en_ca{RDC200 Register Address 0x74<7>} : chrm_r applies equally to chrm_b and chrm_g. It is useful when fast CoKOA
- 0 : diable, 1: enable
- cokoa_en_boot{RDC200 Register Address 0x75<7>} : a system flag bit which determines whether or not CoKOA will active when booting.
- 0 : diable, 1: enable