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
formut image_frame_instance in image_frame.instance_iter(){
14
-
let image = image_frame_instance.instance;
15
-
// Prepare the image data for processing
16
-
let image_data = bytemuck::cast_vec(image.data.clone());
17
-
let image_buffer = image::Rgba32FImage::from_raw(image.width, image.height, image_data).expect("Failed to convert internal image format into image-rs data type.");
18
-
let dynamic_image:DynamicImage = image_buffer.into();
19
-
20
-
// Run the dehaze algorithm
21
-
let dehazed_dynamic_image = dehaze_image(dynamic_image, strength / 100.);
22
-
23
-
// Prepare the image data for returning
24
-
let buffer = dehazed_dynamic_image.to_rgba32f().into_raw();
let image_data = bytemuck::cast_vec(image.data.clone());
17
+
let image_buffer = image::Rgba32FImage::from_raw(image.width, image.height, image_data).expect("Failed to convert internal image format into image-rs data type.");
18
+
let dynamic_image:DynamicImage = image_buffer.into();
19
+
20
+
// Run the dehaze algorithm
21
+
let dehazed_dynamic_image = dehaze_image(dynamic_image, strength / 100.);
22
+
23
+
// Prepare the image data for returning
24
+
let buffer = dehazed_dynamic_image.to_rgba32f().into_raw();
0 commit comments