mirror of
https://github.com/LdDl/go-darknet.git
synced 2025-09-26 19:51:27 +08:00

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.
8 lines
253 B
C
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);
|