DISTRITO DE TICLACAYÁN, PROVINCIA DE PASCO
Pregunta 4. Creen que satisfacen la necesidad de los clientes
4.1.4. Encuesta a los agricultores
4-2.2 Method 2 ;
The efficiency for the method discussed above can be further improved for large complete scans. The first method discussed above is slow because there are so many operations which have to be applied such as gray code integer conversion, interchanging the digits etcetera. In this section we will present an algorithm which is usually faster than the one described above.
Let us consider a rectangle of size n*m, where n represents the
number of columns and m represents the number of rows. The rectangle of size n*m can be scanned either by using scant or by using scan2, where scant and scan2 are described above.
Since murray polygons are space filling curves, they will pass through each and every point in a given space. Since each point will be visited only once we can mark all the points by giving them an integer number. Scant and scan2 will give a different numbering to the pixels (see Figure 4.2), since the direction is different.
The efficiency may now be improved if we deal straight with the numbers marked on each pixel (see Figure 4.2), to find the corresponding mth
CHAPTER 4. SCAN CONVERSION AND SCALING OF IMAGES.
The efficiency may now be improved if we deal straight with the numbers marked on each pixel (see Figure 4.2), to find the corresponding mth point in the next scan. Here we do not have to find the gray code conversion, digits interchange, etcetera.
Now we will define two lemmas, to get the above transformation. Before we discuss these two lemmas we will review some definitions already given.
Let r n, rn-1» ^n-2... r-j define the radices q associated with the digits d; (i = 1,2... n), such that for each i, 0<= d; < q. As explained earlier the product of the first two radices will be equal to the number of pixels present in a tile i.e., (no.of pixels/tile is equal to r-j*r2), the product of the next two radices will be equal to the total no. of blocks. 1 (say), each of size r-| *r2 (i.e. size of a tile), the product of the next two radices will be equal to the total number of blocks.2(say), each of pixel size ^3*^4
and so on. For example:
If r-j = 3, r2 = 3, rg = 5, r^ = 7, rg = 3 and rg = 5, then no. of pixels/tile is 9, total no.of blocks. 1 of pixel size 9 are 35 and total no.of blocks.2 of pixel size 315 are 15 .
From the following two lemmas , the first one finds the corresponding point in an image where a murray scan moves across the full width of the image before a unit change in the y-direction occurs. Here the whole image is considered as one large complete tile, whereas the second lemma finds the corresponding points In an image where a murray scan partitions the whole image into small tiles each of size r-j *r2 and the total number of such tiles in an Image is equal to rg^r^* *r^ .
CHAPTER 4. SCAN CONVERSION AND SCALING OF IMAGES.
Lemma 3:
Suppose a tile of size N*M is given, and that i is the point on the tile in scant.Then the corresponding point on the tile in scan2 is given by,
(scant and scan2 have their usual meaning), j = M*A +B iff A is even
= M*A +M -1 -B otherwise
where, A and B are the row and the column numbers respectively, and, N = r(1) and M = r(2)
Proof:
Consider an image of size N*M i.e., n columns and m rows. All the pixels in an image are numbered (see Figure 4.2). The top right numbers belongs to scant i.e., a horizontal scan and the bottom left numbers belongs to scan2 i.e., a vertical scan.
Let us consider scant first. From Figure 4.2, we can see that the start points for scant in each row are 0, N, 2 N , ..., and (M -t)N . Each
row has N points. If we divide each point in the first row by N then the divisor will be zero. For the second row the divisor will be t and and so on.
If we multiply these divisors i.e., 0, t, 2 ... and M -t by N we will get the starting point for each row. Let us call the divisors 0, 1, 2 ,M -t the y- values.
Similarly if we consider scan2, the start points for scan2 in each of the columns are 0, M, 2M, ... ,(N -t)M . If we divide each point in the first column by M the divisor will be zero, similarly for second column, the divisor will be 1 and so on. The start point for each column can be
CHAPTER 4. SCAN CONVERSION AND SCALING OF IMAGES.
determined by multiplying m by these divisors i.e. 0, 1, 2 ... ,N-1. Let us call them the x-values.
If the ith point on scant is given to us then it is very easy to get the start point for a row, by simply dividing the ith point by N to get the divisor and then multiplying it by N. To get the starting point for that column, we have to find the x-value first. Two cases can be considered,