|
List Info
Thread: Lexmark experimental backend
|
|
| Lexmark experimental backend |

|
2006-05-19 11:56:18 |
Hello,
I have just committed a new version of the
experimental/lexmark backend. From
the current regular backend it brings:
- arbitrary scanarea selection
- gain calibration
- offset calibration
- software shading calibration
- Dell A920 support
- infrastructure for adding more models
I believe the experimental is in good shape to get into
regular CVS. However,
while I took care of not altering X1100 support, and since I
don't have such
a model to test, there may be bugs for this model. So it
needs testing.
For A920 1200 dpi scan is disabled, since it does 1200x600,
and so needs
to "inflate" lines to match 1200x1200. Which is
a little tricky since the
data copying expects even/odd columns interleaved.
Last issue is shading calibration. This scanner has no
hardware shading
calibration, and it has to be done in software. The current
correction
implementation gives good results, but shows deficiency in
dark areas. The
trouble is due to the fact that correction depends of the
sensor element that
corresponds to the scanned column, but also slightly depends
on his
neighbours in a way I couldn't figure out. Someone more
clever than me will
have to find it.
Pictures given "out of the box" are correct,
and with little tweaking of
gamma and light from the frontend, one can have good scans.
Regards,
Stef
--
sane-devel mailing list: sane-devel lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
to sane-devel-request lists.alioth.debian.org
|
|
| Lexmark experimental backend |

|
2006-05-19 03:11:16 |
Stéphane,
I tested it on my Lexmark X1185.
It is broken really badly. It hangs in the function
sanei_lexmark_x1100_search_home_fwd - infinite read loop in
a poll after
trying to move the scan head. I did a register compare from
usb dumps of
a good scan (sane-backends-1.0.17) and a bad scan
(experimental) and
none of the lexmark register defaults are set! There are 35
registers
that used to have non-zero default values and now have 0x00
and one
register that was 0x01 and is now 0x81.
Fred
Stéphane VOLTZ wrote:
> Hello,
>
> I have just committed a new version of the
experimental/lexmark backend. From
> the current regular backend it brings:
>
> - arbitrary scanarea selection
> - gain calibration
> - offset calibration
> - software shading calibration
> - Dell A920 support
> - infrastructure for adding more models
>
> I believe the experimental is in good shape to get
into regular CVS. However,
> while I took care of not altering X1100 support, and
since I don't have such
> a model to test, there may be bugs for this model. So
it needs testing.
> For A920 1200 dpi scan is disabled, since it does
1200x600, and so needs
> to "inflate" lines to match 1200x1200.
Which is a little tricky since the
> data copying expects even/odd columns interleaved.
> Last issue is shading calibration. This scanner has no
hardware shading
> calibration, and it has to be done in software. The
current correction
> implementation gives good results, but shows deficiency
in dark areas. The
> trouble is due to the fact that correction depends of
the sensor element that
> corresponds to the scanned column, but also slightly
depends on his
> neighbours in a way I couldn't figure out. Someone
more clever than me will
> have to find it.
> Pictures given "out of the box" are
correct, and with little tweaking of
> gamma and light from the frontend, one can have good
scans.
>
> Regards,
> Stef
>
>
--
sane-devel mailing list: sane-devel lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
to sane-devel-request lists.alioth.debian.org
|
|
| Lexmark experimental backend |

|
2006-05-20 12:53:08 |
Le Vendredi 19 Mai 2006 05:11, Fred Odendaal a écrit :
> Stéphane,
>
> I tested it on my Lexmark X1185.
>
> It is broken really badly. It hangs in the function
> sanei_lexmark_x1100_search_home_fwd - infinite read
loop in a poll after
> trying to move the scan head. I did a register compare
from usb dumps of
> a good scan (sane-backends-1.0.17) and a bad scan
(experimental) and
> none of the lexmark register defaults are set! There
are 35 registers
> that used to have non-zero default values and now have
0x00 and one
> register that was 0x01 and is now 0x81.
>
> Fred
>
Hello,
after checking I only got register 0xC3 different. however
while commiting
this change, I noticed that more files were updated than
I'd expected. I
think I did my previous commit wrongly.
Things should be much better now. But in case there are
other problems I'd
like to have the logs. I can override model detection to
make the regular
backend to think my A920 is a X1100, and so get registers
values before the
chnages, but I won't be able to do it past
sanei_lexmark_x1100_search_home_bwd().
Regards,
Stef
--
sane-devel mailing list: sane-devel lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
to sane-devel-request lists.alioth.debian.org
|
|
| Lexmark experimental backend |

|
2006-05-19 17:48:39 |
|
Stéphane
Much better. I was able to do a scan. However, the scan had blue
streaks down the middle. It also started the scan too early (you can
see the area off the glass) and the rewind went too far (you could hear
the scan head hitting the end). I can create logfiles if you want.
Just let me know what debugging
info you need.
regards,
Fred O.
Stéphane VOLTZ wrote:
modulonet.fr"
type="cite">
Le Vendredi 19 Mai 2006 05:11, Fred Odendaal a écrit :
Stéphane,
I tested it on my Lexmark X1185.
It is broken really badly. It hangs in the function
sanei_lexmark_x1100_search_home_fwd - infinite read loop in a poll after
trying to move the scan head. I did a register compare from usb dumps of
a good scan (sane-backends-1.0.17) and a bad scan (experimental) and
none of the lexmark register defaults are set! There are 35 registers
that used to have non-zero default values and now have 0x00 and one
register that was 0x01 and is now 0x81.
Fred
Hello,
after checking I only got register 0xC3 different. however while commiting
this change, I noticed that more files were updated than I'd expected. I
think I did my previous commit wrongly.
Things should be much better now. But in case there are other problems I'd
like to have the logs. I can override model detection to make the regular
backend to think my A920 is a X1100, and so get registers values before the
chnages, but I won't be able to do it past
sanei_lexmark_x1100_search_home_bwd().
Regards,
Stef
|
| Lexmark experimental backend |

|
2006-05-21 01:41:13 |
|
Stéphane,
When I tried the default maximum scan size at 150dpi I got blue streaks
down the middle of the scan. Also, it had the wrong initial y position
as it scanned the area off the glass and didn't scan to the maximum y
coordinate. It also rewound to far.
When I tried smaller scans at 75 dpi, the colours were really wrong!
The gain and offset registers are very different than the ones set by
the Windows driver, so I assume something funny is happening in the
calibration. When I took a quick look through the code a few questions
came up:
1. In the sanei_lexmark_x1100_offset_calibration function there is a
while loop that loops through the ranges while its not the null range
and the average is more than the offset_threshold. However, I can't
find where the offset_threshold is being set. Is
dev->sensor->offset_threshold set anywhere?
2. In the function sanei_lexmark_x1100_calibration you set the
registers like this:
dev->shadow_regs[0x02] = dev->offset.red;
dev->shadow_regs[0x03] = dev->offset.red;
dev->shadow_regs[0x04] = dev->offset.green;
dev->shadow_regs[0x05] = dev->offset.green;
dev->shadow_regs[0x06] = dev->offset.blue;
dev->shadow_regs[0x07] = dev->offset.blue;
Are you sure this is correct? For my scanner the:
red offset is for shadow_regs[0x02] and shadow_regs[0x05]
green offset is for shadow_regs[0x03] and shadow_regs[0x06]
blue offset is for shadow_regs[0x04] and shadow_regs[0x07]
Fred.
Stéphane VOLTZ wrote:
modulonet.fr"
type="cite">
Le Vendredi 19 Mai 2006 05:11, Fred Odendaal a écrit :
Stéphane,
I tested it on my Lexmark X1185.
It is broken really badly. It hangs in the function
sanei_lexmark_x1100_search_home_fwd - infinite read loop in a poll after
trying to move the scan head. I did a register compare from usb dumps of
a good scan (sane-backends-1.0.17) and a bad scan (experimental) and
none of the lexmark register defaults are set! There are 35 registers
that used to have non-zero default values and now have 0x00 and one
register that was 0x01 and is now 0x81.
Fred
Hello,
after checking I only got register 0xC3 different. however while commiting
this change, I noticed that more files were updated than I'd expected. I
think I did my previous commit wrongly.
Things should be much better now. But in case there are other problems I'd
like to have the logs. I can override model detection to make the regular
backend to think my A920 is a X1100, and so get registers values before the
chnages, but I won't be able to do it past
sanei_lexmark_x1100_search_home_bwd().
Regards,
Stef
|
| Lexmark experimental backend |

|
2006-05-23 13:20:05 |
Le Dimanche 21 Mai 2006 03:41, Fred Odendaal a écrit :
> Stéphane,
>
> When I tried the default maximum scan size at 150dpi I
got blue streaks
> down the middle of the scan. Also, it had the wrong
initial y position
> as it scanned the area off the glass and didn't scan
to the maximum y
> coordinate. It also rewound to far.
>
> When I tried smaller scans at 75 dpi, the colours were
really wrong! The
> gain and offset registers are very different than the
ones set by the
> Windows driver, so I assume something funny is
happening in the
> calibration. When I took a quick look through the code
a few questions
> came up:
>
> 1. In the sanei_lexmark_x1100_offset_calibration
function there is a
> while loop that loops through the ranges while its not
the null range
> and the average is more than the offset_threshold.
However, I can't find
> where the offset_threshold is being set. Is
> dev->sensor->offset_threshold set anywhere?
threshold, gain targets and shading targets are set in
lexmark_devices.c.
They are loaded in attachLexmark ()
with 'lexmark_device->sensor=&(sensor_list[dn]);'
>
> 2. In the function sanei_lexmark_x1100_calibration you
set the registers
> like this:
> dev->shadow_regs[0x02] = dev->offset.red;
> dev->shadow_regs[0x03] = dev->offset.red;
> dev->shadow_regs[0x04] = dev->offset.green;
> dev->shadow_regs[0x05] = dev->offset.green;
> dev->shadow_regs[0x06] = dev->offset.blue;
> dev->shadow_regs[0x07] = dev->offset.blue;
>
> Are you sure this is correct? For my scanner the:
> red offset is for shadow_regs[0x02] and
shadow_regs[0x05]
> green offset is for shadow_regs[0x03] and
shadow_regs[0x06]
> blue offset is for shadow_regs[0x04] and
shadow_regs[0x07]
>
You are right. For the A920, these are always set the same.
So I didn't get
the order right. I have fixed it in experimental CVS, with a
few shading
calibration imrpovements.
> Fred.
>
I think I have a problem with
sanei_lexmark_x1100_find_start_line(). The
detected offet is always 0. I attach the picture produced by
the scan in this
function. The dark area of the dot is at bottom, while I
think it is at the
top for your scanner. Can you confirm it ?
Not finding home accurately will disturb shading
calibration, and you'll have
a "overexposed" band where the dot it on the
final scan.
Regards,
Stef
--
sane-devel mailing list: sane-devel lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
to sane-devel-request lists.alioth.debian.org
|
|
| Lexmark experimental backend |

|
2006-05-23 02:59:07 |
|
Stef,
You are correct about the dot. I've attached 2 files:
find_start_lexmark1.pnm - This was with SANE_DEBUG_SANEI_USB=255
find_start_lexmark2.pnm - This was with SANE_DEBUG_SANEI_USB unset.
As you can see the picture gets better with usb logging turned off. I
think the real problem function is
sanei_lexmark_x1100_search_home_bwd(). It should have stopped the scan
head and positioned it inside the dot. The white space at the top of
each file is the distance past the dot that the scan head moved in the
reverse direction. In this function after the scan is stopped from
moving in the backward direction it is moved forward half the distance
of the dot plus the maximum no. of lines the buffer will hold. This is
done by the call to sanei_lexmark_x1100_move_fwd(). When I comment this
line out the picture gets even better. In other words, this function
isn't moving forward, but continuing backwards making our position even
worse!
The sanei_lexmark_x1100_find_start_line() function is working as it
should. It simply scans what should be enough lines to scan past the
dot into white space and return the number of white lines past the dot.
Since the distance to the scanning area from the dot is known we simply
subtract how far past the dot we've moved from this number to see how
far we still have to go.
regards,
Fred O.
Stéphane VOLTZ wrote:
modulonet.fr"
type="cite">
Le Dimanche 21 Mai 2006 03:41, Fred Odendaal a écrit :
Stéphane,
When I tried the default maximum scan size at 150dpi I got blue streaks
down the middle of the scan. Also, it had the wrong initial y position
as it scanned the area off the glass and didn't scan to the maximum y
coordinate. It also rewound to far.
When I tried smaller scans at 75 dpi, the colours were really wrong! The
gain and offset registers are very different than the ones set by the
Windows driver, so I assume something funny is happening in the
calibration. When I took a quick look through the code a few questions
came up:
1. In the sanei_lexmark_x1100_offset_calibration function there is a
while loop that loops through the ranges while its not the null range
and the average is more than the offset_threshold. However, I can't find
where the offset_threshold is being set. Is
dev->sensor->offset_threshold set anywhere?
threshold, gain targets and shading targets are set in lexmark_devices.c.
They are loaded in attachLexmark ()
with 'lexmark_device->sensor=&(sensor_list[dn]);'
2. In the function sanei_lexmark_x1100_calibration you set the registers
like this:
dev->shadow_regs[0x02] = dev->offset.red;
dev->shadow_regs[0x03] = dev->offset.red;
dev->shadow_regs[0x04] = dev->offset.green;
dev->shadow_regs[0x05] = dev->offset.green;
dev->shadow_regs[0x06] = dev->offset.blue;
dev->shadow_regs[0x07] = dev->offset.blue;
Are you sure this is correct? For my scanner the:
red offset is for shadow_regs[0x02] and shadow_regs[0x05]
green offset is for shadow_regs[0x03] and shadow_regs[0x06]
blue offset is for shadow_regs[0x04] and shadow_regs[0x07]
You are right. For the A920, these are always set the same. So I didn't get
the order right. I have fixed it in experimental CVS, with a few shading
calibration imrpovements.
Fred.
I think I have a problem with sanei_lexmark_x1100_find_start_line(). The
detected offet is always 0. I attach the picture produced by the scan in this
function. The dark area of the dot is at bottom, while I think it is at the
top for your scanner. Can you confirm it ?
Not finding home accurately will disturb shading calibration, and you'll have
a "overexposed" band where the dot it on the final scan.
Regards,
Stef
|
[1-7]
|
|