% function to output two images which are similar to the image in the query

function [ im1,im2 ] = query( img )
global V;
rgb_img = imread(img);
I = rgb2gray(rgb_img);
Vimg=imhist(I);

% finding the normal of the image
for i=1:8
    img1=V(:,i);
    normal = normimg(img1,Vimg);
    N(i,1)= abs(normal);
end

fprintf('Normal vector is\n');
fprintf('%d\n',N);

% Sorting the normal vector

sortedNorm=sort(N);

Ind1 = find(N == sortedNorm(2,1));
Ind2 = find(N == 0);

i1 = Ind2(1,1);
i2 = Ind1(1,1);

im1 = strcat('image',int2str(i1),'.jpg');
im2 = strcat('image',int2str(i2),'.jpg');

