Joseph Redmon
2016-02-29 16d06ec0db241261d0d030722e440206ed8aad77
src/image.h
@@ -8,6 +8,11 @@
#include <math.h>
#include "box.h"
#ifdef OPENCV
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/imgproc/imgproc_c.h"
#endif
typedef struct {
    int h;
    int w;
@@ -20,11 +25,14 @@
void draw_box(image a, int x1, int y1, int x2, int y2, float r, float g, float b);
void draw_box_width(image a, int x1, int y1, int x2, int y2, int w, float r, float g, float b);
void draw_bbox(image a, box bbox, int w, float r, float g, float b);
void draw_label(image a, int r, int c, image label, const float *rgb);
void draw_detections(image im, int num, float thresh, box *boxes, float **probs, char **names, image *labels, int classes);
image image_distance(image a, image b);
void scale_image(image m, float s);
image crop_image(image im, int dx, int dy, int w, int h);
image random_crop_image(image im, int low, int high, int size);
image resize_image(image im, int w, int h);
image resize_image2(image im, int w, int h);
image resize_min(image im, int min);
void translate_image(image m, float s);
void normalize_image(image p);
image rotate_image(image m, float rad);
@@ -51,11 +59,14 @@
#ifdef OPENCV
void save_image_jpg(image p, char *name);
image get_image_from_stream(CvCapture *cap);
image ipl_to_image(IplImage* src);
#endif
void print_image(image m);
image make_image(int w, int h, int c);
image make_random_image(int w, int h, int c);
image make_empty_image(int w, int h, int c);
image float_to_image(int w, int h, int c, float *data);
image copy_image(image p);