1 / 5

Resampling

Resampling. MALTAB. improfile(f,[XFP x],[YFP y],search_radius,' bicubic '); f :原圖 [ ] :座標 search_radius :點數 bicubic :函式. 各方法簡介 - 雙線性內插法. 雙線性內插法 (bilinear interpolation) 實際上為連續記算三次線性內插的結果 與最近相鄰內插法一樣,利用相鄰四點求取新的像素值 下頁式子中的 α 、 β 為點 p 對應鄰近四點的相對水平與垂直距離 假設點與點間距離為 1 , 故 0 < α 、 β < 1. 3.

lali
Télécharger la présentation

Resampling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Resampling

  2. MALTAB • improfile(f,[XFP x],[YFP y],search_radius,'bicubic'); • f:原圖 • [ ] :座標 • search_radius :點數 • bicubic:函式

  3. 各方法簡介-雙線性內插法 • 雙線性內插法(bilinear interpolation) • 實際上為連續記算三次線性內插的結果 • 與最近相鄰內插法一樣,利用相鄰四點求取新的像素值 • 下頁式子中的α、β為點p對應鄰近四點的相對水平與垂直距離 • 假設點與點間距離為1 , 故 0 < α、β < 1 3

  4. 各方法簡介-雙線性內插法 • 作法 • 第一次線性內插 • 即a 、b兩點對p的影響,可求出e點像素 • 第二次線性內插 • 即c 、d兩點對p的影響,可求出f點像素 • 最後對e 、f兩點做內插 可求得p點像素 4

  5. C / C++ • //計算bilinear需要的alpha,beta值 • alpha = point_x - prepoint_x ; • beta = 1 - ( point_y - prepoint_y ) ; • //start bilinear interpolation • gray_a = ( 1 - alpha ) * *( pImage + 8 * ( prepoint_x ) + ( prepoint_y + 1 ) ) + alpha * *( pImage + 8 * ( prepoint_x + 1 ) + ( prepoint_y + 1 ) ) ; • gray_b = ( 1 - alpha ) * *( pImage + 8 * ( prepoint_x ) + ( prepoint_y ) ) + alpha * *( pImage + 8 * ( prepoint_x + 1 ) + ( prepoint_y ) ) ; • last_gray = ( 1 - beta ) * gray_a + beta * gray_b ; • gray_value[ count1++ ] = ( int )last_gray ;

More Related