Changeset 124 in flair-src for trunk/lib/FlairVisionFilter


Ignore:
Timestamp:
Jan 12, 2017, 10:39:23 AM (5 years ago)
Author:
Sanahuja Guillaume
Message:

modifs jpeg

Location:
trunk/lib/FlairVisionFilter/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairVisionFilter/src/CvtColor.cpp

    r122 r124  
    2525
    2626    switch(conversion) {
    27     case Conversion_t::GRAY:
     27    case Conversion_t::ToGray:
    2828        try{
    2929            cvimage::Type const &imageType=dynamic_cast<cvimage::Type const &>(parent->GetOutputDataType());
    30             output=new cvimage(this,imageType.GetWidth(),imageType.GetHeight(),cvimage::Type::Format::GRAY,"conversion",true,2);
     30            output=new cvimage(this,imageType.GetWidth(),imageType.GetHeight(),cvimage::Type::Format::Gray,"conversion",true,2);
    3131
    3232        } catch(std::bad_cast& bc) {
     
    6161
    6262    switch(conversion) {
    63     case Conversion_t::GRAY:
     63    case Conversion_t::ToGray:
    6464        switch(((cvimage*)data)->GetDataType().GetFormat()) {
    6565        case cvimage::Type::Format::YUYV:
  • trunk/lib/FlairVisionFilter/src/CvtColor.h

    r122 r124  
    3939            */
    4040            enum class Conversion_t {
    41                 BGR,/*!< BGR 24 bits */
    42                 GRAY,/*!< gray 8 bits */
     41                ToBGR,/*!< BGR 24 bits */
     42                ToGray,/*!< gray 8 bits */
    4343                } ;
    4444
  • trunk/lib/FlairVisionFilter/src/HoughLines.cpp

    r122 r124  
    5353    try{
    5454        cvimage::Type const &imageType=dynamic_cast<cvimage::Type const &>(parent->GetOutputDataType());
    55         if(imageType.GetFormat()!=cvimage::Type::Format::GRAY) {
    56             Err("input image is not grey\n");
     55        if(imageType.GetFormat()!=cvimage::Type::Format::Gray) {
     56            Err("input image is not gray\n");
    5757        }
    5858    } catch(std::bad_cast& bc) {
  • trunk/lib/FlairVisionFilter/src/ImgThreshold.cpp

    r122 r124  
    3232    try{
    3333        cvimage::Type const &imageType=dynamic_cast<cvimage::Type const &>(parent->GetOutputDataType());
    34         if(imageType.GetFormat()==cvimage::Type::Format::GRAY) {
     34        if(imageType.GetFormat()==cvimage::Type::Format::Gray) {
    3535            output=new cvimage(this,imageType.GetWidth(),imageType.GetHeight(),imageType.GetFormat(),"threshold");
    3636        } else {
    37             Err("input image is not grey\n");
     37            Err("input image is not gray\n");
    3838        }
    3939    } catch(std::bad_cast& bc) {
  • trunk/lib/FlairVisionFilter/src/Sobel.cpp

    r122 r124  
    3434    try{
    3535        cvimage::Type const &imageType=dynamic_cast<cvimage::Type const &>(parent->GetOutputDataType());
    36         if(imageType.GetFormat()==cvimage::Type::Format::GRAY) {
     36        if(imageType.GetFormat()==cvimage::Type::Format::Gray) {
    3737            output=new cvimage(this,imageType.GetWidth(),imageType.GetHeight(),imageType.GetFormat(),"sobel");
    3838        } else {
    39             Err("input image is not grey\n");
     39            Err("input image is not gray\n");
    4040        }
    4141
  • trunk/lib/FlairVisionFilter/src/VisionFilter.cpp

    r123 r124  
    99}
    1010
    11 void saveToJpeg(IplImage* src_img,std::string filename,unsigned char compression_level) {
     11void saveToJpeg(IplImage* src_img,std::string filename,PictureFormat_t input_format,PictureFormat_t output_format,unsigned char compression_level) {
    1212        if(!cvSaveImage(filename.c_str(),src_img)) printf("Could not save.\n");
    1313}
  • trunk/lib/FlairVisionFilter/src/VisionFilter.h

    r123 r124  
    1212void CloseVisionFilter(void);
    1313
    14 void saveToJpeg(IplImage* src_img,std::string filename,unsigned char compression_level=95);
     14enum class PictureFormat_t {
     15                Gray,/*!< gray 8 bits */
     16                                                                RGB,/*!< rgb 24 bits */
     17                                                                UYVY,/*!< YUV 4:2:2 planer */
     18                } ;
     19                                                               
     20void saveToJpeg(IplImage* src_img,std::string filename,PictureFormat_t input_format,PictureFormat_t output_format,unsigned char compression_level=95);
  • trunk/lib/FlairVisionFilter/src/unexported/compile_info.h

    r123 r124  
    55
    66#define USER "gsanahuj@gsanahuj-Latitude-E6420"
    7 #define DATE "mardi 10 janvier 2017, 15:56:33 (UTC+0100)"
     7#define DATE "jeudi 12 janvier 2017, 09:32:25 (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 "122M"
     11#define SVN_REV "122:123M"
    1212
    1313inline void compile_info(std::string name) {
Note: See TracChangeset for help on using the changeset viewer.