Darknet/YOLO v3.0-149-gb11c9d5
Object Detection Framework
 
Loading...
Searching...
No Matches
darknet_image.hpp File Reference

This file defines Darknet::Image as well as many functions which modify or create images. More...

This graph shows which files directly or indirectly include this file:

Namespaces

namespace  Darknet
 The namespace for the C++ Darknet API.
 

Functions

int Darknet::best_3d_shift (const Darknet::Image &a, const Darknet::Image &b, int min, int max)
 
int Darknet::best_3d_shift_r (const Darknet::Image &a, const Darknet::Image &b, int min, int max)
 
Darknet::Image Darknet::bgr_mat_to_rgb_image (const cv::Mat &mat)
 Similar to the original mat_to_image(), but with 2 differences:
 
float Darknet::bilinear_interpolate (const Darknet::Image &im, float x, float y, int c)
 
Darknet::Image Darknet::blend_image (const Darknet::Image &fore, const Darknet::Image &back, float alpha)
 
Darknet::Image Darknet::collapse_image_layers (const Darknet::Image &source, int border)
 
Darknet::Image Darknet::collapse_images_horz (const Darknet::Image *ims, int n)
 
Darknet::Image Darknet::collapse_images_vert (const Darknet::Image *ims, int n)
 
void Darknet::composite_3d (char *f1, char *f2, const char *out, int delta)
 
void Darknet::composite_image (const Darknet::Image &source, Darknet::Image &dest, int dx, int dy)
 
void Darknet::constrain_image (Darknet::Image &im)
 
Darknet::Image Darknet::copy_image (const Darknet::Image &p)
 
void Darknet::copy_image_from_bytes (Darknet::Image im, char *pdata)
 
void Darknet::copy_image_inplace (const Darknet::Image &src, Darknet::Image &dst)
 
Darknet::Image Darknet::crop_image (const Darknet::Image &im, const int dx, const int dy, const int w, const int h)
 Crop the given image.
 
void Darknet::distort_image (Darknet::Image &im, float hue, float sat, float val)
 
void Darknet::draw_bbox (Darknet::Image &a, const Darknet::Box &bbox, int w, float r, float g, float b)
 Draw the given bounding box. The line thickness can be specified using w.
 
void Darknet::draw_box (Darknet::Image &a, int x1, int y1, int x2, int y2, float r, float g, float b)
 Draw a bounding box at the rectangle coordinates within an image, using the specified colour.
 
void Darknet::draw_box_bw (Darknet::Image &a, int x1, int y1, int x2, int y2, float brightness)
 Draw a bounding box on a black-and-white image.
 
void Darknet::draw_box_width (Darknet::Image &a, int x1, int y1, int x2, int y2, int w, float r, float g, float b)
 Similiar to Darknet::draw_box(), but the line thickness can be specified using w.
 
void Darknet::draw_box_width_bw (Darknet::Image &a, int x1, int y1, int x2, int y2, int w, float brightness)
 Similar to Darknet::draw_box_bw(), but the line thickness can be specified using w.
 
void Darknet::draw_detections_v3 (Darknet::Image &im, const Darknet::Detection *dets, const int num, const float thresh, const Darknet::VStr &names, const int classes, const int ext_output)
 This is the function that is called from older Darknet code to draw annotations on an image.
 
void Darknet::draw_weighted_label (Darknet::Image &a, int r, int c, Darknet::Image &label, const float *rgb, const float alpha)
 Blend the label (actually an image) into the given image.
 
void Darknet::embed_image (const Darknet::Image &source, Darknet::Image &dest, int dx, int dy)
 
void Darknet::fill_image (Darknet::Image &m, float s)
 
void Darknet::flip_image (Darknet::Image &a)
 Flip image left <-> right.
 
Darknet::Image Darknet::float_to_image (int w, int h, int c, float *data)
 
Darknet::Image Darknet::float_to_image_scaled (int w, int h, int c, float *data)
 
void Darknet::free_image (Darknet::Image &im)
 Free the image.
 
float Darknet::get_color (int c, int x, int max)
 Generate some "random" colour value to use. Mostly used for labels and charts.
 
Darknet::Image Darknet::get_image_layer (const Darknet::Image &m, int l)
 Return a specific channel (eg: R, G, B) from an image.
 
Darknet::Image Darknet::grayscale_image (const Darknet::Image &im)
 
void Darknet::hsv_to_rgb (Darknet::Image &im)
 
std::string Darknet::image_as_debug_string (const Darknet::Image &m)
 Convert the image to a debug string to display the data pointer values.
 
Darknet::Image Darknet::image_distance (Darknet::Image &a, Darknet::Image &b)
 Create a single-channel image for ...?
 
cv::Mat Darknet::image_to_mat (const Darknet::Image &img)
 Convert the usual Darknet::Image format to OpenCV cv::Mat.
 
Darknet::Image Darknet::letterbox_image (const Darknet::Image &im, int w, int h)
 
void Darknet::letterbox_image_into (const Darknet::Image &im, int w, int h, Darknet::Image &boxed)
 
Darknet::Image Darknet::load_image (const char *filename, int desired_width=0, int desired_height=0, int channels=0)
 Load the given image.
 
Darknet::Image Darknet::make_attention_image (int img_size, float *original_delta_cpu, float *original_input_cpu, int w, int h, int c, float alpha)
 The resulting image takes ownership of original_delta_cpu.
 
void Darknet::make_image_red (Darknet::Image &im)
 
Darknet::Image Darknet::make_random_image (int w, int h, int c)
 
Darknet::Image Darknet::mat_to_image (const cv::Mat &mat)
 Convert an OpenCV cv::Mat object to Darknet::Image.
 
void Darknet::normalize_image (Darknet::Image &p)
 
void Darknet::normalize_image2 (Darknet::Image &p)
 
void Darknet::quantize_image (Darknet::Image &im)
 
Darknet::Image Darknet::random_augment_image (const Darknet::Image &im, const float angle, float aspect, const int low, const int high, const int size)
 Apply a bunch of random augmentations.
 
Darknet::Image Darknet::random_crop_image (const Darknet::Image &im, const int w, const int h)
 Similar to Darknet::crop_image() but the dx and dy are random values.
 
void Darknet::random_distort_image (Darknet::Image &im, float hue, float saturation, float exposure)
 
Darknet::Image Darknet::resize_image (const Darknet::Image &im, int w, int h)
 
Darknet::Image Darknet::resize_max (const Darknet::Image &im, int max)
 
Darknet::Image Darknet::resize_min (const Darknet::Image &im, int min)
 
cv::Mat Darknet::rgb_image_to_bgr_mat (const Darknet::Image &img)
 Similar to the original image_to_mat(), but with 2 differences:
 
void Darknet::rgb_to_hsv (Darknet::Image &im)
 
void Darknet::rgbgr_image (Darknet::Image &im)
 Do the equivalent of OpenCV's cv::COLOR_BGR2RGB to swap red and blue floats.
 
Darknet::Image Darknet::rotate_crop_image (const Darknet::Image &im, float rad, float s, int w, int h, float dx, float dy, float aspect)
 
Darknet::Image Darknet::rotate_image (const Darknet::Image &im, float rad)
 Rotate image.
 
void Darknet::rotate_image_cw (Darknet::Image &im, int times)
 Rotate image clockwise?
 
void Darknet::save_image (const Darknet::Image &p, const char *name)
 
void Darknet::save_image_jpg (const Darknet::Image &im, const char *name)
 
void Darknet::save_image_png (const Darknet::Image &im, const char *name)
 
void Darknet::scale_image (Darknet::Image &m, const float s)
 Scale the RGB values in an image by the given amount.
 
void Darknet::scale_image_channel (Darknet::Image &im, int c, float v)
 
void Darknet::show_image (const Darknet::Image &p, const char *name)
 
void Darknet::show_image_collapsed (const Darknet::Image &p, const char *name)
 
void Darknet::show_image_layers (const Darknet::Image &p, const char *name)
 
void Darknet::show_images (Darknet::Image *ims, int n, const char *window)
 
void Darknet::test_resize (char *filename)
 
Darknet::Image Darknet::threshold_image (const Darknet::Image &im, float thresh)
 
void Darknet::translate_image (Darknet::Image m, float s)
 

Detailed Description

This file defines Darknet::Image as well as many functions which modify or create images.