This class will help you with various problems while dealing with opencv.
More...
#include <convenience.h>
|
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.
|
|
This class will help you with various problems while dealing with opencv.
◆ adjustBrightnessContrast()
cv::Mat Convenience::adjustBrightnessContrast |
( |
cv::Mat |
img, |
|
|
int |
brightness = 0 , |
|
|
double |
contrast = 0.0 |
|
) |
| |
|
static |
Returns image with brightness and contrast applied.
- Parameters
-
img | input image |
brightness | brightness to be applied |
contrast | contrast to be applied |
- Returns
- image
◆ autoCanny()
cv::Mat Convenience::autoCanny |
( |
cv::Mat |
img, |
|
|
double |
sigma = 0.33 |
|
) |
| |
|
static |
Returns image with canny applied.
- Parameters
-
img | input image |
sigma | sigma 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
-
img | input image |
height | height of the image |
width | width of the image |
inter | interpolation |
- 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
-
img | input image |
angle | angle for rotation |
center | center of the image |
scale | scaling value for the image |
- Returns
- rotated image
◆ rotateBounds()
cv::Mat Convenience::rotateBounds |
( |
cv::Mat & |
img, |
|
|
double |
angle |
|
) |
| |
|
static |
Returns rotated bounded image.
- Parameters
-
img | input image |
angle | angle 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
-
img | input image |
size | size |
structuring | the 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
-
img | input image |
x | x-coordinate value for translation |
y | y-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
-
url | url of the image |
readFlag | type of reading |
- Returns
- image
The documentation for this class was generated from the following files: