INNER CODE UNIT · C++

cap_bayer_format

nihui/opencv-mobile · highgui/src/capture_cvi.cpp:2883

    const BAYER_FORMAT_E cap_bayer_format = get_sensor_cfg()->cap_bayer_format;
    const ISP_BAYER_FORMAT_E isp_bayer_format = get_sensor_cfg()->isp_bayer_format;

    // resolve output size
    {
        if (width > cap_width && height > cap_height)
        {
            if (cap_width * height == width * cap_height)
            {
                // same ratio, no crop
                output_width = cap_width;
                output_height = cap_height;
            }
            else if (cap_width / (float)cap_height > width / (float)height)
            {
                // fatter
                output_width = width * cap_height / height;
                output_height = cap_height;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…