-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccuracy.html
35 lines (27 loc) · 1.61 KB
/
accuracy.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html><head><title>High-speed Conversion of Floating Point Images to
8-bit</title></head><body bgcolor=black text=#c0c0c0 link=#80c0c0 vlink=#ffc0c0>
<p>How accurate is this conversion function?
<p>Because only the top 16 bits are used, the actual function we are
dithering to match is a staircase, with each step a point where the
top 16 bits of the floating point number change. (note that the
plotting program tilted the vertical sides of the stairsteps
slightly).
<p>The following snapshots compare the proper <i>to_sRGB()</i>
function (yellow) with the function actually delivered by the lookup
table (red). I zoomed in on the two points shown as gray squares in
the left image. The worst error is at .5 (right picture), where at
several points the error approaches .5 of an output pixel. The error
is reduced as you approach 1 due to the curve's derivative becoming
less. The accuracy is much better in normal image colors, which are
around .18 and well below the .25 that is shown in the middle graph.
<p>The staircase is irregular because the table was filled in so that
bytes read in convert back to the same bytes with no dithering. This
can be seen as the stairsteps that land exactly on a horizontal
integer line. If this is not done the error never exeeds 1/3 of a
pixel. However solid 8-bit grays read in and then written out would
come out dithered and shifted in intensity, this is unacceptable if
the image is to be processed repeatedly.
<p>
<img src=pics/accuracy1.png> <img src=pics/accuracy2.png> <img src=pics/accuracy3.png>
<p><a href=index.html>Back to main page</a>
</body></html>