Dealing with Boundary conditions / Halo regions in CUDA

后端 未结 3 2143
甜味超标
甜味超标 2020-12-05 16:28

I\'m working on image processing with CUDA and i\'ve a doubt about pixel processing.

What is often done with the boundary pixels of an image when applying a

3条回答
  •  佛祖请我去吃肉
    2020-12-05 17:15

    A common approach to dealing with border effects is to pad the original image with extra rows & columns based on your filter size. Some common choices for the padded values are:

    • A constant (e.g. zero)
    • Replicate the first and last row / column as many times as needed
    • Reflect the image at the borders (e.g. column[-1] = column[1], column[-2] = column[2])
    • Wrap the image values (e.g. column[-1] = column[width-1], column[-2] = column[width-2])

提交回复
热议问题