changeset 428:9fcd0215b8d5

Added text for ratures filter
author fsavard
date Sat, 01 May 2010 14:27:56 -0400
parents ace489930918
children 21bf438629d5 e2fd928a7de0
files writeup/techreport.tex
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/writeup/techreport.tex	Fri Apr 30 16:29:43 2010 -0400
+++ b/writeup/techreport.tex	Sat May 01 14:27:56 2010 -0400
@@ -72,8 +72,8 @@
 
 \section{Perturbation and Transformation of Character Images}
 This section describes the different transformations we used to generate data, in their order.
-We can differentiate two important parts in the pipeline. The first one, from slant to pinch, perform transformations 
-of the character. The second part, from blur to contrast, add noise to the image.
+We can differentiate two important parts in the pipeline. The first one, from slant to pinch, performs transformations 
+of the character. The second part, from blur to contrast, adds noise to the image.
 
 \subsection{Adding Slant}
 In order to mimic a slant effect, we simply shift each row of the image proportionnaly to its height: $shift = round(slant \times height)$.
@@ -192,6 +192,19 @@
 
 This filter has a probability of not being applied, at all, of 75\%.
 
+\subsection{"Ratures"}
+
+The ratures ("scratches") filter places line-like white patches on the image. The lines are in fact heavily transformed images of the digit "1" (one), chosen at random among five thousands such start images of this digit.
+
+Once the image is selected, the transformation begins by finding the first $top$, $bottom$, $right$ and $left$ non-zero pixels in the image. It is then cropped to the region thus delimited, then this cropped version is expanded to 32x32 again. It is then rotated by a random angle having a Gaussian distribution of mean 90 and standard deviation $100 \times complexity$ (in degrees). The rotation is done with bicubic interpolation.
+
+The rotated image is then resized to 50x50, with anti-aliasing. In that image, we crop the image again by selecting a region delimited horizontally to $left$ to $left+32$ and vertically by $top$ to $top+32$.
+
+Once this is done, two passes of a greyscale morphological erosion filter are applied. Put briefly, this erosion filter reduces the width of the line by a certain $smoothing$ amount. For small complexities (< 0.5), $smoothing$ is 6, so the line is very small. For complexities ranging from 0.25 to 0.5, $smoothing$ is 5. It is 4 for complexities 0.5 to 0.75, and 3 for higher complexities.
+
+To compensate for border effects, the image is then cropped to 28x28 by removing two pixels everywhere on the borders, then expanded to 32x32 again. The pixel values are then linearly expanded such that the minimum value is 0 and the maximal one is 1. Then, 50\% of the time, the image is vertically flipped.
+
+This filter is only applied only 15\% of the time. When it is applied, 50\% of the time, only one patch image is generated and applied. In 30\% of cases, two patches are generated, and otherwise three patches are generated. The patch is applied by taking the maximal value on any given patch or the original image, for each of the 32x32 pixel locations.
 
 \subsection{Color and Contrast Changes}