Files
go-darknet/image.h
Julian Langschaedel 7e34b459e6 DarknetImage move float conversion into c code
imgTofloat32 + fill_image_f32 took more than double the time since tofloat created needless allocations and iterate over each pixel, and fill_image in c then iterate over each pixel*3 again just to move it into the c image.
2022-03-02 19:19:47 +01:00

8 lines
253 B
C

#pragma once
#include <darknet.h>
extern void fill_image_f32(image *im, int w, int h, int c, float* data);
extern void set_data_f32_val(float* data, int index, float value);
extern void to_float_and_fill_image(image *im, int w, int h, uint8_t* data);