So I am working on a project which resizes images in Matlab, however, I have decided to not use the in-built functions, but rather understand how this is done mathematically.
So far I have a decent idea of how to scale the dimensions and re-allocate the existing pixels values in the new image.
My problem is finding out the values for the new pixels which do not yet have a colour value. In matlab the colours range from 0-255.
This is a very basic and dimmed-down version of the issue I am facing.
Current Image example:
25 25
25 25
New Image example:
0 0 0 0 0
0 25 0 25 0
0 0 0 0 0
0 25 0 25 0
0 0 0 0 0
I am trying to find out what the value for the 0s would be.
I have searched the internet for this, and even tried to watch YouTube videos, but I haven't been able to find a solution for this.
If someone could give a slight insight into the maths behind this process, it would be very much appreciated.