Umax Astra 6x0S - CCD distance - Do they *really* do this that way ?

Nicolas Lucas de Peslouan (nlp@usa.net)
Thu, 19 Feb 1998 01:41:42 +0100

This is a multi-part message in MIME format.
--------------6F43E614EDEAF6DFFF405F5C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Oliver, Hi Umax users,

In order to support more resolutions for Umax Astra 6x0S, I changed one
line from umax-scsi.c, this way :

us->CCD_distance = us->inquiry_CCD_line_distance;

become

us->CCD_distance = us->y_resolution / 37.5 +.5;

This way, you get correct images at 4 different resolutions (75, 150,
225 and 300 dpi).

After this change, all images (except the 4 resolutions above) need to
be ccd-corrected, but with a float ccd value, -1 < ccd < 1

The only way I find to ccd-correct those images is to add part of the
current line value for a given channel with part of the above line value
for the same channel and to use this value.

For example, with a float ccd of .12, I take 88% (100-12) of the current
line + 12% of the above line for blue channel and 76% (100-12*2) of the
current line + 24% (12*2) of the above line for the green channel. If
float ccd is <0, I swap the % values. [This is for Astra 610S, for 600S,
replace green with red].

can't find another way to do this.

Do they *really* do this that way ?

Nicolas.

Attached: ccd.html, a Javascript program to display the line ccd, the
float ccd and the % value for all resolutions from 1 to 300. [This is
for Astra 610S, replace green with red for 600S.] Sorry for those who
can't run Javascript programs.
--------------6F43E614EDEAF6DFFF405F5C
Content-Type: text/html; charset=us-ascii; name="ccd.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="ccd.html"
Content-Base: "file:/home/nicolas/ccd.html"

<body>
<table border=1 width="100%">
<tr>
<th>Resolution</th>
<th>ccd</th>
<th>integer ccd</th>
<th>float ccd</th>
<th>n * currentGreen</th>
<th>n * previousGreen</th>
<th>n * currentBlue</th>
<th>n * previousBlue</th>
</tr>
<script language=javascript>
for (r=1;r<=300;r++)
{
ccd=r/37.5
ccdl=Math.floor(ccd+.5)
ccdf=ccd-ccdl
if (ccdf>=0)
{
bp=ccdf
bc=1-bp

gp=ccdf*2
gc=1-gp

}
else
{
bc=-ccdf
bp=1-bc

gc=-ccdf*2
gp=1-gc
}

document.write(
'<tr align=center>',
'<td>',r,'</td>',
'<td>',ccd,'</td>',
'<td>',ccdl,'</td>',
'<td>',ccdf,'</td>',
'<td>',gc,'</td>',
'<td>',gp,'</td>',
'<td>',bc,'</td>',
'<td>',bp,'</td>',
'</tr>'
)
}
</script>
<tr>
<th>Resolution</th>
<th>ccd</th>
<th>integer ccd</th>
<th>float ccd</th>
<th>n * currentGreen</th>
<th>n * previousGreen</th>
<th>n * currentBlue</th>
<th>n * previousBlue</th>
</tr>
</table>

--------------6F43E614EDEAF6DFFF405F5C--

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com