OpenCV C++图像操作常用API
OpenCV C++常用图像操作API, 常用于深度学习网络模型的输入预处理
参考链接:https://learnopencv.com/image-resizing-with-opencv/
imgproc
cv::Resize()
: https://stackoverflow.com/questions/23984191/resize-image-opencvcv::flip()
: https://docs.opencv.org/3.4/d2/de8/group__core__array.html#gaca7be533e3dac7feb70fc60635adf441- 根据
cv::Rect
来crop图像patch: https://stackoverflow.com/questions/8267191/how-to-crop-a-cvmat-in-opencv cv::cvtColor
颜色空间转换cv::rotate
图像旋转cv::transpose
reshape
操作:https://www.cnblogs.com/denny402/p/5035535.html
图像读写:
cv::imread(filename, Flags)
- ImreadModes: IMREAD_IGNORE_ORIENTATION
cv::imdecode(Buffer, Flags)
cv::imwrite(filename, image)