Difference between revisions of "OpenCV/Basics/Point"
From ProgrammingExamples
< OpenCV
Daviddoria (Talk | contribs) m (moved OpenCV/Point to OpenCV/Basics/Point) |
Daviddoria (Talk | contribs) m (→CMakeLists.txt) |
||
Line 28: | Line 28: | ||
ADD_EXECUTABLE(Point Point.cxx) | ADD_EXECUTABLE(Point Point.cxx) | ||
− | TARGET_LINK_LIBRARIES(Point | + | TARGET_LINK_LIBRARIES(Point ${OpenCV_LIBS}) |
− | + | ||
− | + | ||
− | ) | + | |
</source> | </source> |
Latest revision as of 16:45, 21 January 2011
Point.cxx
#include "cv.h" #include <iostream> int main() { cv::Point3f myPoint; myPoint.x = 1; myPoint.y = 2; myPoint.z = 3; std::cout << myPoint << std::endl; return 0; }
CMakeLists.txt
cmake_minimum_required(VERSION 2.6) PROJECT(Point) FIND_PACKAGE(OpenCV REQUIRED ) INCLUDE_DIRECTORIES( ${OPENCV_INCLUDE_DIR} ) ADD_EXECUTABLE(Point Point.cxx) TARGET_LINK_LIBRARIES(Point ${OpenCV_LIBS})