getRectSubPix函数
来源:互联网 发布:手机透明屏幕软件 编辑:程序博客网 时间:2024/05/11 15:48
getRectSubPix函数
函数作用:
从原图像中提取提取一个感兴趣的矩形区域图像
函数调用形式:
C++: void getRectSubPix(InputArray image, Size patchSize, Point2f center, OutputArray patch, int patchType=-1 )
参数理解:
InputArray image:输入图像
Size patchSize:获取矩形的大小
Point2f center:获取的矩形在原图像中的位置
OutputArray patch:表示输出的图像
int patchType=-1 :表示输出图像的深度
opencv代码:
- <span style="font-family:sans-serif;"><span style="font-size:18px;">#include <opencv2/core/core.hpp>
- #include <opencv2/highgui/highgui.hpp>
- #include <opencv2/imgproc/imgproc.hpp>
- #include <iostream>
- #include<cv.h>
- #include<stdlib.h>
- using namespace cv;
- using namespace std;
- int main()
- {
- Mat src, dst;
- src = imread("D:6.jpg");
- /*Mat kx = (Mat_<float>(1, 3) << 0,-1,0);
- Mat ky = (Mat_<float>(1, 3) << -1,0, -1);
- sepFilter2D(src, dst, src.depth(),kx,ky,Point(-1,-1),0,BORDER_DEFAULT );*/
- getRectSubPix(src, Size(src.cols / 5, src.rows / 5), Point2f(src.cols / 2, src.rows / 2), dst, -1);
- imshow("shiyan", dst);
- waitKey(0);
- return 0;
0 0
- getRectSubPix函数
- getRectSubPix函数
- getRectSubPix函数
- Opencv中的copyMakeBorder和borderInterpolate以及getRectSubPix函数讲解
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- List,set,map的数据结构
- Jquery表单元素基础操作
- Struts2
- 登陆界面(可记住密码)
- 518.Super Ugly Number-超级丑数(中等题)
- getRectSubPix函数
- dlmalloc 2.8.6 源码详解—[3]核心数据结构malloc_state
- 网络图片查看器
- android属性动画爬坑之路
- muduo库的PollPoller类剖析
- 安装armfriendly GCC编译器时提示找不到arm-none-linux-gnueabi
- 关键字
- scrapy源码分析(七)------------ Crawler
- eclipse如何在线安装svn插件