资源简介
opencv+vs 实现画中画c语言 源代码 任意位置 加了出界判断
代码片段和文件信息
#include
#include
#include
IplImage *ImageStitch(IplImage* Image1IplImage* Image2 int xint y);
int main(int argc char** argv)
{
CvCapture* capture1 = cvCreateFileCapture(argv[1]);
CvCapture* capture2 = cvCreateFileCapture(argv[2]);
int positionx ;
int positiony ;
printf(“Please input the display position format:point xpoint y.\n“);
int inputcount = scanf(“%d%d“&positionx&positiony);
while(inputcount!=2)
{
fflush(stdin);
printf(“Warning:your input position point is not enough!\nPlease check the input format or other questions and input again.\n“);
inputcount = scanf(“%d%d“&positionx&positiony);
}
if(positionx<0||positionx>384||positiony<0||positiony>384)
{
printf(“Warning:your input position point is beyond the available display range!\nThe default position is 2020.\n“);
positionx = 20;
positiony = 20;
}
IplImage* frame1;
IplImage* frame2;
IplImage* frame;
while(1)
{
frame1 = cvQueryframe(capture1);
frame2 = cvQueryframe(capture2);
frame = ImageStitch(frame1frame2positionxpositiony);
if(!frame1) break;
cvShowImage(“Picture in Picture“frame);
char c = cvWaitKey(33);
if(c==27) break;
cvReleaseImage(&frame);
}
fflush(stdin);
cvReleaseCapture(&capture1);
c - 上一篇:C++ OOP实现贪吃蛇,EASYX图形界面
- 下一篇:Buddy算法C语言实现
相关资源
- C语言编程常见问题解答.pdf
- 操作系统c语言模拟文件管理系统844
- C语言开发实战宝典
- C++中头文件与源文件的作用详解
- C语言代码高亮html输出工具
- 猜数字游戏 c语言代码
- C语言课程设计
- 数字电位器C语言程序
- CCS FFT c语言算法
- 使用C语言编写的病房管理系统
- 通信过程中的RS编译码程序(c语言)
- 计算机二级C语言上机填空,改错,编
- 用回溯法解决八皇后问题C语言实现
- 简易教务管理系统c语言开发文档
- 操作系统课设 读写者问题 c语言实现
- 小波变换算法 c语言版
- C流程图生成器,用C语言代码 生成C语
- 3des加密算法C语言实现
- 简单的C语言点对点聊天程序
- 单片机c语言源程序(51定时器 八个按
- 个人日常财务管理系统(C语言)
- c语言电子商务系统
- 小甲鱼C语言课件 源代码
- 将图片转换为C语言数组的程序
- C语言实现的一个内存泄漏检测程序
- DES加密算法C语言实现
- LINUX下命令行界面的C语言细胞游戏
- 用单片机控制蜂鸣器播放旋律程序(
- 学校超市选址问题(数据结构C语言版
- 电子时钟 有C语言程序,PROTEUS仿真图
川公网安备 51152502000135号
评论
共有 条评论