00001 /************************************************************************* 00008 * 00009 * Source code for Real Time Image Library (libRTImage) 00010 * 00011 * Leeds Vision Group give permission for this code to be copied, modified 00012 * and distributed within the University of Leeds subject to the following 00013 * conditions:- 00014 * 00015 * - The code is not to be used for commercial gain. 00016 * - The code and use thereof will be attributed to the authors where 00017 * appropriate (including demonstrations which rely on it's use). 00018 * - All modified, distributions of the source files will retain this header. 00019 * 00020 ****************************************************************************/ 00021 00022 #ifndef RANDOM_SOURCE_H 00023 #define RANDOM_SOURCE_H 00024 00025 #include "ImageSource.h" 00026 #include "Image.h" 00027 00028 00029 class RandomSource : public ImageSource 00041 { 00042 private: 00043 /* Private Members */ 00044 00045 unsigned int sleeptime; 00046 00047 public: 00049 RandomSource(unsigned int w, unsigned int h, unsigned int fps); 00050 00051 /* Extraction operators */ 00052 00053 virtual ImageSource& operator >> (ImageRGB&); 00054 virtual ImageSource& operator >> (ImageGrey&); 00055 virtual ImageSource& operator >> (Image&); 00056 00057 // Update the specified colour image with a random colour. 00058 void update(ImageRGB&); 00059 00060 // Update the specified greyscale image with a random grey value; 00061 void update(ImageGrey&); 00062 }; 00063 00064 00065 #endif // RANDOM_SOURCE_H
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001