function [ R, G, B, NOP, x, y ] = gtPoints(im , NOP, windSize)
% close all;

figure; imshow(im);
h1 = gca;

[x1,y1] = getpts(h1);
hold all;
plot(x1, y1,'--rs','LineWidth',2,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor','g',...
    'MarkerSize',10);

y = floor(x1);
x = floor(y1);
noOfPoints = size(x);

if noOfPoints(1) ~= NOP
    NOP = noOfPoints(1);
end

counter = 0;
wSize = windSize  * windSize ;
hwSize = floor(windSize/2);
R(NOP*wSize) = zeros;
G(NOP*wSize) = zeros;
B(NOP*wSize) = zeros;

for i=1:NOP
    for j = -hwSize:hwSize
        for k = -hwSize:hwSize
            R(wSize*i-counter) = double(im(x(i)+j,y(i)+k,1));
            G(wSize*i-counter) = double(im(x(i)+j,y(i)+k,2));
            B(wSize*i-counter) = double(im(x(i)+j,y(i)+k,3));
            counter = counter+1;
        end

    end
    counter = 0;
end

% save(expName, 'R', 'G', 'B','fName');
end