Is it possible to set `V4L2_CID_ARGUS_*` controls via a V4L2 program?

Hello, NVIDIA Developer Community,

My application requires fine-tuning the camera’s image processing features, such as edge enhancement, white balance, and exposure compensation. I’m particularly interested in utilizing the V4L2_CID_ARGUS_* controls available in the Argus API through a V4L2-based program.

I find it crucial for optimizing image quality for specific application needs. However, integrating these controls within a V4L2 context poses challenges, especially in setting them programmatically.

Below is a code snippet of what I’m trying to achieve, to set the Edge Enhancement Strength (V4L2_CID_ARGUS_EE_STRENGTH) control.

    v4l2_argus_edge_enhance_strength settings = {.EdgeEnhanceStrength = 0.5f};

    memset(&extCtrl, 0, sizeof(extCtrl));
    memset(&extCtrls, 0, sizeof(extCtrls));

    extCtrl.size = sizeof(settings);
    extCtrl.p_u8 = (unsigned char *)&settings;
    extCtrl.id = V4L2_CID_ARGUS_EE_STRENGTH;

    extCtrls.ctrl_class = V4L2_CTRL_CLASS_CAMERA;
    extCtrls.count = 1;
    extCtrls.controls = &extCtrl;

    if (ioctl(fd, VIDIOC_S_EXT_CTRLS, &extCtrls) < 0) {
        perror("Failed to set edge enhancement strength");
        return -1;
    }

I would greatly appreciate it if the guidance could focus on V4L2 solutions. While I recognize the benefits of using Argus, for this specific inquiry, I’m keen on exploring V4L2-based approaches. Thank you for understanding.

hello charmitro,

it still uses Argus::IAutoControlSettings, but uses V4L2_CID_ARGUS_x for sensor operations.
you should have Argus::IEdgeEnhanceSettings for calling setEdgeEnhanceStrength() for such operation.

please refer to developer guide, NVIDIA V4L2 Camera Description and Extensions as see-also.

you should have Argus::IEdgeEnhanceSettings for calling setEdgeEnhanceStrength() for such operation

Does this imply that the Argus Daemon needs to be actively running? Additionally, are the V4L2_CID_ARGUS_* controls genuine V4L2 controls, or do they simply apply Argus post-processing to the frame before it is delivered to the user?

hello charmitro,

it uses VIDIOC_S_EXT_CTRLS for sending sensor controls via v4l2_ioctl() API.
you may download MMAPI package, $ sudo apt install nvidia-l4t-jetson-multimedia-api,
there’s sample application for demonstration,
please refer to… /usr/src/jetson_multimedia_api/samples/unittest_samples/camera_unit_sample/camera_unit_sample_ctrls.cpp