You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB
C

3 years ago
#pragma once
#include <string>
#include <vector>
#include <utility> // std::pair
3 years ago
#include <memory> // std::shared_ptr
3 years ago
#include <opencv2/opencv.hpp> // all opencv header
#include <libraw/libraw.h>
3 years ago
namespace hdrplus
{
3 years ago
6 months ago
class MemFile
{
public:
std::vector<uint8_t> content;
const std::vector<uint8_t> GetConstData() const
{
return content;
}
std::vector<uint8_t> GetData()
{
return content;
}
};
3 years ago
class bayer_image
{
public:
explicit bayer_image( const std::string& bayer_image_path );
6 months ago
explicit bayer_image( const std::vector<uint8_t>& bayer_image_content );
explicit bayer_image( std::shared_ptr<MemFile> bayer_image_file );
3 years ago
~bayer_image() = default;
std::pair<double, double> get_noise_params() const;
3 years ago
std::shared_ptr<LibRaw> libraw_processor;
3 years ago
cv::Mat raw_image;
cv::Mat grayscale_image;
3 years ago
int width;
int height;
int white_level;
std::vector<int> black_level_per_channel;
float iso;
private:
float baseline_lambda_shot = 3.24 * pow( 10, -4 );
float baseline_lambda_read = 4.3 * pow( 10, -6 );
3 years ago
};
3 years ago
} // namespace hdrplus