话不多说,直接上代码:
#include <QCoreApplication>
#include <cv.h>
#include <highgui.h>
#include <QDebug>
#include <stdio.h>
void drawDashRect(CvArr* img,int linelength,int dashlength,CvRect* blob,CvScalar color,int thickness);
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
IplImage* cat = cvLoadImage("D:/Pictures/cat.jpg");
IplImage* dog = cvLoadImage("D:/Pictures/dog.jpg");
if((cat == NULL) || (dog == NULL))
return 1;
qDebug() << "cat-> width = " << cat->width;
qDebug() << "cat-> height = " <<cat->height;
qDebug() << "dog-> width = " << dog->width;
qDebug() << "dog-> height = " <<dog->height;
printf("cat->widthstep = %d\n",cat->widthStep);
printf("cat->nChannels =