• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

include/FCam/Base.h

Go to the documentation of this file.
00001 #ifndef FCAM_BASE_H
00002 #define FCAM_BASE_H
00003 
00004 #include <stdlib.h>
00005 
00012 namespace FCam {
00013   
00015     typedef enum {
00017         RGB24 = 0, 
00018 
00021         RGB16,     
00022         
00030         UYVY,      
00031         
00033         YUV24, 
00034 
00040         RAW,
00041         
00044         UNKNOWN} ImageFormat;
00045 
00049     enum BayerPattern {RGGB = 0, 
00050                        BGGR,     
00051                        GRBG,     
00052                        GBRG,     
00053                        NotBayer  
00054     };        
00055 
00057     int bytesPerPixel(ImageFormat);
00058     
00061     struct Size {
00063         Size() : width(0), height(0) {}
00064 
00066         Size(int w, int h) : width(w), height(h) {}
00067 
00069         bool operator==(const Size &other) const {return width == other.width && height == other.height;}
00070 
00072         bool operator!=(const Size &other) const {return width != other.width || height != other.height;}
00073 
00074         int width; 
00075         int height; 
00076     };
00077     
00079     struct Rect {
00081         Rect() : x(0), y(0), width(0), height(0) {}
00082 
00085         Rect(int x_, int y_, int w_, int h_) : x(x_), y(y_), width(w_), height(h_) {}
00086 
00088         bool operator==(const Rect &other) const {
00089             return (width == other.width &&
00090                     height == other.height &&
00091                     x == other.x &&
00092                     y == other.y);
00093         }
00094 
00096         bool operator!=(const Rect &other) const {
00097             return (width != other.width ||
00098                     height != other.height ||
00099                     x != other.x ||
00100                     y != other.y);
00101         }
00102         
00103         int x;      
00104         int y;      
00105         int width;  
00106         int height; 
00107     };
00108 
00109 }
00110 
00111 
00112 #endif

Generated on Thu Jul 15 2010 17:51:28 for FCam by  doxygen 1.7.1