When I have to sharpen an image using opencv, I use:
#Create our shapening kernel kernel_sharpening = np.array([[0,-1,0], [-1, 5,-1], [0,-1,0]])# applying the sharpening kernel to the input image & displaying it. sharpened = cv2.filter2D(image, -1, kernel_sharpening)
In above code sharpened is our resultant image. As you can see in above code I used opencv function named filter2D to perform convolution of input image with the kernel, and as a result I got sharpened image.
Recently I went through this link regarding image Super-Resolution (link)
And found out Keras has something similar to filter2D and Keras calls it Conv2D.
Its syntax is as follows:
dis2 = Conv2D(filters=64, kernel_size=3, strides=2, padding='same')(dis1)
My question is what is the difference between opencv filter2D, and Keras Conv2D ?
(I assume both do the same role of convolution of image with a kernel, I may be wrong pls correct)