Index: branches/sanscv/lib/FlairVisionFilter/src/CvtColor.cpp
===================================================================
--- branches/sanscv/lib/FlairVisionFilter/src/CvtColor.cpp	(revision 325)
+++ branches/sanscv/lib/FlairVisionFilter/src/CvtColor.cpp	(revision 326)
@@ -15,5 +15,4 @@
 #include "VisionFilter.h"
 #include <Image.h>
-//#include <dspcv_gpp.h>
 #include <typeinfo>
 
Index: branches/sanscv/lib/FlairVisionFilter/src/HoughLines.cpp
===================================================================
--- branches/sanscv/lib/FlairVisionFilter/src/HoughLines.cpp	(revision 325)
+++ branches/sanscv/lib/FlairVisionFilter/src/HoughLines.cpp	(revision 326)
@@ -20,6 +20,5 @@
 #include <GroupBox.h>
 #include <SpinBox.h>
-#include <DoubleSpinBox.h>
-//#include <dspcv_gpp.h>
+#include <DoubleSpinBox.h>>
 #include <typeinfo>
 #include <math.h>
Index: branches/sanscv/lib/FlairVisionFilter/src/ImgThreshold.cpp
===================================================================
--- branches/sanscv/lib/FlairVisionFilter/src/ImgThreshold.cpp	(revision 325)
+++ branches/sanscv/lib/FlairVisionFilter/src/ImgThreshold.cpp	(revision 326)
@@ -18,5 +18,4 @@
 #include <GroupBox.h>
 #include <SpinBox.h>
-//#include <dspcv_gpp.h>
 #include <typeinfo>
 
Index: branches/sanscv/lib/FlairVisionFilter/src/OpticalFlow.cpp
===================================================================
--- branches/sanscv/lib/FlairVisionFilter/src/OpticalFlow.cpp	(revision 325)
+++ branches/sanscv/lib/FlairVisionFilter/src/OpticalFlow.cpp	(revision 326)
@@ -19,8 +19,5 @@
 #include <GroupBox.h>
 #include <SpinBox.h>
-//#include <dspcv_gpp.h>
-#include <algorithm>
 #include <OneAxisRotation.h>
-#include <Vector3D.h>
 #include <typeinfo>
 
Index: branches/sanscv/lib/FlairVisionFilter/src/OpticalFlowData.cpp
===================================================================
--- branches/sanscv/lib/FlairVisionFilter/src/OpticalFlowData.cpp	(revision 325)
+++ branches/sanscv/lib/FlairVisionFilter/src/OpticalFlowData.cpp	(revision 326)
@@ -12,141 +12,150 @@
 
 #include "OpticalFlowData.h"
-#include <cstring>
+#include "VisionFilter.h"
+#include <string.h>
 
 using std::string;
 
-namespace flair
-{
-namespace filter
-{
+class OpticalFlowData_impl {
+public:
+    OpticalFlowData_impl(flair::filter::OpticalFlowData* self,uint32_t max_features) {
+        this->self=self;
+        this->max_features=max_features;
+        nb_features=0;
+        pointsA=(IntPoint*)malloc(max_features*sizeof(IntPoint));
+        pointsB=(FloatPoint*)malloc(max_features*sizeof(FloatPoint));
 
-OpticalFlowData::OpticalFlowData(const Object* parent,uint32_t max_features,string name,uint32_t n): io_data(parent,name,n)
-{
-    this->max_features=max_features;
-    nb_features=0;
+        found_features=(char*)malloc(max_features*sizeof(char));
+        features_error=(uint32_t*)malloc(max_features*sizeof(uint32_t));
+    }
 
-    pointsA=(CvPoint *)malloc(max_features*sizeof(CvPoint));
-    pointsB=(CvPoint2D32f *)malloc(max_features*sizeof(CvPoint2D32f));
+    ~OpticalFlowData_impl() {
+        free((char*)pointsA);
+        free((char*)pointsB);
 
-    found_features=(char *)malloc(max_features*sizeof(char));
-    features_error=(uint32_t*)malloc(max_features*sizeof(uint32_t));
+        free((char*)found_features);
+        free((char*)features_error);
+    }
+    
+    void Resize(uint32_t value) {
+        IntPoint *new_pointsA;
+        FloatPoint *new_pointsB;
+        char *new_found_features;
+        uint32_t *new_features_error;
+
+        new_pointsA=(IntPoint*)malloc(value*sizeof(IntPoint));
+        new_pointsB=(FloatPoint*)malloc(value*sizeof(FloatPoint));
+        new_found_features=(char*)malloc(value*sizeof(char));
+        new_features_error=(uint32_t*)malloc(value*sizeof(uint32_t));
+
+        self->GetMutex();
+        if(value>max_features) {
+            memcpy(new_pointsA,pointsA,max_features*sizeof(IntPoint));
+            memcpy(new_pointsB,pointsB,max_features*sizeof(FloatPoint));
+            memcpy(new_found_features,found_features,max_features*sizeof(char));
+            memcpy(new_features_error,features_error,max_features*sizeof(uint32_t));
+        } else {
+            memcpy(new_pointsA,pointsA,value*sizeof(IntPoint));
+            memcpy(new_pointsB,pointsB,value*sizeof(FloatPoint));
+            memcpy(new_found_features,found_features,value*sizeof(char));
+            memcpy(new_features_error,features_error,value*sizeof(uint32_t));
+            if(nb_features>value) nb_features=value; //si nb_features est le nombre de point qui ont effectivement une correspondande, ça me parait louche. Sauf si les points sont classés et que ceux qui ont une correpondance sont toujours au début
+        }
+        max_features=value;
+        self->ReleaseMutex();
+
+        free((char*)pointsA);
+        free((char*)pointsB);
+        free((char*)found_features);
+        free((char*)features_error);
+
+        pointsA=new_pointsA;
+        pointsB=new_pointsB;
+        found_features=new_found_features;
+        features_error=new_features_error;
+    }
+        
+    uint32_t max_features;
+    uint32_t nb_features;
+    IntPoint* pointsA;
+    FloatPoint* pointsB;
+    char *found_features;
+    uint32_t *features_error;
+
+private:
+    flair::filter::OpticalFlowData *self;
+};
+
+namespace flair {
+namespace filter {
+
+OpticalFlowData::OpticalFlowData(const Object* parent,uint32_t max_features,string name,uint32_t n): io_data(parent,name,n) {
+    pimpl_=new OpticalFlowData_impl(this,max_features);
 }
 
-OpticalFlowData::~OpticalFlowData()
-{
-    free(pointsA);
-    free(pointsB);
-
-    free(found_features);
-    free(features_error);
+OpticalFlowData::~OpticalFlowData() {
+    delete pimpl_;
 }
 
-CvPoint* OpticalFlowData::PointsA(void) const
-{
-    return pointsA;
+IntPoint* OpticalFlowData::PointsA(void) const {
+    return pimpl_->pointsA;
 }
 
-CvPoint2D32f* OpticalFlowData::PointsB(void) const
-{
-    return pointsB;
+FloatPoint* OpticalFlowData::PointsB(void) const {
+    return pimpl_->pointsB;
 }
 
-char *OpticalFlowData::FoundFeature(void) const
-{
-    return found_features;
+char *OpticalFlowData::FoundFeature(void) const {
+    return pimpl_->found_features;
 }
 
-uint32_t *OpticalFlowData::FeatureError(void) const
-{
-    return features_error;
+uint32_t *OpticalFlowData::FeatureError(void) const {
+    return pimpl_->features_error;
 }
 
 // value is new max_features value
 void OpticalFlowData::Resize(uint32_t value) {
-    CvPoint *new_pointsA;
-    CvPoint2D32f *new_pointsB;
-    char *new_found_features;
-    uint32_t *new_features_error;
-
-    new_pointsA=(CvPoint *)malloc(value*sizeof(CvPoint));
-    new_pointsB=(CvPoint2D32f *)malloc(value*sizeof(CvPoint2D32f));
-    new_found_features=(char *)malloc(value*sizeof(char));
-    new_features_error=(uint32_t *)malloc(value*sizeof(uint32_t));
-
-    GetMutex();
-    if(value>max_features) {
-        memcpy(new_pointsA,pointsA,max_features*sizeof(CvPoint));
-        memcpy(new_pointsB,pointsB,max_features*sizeof(CvPoint2D32f));
-        memcpy(new_found_features,found_features,max_features*sizeof(char));
-        memcpy(new_features_error,features_error,max_features*sizeof(uint32_t));
-    }
-    else {
-        memcpy(new_pointsA,pointsA,value*sizeof(CvPoint));
-        memcpy(new_pointsB,pointsB,value*sizeof(CvPoint2D32f));
-        memcpy(new_found_features,found_features,value*sizeof(char));
-        memcpy(new_features_error,features_error,value*sizeof(uint32_t));
-        if(nb_features>value) nb_features=value; //si nb_features est le nombre de point qui ont effectivement une correspondande, ça me parait louche. Sauf si les points sont classés et que ceux qui ont une correpondance sont toujours au début
-    }
-    max_features=value;
-    ReleaseMutex();
-
-    free(pointsA);
-    free(pointsB);
-    free(found_features);
-    free(features_error);
-
-    pointsA=new_pointsA;
-    pointsB=new_pointsB;
-    found_features=new_found_features;
-    features_error=new_features_error;
+    pimpl_->Resize(value);
 }
 
-void OpticalFlowData::RawRead(char* dst) const
-{
+void OpticalFlowData::RawRead(char* dst) const {
     Warn("non implementé\n");
 }
 
-void OpticalFlowData::SetPointsA(const CvPoint* points)
-{
+void OpticalFlowData::SetPointsA(const IntPoint* points) {
     GetMutex();
-    memcpy(pointsA,points,max_features*sizeof(CvPoint));
+    memcpy(pimpl_->pointsA,points,pimpl_->max_features*sizeof(IntPoint));
     ReleaseMutex();
 }
 
-void OpticalFlowData::SetPointsB(const CvPoint2D32f* points)
-{
+void OpticalFlowData::SetPointsB(const FloatPoint* points) {
     GetMutex();
-    memcpy(pointsB,points,max_features*sizeof(CvPoint2D32f));
+    memcpy(pimpl_->pointsB,points,pimpl_->max_features*sizeof(FloatPoint));
     ReleaseMutex();
 }
 
-void OpticalFlowData::SetFoundFeature(const char *found_features)
-{
+void OpticalFlowData::SetFoundFeature(const char *found_features) {
     GetMutex();
-    memcpy(this->found_features,found_features,max_features*sizeof(char));
+    memcpy(pimpl_->found_features,found_features,pimpl_->max_features*sizeof(char));
     ReleaseMutex();
 }
 
-void OpticalFlowData::SetFeatureError(const uint32_t *features_error)
-{
+void OpticalFlowData::SetFeatureError(const uint32_t *features_error) {
     GetMutex();
-    memcpy(this->features_error,features_error,max_features*sizeof(uint32_t));
+    memcpy(pimpl_->features_error,features_error,pimpl_->max_features*sizeof(uint32_t));
     ReleaseMutex();
 }
 
-uint32_t OpticalFlowData::MaxFeatures(void) const
-{
-    return max_features;
+uint32_t OpticalFlowData::MaxFeatures(void) const {
+    return pimpl_->max_features;
 }
 
-uint32_t OpticalFlowData::NbFeatures(void) const
-{
-    return nb_features;
+uint32_t OpticalFlowData::NbFeatures(void) const {
+    return pimpl_->nb_features;
 }
 
-void OpticalFlowData::SetNbFeatures(uint32_t value)
-{
+void OpticalFlowData::SetNbFeatures(uint32_t value) {
     GetMutex();
-    nb_features=value;
+    pimpl_->nb_features=value;
     ReleaseMutex();
 }
Index: branches/sanscv/lib/FlairVisionFilter/src/OpticalFlowData.h
===================================================================
--- branches/sanscv/lib/FlairVisionFilter/src/OpticalFlowData.h	(revision 325)
+++ branches/sanscv/lib/FlairVisionFilter/src/OpticalFlowData.h	(revision 326)
@@ -11,5 +11,19 @@
 
 #include <io_data.h>
-#include <cvtypes.h>
+
+//TODO: use flai::core::Vector2D
+typedef struct IntPoint {
+    int x;
+    int y;
+}
+IntPoint;
+
+typedef struct FloatPoint {
+    float x;
+    float y;
+}
+FloatPoint;
+
+class OpticalFlowData_impl;
 
 namespace flair { namespace filter {
@@ -53,5 +67,5 @@
         *
     */
-        CvPoint* PointsA(void) const;
+        IntPoint* PointsA(void) const;
 
         /*!
@@ -59,5 +73,5 @@
         *
         */
-        CvPoint2D32f* PointsB(void) const;
+        FloatPoint* PointsB(void) const;
 
         /*!
@@ -79,5 +93,5 @@
         * \param points points
         */
-        void SetPointsA(const CvPoint *points);
+        void SetPointsA(const IntPoint *points);
 
         /*!
@@ -86,5 +100,5 @@
         * \param points points
         */
-        void SetPointsB(const CvPoint2D32f *points);
+        void SetPointsB(const FloatPoint *points);
 
         /*!
@@ -139,13 +153,8 @@
         */
         void RawRead(char *dst) const;
-
+        
     private:
-        uint32_t max_features;
-        uint32_t nb_features;
-        CvPoint* pointsA;
-        CvPoint2D32f* pointsB;
-        char *found_features;
-        uint32_t *features_error;
         Type dataType;
+        OpticalFlowData_impl *pimpl_;
     };
 } // end namespace filter
Index: branches/sanscv/lib/FlairVisionFilter/src/Sobel.cpp
===================================================================
--- branches/sanscv/lib/FlairVisionFilter/src/Sobel.cpp	(revision 325)
+++ branches/sanscv/lib/FlairVisionFilter/src/Sobel.cpp	(revision 326)
@@ -18,5 +18,4 @@
 #include <GroupBox.h>
 #include <SpinBox.h>
-//#include <dspcv_gpp.h>
 #include <typeinfo>
 
Index: branches/sanscv/lib/FlairVisionFilter/src/cvtypes.h
===================================================================
--- branches/sanscv/lib/FlairVisionFilter/src/cvtypes.h	(revision 325)
+++ 	(revision )
@@ -1,150 +1,0 @@
-//  created:    2019/07/18
-//  filename:   cvtypes.cpp
-//
-//  author:     Guillaume Sanahuja
-//              Copyright Heudiasyc UMR UTC/CNRS 7253
-//
-//  version:    $Id: $
-//
-//  purpose:    types used by both gpp and dsp
-//
-//
-/*********************************************************************/
-
-#ifndef CVTYPES_H
-#define CVTYPES_H
-
-
-#define CV_PI   3.1415926535897932384626433832795
-
-
-typedef struct _IplImage
-{
-    int  nSize;             /* sizeof(IplImage) */
-    int  ID;                /* version (=0)*/
-    int  nChannels;         /* Most of OpenCV functions support 1,2,3 or 4 channels */
-    int  alphaChannel;      /* Ignored by OpenCV */
-    int  depth;             /* Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,
-                               IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported.  */
-    char colorModel[4];     /* Ignored by OpenCV */
-    char channelSeq[4];     /* ditto */
-    int  dataOrder;         /* 0 - interleaved color channels, 1 - separate color channels.
-                               cvCreateImage can only create interleaved images */
-    int  origin;            /* 0 - top-left origin,
-                               1 - bottom-left origin (Windows bitmaps style).  */
-    int  align;             /* Alignment of image rows (4 or 8).
-                               OpenCV ignores it and uses widthStep instead.    */
-    int  width;             /* Image width in pixels.                           */
-    int  height;            /* Image height in pixels.                          */
-    struct _IplROI *roi;    /* Image ROI. If NULL, the whole image is selected. */
-    struct _IplImage *maskROI;      /* Must be NULL. */
-    void  *imageId;                 /* "           " */
-    struct _IplTileInfo *tileInfo;  /* "           " */
-    int  imageSize;         /* Image data size in bytes
-                               (==image->height*image->widthStep
-                               in case of interleaved data)*/
-    char *imageData;        /* Pointer to aligned image data.         */
-    int  widthStep;         /* Size of aligned image row in bytes.    */
-    int  BorderMode[4];     /* Ignored by OpenCV.                     */
-    int  BorderConst[4];    /* Ditto.                                 */
-    char *imageDataOrigin;  /* Pointer to very origin of image data
-                               (not necessarily aligned) -
-                               needed for correct deallocation */
-}
-IplImage;
-
-typedef struct _IplROI
-{
-    int  coi; /* 0 - no COI (all channels are selected), 1 - 0th channel is selected ...*/
-    int  xOffset;
-    int  yOffset;
-    int  width;
-    int  height;
-}
-IplROI;
-
-typedef struct _IplTileInfo IplTileInfo;
-
-
-typedef struct CvMat
-{
-    int type;
-    int step;
-
-    /* for internal use only */
-    int* refcount;
-    int hdr_refcount;
-
-    union
-    {
-        unsigned char* ptr;
-        short* s;
-        int* i;
-        float* fl;
-        double* db;
-    } data;
-
-#ifdef __cplusplus
-    union
-    {
-        int rows;
-        int height;
-    };
-
-    union
-    {
-        int cols;
-        int width;
-    };
-#else
-    int rows;
-    int cols;
-#endif
-
-}
-CvMat;
-
-
-/*********************************** CvTermCriteria *************************************/
-
-#define CV_TERMCRIT_ITER    1
-#define CV_TERMCRIT_NUMBER  CV_TERMCRIT_ITER
-#define CV_TERMCRIT_EPS     2
-
-typedef struct CvTermCriteria
-{
-    int    type;  /* may be combination of
-                     CV_TERMCRIT_ITER
-                     CV_TERMCRIT_EPS */
-    int    max_iter;
-    double epsilon;
-}
-CvTermCriteria;
-
-/******************************* CvPoint and variants ***********************************/
-
-typedef struct CvPoint
-{
-    int x;
-    int y;
-}
-CvPoint;
-
-typedef struct CvPoint2D32f
-{
-    float x;
-    float y;
-}
-CvPoint2D32f;
-
-/******************************** CvSize's & CvBox **************************************/
-
-typedef struct
-{
-    int width;
-    int height;
-}
-CvSize;
-
-
-#endif /*CVTYPES_H*/
