kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Use separate settings for dark-white calibration area geometry
rodzic
aaf8a2fd49
commit
4261549e2d
|
@ -137,12 +137,19 @@ struct Genesys_Model
|
|||
// Size of scan area in mm
|
||||
float y_size = 0;
|
||||
|
||||
// Start of white strip in mm
|
||||
// Start of white strip in mm for scanners that use separate dark and white shading calibration.
|
||||
float y_offset_calib_white = 0;
|
||||
|
||||
// The size of the scan area that is used to acquire shading data in mm
|
||||
float y_size_calib_mm = 0;
|
||||
|
||||
// Start of the black/white strip in mm for scanners that use unified dark and white shading
|
||||
// calibration.
|
||||
float y_offset_calib_dark_white_mm = 0;
|
||||
|
||||
// The size of the scan area that is used to acquire dark/white shading data in mm
|
||||
float y_size_calib_dark_white_mm = 0;
|
||||
|
||||
// Start of black mark in mm
|
||||
float x_offset_calib_black = 0;
|
||||
|
||||
|
|
|
@ -2396,21 +2396,6 @@ void CommandSetGl841::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
Genesys_Register_Set& regs) const
|
||||
{
|
||||
DBG_HELPER(dbg);
|
||||
unsigned starty = 0;
|
||||
|
||||
if (dev->model->motor_id == MotorId::CANON_LIDE_80) {
|
||||
/* get over extra dark area for this model.
|
||||
It looks like different devices have dark areas of different width
|
||||
due to manufacturing variability. The initial value of starty was 140,
|
||||
but it moves the sensor almost past the dark area completely in places
|
||||
on certain devices.
|
||||
|
||||
On a particular device the black area starts at roughly position
|
||||
160 to 230 depending on location (the dark area is not completely
|
||||
parallel to the frame).
|
||||
*/
|
||||
starty = 70;
|
||||
}
|
||||
|
||||
unsigned channels = 3;
|
||||
|
||||
|
@ -2421,7 +2406,9 @@ void CommandSetGl841::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
dev->settings.scan_method);
|
||||
|
||||
unsigned calib_lines =
|
||||
static_cast<unsigned>(dev->model->y_size_calib_mm * resolution / MM_PER_INCH);
|
||||
static_cast<unsigned>(dev->model->y_size_calib_dark_white_mm * resolution / MM_PER_INCH);
|
||||
unsigned starty =
|
||||
static_cast<unsigned>(dev->model->y_offset_calib_dark_white_mm * dev->motor.base_ydpi / MM_PER_INCH);
|
||||
ScanSession session;
|
||||
session.params.xres = resolution;
|
||||
session.params.yres = resolution;
|
||||
|
|
|
@ -88,6 +88,12 @@ void genesys_init_usb_device_tables()
|
|||
model.y_offset_sensor_to_ta = 0.0;
|
||||
model.y_offset_calib_white_ta = 0.0;
|
||||
model.y_size_calib_ta_mm = 0.0;
|
||||
|
||||
If the scanner does not have ModelFlag::DARK_WHITE_CALIBRATION, then the following
|
||||
properties are optional:
|
||||
|
||||
model.y_offset_calib_dark_white_mm = 0.0;
|
||||
model.y_size_calib_dark_white_mm = 0.0;
|
||||
*/
|
||||
|
||||
s_usb_devices.init();
|
||||
|
@ -165,6 +171,8 @@ void genesys_init_usb_device_tables()
|
|||
|
||||
model.y_offset_calib_white = 3.0;
|
||||
model.y_size_calib_mm = 3.0;
|
||||
model.y_offset_calib_dark_white_mm = 1.0;
|
||||
model.y_size_calib_dark_white_mm = 6.0;
|
||||
model.x_offset_calib_black = 0.0;
|
||||
|
||||
model.post_scan = 0.0;
|
||||
|
@ -1083,6 +1091,8 @@ void genesys_init_usb_device_tables()
|
|||
|
||||
model.y_offset_calib_white = 3.0;
|
||||
model.y_size_calib_mm = 3.0;
|
||||
model.y_offset_calib_dark_white_mm = 1.0;
|
||||
model.y_size_calib_dark_white_mm = 6.0;
|
||||
model.x_offset_calib_black = 0.0;
|
||||
|
||||
model.post_scan = 0.0;
|
||||
|
@ -1136,6 +1146,8 @@ void genesys_init_usb_device_tables()
|
|||
|
||||
model.y_offset_calib_white = 4.5;
|
||||
model.y_size_calib_mm = 3.0;
|
||||
model.y_offset_calib_dark_white_mm = 1.0;
|
||||
model.y_size_calib_dark_white_mm = 6.0;
|
||||
model.x_offset_calib_black = 0.0;
|
||||
|
||||
model.post_scan = 0.0;
|
||||
|
|
Ładowanie…
Reference in New Issue