00001 #ifndef __PHOTOGRAPHIC_H__
00002 #define __PHOTOGRAPHIC_H__
00003
00004 #include <stdint.h>
00005 #include "processor.h"
00006
00007 namespace photoreceptor {
00008
00010 class Photoreceptor : public spectral::Processor
00011 {
00012 public:
00013 Photoreceptor();
00014 virtual ~Photoreceptor();
00015
00016 protected:
00017
00018
00019
00020 virtual uint32_t GetInterface(
00021 std::list<std::pair<uint32_t, uint32_t> > &mandatory,
00022 std::list<std::pair<uint32_t, uint32_t> > &optional) const;
00023
00024
00025 virtual bool SetImage(uint32_t type, const spectral::Image *img);
00026
00027
00028 virtual void SetParameters(const spectral::Parameters *);
00029
00030
00031 virtual spectral::Image *Process(void);
00032
00033
00034 virtual void ClearImage(uint32_t type);
00035
00036 protected:
00037
00038
00039 virtual void GetParameters(spectral::Parameters *) const;
00040
00041 private:
00042 void GetAdaptation(spectral::Image *, uint32_t, float &, float &, float &, float &);
00043 void GetAverageRGB(spectral::Image *, uint32_t, float *, float *);
00044
00045
00046 const spectral::Image *m_picture;
00047
00048 int32_t m_samples;
00049 float m_contrast;
00050 float m_saturation;
00051 float m_adaptation;
00052 float m_intensity;
00053 };
00054
00055 }
00056
00057 #endif