I want to resize an image based on a percentage and keep it as close to the original with minimal noise and distortion. The resize could be up or down as in I could scale to 5% the size of the original image or 500% (or any other value these are given as example)
This is what i tried and i'd need absolute minimal changes in the resized image since i'll be using it in comparison with other images
def resizing(main,percentage): main = cv2.imread(main) height = main.shape[ 0] * percentage width = crop.shape[ 1] * percentage dim = (width,height) final_im = cv2.resize(main, dim, interpolation = cv2.INTER_AREA) cv2.imwrite("C:\\Users\\me\\nature.jpg", final_im) 

