initial commit

This commit is contained in:
Mauro Torrez
2022-07-30 14:46:04 -03:00
commit 47650131de
312 changed files with 212465 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
// Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
// <dhilvert@ugcs.caltech.edu>
/* This file is part of the Anti-Lamenessing Engine.
The Anti-Lamenessing Engine is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
The Anti-Lamenessing Engine is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with the Anti-Lamenessing Engine; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __canon_300d_raw_linear_h__
#define __canon_300d_raw_linear_h__
#include "../d2.h"
/*
* Device module for the Canon 300D (Digital Rebel).
*
* CRW files are not directly supported; use Dave Coffin's dcraw program
* with arguments -d -4 to produce a raw linear PPM file.
*
* http://www.cybercom.net/~dcoffin/dcraw/
*/
class canon_300d_raw_linear {
public:
/*
* Linear colorspace PSF
*/
class lpsf : public d2::box {
public:
/*
* A box filter of diameter 1 results in an optical fill factor
* of 100%. This probably isn't exactly right; there is lots
* of room for experimentation.
*/
lpsf() : d2::box (0.5) {
}
};
/*
* Exposure
*/
class exposure : public d2::exposure_default {
d2::pixel linearize(d2::pixel input) const {
return input * get_multiplier();
}
d2::pixel unlinearize(d2::pixel input) const {
return input / get_multiplier();
}
};
/*
* View Angle
*/
static ale_pos view_angle() {
fprintf(stderr, "\n\n*** Error: tried to obtain view angle for a sensor device. ***\n\n");
exit(1);
// return 30;
}
};
#undef LPSF_ROWS
#undef LPSF_COLS
#undef NLPSF_ROWS
#undef NLPSF_COLS
#endif

View File

@@ -0,0 +1,45 @@
// Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
// <dhilvert@ugcs.caltech.edu>
/* This file is part of the Anti-Lamenessing Engine.
The Anti-Lamenessing Engine is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
The Anti-Lamenessing Engine is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with the Anti-Lamenessing Engine; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __canon_300d_raw_linear_50mm_1_4_h__
#define __canon_300d_raw_linear_50mm_1_4_h__
#include "../d2.h"
/*
* Extend the Canon 300D (Digital Rebel) device with an EF 50mm f/1.4 lens.
*/
class canon_300d_raw_linear_50mm_1_4 : public canon_300d_raw_linear {
public:
/*
* View Angle
*
* According to:
*
* http://www.acapixus.dk/photography/angle_of_view.htm
*/
static ale_pos view_angle() {
return 31 * M_PI / 180;
}
};
#endif

View File

@@ -0,0 +1,178 @@
// Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
// <dhilvert@ugcs.caltech.edu>
/* This file is part of the Anti-Lamenessing Engine.
The Anti-Lamenessing Engine is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
The Anti-Lamenessing Engine is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with the Anti-Lamenessing Engine; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __canon_300d_raw_linear_50mm_1_4_1_4_h__
#define __canon_300d_raw_linear_50mm_1_4_1_4_h__
#include "../d2.h"
/*
* Extend the Canon 300D (Digital Rebel) device with an EF 50mm f/1.4 lens at 1.4.
*/
#define LPSF_ROWS 9
#define LPSF_COLS 9
/*
* This filter (50-1.4-1.4-1) can produce haloing.
*/
static const double canon_300d_raw_linear_50mm_1_4_1_4_lpsf_calibrated_response[LPSF_ROWS][LPSF_COLS][3] = {
{
{ 41.6, 32, 118.4, },
{ 6.4, -3.2, 32, },
{ -9.6, 35.2, 9.6, },
{ 12.8, -25.6, 9.6, },
{ -16, -3.2, 6.4, },
{ 9.6, 3.2, 35.2, },
{ 6.4, 8.88178419700125e-16, 25.6, },
{ -3.2, -6.4, 16, },
{ -3.2, 8.88178419700125e-16, 92.8000000000001, },
}, {
{ 22.4, 16, 32, },
{ -41.6, -35.2, -35.2, },
{ 12.8, -9.6, -19.2, },
{ -38.4, 3.2, 35.2, },
{ 25.6, -12.8, -48, },
{ 19.2, 16, 35.2, },
{ -38.4, 3.2, -35.2, },
{ -6.4, 8.88178419700125e-16, -35.2, },
{ 19.2, 9.6, 28.8, },
}, {
{ 16, 9.6, 25.6, },
{ 8.88178419700125e-16, -3.2, -9.6, },
{ 19.2, 25.6, 64, },
{ 44.8, 73.6, 67.2, },
{ 67.2, 38.4, 118.4, },
{ 57.6, 44.8, 105.6, },
{ 12.8, -22.4, 48, },
{ -9.6, -9.6, -16, },
{ -9.6, -16, -2.66453525910038e-15, },
}, {
{ 6.4, -12.8, 25.6, },
{ 6.4, 28.8, -44.8, },
{ 57.6, 54.4, 102.4, },
{ 38.4, 44.8, 64, },
{ 115.2, 92.8000000000001, 44.8, },
{ 115.2, 108.8, 115.2, },
{ 28.8, 44.8, 108.8, },
{ 12.8, 12.8, 48, },
{ -12.8, -16, 12.8, },
}, {
{ 9.6, -6.4, 41.6, },
{ -3.2, 22.4, 6.4, },
{ 76.8, 115.2, 115.2, },
{ 9.59999999999999, -28.8, -48, },
{ 884.799999999998, 948.799999999999, 884.799999999998, },
{ 115.2, 115.2, 115.2, },
{ 76.8, 83.2, 115.2, },
{ 25.6, 25.6, 51.2, },
{ -25.6, 3.2, 9.6, },
}, {
{ 3.2, 9.6, 60.8, },
{ 9.6, 19.2, -48, },
{ 32, 73.6, 115.2, },
{ 19.2, 3.2, 9.6, },
{ 64, 73.6, 25.6, },
{ 112, 96, 115.2, },
{ 57.6, 64, 92.8, },
{ -2.66453525910038e-15, -35.2, -22.4, },
{ 6.4, -25.6, 12.8, },
}, {
{ 22.4, 0, 54.4, },
{ 9.6, -3.2, -19.2, },
{ 28.8, 51.2, 76.8, },
{ 38.4, 32, 67.2, },
{ 73.6, 41.6, 112, },
{ 48, 60.8, 80, },
{ -9.6, -12.8, 60.8, },
{ -16, -32, -28.8, },
{ -6.4, 19.2, -2.66453525910038e-15, },
}, {
{ 6.4, 3.2, 22.4, },
{ -28.8, -22.4, -41.6, },
{ -12.8, 3.2, -16, },
{ 12.8, -9.6, 3.2, },
{ -22.4, 16, -41.6, },
{ 9.6, -22.4, 6.4, },
{ -12.8, -12.8, -22.4, },
{ 12.8, 6.4, -44.8, },
{ 6.4, 19.2, 60.8, },
}, {
{ 35.2, 28.8, 108.8, },
{ 3.2, 8.88178419700125e-16, 28.8, },
{ -9.6, -6.4, 22.4, },
{ -9.6, -16, 9.6, },
{ -12.8, -3.2, 16, },
{ 12.8, 9.6, 32, },
{ 9.6, 12.8, 28.8, },
{ -3.2, -3.2, 19.2, },
{ -9.6, -16, 76.8 }
}
};
class canon_300d_raw_linear_50mm_1_4_1_4 : public canon_300d_raw_linear_50mm_1_4 {
/*
* Calculate lpsf array values for ale_real types not able
* to store the entire double range.
*/
class lpsf_calculator {
protected:
ale_real lpsf_array[LPSF_ROWS][LPSF_COLS][3];
lpsf_calculator() {
const double *origin = (const double *)
canon_300d_raw_linear_50mm_1_4_1_4_lpsf_calibrated_response;
double maxval = 255;
double array_maxval = origin[0];
for (int i = 0; i < LPSF_ROWS * LPSF_COLS * 3; i++) {
if (origin[i] > array_maxval)
array_maxval = origin[i];
}
for (int i = 0; i < LPSF_ROWS; i++)
for (int j = 0; j < LPSF_COLS; j++)
for (int k = 0; k < 3; k++)
lpsf_array[i][j][k] =
origin[i * LPSF_COLS * 3 + j * 3 + k]
* (maxval / array_maxval);
}
};
public:
/*
* Linear colorspace PSF
*/
class lpsf : lpsf_calculator, public d2::psf_template<LPSF_ROWS, LPSF_COLS> {
public:
lpsf() : lpsf_calculator(),
d2::psf_template<LPSF_ROWS, LPSF_COLS> (3, 3, lpsf_array) {
}
};
};
#undef LPSF_ROWS
#undef LPSF_COLS
#undef NLPSF_ROWS
#undef NLPSF_COLS
#endif

View File

@@ -0,0 +1,45 @@
// Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
// <dhilvert@ugcs.caltech.edu>
/* This file is part of the Anti-Lamenessing Engine.
The Anti-Lamenessing Engine is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
The Anti-Lamenessing Engine is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with the Anti-Lamenessing Engine; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __canon_300d_raw_linear_50mm_1_8_h__
#define __canon_300d_raw_linear_50mm_1_8_h__
#include "../d2.h"
/*
* Extend the Canon 300D (Digital Rebel) device with an EF 50mm f/1.8 lens.
*/
class canon_300d_raw_linear_50mm_1_8 : public canon_300d_raw_linear {
public:
/*
* View Angle
*
* According to:
*
* http://www.acapixus.dk/photography/angle_of_view.htm
*/
static ale_pos view_angle() {
return 31 * M_PI / 180;
}
};
#endif

View File

@@ -0,0 +1,45 @@
// Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
// <dhilvert@ugcs.caltech.edu>
/* This file is part of the Anti-Lamenessing Engine.
The Anti-Lamenessing Engine is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
The Anti-Lamenessing Engine is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with the Anti-Lamenessing Engine; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __canon_300d_raw_linear_85mm_1_8_h__
#define __canon_300d_raw_linear_85mm_1_8_h__
#include "../d2.h"
/*
* Extend the Canon 300D (Digital Rebel) device with an EF 85mm f/1.8 lens.
*/
class canon_300d_raw_linear_85mm_1_8 : public canon_300d_raw_linear {
public:
/*
* View Angle
*
* According to:
*
* http://www.acapixus.dk/photography/angle_of_view.htm
*/
static ale_pos view_angle() {
return 18 * M_PI / 180;
}
};
#endif

115
device/nikon_d50.h Normal file
View File

@@ -0,0 +1,115 @@
// code by HJ Hornbeck, based on code copyright David Hilvert
/* This file is part of the Anti-Lamenessing Engine.
The Anti-Lamenessing Engine is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
The Anti-Lamenessing Engine is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with the Anti-Lamenessing Engine; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __nikon_d50_h__
#define __nikon_d50_h__
#include "../d2.h"
#include "../d2/render/psf/psf.h"
/*
* Device module for the Nikon D50.
*
* Much like the Canon, alignment works best with RAW input created by
* dcraw, with the -D/-d and -4 flags enabled. If you get bayer patterns
* in the output image, and have Irani-Peleg iteration on, try swapping
* the inputs from RAW to processed (but lossless) and ditch the device
* setting.
*
*/
class nikon_d50 {
public:
/*
* Linear colorspace PSF
*
* This PSF isn't an exact match, instead balancing quality, speed, and
* robustness. While some blur will probably remain, at scale factors
* less than 3 it's easily corrected for in the GIMP (or similar).
* Larger diameters perform more sharpening, but run time increases
* by the square of the diameter. Finally, the PSF should vary by
* lens and focal length, but this mild one works relatively well
* across a wide range of lenses.
*/
static d2::psf *lpsf() {
return d2::psf_parse::get( 1, "circle=1.3^circle=1.3" );
}
/*
* Non-linear colorspace PSF
*
* The linear PSF works perfectly with RAW input, and even performs
* well if I substitute images with non-linear colourspace. I
* haven't found a need for this, yet.
*/
static d2::psf *nlpsf() {
return NULL;
}
/*
* Exposure
*
* The defaults for the Canon work well enough.
*/
class exposure : public d2::exposure_default {
d2::pixel linearize(d2::pixel input) const {
return input * get_multiplier();
}
d2::pixel unlinearize(d2::pixel input) const {
return input / get_multiplier();
}
};
/*
* View Angle
*
* Copy/Paste from the Canon again.
*/
static ale_pos view_angle() {
fprintf(stderr, "\n\n*** Error: tried to obtain view angle for a sensor device. ***\n\n");
exit(1);
// return 30;
}
/*
* Bayer pattern
*
* Adding this function because this info should be here, instead
* of hard-wired into the argument parsing code.
*/
static unsigned int bayer() {
return IMAGE_BAYER_BGRG;
}
};
#undef LPSF_ROWS
#undef LPSF_COLS
#undef NLPSF_ROWS
#undef NLPSF_COLS
#endif

View File

@@ -0,0 +1,91 @@
// Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
// <dhilvert@ugcs.caltech.edu>
/* This file is part of the Anti-Lamenessing Engine.
The Anti-Lamenessing Engine is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
The Anti-Lamenessing Engine is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with the Anti-Lamenessing Engine; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __ov7620_raw_linear_h__
#define __ov7620_raw_linear_h__
#include "../d2.h"
/*
* Device module for the OmniView OV7620 chip.
*
* This module is designed for use with the Linux 2.6.x driver patched with
* code available at:
*
* http://auricle.dyndns.org/ov7620/
*
*/
class ov7620_raw_linear {
public:
/*
* Linear colorspace PSF
*/
class lpsf : public d2::box {
public:
/*
* A box filter of diameter ~0.6325 results in an optical fill
* factor of 40%. Experimentation shows that filters of about
* this size perform well with this sensor, and the fill factor
* value matches data available on the web about this sensor:
*
* http://www.stanford.edu/class/ee109/reference/camera/DS-OV7620-1.3.pdf
*/
lpsf() : d2::box (0.3162) {
}
};
/*
* Exposure
*/
class exposure : public d2::exposure_default {
d2::pixel linearize(d2::pixel input) const {
ale_real lo = 16 / (ale_real) 255;
ale_real scale = 255 / (ale_real) 224;
return (input - d2::pixel(lo, lo, lo)) * scale * get_multiplier();
}
d2::pixel unlinearize(d2::pixel input) const {
ale_real lo = 16 / (ale_real) 255;
ale_real scale = 224 / (ale_real) 255;
return (input / get_multiplier()) * scale + d2::pixel(lo, lo, lo);
}
};
/*
* View Angle
*/
static ale_pos view_angle() {
fprintf(stderr, "\n\n*** Error: tried to obtain view angle for a sensor device. ***\n\n");
exit(1);
// return 30;
}
};
#undef LPSF_ROWS
#undef LPSF_COLS
#undef NLPSF_ROWS
#undef NLPSF_COLS
#endif

143
device/xvp610_320x240.h Normal file
View File

@@ -0,0 +1,143 @@
// Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
// <dhilvert@ugcs.caltech.edu>
/* This file is part of the Anti-Lamenessing Engine.
The Anti-Lamenessing Engine is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
The Anti-Lamenessing Engine is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with the Anti-Lamenessing Engine; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __xvp610_320x240_h__
#define __xvp610_320x240_h__
#include "../d2.h"
/*
* Device module for the IBM PC Camera Pro (IBM VGA Camera Model XVP610; FCC ID
* KSX-X9902).
*
* This module is designed for use with the Linux 2.6.x driver patched with
* code available at:
*
* http://auricle.dyndns.org/xvp610/
*
*/
/*
* PSF Data
*/
#define LPSF_ROWS 3
#define LPSF_COLS 3
static const ale_real lpsf_calibrated_response[LPSF_ROWS][LPSF_COLS][3] = {
{
{ 1.6, 4.8, 3.2 },
{ 6.4, 6.4, 8 },
{ 0, 0, 0 }
}, {
{ 1.6, -6.4, -1.6 },
{ 58.4, 61.6, 80.8 },
{ 0, 0, 0 }
}, {
{ -1.6, -1.6, -1.6 },
{ 0, 0, 0 },
{ 0, 0, 0 }
}
};
#define NLPSF_ROWS 1
#define NLPSF_COLS 5
static const ale_real nlpsf_calibrated_response[NLPSF_ROWS][NLPSF_COLS][3] = {
{
#if 0
/* Filter 12 */
{ -2.9, -4.9, -2.7 },
{ -11.4, -5.4, -9.1 },
{ 40.9, 39.4, 34.2 },
{ -3.8, -3, -3.6 },
{ -4.1, -4.5, -3.2 }
#endif
/* Filter 11 */
{ -6.1, -4.9, -5.9 },
{ -8.2, -5.4, -5.9 },
{ 36.1, 34.6, 31 },
{ -3.8, -3, -3.6 },
{ -4.1, -4.5, -3.2 }
}
};
class xvp610_320x240 {
public:
/*
* Linear colorspace PSF
*/
#if 0
class lpsf : public d2::psf_template<LPSF_ROWS, LPSF_COLS> {
public:
lpsf() : d2::psf_template<LPSF_ROWS, LPSF_COLS> (3, 3, lpsf_calibrated_response) {
}
};
#else
/*
* This filter seems to produce nicer results.
*/
class lpsf : public d2::box {
public:
lpsf() : d2::box (0.5) {
}
};
#endif
/*
* Non-linear colorspace PSF
*/
class nlpsf : public d2::psf_template<NLPSF_ROWS, NLPSF_COLS> {
public:
nlpsf() : d2::psf_template<NLPSF_ROWS, NLPSF_COLS> (1, 5, nlpsf_calibrated_response) {
}
};
/*
* Exposure
*/
class exposure : public d2::exposure_default {
/*
* Uses defaults for now. (If this is changed, then update
* the usage message for --device accordingly.)
*/
};
/*
* View Angle
*/
static ale_pos view_angle() {
return 30;
}
};
#undef LPSF_ROWS
#undef LPSF_COLS
#undef NLPSF_ROWS
#undef NLPSF_COLS
#endif

149
device/xvp610_640x480.h Normal file
View File

@@ -0,0 +1,149 @@
// Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
// <dhilvert@ugcs.caltech.edu>
/* This file is part of the Anti-Lamenessing Engine.
The Anti-Lamenessing Engine is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
The Anti-Lamenessing Engine is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with the Anti-Lamenessing Engine; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// In some circumstances, a better filter might be this one, used with stdin_vg:
//
// 0.16 3 3 3 3 3.2 3.2 4.8 0 3.2 0 3.2 3.2 4.8 1.6 -3.2 1.6 28.8 40 36.8 9.6 16 12.8 3.2 4.44089209850063e-16 1.6 1.6 6.4 1.6 3.2 3.2 3.2 0.8 1 11 1 11 0 -1.6 -1.6 -3.2 -3.2 -3.2 -8 -8 -6.4 1.6 4.8 1.6 12.8 17.6 11.2 28.8 33.6 28.8 3.2 3.2 3.2 -3.2 -3.2 -3.2 -4.8 -6.4 -4.8 0 0 0 0 0 0
//
// (atp-16)
#ifndef __xvp610_640x480_h__
#define __xvp610_640x480_h__
#include "../d2.h"
/*
* Device module for the IBM PC Camera Pro (IBM VGA Camera Model XVP610; FCC ID
* KSX-X9902).
*
* This module is designed for use with the Linux 2.6.x driver patched with
* code available at:
*
* http://auricle.dyndns.org/xvp610/
*
*/
/*
* PSF Data
*/
#define LPSF_ROWS 3
#define LPSF_COLS 3
static const ale_real xvp610_640x480_lpsf_calibrated_response[LPSF_ROWS][LPSF_COLS][3] = {
{
{ 1.6, 4.8, 3.2 },
{ 6.4, 6.4, 8 },
{ 0, 0, 0 }
}, {
{ 1.6, -6.4, -1.6 },
{ 58.4, 61.6, 80.8 },
{ 0, 0, 0 }
}, {
{ -1.6, -1.6, -1.6 },
{ 0, 0, 0 },
{ 0, 0, 0 }
}
};
#define NLPSF_ROWS 1
#define NLPSF_COLS 5
static const ale_real xvp610_640x480_nlpsf_calibrated_response[NLPSF_ROWS][NLPSF_COLS][3] = {
{
#if 0
/* Filter 12 */
{ -2.9, -4.9, -2.7 },
{ -11.4, -5.4, -9.1 },
{ 40.9, 39.4, 34.2 },
{ -3.8, -3, -3.6 },
{ -4.1, -4.5, -3.2 }
#endif
/* Filter 11 */
{ -6.1, -4.9, -5.9 },
{ -8.2, -5.4, -5.9 },
{ 36.1, 34.6, 31 },
{ -3.8, -3, -3.6 },
{ -4.1, -4.5, -3.2 }
}
};
class xvp610_640x480 {
public:
/*
* Linear colorspace PSF
*/
#if 0
class lpsf : public d2::psf_template<LPSF_ROWS, LPSF_COLS> {
public:
lpsf() : d2::psf_template<LPSF_ROWS, LPSF_COLS> (3, 3, xvp610_640x480_lpsf_calibrated_response) {
}
};
#else
/*
* This filter seems to produce nicer results.
*/
class lpsf : public d2::box {
public:
lpsf() : d2::box (0.5) {
}
};
#endif
/*
* Non-linear colorspace PSF
*/
class nlpsf : public d2::psf_template<NLPSF_ROWS, NLPSF_COLS> {
public:
nlpsf() : d2::psf_template<NLPSF_ROWS, NLPSF_COLS> (1, 10, xvp610_640x480_nlpsf_calibrated_response) {
}
};
/*
* Exposure
*/
class exposure : public d2::exposure_default {
/*
* Uses defaults for now. (If this is changed, then update
* the usage message for --device accordingly.)
*/
};
/*
* View Angle
*/
static ale_pos view_angle() {
return 30;
}
};
#undef LPSF_ROWS
#undef LPSF_COLS
#undef NLPSF_ROWS
#undef NLPSF_COLS
#endif