Four Retouches of One Doorway

Images as DataMedium+20 XP+20

Four Retouches of One Doorway

A photo of a dark doorway in a pale wall is cropped to a small grayscale grid, 333 rows by 666 columns. All three rows are identical:

c0c1c2c3c4c5
each row404040180180180

An edge detector compares every pixel with its right-hand neighbour and records the size of the change between them, ignoring whether brightness went up or down. Those sizes, laid out as a grid of 333 rows by 555, are the photo's edge map: the edges-only version of the picture.

The photo is then retouched in four different ways. Pixel values are stored from 000 to 255255255, so any value that would go above 255255255 is held at 255255255.

retouchwhat happens to every row
Negativeevery value vvv becomes 255−v255 - v255−v
Halvedevery value is divided by 222
Brightened100100100 is added to every value
Softenedthe pixel in c3 becomes 110110110, so each row reads 40,40,40,110,180,18040, 40, 40, 110, 180, 18040,40,40,110,180,180

Which retouched photo has exactly the same edge map as the original?

0
0
0
0
170
0
0
0

An edge is not a dark pixel or a bright one. It is the change between them — the one place the difference is large.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.