refinery
RAW file processor
|
Holds static data about an actual camera model. More...
#include <refinery/camera.h>
Classes | |
struct | ColorConversionData |
These values are used in mapping from sensors to RGB, CMYK and XYZ. More... | |
Public Member Functions | |
virtual const char * | make () const =0 |
The make of the camera, for example "NIKON". | |
virtual const char * | model () const =0 |
The model of the camera, for example "D5000". | |
virtual const char * | name () const =0 |
The make + model of the camera, for example "NIKON D5000". | |
virtual unsigned int | colors () const =0 |
The number of sensor colors, typically 3 or 4. | |
virtual unsigned int | rawWidth (const ExifData &exifData) const =0 |
The width of the raw image, in pixels. | |
virtual unsigned int | rawHeight (const ExifData &exifData) const =0 |
The height of the raw image, in pixels. | |
virtual ColorConversionData | colorConversionData () const =0 |
Some multipliers for changing color spaces. | |
virtual unsigned int | orientation (const ExifData &exifData) const =0 |
The Exif "Orientation", from 1 to 8, saying how one image is flipped. | |
virtual unsigned int | filters (const ExifData &exifData) const =0 |
Returns a bitmask representing the camera sensor array. | |
virtual bool | canHandle (const ExifData &exifData) const =0 |
Returns true if this is the right Camera for exifData. |
Holds static data about an actual camera model.
Each camera model behaves slightly differently: different compression, for instance, or different color profiles. That's what Camera represents. Most of the time users really want CameraData, which uses a Camera to make sense of Exif data.
Some Camera methods accept an ExifData& as a parameter. That's because different cameras treat the same Exif tags differently.
virtual bool refinery::Camera::canHandle | ( | const ExifData & | exifData | ) | const [pure virtual] |
virtual ColorConversionData refinery::Camera::colorConversionData | ( | ) | const [pure virtual] |
Some multipliers for changing color spaces.
virtual unsigned int refinery::Camera::colors | ( | ) | const [pure virtual] |
The number of sensor colors, typically 3 or 4.
virtual unsigned int refinery::Camera::filters | ( | const ExifData & | exifData | ) | const [pure virtual] |
Returns a bitmask representing the camera sensor array.
Here are some possible return values and what they represent:
PowerShot 600 PowerShot A50 PowerShot Pro70 Pro90 & G1 0xe1e4e1e4: 0x1b4e4b1e: 0x1e4b4e1b: 0xb4b4b4b4:
0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 G M G M G M 0 C Y C Y C Y 0 Y C Y C Y C 0 G M G M G M 1 C Y C Y C Y 1 M G M G M G 1 M G M G M G 1 Y C Y C Y C 2 M G M G M G 2 Y C Y C Y C 2 C Y C Y C Y 3 C Y C Y C Y 3 G M G M G M 3 G M G M G M 4 C Y C Y C Y 4 Y C Y C Y C PowerShot A5 5 G M G M G M 5 G M G M G M 0x1e4e1e4e: 6 Y C Y C Y C 6 C Y C Y C Y 7 M G M G M G 7 M G M G M G 0 1 2 3 4 5 0 C Y C Y C Y 1 G M G M G M 2 C Y C Y C Y 3 M G M G M G
All RGB cameras use one of these Bayer grids:
0x16161616: 0x61616161: 0x49494949: 0x94949494:
0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 B G B G B G 0 G R G R G R 0 G B G B G B 0 R G R G R G 1 G R G R G R 1 B G B G B G 1 R G R G R G 1 G B G B G B 2 B G B G B G 2 G R G R G R 2 G B G B G B 2 R G R G R G 3 G R G R G R 3 B G B G B G 3 R G R G R G 3 G B G B G B
[in] | exifData | the Exif data. |
virtual const char* refinery::Camera::make | ( | ) | const [pure virtual] |
The make of the camera, for example "NIKON".
virtual const char* refinery::Camera::model | ( | ) | const [pure virtual] |
The model of the camera, for example "D5000".
virtual const char* refinery::Camera::name | ( | ) | const [pure virtual] |
The make + model of the camera, for example "NIKON D5000".
virtual unsigned int refinery::Camera::orientation | ( | const ExifData & | exifData | ) | const [pure virtual] |
The Exif "Orientation", from 1 to 8, saying how one image is flipped.
[in] | exifData | the Exif data. |
virtual unsigned int refinery::Camera::rawHeight | ( | const ExifData & | exifData | ) | const [pure virtual] |
The height of the raw image, in pixels.
This is different from height(), which is the height of the output image. Some cameras capture margin pixels which have no value at all, and this height includes those.
[in] | exifData | the Exif data. |
virtual unsigned int refinery::Camera::rawWidth | ( | const ExifData & | exifData | ) | const [pure virtual] |
The width of the raw image, in pixels.
This is different from width(), which is the width of the output image. Some cameras capture margin pixels which have no value at all, and this width includes those.
[in] | exifData | the Exif data. |