#pragma once #include "../color/ColorGradingParams.h" #include #include #include #include namespace photoconv { /** * @brief Film type classification for processing decisions. */ enum class FilmType { Unknown, ColorNegative, // C-41 process BWNegative, // B&W negative ColorPositive, // Slide / E-6 BWPositive, // B&W positive }; /** * @brief RAW metadata extracted from the image file. * * Populated by the Loader stage and carried through the pipeline * for use by downstream stages (e.g., color correction using WB data). */ struct RawMetadata { std::string camera_make; // e.g. "Sony", "Canon", "Nikon" std::string camera_model; // e.g. "ILCE-7M3" float iso_speed{0.0f}; float shutter_speed{0.0f}; // seconds float aperture{0.0f}; // f-number float focal_length{0.0f}; // mm float wb_red{1.0f}; // White balance multipliers float wb_green{1.0f}; float wb_blue{1.0f}; int raw_width{0}; int raw_height{0}; int raw_bit_depth{0}; // Bits per channel in source std::string timestamp; // ISO 8601 }; /** * @brief Core data structure flowing through the entire pipeline. * * Every pipeline stage receives an ImageData, transforms it, and * returns a new ImageData (or Error) via std::expected. * * Invariants: * - rgb is always CV_16UC3 (16-bit, 3-channel BGR) * - metadata is populated after the Loader stage * - film_type is set after the Detect stage */ struct ImageData { cv::Mat rgb; // 16-bit BGR (CV_16UC3) std::string source_path; // Original file path RawMetadata metadata; // Camera/RAW metadata FilmType film_type{FilmType::Unknown}; // Detected after Detect stage std::optional crop_region; // Set by Crop stage ColorGradingParams color_params{}; // User-defined color grading overrides }; } // namespace photoconv