A tool to construct HDR-images from a series of exposures.

123456789101112131415161718192021222324252627282930313233343536
  1. #include <stdint.h>
  2. #include <iostream>
  3. // unsigned rational number: p/q
  4. struct urational_t {
  5. urational_t();
  6. urational_t(uint32_t p, uint32_t q);
  7. uint32_t p; // numerator
  8. uint32_t q; // denominator
  9. };
  10. // signed rational number: p/q
  11. struct srational_t {
  12. srational_t();
  13. srational_t(int32_t p, int32_t q);
  14. int32_t p; // numerator
  15. int32_t q; // denominator
  16. };
  17. struct ExifTags {
  18. ExifTags();
  19. static bool read_from_jpeg(std::istream &stream, ExifTags &output);
  20. // Returns true => output reference is set to exposure time or shutter speed in seconds.
  21. // Returns false => do not set output because there is no valid value.
  22. bool get_exposure_time(double &output);
  23. bool ifd0_parsed_ok;
  24. bool exififd_parsed_ok;
  25. uint16_t exififd_offset;
  26. urational_t exposure_time;
  27. srational_t shutter_speed_value;
  28. };