Question: Write a function in MATLAB using the homogeneous coordinates that scales (enlarge and shrink) a 2D image about a point P = [tx, ty, 1]'.
Write a function in MATLAB using the homogeneous coordinates that scales (enlarge and shrink) a 2D image about a point P = [tx, ty, 1]'. Specifically, the first line of your function will be
function [ newImg] = scale(img, alpha, P)
where Alpha =[sx, sy]' is the scale parameter that controls how much scaling is applied in x-direction and in y-direction, respectively. Preferably, implement this using "meshgrid" and "interp2" commands.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
