Typedefs | |
typedef void * | mat_cv |
Hide a C++ cv::Mat object as a C style void* pointer. More... | |
typedef void * | cap_cv |
Hide a C++ cv::VideoCapture object as a C style void* pointer. More... | |
typedef void * | write_cv |
Hide a C++ cv::VideoWriter object as a C style void* pointer. More... | |
Functions | |
mat_cv * | load_image_mat_cv (const char *const filename, int flag) |
Load the given image using OpenCV and return it as a "C" style mat_cv void* pointer. More... | |
image | load_image_cv (char *filename, int channels) |
Similar to load_image_mat_cv() but is explicit about the image channels and returns a Darknet-style image. More... | |
image | load_image_resize (char *filename, int w, int h, int c, image *im) |
Load the given image, but then immediately resize it to the desired dimensions. More... | |
int | get_width_mat (mat_cv *mat) |
int | get_height_mat (mat_cv *mat) |
void | release_mat (mat_cv **mat) |
Frees the cv::Mat object allocated in load_image_mat_cv(). More... | |
image | mat_to_image_cv (mat_cv *mat) |
void | create_window_cv (char const *window_name, int full_screen, int width, int height) |
void | resize_window_cv (char const *window_name, int width, int height) |
void | move_window_cv (char const *window_name, int x, int y) |
void | destroy_all_windows_cv () |
int | wait_key_cv (int delay) |
int | wait_until_press_key_cv () |
void | show_image_cv (image p, const char *name) |
void | show_image_mat (mat_cv *mat_ptr, const char *name) |
write_cv * | create_video_writer (char *out_filename, char c1, char c2, char c3, char c4, int fps, int width, int height, int is_color) |
void | write_frame_cv (write_cv *output_video_writer, mat_cv *mat) |
void | release_video_writer (write_cv **output_video_writer) |
cap_cv * | get_capture_video_stream (const char *path) |
cap_cv * | get_capture_webcam (int index) |
void | release_capture (cap_cv *cap) |
mat_cv * | get_capture_frame_cv (cap_cv *cap) |
int | get_stream_fps_cpp_cv (cap_cv *cap) |
double | get_capture_property_cv (cap_cv *cap, int property_id) |
double | get_capture_frame_count_cv (cap_cv *cap) |
int | set_capture_property_cv (cap_cv *cap, int property_id, double value) |
int | set_capture_position_frame_cv (cap_cv *cap, int index) |
image | get_image_from_stream_cpp (cap_cv *cap) |
image | get_image_from_stream_resize (cap_cv *cap, int w, int h, int c, mat_cv **in_img, int dont_close) |
image | get_image_from_stream_letterbox (cap_cv *cap, int w, int h, int c, mat_cv **in_img, int dont_close) |
void | consume_frame (cap_cv *cap) |
void | save_cv_png (mat_cv *img, const char *name) |
void | save_cv_jpg (mat_cv *img, const char *name) |
void | draw_detections_cv_v3 (mat_cv *show_img, detection *dets, int num, float thresh, char **names, image **alphabet, int classes, int ext_output) |
mat_cv * | draw_initial_train_chart (char *windows_name, float max_img_loss, int max_batches, int number_of_lines, int img_size, int dont_show, char *chart_path) |
Draw the intial Loss & Accuracy chart. This is called once at the very start. More... | |
void | update_train_loss_chart (char *windows_name, mat_cv *img, int img_size, float avg_loss, float max_img_loss, int current_batch, int max_batches, float precision, int draw_precision, char *accuracy_name, float contr_acc, int dont_show, int mjpeg_port, double time_remaining) |
Update the Loss & Accuracy chart with the given information. This is called repeatedly as more data is produced during training. More... | |
image | image_data_augmentation (mat_cv *mat, int w, int h, int pleft, int ptop, int swidth, int sheight, int flip, float dhue, float dsat, float dexp, int gaussian_noise, int blur, int num_boxes, int truth_size, float *truth) |
void | blend_images_cv (image new_img, float alpha, image old_img, float beta) |
image | blur_image (image src_img, int ksize) |
void | cv_draw_object (image sized, float *truth_cpu, int max_boxes, int num_truth, int *it_num_set, float *lr_set, int *boxonly, int classes, char **names) |
void | show_acnhors (int number_of_boxes, int num_of_clusters, float *rel_width_height_array, model anchors_data, int width, int height) |
void | show_opencv_info () |
typedef void* mat_cv |
Hide a C++ cv::Mat object as a C style void*
pointer.
typedef void* cap_cv |
Hide a C++ cv::VideoCapture object as a C style void*
pointer.
typedef void* write_cv |
Hide a C++ cv::VideoWriter object as a C style void*
pointer.
mat_cv* load_image_mat_cv | ( | const char *const | filename, |
int | flag | ||
) |
Load the given image using OpenCV and return it as a "C"
style mat_cv void*
pointer.
Converts the image from the usual OpenCV BGR format to RGB. Remember to free the image with release_mat().
image load_image_cv | ( | char * | filename, |
int | channels | ||
) |
Similar to load_image_mat_cv() but is explicit about the image channels and returns a Darknet-style image.
Channels should be 0
(colour), 1
(grayscale) or 3
(colour). This uses load_image_mat_cv() so the channels will be converted fro BGR to RGB.
Load the given image, but then immediately resize it to the desired dimensions.
Does not maintain apect ratio, and does not use letterbox.
int get_width_mat | ( | mat_cv * | mat | ) |
int get_height_mat | ( | mat_cv * | mat | ) |
void release_mat | ( | mat_cv ** | mat | ) |
Frees the cv::Mat
object allocated in load_image_mat_cv().
void create_window_cv | ( | char const * | window_name, |
int | full_screen, | ||
int | width, | ||
int | height | ||
) |
void resize_window_cv | ( | char const * | window_name, |
int | width, | ||
int | height | ||
) |
void move_window_cv | ( | char const * | window_name, |
int | x, | ||
int | y | ||
) |
void destroy_all_windows_cv | ( | ) |
int wait_key_cv | ( | int | delay | ) |
int wait_until_press_key_cv | ( | ) |
void show_image_cv | ( | image | p, |
const char * | name | ||
) |
void show_image_mat | ( | mat_cv * | mat_ptr, |
const char * | name | ||
) |
write_cv* create_video_writer | ( | char * | out_filename, |
char | c1, | ||
char | c2, | ||
char | c3, | ||
char | c4, | ||
int | fps, | ||
int | width, | ||
int | height, | ||
int | is_color | ||
) |
void release_video_writer | ( | write_cv ** | output_video_writer | ) |
cap_cv* get_capture_video_stream | ( | const char * | path | ) |
cap_cv* get_capture_webcam | ( | int | index | ) |
void release_capture | ( | cap_cv * | cap | ) |
int get_stream_fps_cpp_cv | ( | cap_cv * | cap | ) |
double get_capture_property_cv | ( | cap_cv * | cap, |
int | property_id | ||
) |
double get_capture_frame_count_cv | ( | cap_cv * | cap | ) |
int set_capture_property_cv | ( | cap_cv * | cap, |
int | property_id, | ||
double | value | ||
) |
int
? int set_capture_position_frame_cv | ( | cap_cv * | cap, |
int | index | ||
) |
image get_image_from_stream_resize | ( | cap_cv * | cap, |
int | w, | ||
int | h, | ||
int | c, | ||
mat_cv ** | in_img, | ||
int | dont_close | ||
) |
image get_image_from_stream_letterbox | ( | cap_cv * | cap, |
int | w, | ||
int | h, | ||
int | c, | ||
mat_cv ** | in_img, | ||
int | dont_close | ||
) |
void consume_frame | ( | cap_cv * | cap | ) |
void save_cv_png | ( | mat_cv * | img, |
const char * | name | ||
) |
void save_cv_jpg | ( | mat_cv * | img, |
const char * | name | ||
) |
void draw_detections_cv_v3 | ( | mat_cv * | show_img, |
detection * | dets, | ||
int | num, | ||
float | thresh, | ||
char ** | names, | ||
image ** | alphabet, | ||
int | classes, | ||
int | ext_output | ||
) |
mat_cv* draw_initial_train_chart | ( | char * | windows_name, |
float | max_img_loss, | ||
int | max_batches, | ||
int | number_of_lines, | ||
int | img_size, | ||
int | dont_show, | ||
char * | chart_path | ||
) |
Draw the intial Loss & Accuracy chart. This is called once at the very start.
void update_train_loss_chart | ( | char * | windows_name, |
mat_cv * | img, | ||
int | img_size, | ||
float | avg_loss, | ||
float | max_img_loss, | ||
int | current_batch, | ||
int | max_batches, | ||
float | precision, | ||
int | draw_precision, | ||
char * | accuracy_name, | ||
float | contr_acc, | ||
int | dont_show, | ||
int | mjpeg_port, | ||
double | time_remaining | ||
) |
Update the Loss & Accuracy chart with the given information. This is called repeatedly as more data is produced during training.
"current_batch"
is already set to 1
, not 0
. In othe parts, this is called at the start of the iteration, so the first time through the "current_batch"
is zero.image image_data_augmentation | ( | mat_cv * | mat, |
int | w, | ||
int | h, | ||
int | pleft, | ||
int | ptop, | ||
int | swidth, | ||
int | sheight, | ||
int | flip, | ||
float | dhue, | ||
float | dsat, | ||
float | dexp, | ||
int | gaussian_noise, | ||
int | blur, | ||
int | num_boxes, | ||
int | truth_size, | ||
float * | truth | ||
) |
void cv_draw_object | ( | image | sized, |
float * | truth_cpu, | ||
int | max_boxes, | ||
int | num_truth, | ||
int * | it_num_set, | ||
float * | lr_set, | ||
int * | boxonly, | ||
int | classes, | ||
char ** | names | ||
) |
void show_acnhors | ( | int | number_of_boxes, |
int | num_of_clusters, | ||
float * | rel_width_height_array, | ||
model | anchors_data, | ||
int | width, | ||
int | height | ||
) |
void show_opencv_info | ( | ) |