Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mmal: Failed to fix lens shading, use the default mode! #2

Open
sjbeskur opened this issue Apr 22, 2023 · 0 comments
Open

mmal: Failed to fix lens shading, use the default mode! #2

sjbeskur opened this issue Apr 22, 2023 · 0 comments

Comments

@sjbeskur
Copy link

sjbeskur commented Apr 22, 2023

Hi I'm trying to use this excellent Rust wrapper with my arducam stereo camera but I keep getting an Error when I call the capture() function.

I have crawled through your code and the arducam c library but I cannot figure out what I'm doing wrong. The only indication I see is the message:
mmal: Failed to fix lens shading, use the default mode!

here is a snippet of how I am calling into the api:

'

let cam = CameraInterface{
    i2c_bus: 0,       // /dev/i2c-0  or /dev/i2c-1 
    camera_num: camera_number,    // mipi interface num
    sda_pins: [44, 0], // enable sda_pins[camera_num], disable sda_pins[camera_num ? 0 : 1]
    scl_pins: [45, 1], // enable scl_pins[camera_num], disable scl_pins[camera_num ? 0 : 1]
    led_pins:[30,2],
    shutdown_pins: [133,133],
};

println!("Initializing Camera!");
let mut camera = arducam_mipicamera::Camera::init(Some(cam)).unwrap();

println!("\nCapturing Image:");
let result = camera.capture(3000, Encoding::Png, 50);
println!("\nCapture result is_ok: {:?}", result.is_ok());

let buffer = result.unwrap(); // everything goes wrong here

`
All of the FFI calls seem to call the arducam_mipicamera.h and I have compared this to other examples in that project "capture-dualcam.c" and while that program works I cannot seem to figure what might be different.

Any help would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant