Darknet/YOLO v3.0-177-gfa2353b
Object Detection Framework
 
Loading...
Searching...
No Matches
darknet_image.cpp File Reference
Include dependency graph for darknet_image.cpp:

Functions

Darknet::Image collapse_images_horz (const Darknet::Image *ims, int n)
 
int compare_by_lefts (const void *a_ptr, const void *b_ptr)
 
int compare_by_probs (const void *a_ptr, const void *b_ptr)
 
void copy_image_from_bytes (DarknetImage im, char *pdata)
 This is part of the original C API. Convert from data pointer to a Darknet image. Used by the Python API.
 
void free_image (image im)
 This is part of the original C API.
 
detection_with_classget_actual_detections (const Darknet::Detection *dets, int dets_num, float thresh, int *selected_detections_num, const Darknet::VStr &names)
 Creates array of detections with prob > thresh and fills best_class for them Return number of selected detections in *selected_detections_num.
 
Darknet::Image get_opencv_label (const std::string &str, const int area)
 
DarknetImage load_image_v2 (const char *filename, int desired_width, int desired_height, int channels)
 This is part of the original C API. This function exists for the Python API.
 
DarknetImage make_empty_image (int w, int h, int c)
 This is part of the original C API.
 
DarknetImage make_image (int w, int h, int c)
 This is part of the original C API.
 
void translate_image (Darknet::Image m, float s)
 

Function Documentation

◆ collapse_images_horz()

Darknet::Image collapse_images_horz ( const Darknet::Image ims,
int  n 
)
Todo:
COLOR
Here is the call graph for this function:

◆ compare_by_lefts()

int compare_by_lefts ( const void *  a_ptr,
const void *  b_ptr 
)
Here is the caller graph for this function:

◆ compare_by_probs()

int compare_by_probs ( const void *  a_ptr,
const void *  b_ptr 
)
Here is the caller graph for this function:

◆ copy_image_from_bytes()

void copy_image_from_bytes ( DarknetImage  im,
char *  pdata 
)

This is part of the original C API. Convert from data pointer to a Darknet image. Used by the Python API.

◆ free_image()

void free_image ( image  im)

This is part of the original C API.

Free the data pointer that stores the image . All image objects must eventually call either this function or Darknet::free_image() to prevent memory leaks.

See also
Darknet::free_image()
Note
The image is passed by value, meaning that the data pointer in the caller's copy of the image will be left dangling. Be careful not to reference it once this call returns. Where possible when using C++, call Darknet::free_image() instead.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_actual_detections()

detection_with_class * get_actual_detections ( const Darknet::Detection dets,
int  dets_num,
float  thresh,
int *  selected_detections_num,
const Darknet::VStr names 
)

Creates array of detections with prob > thresh and fills best_class for them Return number of selected detections in *selected_detections_num.

Here is the caller graph for this function:

◆ get_opencv_label()

Darknet::Image get_opencv_label ( const std::string &  str,
const int  area 
)
Todo:
what are the performance implications of LINE_AA over LINE_4 or LINE_8?
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_image_v2()

DarknetImage load_image_v2 ( const char *  filename,
int  desired_width,
int  desired_height,
int  channels 
)

This is part of the original C API. This function exists for the Python API.

Here is the call graph for this function:

◆ make_empty_image()

DarknetImage make_empty_image ( int  w,
int  h,
int  c 
)

This is part of the original C API.

Make an empty image with the given dimensions. The data pointer will be nullptr.

See also
free_image()
make_image()
Here is the caller graph for this function:

◆ make_image()

DarknetImage make_image ( int  w,
int  h,
int  c 
)

This is part of the original C API.

Similar to make_empty_image() but the data pointer is fully allocated.

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

◆ translate_image()

void translate_image ( Darknet::Image  m,
float  s 
)