kopia lustrzana https://gitlab.com/sane-project/website
82 wiersze
4.4 KiB
HTML
82 wiersze
4.4 KiB
HTML
<!-- received="Fri Dec 4 01:37:06 1998 PST" -->
|
||
<!-- sent="Fri, 4 Dec 1998 10:39:54 CET" -->
|
||
<!-- name="Matthias Fleischer" -->
|
||
<!-- email="FLEISCHER@ito311.ito.uni-stuttgart.de" -->
|
||
<!-- subject="Re: Adjusting contrast and brightness" -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="Adjusting contrast and brightness" -->
|
||
<title>sane-devel: Re: Adjusting contrast and brightness</title>
|
||
<h1>Re: Adjusting contrast and brightness</h1>
|
||
<b>Matthias Fleischer</b> (<a href="mailto:FLEISCHER@ito311.ito.uni-stuttgart.de"><i>FLEISCHER@ito311.ito.uni-stuttgart.de</i></a>)<br>
|
||
<i>Fri, 4 Dec 1998 10:39:54 CET</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#35">[ date ]</a><a href="index.html#35">[ thread ]</a><a href="subject.html#35">[ subject ]</a><a href="author.html#35">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0036.html">Stefan Gombar: "Re: Microtek E3 and sane OS/2, anyone??"</a>
|
||
<li> <b>Previous message:</b> <a href="0034.html">Andre Couture: "sane-devel: Re: Win32 TWAIN DLL to interface with SANE"</a>
|
||
<li> <b>Maybe in reply to:</b> <a href="0004.html">David Fox: "Adjusting contrast and brightness"</a>
|
||
<!-- nextthread="start" -->
|
||
<li> <b>Next in thread:</b> <a href="0008.html">Jon Knight: "Re: Genius scanners"</a>
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
<i>> Well, then I suppose we can begin to make a few conjectures. One</i><br>
|
||
<i>> approach would be to interactively modify the appearance of the</i><br>
|
||
<i>> preview image based on the current settings of the controls. This</i><br>
|
||
<i>> could be done based on a calibration run performed on a test image</i><br>
|
||
<i>> which would record the behavior of the scanner at various settings.</i><br>
|
||
<p>
|
||
Or by scanning the preview with a linear lookup-table that stretches<br>
|
||
over the whole dynamic range of the scanner. Modifications could then<br>
|
||
be applied to this image with the same LUT that is sent to the scanner<br>
|
||
for normal scans. Scanners that don't use a LUT (do they exist?) will <br>
|
||
be more difficult, though.<br>
|
||
<p>
|
||
<i>> A real-time display of the brightness histogram of the preview image</i><br>
|
||
<i>> might be a useful stopgap measure.</i><br>
|
||
<p>
|
||
Indeed. A combined RGB histogram might be useful, too. Keep in mind<br>
|
||
that a LUT (i.e. any operation applied on a per-pixel basis) does not <br>
|
||
produce intermediate color values but just reorders the buckets that <br>
|
||
are already there. So a little lowpass-filter should be applied to <br>
|
||
the histogram curves to make them look fine. A binomial-filter might <br>
|
||
be a good one.<br>
|
||
<p>
|
||
<i>> Having the software actually select the contrast and brightness and</i><br>
|
||
<i>> gamma is a lot trickier, with subjective elements. Its one of those</i><br>
|
||
<i>> problems, like the travelling salesman problem, that are impossible in</i><br>
|
||
<i>> theory but solved in practice every day. Are the algorithms for doing</i><br>
|
||
<i>> this proprietary, or are there no image processing experts here? I</i><br>
|
||
<i>> know about image synthesis, but not much about image processing.</i><br>
|
||
<p>
|
||
Not that I'm an expert, but from my experience simply stretching the <br>
|
||
histogram so that the darkest and brightest color become black and <br>
|
||
white gives excellent results for greyscale images. Noise can <br>
|
||
be ignored if you drop the lower and upper 0.5% of the histogram. <br>
|
||
Gamma should be used with care since it often increases noise.<br>
|
||
This doesn't work for all pictures, but if there are any secret <br>
|
||
algorithms out there (used in photo labs) they show their flaws for <br>
|
||
difficult pictures, too.<br>
|
||
(Ever tried to have some fireworks pictures developed in a cheap photo <br>
|
||
lab?)<br>
|
||
<p>
|
||
Matthias<br>
|
||
<p>
|
||
<pre>
|
||
--
|
||
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
|
||
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
|
||
</pre>
|
||
<!-- body="end" -->
|
||
<p>
|
||
<ul>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0036.html">Stefan Gombar: "Re: Microtek E3 and sane OS/2, anyone??"</a>
|
||
<li> <b>Previous message:</b> <a href="0034.html">Andre Couture: "sane-devel: Re: Win32 TWAIN DLL to interface with SANE"</a>
|
||
<li> <b>Maybe in reply to:</b> <a href="0004.html">David Fox: "Adjusting contrast and brightness"</a>
|
||
<!-- nextthread="start" -->
|
||
<li> <b>Next in thread:</b> <a href="0008.html">Jon Knight: "Re: Genius scanners"</a>
|
||
<!-- reply="end" -->
|
||
</ul>
|