Changeset 123 in flair-src for trunk/lib


Ignore:
Timestamp:
01/10/17 15:56:53 (5 years ago)
Author:
Sanahuja Guillaume
Message:

vision filter

Location:
trunk/lib
Files:
6 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/FrameworkManager.cpp

    r122 r123  
    174174}
    175175
     176string FrameworkManager::GetLogPath(void) const {
     177        return pimpl_->log_path;
     178}
    176179void FrameworkManager::AddDeviceToLog(IODevice *device) {
    177180  pimpl_->AddDeviceToLog(device);
  • trunk/lib/FlairCore/src/FrameworkManager.h

    r122 r123  
    109109  */
    110110  void SetupLogger(std::string log_path);
     111       
     112        /*!
     113  * \brief Get log path
     114  *
     115        * get the path defined by SetupLogger
     116  *
     117  * \return log path
     118  */
     119  std::string GetLogPath(void) const;
    111120
    112121  /*!
  • trunk/lib/FlairSensorActuator/CMakeLists.txt

    r45 r123  
    2323        ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported
    2424        ${CMAKE_CURRENT_SOURCE_DIR}/../FlairCore/src
     25        ${CMAKE_CURRENT_SOURCE_DIR}/../FlairVisionFilter/src
    2526        ${CMAKE_SYSROOT}/usr/include/opencv
    2627        ${CMAKE_SYSROOT}/usr/include/vrpn
    27 #       $ENV{IGEP_ROOT}/uav_dev/include
    2828)
    2929
  • trunk/lib/FlairSensorActuator/src/Camera.cpp

    r122 r123  
    2424#include <DataPlot1D.h>
    2525#include <Picture.h>
     26#include <VisionFilter.h>
    2627#include <highgui.h>
    2728#include <fstream>
     
    118119                        case LogFormat::JPG:
    119120                                        IplImage *img=((cvimage*)data)->img;
    120                                         //dspSaveToJpeg(img,"toto");
     121                                        string filename=getFrameworkManager()->GetLogPath()+"/"+ObjectName()+"_"+std::to_string(data->DataTime())+".jpg";
     122                                        saveToJpeg(img,filename);
    121123                                break;
    122124                }
  • trunk/lib/FlairVisionFilter/CMakeLists.txt

    r122 r123  
    2121        ${LIBXML2_INCLUDE_DIR}
    2222        ${CMAKE_CURRENT_SOURCE_DIR}/src
     23        ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported
    2324        $ENV{FLAIR_ROOT}/flair-src/lib/FlairCore/src
    2425        ${CMAKE_SYSROOT}/usr/include/opencv
  • trunk/lib/FlairVisionFilter/src/VisionFilter.cpp

    r122 r123  
    1 #include "init.h"
     1#include "VisionFilter.h"
     2#include "compile_info.h"
     3#include <highgui.h>
    24
     5static void constructor() __attribute__((constructor));
    36
    4 void SetupDSP(std::string file,int globalTimeoutMs) {
    5    
     7void constructor() {
     8  compile_info("FlairVisionFilter");
    69}
    710
    8 void CloseDSP(void) {
     11void saveToJpeg(IplImage* src_img,std::string filename,unsigned char compression_level) {
     12        if(!cvSaveImage(filename.c_str(),src_img)) printf("Could not save.\n");
     13}
     14
     15bool InitVisionFilter(std::string args) {
     16  printf("Using default vision lib filter, all functions are not ready!\n");
     17        return true;
     18}
     19
     20void CloseVisionFilter(void) {
    921 
    1022}
  • trunk/lib/FlairVisionFilter/src/VisionFilter.h

    r122 r123  
    11#include <string>
     2#include <cxtypes.h>
    23
    34/*!
    4 * \brief DSP setup
     5* \brief InitVisionFilter
    56*
    6 * Setup DSP executable file. \n
    7 * If this method is not called, no DSP processing will be available. \n
    8 *
    9 * \param file DSP executable file
    10 * \param globalTimeoutMs timeout for all DSP functions, in ms (timeout is only
    11 * used to display a warning. -1 to disable timeout
     7* \return true
    128*/
    13 void SetupDSP(std::string file,int globalTimeoutMs=-1);
    149
     10bool InitVisionFilter(std::string args);
    1511
    16 void CloseDSP(void);
     12void CloseVisionFilter(void);
     13
     14void saveToJpeg(IplImage* src_img,std::string filename,unsigned char compression_level=95);
  • trunk/lib/FlairVisionFilter/src/unexported/compile_info.h

    r122 r123  
    55
    66#define USER "gsanahuj@gsanahuj-Latitude-E6420"
    7 #define DATE "vendredi 6 janvier 2017, 12:43:09 (UTC+0100)"
     7#define DATE "mardi 10 janvier 2017, 15:56:33 (UTC+0100)"
    88#define GCC_REV "4.9.1"
    99#define GCC_PATH "/opt/robomap3/1.7.3/armv7a-neon/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc"
    1010#define SVN_PATH "/home/gsanahuj/HDS/igep/flair-src_svn/trunk/lib/FlairVisionFilter"
    11 #define SVN_REV "Ajout, copie ou déplacement local non propagé"
     11#define SVN_REV "122M"
    1212
    1313inline void compile_info(std::string name) {
Note: See TracChangeset for help on using the changeset viewer.