Closed CX-XC closed 9 months ago
For color images, you can first estimate the kernel using the grayscale version of the image and the deblur each of the channels using the kernel. The pseduocode would look something like this.
# Get the grayscale image as follows:
y_grayscale = (y[:,:,0] + y[:,:,1] + y[:,:,2])/3
k_est = estimate_kernel(y_grayscale) ## Your kernel estimation method here
x_out = np.copy(y)*0
for ii in range(3):
x_out[:,:,ii] = deblur(y[:,:,ii], k_est) ## Use the non-blind solver here.
return x_out
hello! I would like to ask how to enhance my own image. The input in the code is a grayscale image, can only handle single channel images? thanks