18 #ifndef PIC_UTIL_CONVERT_RAW_TO_IMAGES_HPP 19 #define PIC_UTIL_CONVERT_RAW_TO_IMAGES_HPP 21 #include "../base.hpp" 22 #include "../util/raw.hpp" 23 #include "../util/string.hpp" 24 #include "../image.hpp" 36 int width,
int height)
39 FileLister::List(nameDirectory,
"raw", &vec);
43 for(
unsigned int i = 0; i < vec.size(); i++) {
44 img.ReadRAW(vec[i],
"NULL",
RAW_U16_RGGB, width, height);
49 printf(
"%s\n", out.c_str());
66 (nameDirectory,
"raw", width, height);
69 FileLister::List(nameDirectory,
"raw", &vec);
74 for(
unsigned int i = 0; i < vec.size(); i++) {
75 tmp.
Read(vec[i], width * height);
77 for(
int j = 0; j < tmp.
nData; j++) {
78 int diff = (tmp.
data[j] - imgMean->
data[j]);
79 diff = diff > 0 ? diff : -diff;
88 tmp.
Write(
"tmpRAW.raw");
89 img.ReadRAW(
"tmpRAW.raw",
"NULL",
RAW_U16_RGGB, width, height);
91 std::string out = vec[i];
94 printf(
"%s\n", out.c_str());
std::vector< std::string > StringVec
StringVec is an std::vector of std::string.
Definition: string.hpp:49
PIC_INLINE void ConvertDetect(std::string nameDirectory, std::string format, int width, int height)
ConvertDetect.
Definition: convert_raw_to_images.hpp:61
PIC_INLINE void ConvertRAWtoImages(std::string nameDirectory, std::string format, int width, int height)
ConvertRAWtoImages converts .RAW into format.
Definition: convert_raw_to_images.hpp:35
#define PIC_INLINE
Definition: base.hpp:33
bool Read(std::string nameFile, int nData)
Read.
Definition: raw.hpp:84
The Image class stores an image as buffer of float.
Definition: image.hpp:60
Definition: bilateral_separation.hpp:25
std::string removeExtension(std::string name)
RemoveExtension removes the extension of a string.
Definition: string.hpp:132
T * data
Definition: saturation.hpp:37
bool Write(std::string nameFile, LDR_type typeWrite, int writerCounter)
Write saves an Image into a file on the disk.
bool Write(std::string nameFile)
Write.
Definition: raw.hpp:116
int nData
Definition: saturation.hpp:38