kopia lustrzana https://gitlab.com/sane-project/website
92 wiersze
4.3 KiB
HTML
92 wiersze
4.3 KiB
HTML
<!-- received="Mon Mar 8 04:53:28 1999 PST" -->
|
||
<!-- sent="Mon, 08 Mar 1999 12:49:55 +0100" -->
|
||
<!-- name="=?iso-8859-1?Q?H=E5kan=20Kvarnstr=F6m?=" -->
|
||
<!-- email="Hakan.K.Kvarnstrom@telia.se" -->
|
||
<!-- subject="Re: Automatic Brightness and Contrast correction?" -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="Automatic Brightness and Contrast correction?" -->
|
||
<title>sane-devel: Re: Automatic Brightness and Contrast correction?</title>
|
||
<h1>Re: Automatic Brightness and Contrast correction?</h1>
|
||
<b>=?iso-8859-1?Q?H=E5kan=20Kvarnstr=F6m?=</b> (<a href="mailto:Hakan.K.Kvarnstrom@telia.se"><i>Hakan.K.Kvarnstrom@telia.se</i></a>)<br>
|
||
<i>Mon, 08 Mar 1999 12:49:55 +0100</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#75">[ date ]</a><a href="index.html#75">[ thread ]</a><a href="subject.html#75">[ subject ]</a><a href="author.html#75">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0076.html">=?iso-8859-1?Q?H=E5kan=20Kvarnstr=F6m?=: "Re: More problems with Microtek ScanMaker X6"</a>
|
||
<li> <b>Previous message:</b> <a href="0074.html">Ingo Wilken: "SANE backend for Siemens ST400 available"</a>
|
||
<li> <b>Maybe in reply to:</b> <a href="0047.html">Håkan Kvarnström: "Automatic Brightness and Contrast correction?"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
<i>>Håkan Kvarnström:</i><br>
|
||
<i>>> Does any one know how to achieve automated brightness and</i><br>
|
||
<i>>> contrast correction for scans made using SANE?</i><br>
|
||
<p>
|
||
Jiri Baum wrote:<br>
|
||
<p>
|
||
<i>>Well, ppmnorm / pgmnorm would probably do most of what you're after... They</i><br>
|
||
<i>>map the ligthest pixels to white, darkest to black and interpolate (you can</i><br>
|
||
<i>>also give it the values manually). Check also pnmgamma, ppmbrighten,</i><br>
|
||
<i>>ppmflash and probably some others I've missed.</i><br>
|
||
<p>
|
||
Yes, the ppm tools can be used as you describe, but the problem is that the<br>
|
||
quality of the images will not be optimal. For example if the scanned image<br>
|
||
has gamma values between 67 and 136 per bitplane, almost half of contrast<br>
|
||
is lost if one let "ppmnorm" recalculate the gamma-values. What I would like<br>
|
||
to<br>
|
||
to is to look at the gamma-values and try to provide optimal values for both<br>
|
||
contrast and brightness such that the resulting scan always have gamma-values<br>
|
||
ranging from 0 to 256. In this way, the full color-range of the scanners will<br>
|
||
be<br>
|
||
used.<br>
|
||
This would of course require two scans, although the first could be a fast<br>
|
||
preview<br>
|
||
scan. In addition, it is not clear to me how one should calculate these<br>
|
||
correction values<br>
|
||
for brightness and contrast using the first scan. Somehow one must know<br>
|
||
whether<br>
|
||
the contrast and brightness controls are linear or if the follow some other<br>
|
||
function.<br>
|
||
<p>
|
||
I have been told that GIMP can perform automatic gamma-correction, but<br>
|
||
I have not had time to test GIMP yet. Hopefully, GIMP can be scripted so<br>
|
||
that I can use it in CGI-scripts.<br>
|
||
<p>
|
||
/ Håkan<br>
|
||
<p>
|
||
ness values have linar<br>
|
||
<i>>Håkan Kvarnström:</i><br>
|
||
<i>>> I have been experimenting with "ppmhist" to create histograms of images</i><br>
|
||
<i>>> which I used to calculate correction values for brightness and contrast.</i><br>
|
||
<i>>> The problem is that it requires me to scan the same image twice.</i><br>
|
||
<p>
|
||
Jiri Baum wrote:<br>
|
||
<p>
|
||
<i>>If you want to set the brightness/contrast directly at the scanner, you'll</i><br>
|
||
<i>>naturally have to do two scans; the first one might be just a quick</i><br>
|
||
<i>>pre-scan. Even automatic photocopiers do a quick half-scan to set</i><br>
|
||
<i>>brightness.</i><br>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<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="0076.html">=?iso-8859-1?Q?H=E5kan=20Kvarnstr=F6m?=: "Re: More problems with Microtek ScanMaker X6"</a>
|
||
<li> <b>Previous message:</b> <a href="0074.html">Ingo Wilken: "SANE backend for Siemens ST400 available"</a>
|
||
<li> <b>Maybe in reply to:</b> <a href="0047.html">Håkan Kvarnström: "Automatic Brightness and Contrast correction?"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|