Changeset 1975
- Timestamp:
- 11/16/07 02:34:32 (6 years ago)
- Location:
- www/study
- Files:
-
- 2 added
- 1 edited
-
fig4-1-3.png (added)
-
fig4-1-3.svg (added)
-
part4.html (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
www/study/part4.html
r1972 r1975 96 96 97 97 <p> The following figure shows the gamma curve for the naïve three-colour 98 grayscale gradient we saw above (red ) compared to the two-colour gradient99 (blue). Two major observations can be made: the new curve is far closer to 100 a perfect, linear gradient, and there is a singularity in the middle of 101 the curve, meaning a break in the gradient’s smoothness. </p>98 grayscale gradient we saw above (red curve) compared to the two-colour 99 gradient (blue curve). Two major observations can be made: the new curve is 100 far closer to a perfect, linear gradient, but there is a singularity in the 101 middle of the curve, meaning a break in the gradient’s smoothness. </p> 102 102 103 103 <p style="text-align: center;"> … … 114 114 is fixed. </li> 115 115 <li> Don’t place the gray value at the middle of the gradient, for instance 116 putting it around 25% itensity will again match the previous two-colour116 a value of around 25% intensity will again match the previous two-colour 117 117 gradients. </li> 118 118 <li> <b>Gamma-correct</b> input pixels before assigning them an output 119 value. This ensures that the resulting gradient is perfectly linear. 119 value. This ensures that the resulting gradient is perfectly linear 120 and has no singularity. 120 121 </li> 121 122 </ul> … … 123 124 <h3> 4.2. Gamma correction </h3> 124 125 125 <p> These are the results of gamma-correcting input pixels before doing 126 <p> Gamma correction consists in converting pixel values into intensity values 127 before performing operations on them, then reconverting them to pixel values 128 before displaying them. The exact same algorithms can be used, they just 129 operate on slightly different data. </p> 130 131 <p style="text-align: center;"> 132 <img src="fig4-1-3.png" width="460" height="256" alt="3-colour gamma coorection" /> 133 </p> 134 135 <p> Here are the results of gamma-correcting input pixels before doing 126 136 any computation on them, then using Floyd-Steinberg error diffusion: </p> 127 137 … … 137 147 </p> 138 148 139 <!-- 140 <p> So, instead of using 25%, 50% and 75% patterns (which give non-uniform 141 gray values of 0.53, 0.73 and 0.88), one should rather use 6.25%, 25% and 50% 142 patterns, which give the better spread gray values of 0.28, 0.53 and 0.73 143 and result in far more accurate gradients. This is especially obvious when 144 observing the high intensity drop between the 25% pattern and black (top row): 145 </p> 146 147 <p style="text-align: center;"> 148 <img src="pat005.png" width="400" height="240" 149 class="inline" alt="better gradients" /> 150 </p> 151 152 <p> Here is the result on Lenna. As you can see, the result is visually less 153 appealing than with the “incorrect” colours. But when seen from a distance, 154 there is no doubt this version is more accurate: </p> 155 156 <p style="text-align: center;"> 157 <img src="out007.png" width="256" height="256" 158 class="inline" alt="gamma-aware 3-pattern halftoning" /> 159 <img src="grad007.png" width="32" height="256" 160 class="inline" alt="gamma-aware 3-pattern halftoning gradient" /> 161 </p> 162 --> 163 164 <!-- 165 <h3> Gamma with more gray levels </h3> 166 167 <p> As seen previously, the smoothest dithering pattern that can be created 168 with black and white is by uniformly alterning the two colours. However, the 169 resulting colour (0.73) it is not evenly situated on the gray scale. </p> 170 171 <img src="out008.png" width="256" height="256" 172 class="inline" alt="gamma-aware 6.25%, 25% and 50% halftoning" /> 173 174 <p> Here is the application to Lenna, using the 0-0.2, 0.2-0.4, 0.4-0.6, 175 0.6-0.8 and 0.8-1 ranges for black, white and the three patterns: </p> 176 177 <p style="text-align: center;"> 178 <img src="out005.png" width="256" height="256" 179 class="inline" alt="20/40/60/80% threshold and 25/50/75% halftones" /> 180 </p> 181 --> 149 <p> Two-colour dithering is not visually satisfying: dark areas lack much 150 detail because the gamma curve is very flat at low intensities. However, 151 the result itself is far more accurate that previously. The problem, while 152 still visible, is even less important with three-colour dithering: the image 153 on the right is superior to what The Gimp or Adobe Photoshop are able to 154 come up with. </p> 182 155 183 156 <div style="float: left;">
Note: See TracChangeset
for help on using the changeset viewer.
