I am using opencv to detect person in live video feed. I need to save the image of the person detected. But here the person is not standing and is keeps moving due to which when I am about to save the image, it is saved in very blurry format, just like below image:
As you can see the image is not very clear and has a lot of blurriness into it. Face is also not clear. Is there anyway we can remove the blurriness from image. Thanks
解决方案
You can try sharpening the image using cv2.filter2D() and a generic sharpening kernel
Here are other sharpening kernels you can experiment with
import cv2
import numpy as np
image = cv2.imread('1.jpg')
sharpen_kernel = np.array([[-1,-1,-1], [-1,9,-1], [-1,-1,-1]])
sharpen = cv2.filter2D(image, -1, sharpen_kernel)
cv2.imshow('sharpen', sharpen)
cv2.waitKey()