CvMatWrap.cpp

Go to the documentation of this file.
00001 /************************************************************************/
00002 /*                                                                      */
00003 /*               Copyright 2004-2005 by Hirotaka Niitsuma               */
00004 /*                                                                      */
00005 /*                                                                      */
00006 /*    This file is part of the STLLCV computer vision library.          */
00007 /*    ( Version 0.1, Sep 28 2005 )                                      */
00008 /*    You may use, modify, and distribute this software according       */
00009 /*    to the terms stated in the LICENSE file included in               */
00010 /*    the STLLCV distribution.                                          */
00011 /*                                                                      */
00012 /*    The STLLCV Website is                                             */
00013 /*        http://www2s.biglobe.ne.jp/~niitsuma/STLLCV/                  */
00014 /*    Please direct questions, bug reports, and contributions to        */
00015 /*        niitsuma@mub.biglobe.ne.jp@@@                              */
00016 /*                                                                      */
00017 /*  THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR          */
00018 /*  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED      */
00019 /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
00020 /*                                                                      */
00021 /************************************************************************/
00022 
00023 #include "stllcv/ublascvmatrix.hxx"
00024 
00025 
00026 int main(int argc, char * argv[])
00027 {
00028         //init as identity_matrix
00029         CWrapCvMat<boost::numeric::ublas::matrix<float> > mat((boost::numeric::ublas::matrix<float>)boost::numeric::ublas::identity_matrix<float>(4));
00030         std::cout << "mat= " << mat  << std::endl;
00031         
00032         
00033 
00034         CWrapCvMat<boost::numeric::ublas::matrix<float> > matI((boost::numeric::ublas::matrix<float>)boost::numeric::ublas::identity_matrix<float>(4)); 
00035 
00036         //multiple as uBLAS
00037         mat *= 2 ; 
00038         std::cout << "mat= " << mat  << std::endl;
00039 
00040         cvmInvert(&(CvMat)mat, &(CvMat)matI );
00041         std::cout << "matI= " << matI  << std::endl;
00042 
00043 
00044         cvInvert(mat.pCvMat, matI.pCvMat );
00045         std::cout << "matI= " << matI  << std::endl;
00046 
00047 
00048 
00049 
00050         return 0;
00051 }
00052 

Generated on Thu Oct 27 21:27:44 2005 for STL like OpenCV wrapper (STLLCV) by  doxygen 1.4.5