imutils-cpp
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Convenience Class Reference

This class will help you with various problems while dealing with opencv. More...

#include <convenience.h>

Static Public Member Functions

static cv::Mat translate (const cv::Mat &img, float x, float y)
 Returns translated image.
 
static cv::Mat rotate (cv::Mat &img, double angle, cv::Point2f center={-1, -1}, float scale=1.0)
 Returns rotated image.
 
static cv::Mat rotateBounds (cv::Mat &img, double angle)
 Returns rotated bounded image.
 
static cv::Mat resize (cv::Mat &img, int height=0, int width=0, int inter=cv::INTER_AREA)
 Returns resized bounded image.
 
static cv::Mat skeletonize (cv::Mat &img, cv::Size size, int structuring=cv::MORPH_RECT)
 Returns skeleton image.
 
static cv::Mat urlToImager (std::string url, int readFlag=cv::IMREAD_COLOR)
 Returns image from the specified url with the appropriate read flag applied.
 
static cv::Mat autoCanny (cv::Mat img, double sigma=0.33)
 Returns image with canny applied.
 
static cv::Mat adjustBrightnessContrast (cv::Mat img, int brightness=0, double contrast=0.0)
 Returns image with brightness and contrast applied.
 

Detailed Description

This class will help you with various problems while dealing with opencv.

Member Function Documentation

◆ adjustBrightnessContrast()

cv::Mat Convenience::adjustBrightnessContrast ( cv::Mat  img,
int  brightness = 0,
double  contrast = 0.0 
)
static

Returns image with brightness and contrast applied.

Parameters
imginput image
brightnessbrightness to be applied
contrastcontrast to be applied
Returns
image

◆ autoCanny()

cv::Mat Convenience::autoCanny ( cv::Mat  img,
double  sigma = 0.33 
)
static

Returns image with canny applied.

Parameters
imginput image
sigmasigma value while applying canny
Returns
autocanny applied image

◆ resize()

cv::Mat Convenience::resize ( cv::Mat &  img,
int  height = 0,
int  width = 0,
int  inter = cv::INTER_AREA 
)
static

Returns resized bounded image.

Parameters
imginput image
heightheight of the image
widthwidth of the image
interinterpolation
Returns
resized image with bounds

◆ rotate()

cv::Mat Convenience::rotate ( cv::Mat &  img,
double  angle,
cv::Point2f  center = {-1, -1},
float  scale = 1.0 
)
static

Returns rotated image.

Parameters
imginput image
angleangle for rotation
centercenter of the image
scalescaling value for the image
Returns
rotated image

◆ rotateBounds()

cv::Mat Convenience::rotateBounds ( cv::Mat &  img,
double  angle 
)
static

Returns rotated bounded image.

Parameters
imginput image
angleangle for rotation
Returns
rotated image with bounds

◆ skeletonize()

cv::Mat Convenience::skeletonize ( cv::Mat &  img,
cv::Size  size,
int  structuring = cv::MORPH_RECT 
)
static

Returns skeleton image.

Parameters
imginput image
sizesize
structuringthe structuring filter you want to apply
Returns
skeletonized image

◆ translate()

cv::Mat Convenience::translate ( const cv::Mat &  img,
float  x,
float  y 
)
static

Returns translated image.

Parameters
imginput image
xx-coordinate value for translation
yy-coordinate value for translation
Returns
Translated image

◆ urlToImager()

cv::Mat Convenience::urlToImager ( std::string  url,
int  readFlag = cv::IMREAD_COLOR 
)
static

Returns image from the specified url with the appropriate read flag applied.

Parameters
urlurl of the image
readFlagtype of reading
Returns
image

The documentation for this class was generated from the following files: