An advise for a simple pixel prediction algorithm


Could someone propose me a simple pixel prediction algorithm, any links will be apreciated. I am trying to filter an image but I want to predict the pixels surrounding the image so to avoid the edge effect.
I found this advanced algorithm but the algorithm seems a bit too complex for my purposes.
Isn’t there something simpler?


what would that be ? please explain
what is the purpose of it ?

Hi berak,
My goal is to eliminate the “edge effect”. At least I think this is the term. I am trying to filter an image with a mask. A convolution of each pixel with a 4 by 4 2d matrix. Problem is that for the border pixels there isnt a previous row and/or column or there isnt’t a next border or column according to which border we are speaking. In such a case either there is the need to predict outside pixels or to filter only the inner contents of the image and not the border pixels introducing the so called “edge effect” which I would like to avoid.

1 Like

I guess the simplest, and usually sufficient, would just multiplying the edge rows and colums - and after the effect, cropping back.

1 Like


look into cv::copyMakeBorder()

1 Like