Initial commit
[distort.git] / README.txt
1 -------------------------------------------------------------------------------
2   Distort v1.0
3   Documentation written by Francois Fleuret
4   Contact <francois.fleuret@inria.fr> for comments & bug reports
5   Check http://www.eleves.ens.fr:8080/home/fleuret for latest version
6 -------------------------------------------------------------------------------
7
8 Distort is a small program which performs image distortions using a
9 file of coordinates that defines a distorted gride. I wrote it to
10 correct the distortions of the QuickCam. The syntax is the following :
11
12  ./distort <block size> <gride file> <source pic> <result pic>
13
14 The gride file contains first a couple of integers wich are the number
15 of intersections per line, and the number of lines, and then the list
16 of the couples of coordinates of each intersection of the gride.
17
18 The distort program will load the gride file, the source_pic file and
19 will build a new picture so that the point of the original picture
20 whose location is the location of the k-th intersection of the n-th
21 line of the gride will be in the result picture at the location
22 ((k-1)*block_size, (n-1)*block_size).
23
24 The locations of the other points, those whose coordinates are not
25 directly given in the gride file, will be afinely interpolated.
26
27 The result picture is smoothed with an anti-aliasing algorithm : the
28 gray level of a point in the result picture is a center of mass of the
29 gray levels of four pixels in the original pictures. The weights
30 depending on the distance to the four points.
31
32 You can use this program with any gride file. I made one for the
33 QuickCam, wich is called quickcam.grd.
34
35 The pictures file MUST BE IN PGM OR PPM FORMAT. I'm sorry for this
36 point, but I didn't develop new pictures loading/saving routines and
37 the only ones I had can only do that.
38
39 I wrote this program in few hours, so it's VERY dirty, the source is
40 horrible, disgusting, berk berk berk. Please don't judge me on this
41 program ;)
42
43                                                     Francois FLEURET