需求说明:FPGA图像处理前期算法验证
当前状态:已通过matlab验证
%当前算法只能等比例放大或者缩小
function scaler_bilinear_matlab()
%-----------------------------0:配置输入输出--------------------------------
I=imread('F:\book\Digital image processing and machine vision\640480\plane.jpg');%读入原图像
[width_sr,height_sr,l]=size(I); %读取图像矩阵大小,方便后面操作
K = str2double(inputdlg('please input scale factor (must between 0.2 - 5.0)', 'INPUT scale factor', 1, {'0.5'}));
width = K * width_sr;
height = K * height_sr;
O = uint8(zeros(width,height,l));
widthScale = width_sr/width; %横向放大系数
heightS