如何在OpenCV中将平行四边形图像转换为矩形图像
How to transform a parallelogram image to rectangle image in OpenCV?
可能的重复项:
在一组 cv::P oint 上执行 cv::warpPerspective 的假纠偏
我正在使用OpenCV。我想将具有平行四边形的图像转换为矩形图像。请告诉我该怎么做?
谢谢。
查看OpenCV文档中有关仿射变换的信息。那里有例子:
http://opencv.willowgarage.com/documentation/cpp/geometric_image_transformations.html
你想要剪切图像(或图像的一部分)
为此,您可以使用带有warpAffine函数的仿射变换
void warpAffine(const Mat& src, Mat& dst, const Mat& M, Size dsize,
int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT,
const Scalar& borderValue=Scalar())
并阅读此问答:在OpenCV中执行原点改变的剪切
相关文章:
- 如何使用OpenCV将RBG图像转换为HSV,并将H、S和V值保存为C++中的3个独立图像
- 将 BGR 图像转换为 jpeg 格式的 base64 字符串
- C++ Gdi+将图像转换为灰度
- 将 BMP 图像转换为灰度
- Qmage:如何将灰色图像转换为RGB热图
- 更快地将卤化物图像转换为 opencv 垫?
- 将原始视频图像转换为VPX编码器的I420
- ROS中未定义的参考误差到OpenCV图像转换器
- 如何将图像转换为灰度 opengl c++
- 将 24 位".bmp"图像转换为黑白/单色图像的可能算法是什么?
- 在OpenCV中将灰度图像转换为单色
- RGB到XYZ,图像转换
- 如何将图像转换为C 中的RGB数据值
- OpenCV:将图像转换为C++数组
- 从两个图像转换的OpenCV
- 使用某些系数将图像转换为灰度的最快方法
- 将RGB颜色图像转换为OpenCV C 中的索引颜色图像类型
- CUDA OPENCV CVTCOLOR调用不会将图像转换为不同的格式
- 将 RGB 图像转换为 3 个 HSI 输出
- VTK 将 2D 图像转换为 3D (C++)