Changeset 131 in pacpussensors for trunk/Vislab
- Timestamp:
- Dec 9, 2016, 9:29:50 AM (8 years ago)
- Location:
- trunk/Vislab
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Vislab/CMakeLists.txt
r128 r131 1 1 project(VislabComponent) 2 3 add_definitions( -DVISLAB_COMPONENT_EXPORTS ) 2 4 3 5 set(${PROJECT_NAME}_VERSION_MAJOR 0) … … 24 26 ${PACPUS_INCLUDE_DIR} 25 27 ${PACPUS_INCLUDE_DIR}/Pacpus/ 26 C:/Users/ldecherf/Documents/Visual Studio 2015/Projects/dev/pacpus/pacpussensors/Vislab/lib3dv-1.2.0/lib3dv28 "C:/Program Files (x86)/lib3dv/include/lib3dv" 27 29 ) 28 30 … … 57 59 ${PLUGIN_HDR} 58 60 VislabComponent.hpp 59 VislabCamera.hpp60 61 Display.h 61 62 ) … … 104 105 ${QT_LIBRARIES} 105 106 ${OpenCV_LIBS} 106 3dv107 "C:/Program Files (x86)/lib3dv/lib/3dv.lib" 107 108 ) 108 109 ################################################################################ -
trunk/Vislab/DiskWriter.cpp
r127 r131 7 7 const int MAX_LENGTH_NAME = 512; 8 8 9 /*! A more elaborate description of the constructor*/ 9 10 DiskWriter::DiskWriter(const QString name, lib3dv::image::type::types imageType) : VislabImageProcessor(name, imageType) 10 11 { 11 12 QDir directory; 13 /*! For the classic picture */ 12 14 if (imageType == lib3dv::image::type::RIGHT_RECTIFIED) 13 15 { … … 21 23 22 24 } 25 /*! For the disparity picture */ 23 26 if (imageType == lib3dv::image::type::DSI) 24 27 { … … 33 36 } 34 37 35 38 /*! process function from the DiskWriter class with a cv:Mat parameter */ 36 39 void DiskWriter::process(cv::Mat const& frame) 37 40 { … … 45 48 throw std::runtime_error("cannot save the following frame: " + filename.toStdString()); 46 49 50 /*! Write of the file on the disk */ 47 51 mDBTFile.writeRecord(road_time(), 0, filename.toStdString().c_str(), MAX_LENGTH_NAME); 48 52 } -
trunk/Vislab/Display.cpp
r127 r131 5 5 #include "VislabImageProcessor.h" 6 6 7 /*! A more elaborate description of the constructor*/ 7 8 Display::Display(const QString& windowName, lib3dv::image::type::types imageType) : VislabImageProcessor(windowName, imageType) 8 9 { … … 12 13 } 13 14 15 /*! DisplayFrame function from the Display class with a cv:Mat parameter */ 14 16 void Display::DisplayFrame(cv::Mat const& frame) 15 17 { … … 17 19 } 18 20 21 /*! process function from the Display class with a cv:Mat parameter 22 Emit the signal to diplay the frame 23 */ 19 24 void Display::process(cv::Mat const& frame) 20 25 { -
trunk/Vislab/VislabCamera.cpp
r127 r131 24 24 25 25 //ComponentFactory<VislabCamera> sFactory("VislabComponent"); 26 26 /*! Constructor */ 27 27 VislabCamera::VislabCamera(const QString& name) 28 28 :diskwriterVideo(name,lib3dv::image::type::RIGHT_RECTIFIED), … … 41 41 void VislabCamera::open() 42 42 { 43 curr_devices = lib3dv::device::enumerate(boost::asio::ip::address_v4::from_string("192.168.0.2"), 1, error); 43 44 curr_devices = lib3dv::device::enumerate(boost::asio::ip::address_v4::from_string("192.168.0.1"), 1, error); 44 45 if(error != lib3dv::error::NONE) 45 46 std::cout << "[EE] 3dv-client: error detected: " << error << std::endl; … … 51 52 } 52 53 //disk_writer = boost::shared_ptr< ::disk_writer>(new ::disk_writer(paths, data_format, autonumber, params, guid_type, log_level)); 54 std::cout << "[II] 3dv-client: banane" << std::endl; 55 curr_devices[0].log_level(2); 56 curr_devices[0].timeout(boost::posix_time::milliseconds(5000)); 53 57 curr_devices[0].connect_image_callback(boost::function<void(boost::shared_ptr< const lib3dv::image>, unsigned int)>(boost::bind(&::VislabImageProcessor::image_callback, &displayVideo, _1, _2))); 54 58 curr_devices[0].connect_image_callback(boost::function<void(boost::shared_ptr< const lib3dv::image>, unsigned int)>(boost::bind(&::VislabImageProcessor::image_callback, &displayDisparite, _1, _2))); … … 58 62 if(error != lib3dv::error::NONE) 59 63 std::cout << "[EE] 3dv-client: error detected: " << error << std::endl; 64 else 65 std::cout << "[II] 3dv-client: device successfully opened" << std::endl; 60 66 } 61 67 -
trunk/Vislab/VislabCamera.hpp
r127 r131 11 11 // Includes, lib3dv. 12 12 #include <lib3dv-1.2.0/lib3dv/device.h> 13 #include <lib3dv-1.2.0/lib3dv/error.h> 13 14 #include "DiskWriter.h" 14 15 #include "Display.h" -
trunk/Vislab/VislabComponent.cpp
r127 r131 8 8 #include <Pacpus/kernel/Log.h> 9 9 #include <Pacpus/kernel/DbiteFileTypes.h> 10 #include < /home/louis/dev/pacpus/pacpusframework/include/Pacpus/kernel/DbiteException.h>11 //#include <lib3dv-1.2.0/lib3dv/device.h>10 #include <Pacpus/kernel/DbiteException.h> 11 #include <lib3dv-1.2.0/lib3dv/device.h> 12 12 #include <20150310_lib3dv-1.2.0/src/display.h> 13 13 -
trunk/Vislab/VislabImageProcessor.cpp
r127 r131 9 9 void VislabImageProcessor::image_callback(boost::shared_ptr< const lib3dv::image> image, unsigned int) 10 10 { 11 //std::cout << "[II] 3dv-client: Gruyere" << std::endl; 11 12 if(image->m_type == mImageType) 12 13 { -
trunk/Vislab/VislabImageProcessor.h
r127 r131 22 22 public: 23 23 VislabImageProcessor(const QString& name, lib3dv::image::type::types imageType); 24 void image_callback(boost::shared_ptr< 24 void image_callback(boost::shared_ptr<const lib3dv::image>, unsigned int); 25 25 virtual void process(cv::Mat const& frame) = 0; 26 26 QString getName();
Note:
See TracChangeset
for help on using the changeset viewer.