CiplvBasicImage< PIXELTYPE, Alloc > Class Template Reference

Image class can use as image of OpenCV and VIGRA. More...

#include <iplvbasicimage.hxx>

Inheritance diagram for CiplvBasicImage< PIXELTYPE, Alloc >:

CipliConstImgDepth< PIXELTYPE > List of all members.

Public Member Functions

IplImage * initProc (int width, int height)
IplImage * initAndCopyProc (IplImage ipl_imageIn)
int iplWidth ()
IplImage * loadImageAndInit (char *filename)
IplImage * loadImageAndInit (const char *filename)
 CiplvBasicImage (char *filename)
 CiplvBasicImage (const char *filename)
 CiplvBasicImage (int width, int height)
 CiplvBasicImage (IplImage *pIplImageIn)
 CiplvBasicImage (IplImage ipl_imageIn)
 CiplvBasicImage (CiplvBasicImage< PIXELTYPE > &iplvImageIn)
 ~CiplvBasicImage ()

Public Attributes

int iplDepthDef
IplImage * pIplImage

Detailed Description

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
class CiplvBasicImage< PIXELTYPE, Alloc >

Image class can use as image of OpenCV and VIGRA.

This is the fixed size image class can use as image of OpenCV and VIGRA.

Usage:

#include "vigra/transformimage.hxx"
#include "vigra/recursiveconvolution.hxx"

#include "stllcv/iplvbasicimageoperation.hxx"

#include "stllcv/iplvbasicimage.hxx"

#include "highgui.h"


#define PEXTYPE unsigned char

int main(int argc, char * argv[])
{


        char winName[]="srcImg";
        cvNamedWindow( winName, 1 );

        CiplvBasicImage<PEXTYPE> iplvImage1("lena.jpg");

        showIplvBasicImag<PEXTYPE>(&iplvImage1,winName);
        int width1 = iplvImage1.width();
        int height1 =iplvImage1.height();
        CiplvBasicImage<PEXTYPE> iplvImage2( width1*2 ,height1*2);

        std::fill(iplvImage2.begin(),iplvImage2.end(),100);
        iplRotate(iplvImage1.pIplImage, iplvImage2.pIplImage,30.0, 100 ,150 ,IPL_INTER_NN);     
        showIplvBasicImag<PEXTYPE>(&iplvImage2,winName);


        vigra::initImage(
                        destIterRange(
                                iplvImage2.upperLeft() + vigra::Diff2D(50, 100),iplvImage2.upperLeft() + vigra::Diff2D(400, 200))
                        ,200
                );
        showIplvBasicImag<PEXTYPE>(&iplvImage2,winName);


        vigra::transformImage(srcImageRange(iplvImage2), destImage(iplvImage2),
                           vigra::linearIntensityTransform(-1, -255));
        showIplvBasicImag<PEXTYPE>(&iplvImage2,winName);

        CiplvBasicImage<PEXTYPE> iplvImage3tmp( iplvImage2);
        CiplvBasicImage<PEXTYPE> iplvImage3( iplvImage2);

        int scale = 5;
        vigra::recursiveSmoothX(vigra::srcImageRange(iplvImage2)   , vigra::destImage(iplvImage3tmp), scale);
        vigra::recursiveSmoothY(vigra::srcImageRange(iplvImage3tmp), vigra::destImage(iplvImage3), scale);
        showIplvBasicImag<PEXTYPE>(&iplvImage3,winName);

        

        saveIplvBasicImag<PEXTYPE>(&iplvImage3, "out.jpg");


        cvDestroyWindow(winName);
        return 0;
}

See also:

Definition at line 158 of file iplvbasicimage.hxx.


Constructor & Destructor Documentation

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
CiplvBasicImage< PIXELTYPE, Alloc >::CiplvBasicImage char *  filename  )  [inline]
 

Definition at line 202 of file iplvbasicimage.hxx.

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
CiplvBasicImage< PIXELTYPE, Alloc >::CiplvBasicImage const char *  filename  )  [inline]
 

Definition at line 207 of file iplvbasicimage.hxx.

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
CiplvBasicImage< PIXELTYPE, Alloc >::CiplvBasicImage int  width,
int  height
[inline]
 

Definition at line 213 of file iplvbasicimage.hxx.

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
CiplvBasicImage< PIXELTYPE, Alloc >::CiplvBasicImage IplImage *  pIplImageIn  )  [inline]
 

Definition at line 219 of file iplvbasicimage.hxx.

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
CiplvBasicImage< PIXELTYPE, Alloc >::CiplvBasicImage IplImage  ipl_imageIn  )  [inline]
 

Definition at line 227 of file iplvbasicimage.hxx.

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
CiplvBasicImage< PIXELTYPE, Alloc >::CiplvBasicImage CiplvBasicImage< PIXELTYPE > &  iplvImageIn  )  [inline]
 

Definition at line 234 of file iplvbasicimage.hxx.

References iplvResizeCopyImageZeroPad().

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
CiplvBasicImage< PIXELTYPE, Alloc >::~CiplvBasicImage  )  [inline]
 

Definition at line 258 of file iplvbasicimage.hxx.


Member Function Documentation

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
IplImage* CiplvBasicImage< PIXELTYPE, Alloc >::initAndCopyProc IplImage  ipl_imageIn  )  [inline]
 

Definition at line 177 of file iplvbasicimage.hxx.

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
IplImage* CiplvBasicImage< PIXELTYPE, Alloc >::initProc int  width,
int  height
[inline]
 

Definition at line 165 of file iplvbasicimage.hxx.

References CiplImageDepth< PIXELTYPE >::depth.

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
int CiplvBasicImage< PIXELTYPE, Alloc >::iplWidth  )  [inline]
 

Definition at line 184 of file iplvbasicimage.hxx.

Referenced by iplvMutualInformationShiftMap(), iplvMutualInformationShiftMapOnOverlapAreaOnly(), iplvShiftedMutualInformationOnOverlapAreaOnly(), saveIplvBasicImag(), and showIplvBasicImag().

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
IplImage* CiplvBasicImage< PIXELTYPE, Alloc >::loadImageAndInit const char *  filename  )  [inline]
 

Definition at line 196 of file iplvbasicimage.hxx.

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
IplImage* CiplvBasicImage< PIXELTYPE, Alloc >::loadImageAndInit char *  filename  )  [inline]
 

Definition at line 190 of file iplvbasicimage.hxx.


Member Data Documentation

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
int CiplvBasicImage< PIXELTYPE, Alloc >::iplDepthDef
 

Definition at line 161 of file iplvbasicimage.hxx.

template<class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE>>
IplImage* CiplvBasicImage< PIXELTYPE, Alloc >::pIplImage
 

Definition at line 163 of file iplvbasicimage.hxx.

Referenced by iplvMutualInformationShiftMap(), main(), saveIplvBasicImag(), and showIplvBasicImag().


The documentation for this class was generated from the following file:
Generated on Thu Oct 27 21:27:44 2005 for STL like OpenCV wrapper (STLLCV) by  doxygen 1.4.5