d2/align: Remove obsolete set_input_frame call.
[Ale.git] / device / canon_300d_raw_linear.h
blob15f3f31b9a98d73f1ef4a0170664bc841110c7e2
1 // Copyright 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
2 // <dhilvert@ugcs.caltech.edu>
4 /* This file is part of the Anti-Lamenessing Engine.
6 The Anti-Lamenessing Engine is free software; you can redistribute it
7 and/or modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 3 of the License,
9 or (at your option) any later version.
11 The Anti-Lamenessing Engine is distributed in the hope that it will be
12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14 Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with the Anti-Lamenessing Engine; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __canon_300d_raw_linear_h__
22 #define __canon_300d_raw_linear_h__
24 #include "../d2.h"
27 * Device module for the Canon 300D (Digital Rebel).
29 * CRW files are not directly supported; use Dave Coffin's dcraw program
30 * with arguments -d -4 to produce a raw linear PPM file.
32 * http://www.cybercom.net/~dcoffin/dcraw/
35 class canon_300d_raw_linear {
36 public:
39 * Linear colorspace PSF
42 class lpsf : public d2::box {
43 public:
45 * A box filter of diameter 1 results in an optical fill factor
46 * of 100%. This probably isn't exactly right; there is lots
47 * of room for experimentation.
50 lpsf() : d2::box (0.5) {
55 * Exposure
58 class exposure : public d2::exposure_default {
59 d2::pixel linearize(d2::pixel input) const {
60 return input * get_multiplier();
62 d2::pixel unlinearize(d2::pixel input) const {
63 return input / get_multiplier();
68 * View Angle
71 static ale_pos view_angle() {
72 fprintf(stderr, "\n\n*** Error: tried to obtain view angle for a sensor device. ***\n\n");
73 exit(1);
74 // return 30;
78 #undef LPSF_ROWS
79 #undef LPSF_COLS
80 #undef NLPSF_ROWS
81 #undef NLPSF_COLS
83 #endif