資源簡介
這個是雙線性內插法的實現,用c語言實現,并跑通,效果比鄰域內插要好
代碼片段和文件信息
void?Bilinear_Interpolation(unsigned?char?*?source_addrunsigned?char?*?destination_addrint?source_heightint?source_widthfloat?destination_heightfloat?destination_width)
{ float?f_u;
? float?f_v;
? int?ijxy;
? int?adjacent[4];
? for(j=0;j ? { for(i=0;i ? { f_u=i*(source_width/destination_width);
? f_v=j*(source_height/destination_height);
? x=(int)f_u;
? f_u=f_u-x;
? y=
評論
共有 條評論