PARP Research Group Universidad de Murcia


src/qvip/qvimage.cpp File Reference

File from the QVision library. More...

#include <QDebug>
#include <QVImage>
#include <iostream>
#include <qvipp.h>

Go to the source code of this file.

Defines

#define CREATE_IPLIMAGE_CONSTRUCTOR(TYPE, C, DEPTH)

Detailed Description

File from the QVision library.

Author:
PARP Research Group. University of Murcia, Spain.

Definition in file qvimage.cpp.


Define Documentation

#define CREATE_IPLIMAGE_CONSTRUCTOR ( TYPE,
C,
DEPTH   ) 
Value:
template <> QVImage<TYPE, C>::QVImage(const IplImage *iplImage):QVGenericImage()                                        \
        {                                                                                                               \
        if (iplImage->nChannels != C)                                                                                   \
                qWarning("Conversion from incompatible OpenCV image: incompatible channel number");                     \
        if (iplImage->depth != DEPTH)                                                                                   \
                qWarning("Conversion from incompatible OpenCV image: incompatible depth");                              \
                                                                                                                        \
        /*std::cout << "BBB" << std::endl;*/ \
        imageBuffer = new QVImageBuffer<TYPE>(C*iplImage->width, iplImage->height /*align(C*iplImage->width,4)*/);      \
        setROI(0, 0, iplImage->width, iplImage->height);                                                                \
        step_div_type_size = getStep()/sizeof(TYPE);                                                                    \
        setAnchor(0, 0);                                                                                                \
                                                                                                                        \
        const int lineSize = getCols() * C;     /* This depends on data size */                                         \
                                                                                                                        \
        for (uInt y=0 ;y<getRows(); y++)                                                                                \
                memcpy(getWriteData() + getStep() * y, iplImage->imageData + iplImage->widthStep*y, lineSize);          \
        }
Todo:
Check IplImage is compatible with actual image

Definition at line 501 of file qvimage.cpp.




QVision framework. PARP research group. Copyright © 2007, 2008, 2009, 2010, 2011.