How to update ISP parameters of imx8mp?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to update ISP parameters of imx8mp?

2,452 次查看
LDX
Contributor II

Excuse me, how can I update the modified sensor_calibration.xml to imx8-isp.service? Do I need to recompile the isp-imx-xxx project, then replace the original with a new .ko file, and then restart imx8-isp.service?

 

0 项奖励
回复
8 回复数

2,377 次查看
malik_cisse
Senior Contributor I

Hi,

As said, I have not done this directly myself, but I can point you to the right direction.
You may want to check this site where everything is explained in a detailed way. The code and command line examples can be gathered from their Virtual Machine:
https://www.phytec.de/cdocuments/?doc=MYBgIg&__hstc=12841640.b4e214a6c83134bb217549fe641d3161.168240...

There it states:

V4L2 External Control Interface

The VVEXT tool uses the viv_ext_ctrl V4L2 control internally to access the ISP. This mechanism can also be used externally and independently of the VVEXT tool to change the configuration of the ISP at runtime. On the NXP website, you can find the documentation for the viv_ext_ctrl V4L2 control and the available parameters under the following link: IMX8MPISPUV4L2IUG.pdf  (User account/login to NXP website required)

The BSP contains an exemplary implementation in the form of a Python demo. The demo can be found under /root/gstreamer-examples/isp_gstreamer-examples/gst-python_demo/isp-demo-cam.py 

0 项奖励
回复

2,377 次查看
malik_cisse
Senior Contributor I

If I understand this correctly one needs to launch v4l2-ctl command for ISP configuration prior to launching gst-launch-1.0

0 项奖励
回复

2,327 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @malik_cisse,

I hope you are doing well.
 
For the information related to vvext, please refer to the section 5 ISP Unit Test vvext User Manual and Table 120. vvext feature list of Document i.MX 8M Plus Camera and Display Guide.
 
Thanks & Regards,
Dhruvit Vasavada

2,427 次查看
malik_cisse
Senior Contributor I

You can indeed change the xml file by using the tuning tool too, however this tuning tool is not available to "normal Folks". You need to be premium partner to get it. I don't have it either. Therefore I change existing xml files manually.

In your case you don't want to use xml file but you rather want to use gst-launch-1.0 -v v4l2src to configure ISP and display the live stream.
I think this should be possible too, but I never configured the ISP via Gstreamer command line and I never saw any example.

In my C++ application I am using gstreamer programmatically and I configure the ISP like in vvext example.

0 项奖励
回复

2,398 次查看
LDX
Contributor II

Thank you for your suggestion. I tried to use vvext to configure ISP these days, but I noticed that the parameters that vvext can configure are very limited. The key problem is that I don't even know whether the modified configuration can work normally, which seems not.

2023-04-25 10-33-33 的屏幕截图.png

0 项奖励
回复

2,394 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @LDX,

I hope you are doing well
 
Please refer to the below document for the information related to ISP sensor calibration parameters.
 
There is no such document available that can be used to tune the parameter using GStreamer.
 
Thanks & Regards,
Dhruvit Vasavada
0 项奖励
回复

2,433 次查看
malik_cisse
Senior Contributor I

Hi,
Not sure what you mean by update.
If you want to change some values in the xml file you can do that and overwrite existing xml file. when you restart the ISP service, the new values will be used by the ISP.
systemctl restart imx8-isp.service

A better way to dynamically change the ISP settings (White balance, Gamma, etc) without restarting the ISP service is to use vvext tool
Its in /opt/imx.../bin/vvext
This tool has a text based UI that can be used to set many parameters. You can write your own C/C++ code based on this to integrate the configuration in your app.

0 项奖励
回复

2,430 次查看
LDX
Contributor II

I am referring to this article to transplant new modules.

https://www.nxp.com.cn/docs/en/application-note/AN13712.pdf

As 4.7 and 4.8 in the document say.

When I am tuning with isp tuning tool, I really only need to replace the xml file in the tool to update the parameters, but if I want to abandon this tool and only use gst-launch-1.0 -v v4l2src to plot, how can I make my xml file effective?

0 项奖励
回复