Backed out changeset bce43bcbc451 (dark frame subtraction)

This commit is contained in:
Wyatt Olson
2010-08-18 21:07:17 -06:00
parent dea0a8f981
commit b08ef3956e
40 changed files with 765 additions and 2015 deletions

View File

@@ -36,49 +36,32 @@
#define CMAXVAL 65535
#include <time.h>
#include <glibmm.h>
namespace rtengine {
struct badPix
{
int x;
int y;
badPix( int xc, int yc ):x(xc),y(yc){}
};
struct RawImage {
Glib::ustring fname; // complete filename
int width; // with of the image as reported by dcraw
int height; // height of the image as reported by dcraw
int width;
int height;
unsigned filters; // sequence of Bayer filter colors: 2bit for each of 2x8 pixels grid indicate 0=Red,1=Green1,2=Blue,(3=green2)
int colors; // Number of colors of bayer filter (3 or 4)
unsigned filters;
int black_point; // Black offset taken from dslr info by dcraw
int cblack[4]; // Black for each color.
unsigned short white[8][8]; // square of white registered by camera
float cam_mul[4]; // Camera color multiplier taken from exif by dcraw
float pre_mul[4];
int maximum; // White (maximum) point taken from dslr info
int rotate_deg; // 0,90,180,270 degree of rotation: info taken by dcraw from exif
double red_multiplier;
double green_multiplier;
double blue_multiplier;
double camwb_red;
double camwb_green;
double camwb_blue;
int blackpoint;
int rgb_max;
int rotate_deg;
int fuji_width;
double defgain;
double iso_speed;
double shutter;
double aperture;
double focal_len;
time_t timestamp;
char *make, *model;
int exifbase, prefilters, ciff_base, ciff_len;
int thumbLength;
int thumbOffset;
int thumbType;
int thumbWidth;
int thumbHeight;
unsigned short* allocation;
unsigned short** data; // holds pixel values, data[i][j] corresponds to the ith row and jth column
@@ -87,43 +70,7 @@ struct RawImage {
float icoeff[3][3];
int profile_len;
char* profile_data; // Embedded ICC color profile
RawImage( const Glib::ustring name):allocation(NULL),data(NULL),profile_data(NULL),fname(name)
{
}
~RawImage()
{
if(allocation){ delete [] allocation; allocation=NULL;}
if(data){ delete [] data; data=NULL;}
if(profile_data){ delete [] profile_data; profile_data=NULL;}
}
int loadRaw (bool loadData=true);
void allocData()
{
if (filters) {
if (!allocation) {
allocation = new unsigned short[height * width];
data = new unsigned short*[height];
for (int i = 0; i < height; i++)
data[i] = allocation + i * width;
}
}else{
if (!allocation) {
allocation = new unsigned short[3 * height * width];
data = new unsigned short*[height];
for (int i = 0; i < height; i++)
data[i] = allocation + 3 * i * width;
}
}
if(profile_len)
profile_data = new char[profile_len];
}
char* profile_data;
};
}
#endif