Darknet/YOLO v5.0-117-g31c55275-dirty
Object Detection Framework
 
Loading...
Searching...
No Matches
image_opencv.cpp File Reference
Include dependency graph for image_opencv.cpp:

Macros

#define CV_AA   cv::LINE_AA
 
#define CV_FILLED   cv::FILLED
 
#define CV_RGB(r, g, b)   cvScalar( (b), (g), (r) )
 

Functions

void blend_images_cv (Darknet::Image new_img, float alpha, Darknet::Image old_img, float beta)
 
void draw_detections_cv_v3 (cv::Mat mat, Darknet::Detection *dets, int num, float thresh, char **names, int classes, int ext_output)
 
static float get_pixel (Darknet::Image m, int x, int y, int c)
 
Darknet::Image image_data_augmentation (cv::Mat 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)
 
cv::Mat load_rgb_mat_image (const std::string &filename, int channels)
 Load the given image using OpenCV.
 
void save_mat_jpg (cv::Mat mat, const char *name)
 
void save_mat_png (cv::Mat mat, const char *name)
 
void show_anchors (int number_of_boxes, int num_of_clusters, float *rel_width_height_array, model anchors_data, int width, int height)
 
void show_image_cv (Darknet::Image p, const char *name)
 

Macro Definition Documentation

◆ CV_AA

#define CV_AA   cv::LINE_AA

◆ CV_FILLED

#define CV_FILLED   cv::FILLED

◆ CV_RGB

#define CV_RGB (   r,
  g,
 
)    cvScalar( (b), (g), (r) )

Function Documentation

◆ blend_images_cv()

void blend_images_cv ( Darknet::Image  new_img,
float  alpha,
Darknet::Image  old_img,
float  beta 
)
Here is the caller graph for this function:

◆ draw_detections_cv_v3()

void draw_detections_cv_v3 ( cv::Mat  mat,
Darknet::Detection dets,
int  num,
float  thresh,
char **  names,
int  classes,
int  ext_output 
)
Here is the call graph for this function:

◆ get_pixel()

static float get_pixel ( Darknet::Image  m,
int  x,
int  y,
int  c 
)
static
Here is the caller graph for this function:

◆ image_data_augmentation()

Darknet::Image image_data_augmentation ( cv::Mat  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 
)
Todo:
COLOR - cannot do hue in hyperspectal land
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_rgb_mat_image()

cv::Mat load_rgb_mat_image ( const std::string &  filename,
int  flag 
)

Load the given image using OpenCV.

Automatically converts the image from the usual OpenCV BGR format to RGB for use in Darknet. This is the function that is used to load images when training.

See also
Darknet::load_image()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_mat_jpg()

void save_mat_jpg ( cv::Mat  mat,
const char *  name 
)
Todo:
merge with Darknet::save_image_jpg()
Here is the call graph for this function:

◆ save_mat_png()

void save_mat_png ( cv::Mat  mat,
const char *  name 
)
Todo:
merge with Darknet::save_image_png()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ show_anchors()

void show_anchors ( int  number_of_boxes,
int  num_of_clusters,
float *  rel_width_height_array,
model  anchors_data,
int  width,
int  height 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ show_image_cv()

void show_image_cv ( Darknet::Image  p,
const char *  name 
)
Here is the call graph for this function:
Here is the caller graph for this function: