score:1

Accepted answer

first, you need to identify where is the problem:

  • is it on your implementation of the vignette filter?
  • or is it in the way the images are being displayed on the screen?

to assist you on that, be sure vig and img1 have the same dimensions before they undergo any processing. save those images to the disk and inspect their width/height values.

then execute your filter, and save the output image to the hard disk before it's displayed on the screen. if the saved image looks ok, then you know for sure the problem is the way that the images are being displayed.

a while back i implemented a vignette filter using c++ and opencv, you can take a look at the source code and compare it to what you are doing. here's an example:

input:

output:


Related Query

More Query from same tag