00001 #ifndef RecognizeBall_H
00002 #define RecognizeBall_H
00003
00004 #define byte unsigned char
00005
00006 class RecognizeBall
00007 {
00008 private:
00009
00010 int isElement(int element, int array[], int *arraylen);
00011
00012
00013 byte* fastSobel(byte *data);
00014 int* histogram(byte *image);
00015 int* smoothenHistogram(int *histogram);
00016 int calculateThreshold(int *histogram);
00017 byte* threshold(byte *image, int threshold);
00018 int findNextOnPixel(int offset, byte image[],
00019 int visited[], int *visitedlen);
00020 int checkPerimeter(int offset, byte *image);
00021
00022
00023
00024 public:
00025 RecognizeBall();
00026 ~RecognizeBall();
00027 int* lookForBall(byte *data);
00028 };
00029
00030 #endif