Please use MATLAB
When images are scaled or resized, the values between pixelsneed to be guessed/interpolated in order to fill in the missinggaps. Write a function that takes a grayscale image and a scalingfactor (any positive decimal value) as input and resizes the imageusing the following methods;
a) Nearest neighbouring pixel
b) Linear interpolation
c) Spline interpolation
Use the test image provided (a8_img.jpg), read in the image andoutput the resulting image for each of the three methods. Test outyour function with 1.5 scaling, 3.1 scaling, and for 0.3 scaling (9images total). You cannot use the built-in MATLAB functionimresize(), but any other MATLAB built-in functions areacceptable.
(Hint:
PayPal Gateway not configured
PayPal Gateway not configured