Difference between revisions of "OpenCV/Basics/MatrixProperties"
From ProgrammingExamples
< OpenCV
Daviddoria (Talk | contribs) m (moved OpenCV/MatrixProperties to OpenCV/Basics/MatrixProperties) |
Daviddoria (Talk | contribs) m (→CMakeLists.txt) |
||
Line 32: | Line 32: | ||
ADD_EXECUTABLE(MatrixProperties MatrixProperties.cxx) | ADD_EXECUTABLE(MatrixProperties MatrixProperties.cxx) | ||
− | TARGET_LINK_LIBRARIES(MatrixProperties | + | TARGET_LINK_LIBRARIES(MatrixProperties ${OpenCV_LIBS}) |
− | + | ||
− | + | ||
− | ) | + | |
</source> | </source> |
Latest revision as of 16:46, 21 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_LIBS})