Difference between revisions of "OpenCV/Basics/MatrixProperties"
From ProgrammingExamples
< OpenCV
Daviddoria (Talk | contribs) (Created page with '==MatrixProperties.cxx== <source lang="cpp"> #include "cv.h" #include <iostream> int main() { cv::Mat A(3,3,CV_32FC1); std::cout << A.depth() << std::endl; // float seems …') |
Daviddoria (Talk | contribs) m (moved OpenCV/MatrixProperties to OpenCV/Basics/MatrixProperties) |
(No difference)
|
Revision as of 18:48, 20 January 2011
MatrixProperties.cxx
#include "cv.h" #include <iostream> int main() { cv::Mat A(3,3,CV_32FC1); std::cout << A.depth() << std::endl; // float seems to be depth 5 cv::Mat B(3,3,CV_64FC1); std::cout << B.depth() << std::endl; // float seems to be depth 6 return 0; }
CMakeLists.txt
cmake_minimum_required(VERSION 2.6) PROJECT(MatrixProperties) FIND_PACKAGE(OpenCV REQUIRED ) INCLUDE_DIRECTORIES( ${OPENCV_INCLUDE_DIR} ) ADD_EXECUTABLE(MatrixProperties MatrixProperties.cxx) TARGET_LINK_LIBRARIES(MatrixProperties opencv_core opencv_highgui opencv_flann opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_objdetect opencv_features2d opencv_calib3d opencv_legacy opencv_contrib )