#ifndef IMAGE_AF9FV02C #define IMAGE_AF9FV02C #include #include namespace haader { class LdrHistogram { public: std::vector m_bins; unsigned int m_max_freq; }; // A low dynamic range image/photograph with an associated exposure time. class Image { friend class HdrImageStack; friend class HdrImage; public: Image(); void to_string(std::string &s) const; bool read_from_file(const char *file_path); bool save_as_ppm_file(const char *file_path, bool ascii=false) const; LdrHistogram histogram() const; unsigned int get_width() const; unsigned int get_height() const; unsigned int get_components() const; bool has_equal_dimensions(const Image &other) const; double get_exposure_time() const; const unsigned char* get_const_image_data() const; unsigned char* get_image_data(); private: std::vector m_image_data; unsigned int m_width; unsigned int m_height; // Number of channels (usually 3 for RGB images) unsigned int m_components; // Exposure time in seconds double m_exposure_time; }; } #endif // IMAGE_AF9FV02C