00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __TLOBJECT_H__
00018 #define __TLOBJECT_H__
00019
00020
00021 #include "tlVision.h"
00022 #include "tlPixelArray.h"
00023
00024
00025
00026 class tlObject : public tlPixelArray
00027 {
00028 public:
00029 tlMask * shape;
00030 tlConst<float>* vx;
00031 tlConst<float>* vy;
00032
00033
00034
00035 tlObject ();
00036 tlObject (tl_format format, int x, int y, int width, int height);
00037 virtual ~tlObject ();
00038
00039
00040 int copy (tlObject *object);
00041 int copyTo (tlObject *object);
00042
00043
00044 int define (tlImage *image, tlRect *rect);
00045 int define (tlImage *image, tlColor *minColor, tlColor *maxColor, tlRect *rect);
00046
00047
00048 tlPoint *getPredictedPosition ();
00049 int getPredictedX ();
00050 int getPredictedY ();
00051
00052
00053 int extract (tlImage *image, tlPoint *point, tlColor *gapColor, tlColor *varColor, int connex=TL_CONNEX_4);
00054 int extract (tlImage *image, tlPoint *point, tlColor *gapColor, tlColor *varColor, tlRect *rect, int connex=TL_CONNEX_4);
00055 int extract (tlImage *image, tlPoint *point, tlColorModel *colorModel, int threshold, int connex=TL_CONNEX_4);
00056 int extract (tlImage *image, tlPoint *point, tlColorModel *colorModel, tlRect *rect, int threshold, int connex=TL_CONNEX_4);
00057 };
00058
00059
00060 #endif