cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the camera parameters or the ISP in STM32N6570-DK Board

TatianaP
Associate II

Hi! I’m working with the STM32N6570-DK board using an object detection AI model, and I would like to manually modify the camera parameters. I believe settings such as exposure, white balance, and similar controls are currently configured automatically, but I want to use fixed/manual values instead.

I already tried modifying the cmw_camera.c file, but nothing changed. Which files do I actually need to modify in order to set specific camera parameter values? Do I need to use a dedicated tool for this?

I’m using the IMX335 camera module.

 
 
1 ACCEPTED SOLUTION

Accepted Solutions
JMar
Associate II

Hi, I my projects, the parameters you are referring to were set in a header file called "imx335_E27_ISP_param_conf.h" in particular, there are the options ".AECAlgo" and ".AEWAlgo" that can be disabled.

My modifications for setting fixed values instead of the automatic exposure algo were getting the following code:

    .sensorGainStatic = {
        .gain = 0,
    },
    .sensorExposureStatic = {
        .exposure = 0,
    },
    .AECAlgo = {
        .enable = 1,
        .exposureCompensation = EXPOSURE_TARGET_0_0_EV,
        .antiFlickerFreq = ANTIFLICKER_NONE,
    },

into this code:

    .sensorGainStatic = {
        .gain = 0,
    },
    .sensorExposureStatic = {
        .exposure = 16072,
    },
    .AECAlgo = {
        .enable = 0,
        .exposureCompensation = EXPOSURE_TARGET_0_0_EV,
        .antiFlickerFreq = ANTIFLICKER_NONE,
    },

 

I did it manually, testing arbitrary values, but I think the rightest way to do it would be by using the STM32-ISP-IQTune software (I did not tried it so I am not sure of what I am saying).

View solution in original post

2 REPLIES 2
JMar
Associate II

Hi, I my projects, the parameters you are referring to were set in a header file called "imx335_E27_ISP_param_conf.h" in particular, there are the options ".AECAlgo" and ".AEWAlgo" that can be disabled.

My modifications for setting fixed values instead of the automatic exposure algo were getting the following code:

    .sensorGainStatic = {
        .gain = 0,
    },
    .sensorExposureStatic = {
        .exposure = 0,
    },
    .AECAlgo = {
        .enable = 1,
        .exposureCompensation = EXPOSURE_TARGET_0_0_EV,
        .antiFlickerFreq = ANTIFLICKER_NONE,
    },

into this code:

    .sensorGainStatic = {
        .gain = 0,
    },
    .sensorExposureStatic = {
        .exposure = 16072,
    },
    .AECAlgo = {
        .enable = 0,
        .exposureCompensation = EXPOSURE_TARGET_0_0_EV,
        .antiFlickerFreq = ANTIFLICKER_NONE,
    },

 

I did it manually, testing arbitrary values, but I think the rightest way to do it would be by using the STM32-ISP-IQTune software (I did not tried it so I am not sure of what I am saying).

Hi @TatianaP 

 

he method proposed by @JMar is a correct and quick way to fix the exposure value: disable the AE algorithm and set the sensor exposure, and gain if needed.

If you need to find the right exposure value for a specific luminance target, STM32 ISP IQTune is preferable because it shows the result instantly.

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.