Changeset 99 in pacpussensors for trunk/PtGreyCameras
- Timestamp:
- Oct 15, 2015, 2:47:01 PM (9 years ago)
- Location:
- trunk/PtGreyCameras
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PtGreyCameras/CMakeLists.txt
r64 r99 1 #########################quick start############################################ 2 # cmake ../ -G "CodeBlocks - Unix Makefiles" 3 # make 4 # make install 5 # make clean 6 # sudo apt-get install libopencv-dev 7 ################################################################################ 1 8 project(PtGreyCameras) 9 set(${PROJECT_NAME}_VERSION_MAJOR 0) 10 set(${PROJECT_NAME}_VERSION_MINOR 1) 11 # Create a DLL 12 add_definitions(-DCVWEBCAM_COMPONENT_EXPORTS) 13 add_definitions( -DVIDEO_EXPORTS ) 14 15 #include(FindOpenCV.cmake) 16 find_package(OpenCV REQUIRED) 17 18 # Check for OpenCV 19 if(NOT OpenCV_FOUND) 20 message(FATAL_ERROR "Project ${PROJECT_NAME} requires OpenCV library") 21 endif() 2 22 ################################################################################ 3 add_definitions(-DPTGREYCAMERAS_EXPORTS) 4 5 # ======================================== 6 # Configure qt4 7 # ======================================== 8 if(QT4_FOUND) 9 set(QT_USE_QTXML true) 10 set(QT_USE_QTNETWORK true) 11 include(${QT_USE_FILE}) 12 else() 13 message(ERROR "Qt4 needed") 14 endif() 15 16 # ======================================== 17 # Find dependencies 18 # ======================================== 19 find_package(OpenCV REQUIRED) 20 if(OpenCV_FOUND) 21 list(APPEND OpenCV_LIBS ${OpenCV_LIBRARIES}) 22 list(APPEND OpenCV_INCLUDE_DIR ${OpenCV_INCLUDE_DIRS}) 23 include_directories(${OpenCV_INCLUDE_DIR}) 24 endif(OpenCV_FOUND) 25 26 27 # ======================================== 28 # Compiler definitions 29 # ======================================== 30 add_definitions( 31 ${QT_DEFINITIONS} 32 ) 23 create_export(EXPORT_HDR ${PROJECT_NAME}) 24 pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME}) 25 add_definitions (${QT_DEFINITIONS}) 33 26 # ======================================== 34 27 # Options … … 63 56 endif() 64 57 endif() 65 66 # ======================================== 67 # Include directories 68 # ======================================== 69 include_directories( 70 ${PACPUS_INCLUDE_HINT} 71 ${QT_INCLUDE_DIR} 72 ${OPT_INCLUDE_DIRS} 73 ${OpenCV_INCLUDE_DIR} 58 find_package(Qt5Network REQUIRED) 59 ################################################################################ 60 # DIRECTORIES 61 include_directories( 62 ${PROJECT_BINARY_DIR} 63 ${QT_INCLUDE_DIR} 64 ${PACPUS_INCLUDE_DIR} 65 ${PACPUS_INCLUDE_DIR}/Pacpus/ 74 66 ) 75 67 … … 77 69 # Link directories 78 70 # ======================================== 79 link_directories( 80 ${PACPUS_LIBRARY_HINT}71 link_directories( 72 ${PACPUS_LIB_DIR} 81 73 ) 82 74 83 message("Creating source files for the plugin(s)") 84 message(STATUS PLUGIN_H=${PLUGIN_H}) 85 message(STATUS PLUGIN_CPP=${PLUGIN_CPP}) 75 ################################################################################ 76 # FILES 77 set(PROJECT_HDRS 78 ${EXPORT_HDR} 79 PtGreyCamerasExp.h 80 #../../StdDbtPlayerComponents/ImageBaseStructure.h 81 ) 82 set(PROJECT_SRCS 83 ${PLUGIN_CPP} 84 ) 86 85 87 pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} ) 86 if(OpenCV_FOUND) 87 list(APPEND OpenCV_LIBS ${OpenCV_LIBRARIES}) 88 list(APPEND OpenCV_INCLUDE_DIR ${OpenCV_INCLUDE_DIRS}) 89 include_directories(${OpenCV_INCLUDE_DIR}) 90 endif(OpenCV_FOUND) 88 91 89 # ========================================90 # List of sources91 # ========================================92 set(93 PROJECT_SRCS94 PtGreyCamerasExp.h95 #../../StdDbtPlayerComponents/ImageBaseStructure.h96 ${PLUGIN_CPP}97 )98 92 if(BUILD_PtGreyCameras AND BumbleBeeXB3_FOUND ) 99 93 list(APPEND PROJECT_SRCS … … 112 106 endif() 113 107 114 # ======================================== 115 # Files to MOC 116 # ======================================== 117 set( 118 FILES_TO_MOC 119 ${PLUGIN_H} 108 set(FILES_TO_MOC 109 ${PLUGIN_HDR} 120 110 ) 121 111 if(BUILD_PtGreyCameras AND BumbleBeeXB3_FOUND) … … 134 124 endif() 135 125 136 set( 137 UI_FILES 138 # WidgetIMU.ui 139 126 set(UI_FILES 140 127 ) 141 128 142 # ======================================== 143 # Directories architecture 144 # ======================================== 145 #SOURCE_GROUP(PtGreyCameras FILES ${PROJECT_SRCS} ) 146 SOURCE_GROUP(moc FILES ${PROJECT_MOC_SRCS}) 147 148 # ======================================== 149 # Call MOC 150 # ======================================== 151 qt4_wrap_cpp( 152 PROJECT_MOC_SRCS 129 ################################################################################ 130 # Qt: call moc, uic 131 qt_wrap_cpp(PROJECT_MOC_SRCS 153 132 ${FILES_TO_MOC} 154 133 ) 155 134 156 qt4_wrap_ui( 157 PROJECT_UI_SRCS 135 qt_wrap_ui(PROJECT_UI_SRCS 158 136 ${UI_FILES} 159 137 ) 160 138 161 # ======================================== 162 # Build a library 163 # ======================================== 164 pacpus_add_library( 165 ${PROJECT_NAME} SHARED 139 ################################################################################ 140 # BUILD and LINK 141 pacpus_add_library(${PROJECT_NAME} SHARED 142 ${PROJECT_HDRS} 166 143 ${PROJECT_SRCS} 167 144 ${PROJECT_MOC_SRCS} 168 145 ${PROJECT_UI_SRCS} 169 146 ) 147 148 170 149 # ======================================== 171 150 # Libraries 172 151 # ======================================== 173 # All the platform 174 message ( "\${VAR} = ${OPT_LIBRARIES}") 175 target_link_libraries( 176 ${PROJECT_NAME} 177 ${PACPUS_LIBRARIES} 178 ${QT_LIBRARIES} 179 optimized ${OPT_LIBRARIES} debug ${DBG_LIBRARIES} 180 ${PACPUS_DEPENDENCIES_LIB} 181 ${OpenCV_LIBS} 182 ${BumbleBeeXB3_PGR_LIBRARIES} 183 ${BumbleBeeXB3_TRICLOPS_LIBRARIES} 152 set(LIBS 153 optimized FileLib debug FileLib_d 154 optimized PacpusLib debug PacpusLib_d 155 optimized PacpusTools debug PacpusTools_d 184 156 ) 185 186 # ======================================== 187 # Install 188 # ======================================== 189 pacpus_install(${PROJECT_NAME}) 157 if (WIN32) 158 list(APPEND LIBS 159 optimized ROAD_TIME debug ROAD_TIME_d 160 ) 161 endif() 162 # LINK 163 target_link_libraries(${PROJECT_NAME} 164 ${PACPUS_LIBRARIES} 165 ${PACPUS_DEPENDENCIES_LIB} 166 ${LIBS} 167 ${QT_LIBRARIES} 168 ${OpenCV_LIBS} 169 ) 170 qt5_use_modules(${PROJECT_NAME} Network) 171 ################################################################################ 172 # FOLDERS 173 pacpus_folder(${PROJECT_NAME} "components") 174 ################################################################################ 175 # INSTALL 176 pacpus_install(${PROJECT_NAME}) -
trunk/PtGreyCameras/Flea3Grabber.h
r64 r99 5 5 // author: Danilo Alves de Lima 6 6 // Copyright Heudiasyc UMR UTC/CNRS 6599 7 // 7 // 8 8 // version: $Id: $ 9 9 // 10 // purpose: 10 // purpose: 11 11 *********************************************************************/ 12 12 … … 31 31 #include <string> 32 32 #include <vector> 33 #include "../ ../../Pacpussensors/trunk/StdDbtPlayerComponents/ImageBaseStructure.h"33 #include "../StdDbtPlayerComponents/ImageBaseStructure.h" 34 34 35 35 namespace pacpus { … … 58 58 unsigned int cam_trigger_mode; // Trigger mode 59 59 unsigned int cam_trigger_enable; // Trigger enable (1 on // 0 off) 60 unsigned int cam_trigger_parameter; 60 unsigned int cam_trigger_parameter; 61 61 unsigned int cam_trigger_polarity; // Trigger polarity (0 low // 1 high) 62 62 unsigned int cam_trigger_source; // Source (GPIO) … … 85 85 //---------------------------------------------------------------------------------------------------------------- 86 86 bool showdebug; // Show frame acquired 87 88 int mMaxImageOutputSize; // Size of the input image data in the memory 89 87 88 int mMaxImageOutputSize; // Size of the input image data in the memory 89 90 90 // Output directory 91 91 QDir mOutputDirectory; … … 98 98 99 99 /** Class to provide the obstacle detection from a disparity map data */ 100 class PTGREYCAMERAS_API Flea3Grabber: public QThread, 100 class PTGREYCAMERAS_API Flea3Grabber: public QThread, 101 101 public ComponentBase 102 102 { … … 114 114 //============================================================================================== 115 115 116 /** 116 /** 117 117 * Initialize default values 118 118 */ 119 119 void InitDefault(int indice); 120 120 121 int img2send_; 121 int img2send_; 122 122 123 123 protected: -
trunk/PtGreyCameras/PtGreyCamerasPlugin.cpp
r48 r99 1 // Autogenerated file by Pacpus Plugin.cmake1 // Autogenerated file by PacpusUtilities.cmake 2 2 // DO NOT EDIT!!! ALL CHANGES WOULD BE REMOVED BY THE NEXT CALL OF CMAKE 3 3 … … 17 17 } 18 18 19 Q_EXPORT_PLUGIN2(PtGreyCamerasPlugin, PtGreyCamerasPlugin) 19 //Qt4 Plugin Macro desactivated 20 //Q_EXPORT_PLUGIN2(PtGreyCamerasPlugin, PtGreyCamerasPlugin) -
trunk/PtGreyCameras/PtGreyCamerasPlugin.h
r48 r99 1 // Autogenerated file by Pacpus Plugin.cmake1 // Autogenerated file by PacpusUtilities.cmake 2 2 // DO NOT EDIT!!! ALL CHANGES WOULD BE REMOVED BY THE NEXT CALL OF CMAKE 3 3 … … 16 16 { 17 17 Q_OBJECT 18 //Qt5 Plugins Macro 19 Q_PLUGIN_METADATA(IID "pacpus.PtGreyCamerasPlugin" FILE "PtGreyCamerasPlugin.json") 18 20 Q_INTERFACES(PacpusPluginInterface) 19 21
Note:
See TracChangeset
for help on using the changeset viewer.