MATLAB: Shrink image without using imresize

Image Processing Toolboximage resizeimresize

First, I will say I do not have the Image Processing Toolbox and cannot get it so please do not turn this into yet another debate about why I should use built in functions. I would love to, but I can't for various reasons.
I'm using Matlab 2017a (9.2.0.556344)
I have a video frame that's 1200×1100 (I know, odd dimensions) color RGB image.
I want to end up with a 650×650 color RGB image.
Here's what I tried, which just results in a cropped image. I want a shrunken image. How can I shrink this large image without using imresize or any other function in the Image Processing Toolbox?
v_obj = VideoReader('vid.mp4');
img = readFrame(v_obj);
[Xq,Yq,Zq] = meshgrid(1:1:650,1:1:650,1:1:3);
Vq = interp3(double(img),Xq,Yq,Zq);

Best Answer

Let I be your image of size 1200x1100.
[m,n,p] = size(I) ;
[X,Y] = meshgrid(1:m,1:n) ;
xi = linspace(1,m,650) ;
yi = linsace(1,n,650) ;
[Xi,Yi] = meshgrid(xi,yi) ;
Ii = zeros(650,650,3) ;
for i = 1:p
Ii(:,:,i) = interp2(X,Y,I(:,:,i),Xi,Yi) ;
end