Function nn_tensor_load_image_ex

Source
pub unsafe extern "C" fn nn_tensor_load_image_ex(
    tensor: *mut NNTensor,
    image: *const c_void,
    image_size: usize,
    proc_: u32,
) -> NNError
Expand description

Loads an image from the provided buffer and decodes it accordingly, the function uses the images headers to find an appropriate decoder. The function will handle any required casting to the target tensor’s format and will apply image standardization (compatible with tensorflow’s tf.image.per_image_standardization) if the proc parameter is set to NN_IMAGE_PROC_WHITENING.

When called with proc==0 it is the same as nn_tensor_load_image().

NN_IMAGE_PROC_UNSIGNED_NORM NN_IMAGE_PROC_WHITENING_NORM NN_IMAGE_PROC_SIGNED_NORM

@public @memberof NNTensor @since 2.1