Image Manipulation

Problem

We want to improve upon pictures of blackboards so that they become legible.

We approach the problem by blurring the image, taking the average of the pixels and then taking the difference of it with the original image. Any point with a large difference between the average pixel and the pixel itself must have a modest amount of contrast in a small neighborhood around the point (as opposed to simply high contrast across the image), and so is likely to contain information.

We then convert the image to black and white and take the negative image to improve upon the contrast.

legibility[image_]:=ColorNegate[Binarize[ImageSubtract[image,MeanFilter[image,10]],0.1]]

legibility[URLExecute["http://drorbn.net/bbs/shots/17-1750-171013-121553.jpg"]]

legibility[URLExecute["http://drorbn.net/bbs/shots/17-1750-171016-111042.jpg"]]