/* 程序名:hello.c
功能:从磁盘中读入图像文件,并将图像显示在屏幕上
*/
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
int main( int argc, char** argv )
{
IplImage* pImg,*pImg2; //声明IplImage指针
int row,col,row1,col1;
int sign;
int i=0;
if( argc == 3 && (pImg = cvLoadImage( argv[1], 1)) != 0 && (pImg2 = cvLoadImage( argv[2], 1)) != 0)
{
cvNamedWindow( "Image", CV_WINDOW_AUTOSIZE ); //创建窗口
cvShowImage( "Image", pImg ); //显示图像
cvNamedWindow( "Image2", CV_WINDOW_AUTOSIZE ); //创建窗口
cvShowImage( "Image2", pImg2 ); //显示图像
for(i=0;i<9;i++)
{
for(row1=row=(i/3)*(pImg->height/3);row<row1+(pImg->height/3);row++)
{
uchar* ptr=(uchar*)(pImg->imageData&
opencv找出两幅图像不同!
最新推荐文章于 2024-02-21 00:12:55 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)