You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to know how to decode the images. Here's what I've tried
let camera = Camera::new_default_device();
camera.start();letSome(frame) = camera.wait_for_frame()else{
return;};// always blockingly waiting for next new framelet(w, h) = frame.size_u32();
camera.stop();// or drop it}println!("w, h {} {}", w, h);let data = frame.data();let image = data.data_u8();// use this buffer, per default in ARGB format// for real use cases processing or displaying frames can get more complicated when trying to be most efficient
image::save_buffer(format!("image.jpeg"), image, w, h, image::ColorType::Rgba8).unwrap();
The text was updated successfully, but these errors were encountered:
I want to know how to decode the images. Here's what I've tried
The text was updated successfully, but these errors were encountered: