Viewing a single comment thread. View all comments

MagiMas t1_j9j8gtn wrote

Yes, but it's usually done with a moving average.

So if you have the pixel values 1,3,2,4,3,1,5,2 you could always average in groups of three

1,3,2 => 2
3,2,4 => 3
2,4,3 => 3
4,3,1 => 2.66
3,1,5 => 3
1,5,2 => 2.66

so the blurred image is

2,3,3,2.66,3,2.66

An actual blur filter is usually a bit more complex, a gaussian blur for example weights the original pixels in different amounts (according to a gaussian curve). So instead of just taking the average of 1,3,2 you'd calculate

0.25 * 1 + 0.5 * 3 + 0.25 * 2 = 2.25

And you can choose how broad you want to make the window of values that you consider in the operation etc.

Crucially, if we write the simple blurring operation from the top as a set of equations with the original pixel values unknown and named as x_i:

(x_1 + x_2 + x_3) / 3 = 2
(x_2 + x_3 + x_4) / 3 = 3
(x_3 + x_4 + x_5) / 3 = 3
(x_4 + x_5 + x_6) / 3 = 2.66
(x_5 + x_6 + x_7) / 3 = 3
(x_6 + x_7 + x_8) / 3 = 2.66

you can see that we have 8 unknown values but only 6 equations. If you remember the maths of systems of equations from school we need 8 equations to fully determine 8 unknowns. So this problem is under-determined even in a case of such a simple blurring operation where we know exactly which kind of operation was done to the original image. In a more realistic scenario, where we don't know the exact type of blurring operation done to an image, it gets even less feasible to reverse the operation without somehow using prior knowledge of how unblurred content usually looks like (which is what neural networks are doing when they are used to scale up and unblur small images).

3