Classes | Functions
image_manipulation.h File Reference

Contains functions to manipulate images. More...

#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

Go to the source code of this file.

Classes

class  ImageUndistort
 Class to undistort images. More...
 
class  PerspectiveWrapper
 A class to do a perspective transformation. More...
 

Functions

void white_regions (const Mat &image, Mat &white_regions, int thres=100)
 Calculate a binary black-white image. More...
 
void edm (const Mat &src, Mat &dst, int erode_size=3, int dilation_size=4, int morph_size=10, bool debug=false)
 Erode, Dilate, Morph. More...
 
void get_thresholded_image (const Mat &image, Scalar min, Scalar max, Mat &dst, bool debug=false)
 Create a thresholded image with white regions. More...
 
void get_thresholded_image2 (const Mat &image, Scalar min1, Scalar max1, Scalar min2, Scalar max2, Mat &dst, bool debug=false)
 Create a thresholded image with white regions from two color ranges. More...
 
void wrap_perspective (const Mat &src, Mat &dst, const vector< Point > &rect)
 Wrap the perspective. More...
 

Detailed Description

Contains functions to manipulate images.

Definition in file image_manipulation.h.

Function Documentation

void edm ( const Mat &  src,
Mat &  dst,
int  erode_size = 3,
int  dilation_size = 4,
int  morph_size = 10,
bool  debug = false 
)

Erode, Dilate, Morph.

Parameters
srcThe source image
dstThe destination image
erode_sizeThe size of the structuring element for the erode operation.
dilation_sizeThe size of the structuring element for the dilate operation.
morph_sizeThe size of the structuring element for the morphology operation.
debugShow debug images for intermediate steps?
void get_thresholded_image ( const Mat &  image,
Scalar  min,
Scalar  max,
Mat &  dst,
bool  debug = false 
)

Create a thresholded image with white regions.

Parameters
imageThe source image
minLower boundary
maxUpper boundary
dstThe destination image
debugShow debug images for intermediate steps?
void get_thresholded_image2 ( const Mat &  image,
Scalar  min1,
Scalar  max1,
Scalar  min2,
Scalar  max2,
Mat &  dst,
bool  debug = false 
)

Create a thresholded image with white regions from two color ranges.

See also http://stackoverflow.com/questions/12204522/efficiently-threshold-red-using-hsv-in-opencv

Parameters
imageThe source image
min1First lower boundary
max1First upper boundary
min2Second lower boundary
max2Second upper boundary
dstThe destination image
debugShow debug images for intermediate steps?
void white_regions ( const Mat &  image,
Mat &  white_regions,
int  thres = 100 
)

Calculate a binary black-white image.

Parameters
imageThe source image
white_regionsThe black-white image
thresThreshold, the smaller, the more white regions you will get
void wrap_perspective ( const Mat &  src,
Mat &  dst,
const vector< Point > &  rect 
)

Wrap the perspective.

Parameters
srcThe source image
dstThe destination image
rectWarped rect to unwrap