I have a digital image of an old black and white picture. Is it possible, using Mathematica, to convert this old picture into a black and white image? For example:

enter image description here enter image description here

This transformation was done using Photoshop and a special neural filter. But is it also possible with Mathematica?


1 Answer 1


Note I did not write any of this code, netevaluation is taken directly from the Examples -> Evaluation Function of the "ColorNet Image Colorization Trained on ImageNet Competition Data" page on the Wolfram neural net repository:

netevaluation[img_Image] := 
      "ColorNet Image Colorization Trained on ImageNet Competition \
Data"][img], Prepend[Reverse@ImageDimensions@img, 2]], 
   ImageData[ColorSeparate[img, "L"]]], Interleaving -> False, 
  ColorSpace -> "LAB"]

It produces a colored image, although in this specific case it seems the photoshop output is more vividly colored compared to this output:

img = Import["https://i.sstatic.net/WVZWNm.jpg"];
img = ColorConvert[img, "Grayscale"];

colored = netevaluation[img];

ImageCollage[{img, colored}]

Mathematica graphics


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.