darknet  v3
image.h
Go to the documentation of this file.
1 #ifndef IMAGE_H
2 #define IMAGE_H
3 
4 #include <stdlib.h>
5 #include <stdio.h>
6 #include <float.h>
7 #include <string.h>
8 #include <math.h>
9 #include "box.h"
10 #include "darknet.h"
11 
12 #ifndef __cplusplus
13 #ifdef OPENCV
14 int fill_image_from_stream(CvCapture *cap, image im);
15 image ipl_to_image(IplImage* src);
16 void ipl_into_image(IplImage* src, image im);
17 void flush_stream_buffer(CvCapture *cap, int n);
18 void show_image_cv(image p, const char *name, IplImage *disp);
19 #endif
20 #endif
21 
22 float get_color(int c, int x, int max);
23 void draw_box(image a, int x1, int y1, int x2, int y2, float r, float g, float b);
24 void draw_bbox(image a, box bbox, int w, float r, float g, float b);
25 void write_label(image a, int r, int c, image *characters, char *string, float *rgb);
27 void scale_image(image m, float s);
28 image rotate_crop_image(image im, float rad, float s, int w, int h, float dx, float dy, float aspect);
29 image random_crop_image(image im, int w, int h);
30 image random_augment_image(image im, float angle, float aspect, int low, int high, int w, int h);
31 augment_args random_augment_args(image im, float angle, float aspect, int low, int high, int w, int h);
32 void letterbox_image_into(image im, int w, int h, image boxed);
33 image resize_max(image im, int max);
34 void translate_image(image m, float s);
35 void embed_image(image source, image dest, int dx, int dy);
36 void place_image(image im, int w, int h, int dx, int dy, image canvas);
37 void saturate_image(image im, float sat);
38 void exposure_image(image im, float sat);
39 void distort_image(image im, float hue, float sat, float val);
40 void saturate_exposure_image(image im, float sat, float exposure);
41 void rgb_to_hsv(image im);
42 void hsv_to_rgb(image im);
43 void yuv_to_rgb(image im);
44 void rgb_to_yuv(image im);
45 
46 
47 image collapse_image_layers(image source, int border);
48 image collapse_images_horz(image *ims, int n);
49 image collapse_images_vert(image *ims, int n);
50 
51 void show_image_normalized(image im, const char *name);
52 void show_images(image *ims, int n, char *window);
53 void show_image_layers(image p, char *name);
54 void show_image_collapsed(image p, char *name);
55 
56 void print_image(image m);
57 
58 image make_empty_image(int w, int h, int c);
59 void copy_image_into(image src, image dest);
60 
61 image get_image_layer(image m, int l);
62 
63 #endif
64 
void draw_bbox(image a, box bbox, int w, float r, float g, float b)
Definition: image.c:210
void copy_image_into(image src, image dest)
Definition: image.c:514
void letterbox_image_into(image im, int w, int h, image boxed)
Definition: image.c:948
void exposure_image(image im, float sat)
Definition: image.c:1311
void show_image_normalized(image im, const char *name)
Definition: image.c:1588
void draw_box(image a, int x1, int y1, int x2, int y2, float r, float g, float b)
Definition: image.c:166
Definition: darknet.h:512
image rotate_crop_image(image im, float rad, float s, int w, int h, float dx, float dy, float aspect)
Definition: image.c:805
image resize_max(image im, int max)
Definition: image.c:985
augment_args random_augment_args(image im, float angle, float aspect, int low, int high, int w, int h)
Definition: image.c:1025
image collapse_images_vert(image *ims, int n)
Definition: image.c:1517
image collapse_images_horz(image *ims, int n)
Definition: image.c:1552
image make_empty_image(int w, int h, int c)
Definition: image.c:746
image collapse_image_layers(image source, int border)
Definition: image.c:441
void show_image_layers(image p, char *name)
Definition: image.c:727
void scale_image(image m, float s)
Definition: image.c:855
void show_image_collapsed(image p, char *name)
Definition: image.c:739
void saturate_exposure_image(image im, float sat, float exposure)
Definition: image.c:1342
void embed_image(image source, image dest, int dx, int dy)
Definition: image.c:428
image random_augment_image(image im, float angle, float aspect, int low, int high, int w, int h)
Definition: image.c:1052
void place_image(image im, int w, int h, int dx, int dy, image canvas)
Definition: image.c:781
void write_label(image a, int r, int c, image *characters, char *string, float *rgb)
void saturate_image(image im, float sat)
Definition: image.c:1290
void rgb_to_yuv(image im)
Definition: image.c:1092
image image_distance(image a, image b)
Definition: image.c:365
float get_color(int c, int x, int max)
Definition: image.c:17
void hsv_to_rgb(image im)
Definition: image.c:1153
void yuv_to_rgb(image im)
Definition: image.c:1069
image random_crop_image(image im, int w, int h)
Definition: image.c:1017
void distort_image(image im, float hue, float sat, float val)
Definition: image.c:1319
void translate_image(image m, float s)
Definition: image.c:849
void rgb_to_hsv(image im)
Definition: image.c:1116
void print_image(image m)
Definition: image.c:1500
void show_images(image *ims, int n, char *window)
Definition: image.c:1596
Definition: darknet.h:519
image get_image_layer(image m, int l)
Definition: image.c:1491