基于opencv的图像的无失真放大
来源:互联网 发布:php工作流引擎 编辑:程序博客网 时间:2024/05/22 15:51
//无失真放大
void DistortionFreeAmplification(const Mat& tmpGrayMat, Mat& dstMat, int times = 8)
{
dstMat = cv::Mat(tmpGrayMat.rows * times, tmpGrayMat.cols * times, tmpGrayMat.type());
for (int i=0; i<tmpGrayMat.rows; i++)
{
for (int j=0; j<tmpGrayMat.cols; j++)
{
const uchar * qtr = tmpGrayMat.ptr<uchar>(i, j);
for (int k=0; k<times; k++)
{
for (int l=0; l<times; l++)
{
uchar * ptr = dstMat.ptr<uchar>(times * i + l, times * j + k);
for (int m = 0; m < tmpGrayMat.channels(); m++)
{
ptr[m] = qtr[m];
}
}
}
}
}
}
void DistortionFreeAmplification(const Mat& tmpGrayMat, Mat& dstMat, int times = 8)
{
dstMat = cv::Mat(tmpGrayMat.rows * times, tmpGrayMat.cols * times, tmpGrayMat.type());
for (int i=0; i<tmpGrayMat.rows; i++)
{
for (int j=0; j<tmpGrayMat.cols; j++)
{
const uchar * qtr = tmpGrayMat.ptr<uchar>(i, j);
for (int k=0; k<times; k++)
{
for (int l=0; l<times; l++)
{
uchar * ptr = dstMat.ptr<uchar>(times * i + l, times * j + k);
for (int m = 0; m < tmpGrayMat.channels(); m++)
{
ptr[m] = qtr[m];
}
}
}
}
}
}
阅读全文
0 0
- 基于opencv的图像的无失真放大
- 图片局部无失真放大的两种方式
- OpenCV 消除平面透视图像的射影失真
- 关于GDI图像放大缩小StretchBlt显示,图像失真的解决
- OpenCv 图像的放大和缩小
- 图片无失真放大工具
- 基于OpenCV的图像检索系统
- 基于OpenCV的图像拼接
- 基于OpenCV的图像测量
- 基于OpenCV的图像旋转
- Opencv学习笔记(六)--图像的放大和缩小
- PS中放大图片不失真的方法
- 一种校正图像失真的工程方法
- 一种校正图像失真的工程方法
- Unity3d 导入的图像尺寸失真解决方法
- Word转PDF图像失真的解决方法
- OpenCV-基于特征点的图像匹配
- 基于OpenCV的图像去雾程序
- Http请求接口HttpClient
- 阿里RocketMQ源码启动服务
- 【git】代码提交冲突
- Android Launcher3 去掉应用列表后,在系统桌面拖动应用图标卸载应用
- hadoop安装
- 基于opencv的图像的无失真放大
- android shape的使用
- 搭建springmvc框架步骤
- Hadoop集群搭建之四 CentOS7+JDK+Hadoop+zookeeper+HBase
- 魅族
- React-Native在android原生上的绘制流程
- MySQL必知必会笔记(七)安全管理 数据库维护 改善性能
- Android中ListView与CheckBox结合-…
- android客户端和java服务端之间用s…