## GENERATING REPRESENTATIVE SETS AND SUMMARIES FOR LARGE COLLECTION OF IMAGES: PRE-CLUSTER (2)

Sequential Windows

Now we would like to generate N sequential windows in order to implement n-gram model. So, the coverage C remains same as the previous technique but the window point is now fixed. More formally for the each image of the dataset P and for the fix coverage C, we generate N sequential windows from (s_x,s_y) pixel point where s_x and s_y is sequential pixel point from where the image with fixed coverage will be cropped. Here we are keeping sequence of windows diagonally. One can see from the figure 4, windows initial points which are totally diagonally .The idea is to capture certain coverage without losing any sort of information. In other words for any N windows, we must have all images between (0,0) and (X,Y) where X and Y are height and width of an original image, diagonally. After having the n sequential windows set of original data set, we apply sift algorithm to generate and store descriptors of each random window for the next stages. The procedure is mentioned in algorithm 2 and the output can be seen in figure 5 with respect to the original image.

Algorithm 2: Sequence windows generation

1: input: original image set

2: output: N sequential windows of each images with certain coverage C.

3: set the coverage C and the number of windows N to generate 4: for each images img do

5: get the size of img [rows columns] = size(img)

6: manipulate window width and height according to coverage C w_width = C * column; w_height= C * rows;

7: generate initial window from the initial pixel point(s_x0, s_y0) of the image img s_x0=0 and s_y0=0; cropped_img=imcrop(img, [r_x, r_y, w_width, w_height]); save cropped_img (window) in output directory 8: for each image img, to generate N sequence windows do ( for i=N;I>1 ;i—) generate sequential pixel point (s_x,s_y) s_x= (rows – w_height)/N-1; s_y= (columns – w_width)/N-1; crop the image img cropped_img=imcrop(img, [s_x, s_y, w_width, w_height] save cropped_img (window) at the output directory 9: end for 10: end for

Figure 5 : Output of random and sequence windows