1
$\begingroup$

When high or low pass filters are being applied to an (grayscale) image, the borders need to be handled separately. They could be filled with 0's or 255's (b/w), repeat the nearest pixel value, or even the image could be repeated.

How do the different border-handling-methods impact the result of he filtering operations? What are the pro's and con's of using one method over an other with a HPF to improve the edges in a picture or a LPF to blur it?

OpenCV for example has various BorderTypes like BORDER_REPLICATE or BORDER_CONSTANT but I can't find any information about what happens when I use one of them with a HPF or LPF.

$\endgroup$
0
$\begingroup$

HPF or LPF linear operators. It means that an operation at pixel position i, j will only be affected by neighbors within the window size of your filter. Pixels outside the filter will not play a role - in other words, the effects of any filtering operation is localized around its support. Typically, if the image size post filtering is not a concern, we 0 pad an image and crop out the contents near the border with a size equal to half the filter window. To maintain the same size, it is advisable to replicate border values.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.