8

How to convert modern day photos to the look and feel of those Polaroid photos ? References and/or sample codes are welcome. Thanks!

ohho
  • 50,879
  • 75
  • 256
  • 383

5 Answers5

7

Convert the images to HSV (cv::cvtColor) then look at adjusting the hue/saturation values

see http://en.wikipedia.org/wiki/HSL_and_HSV for a rather too technical article

Martin Beckett
  • 94,801
  • 28
  • 188
  • 263
  • 1
    HSV is a very broken color model. Performing any operations which hold "L" or "V" constant while translating or scaling "H" and "S" will seriously distort the perceived brightness. Instead use YUV, and you can hold "Y" constant while scaling the "U" and "V" components or rotating them in the UV plane to adjust hue and saturation in a way that's non-destructive to the true "brightness" (luminosity, aka "Y"). – R.. GitHub STOP HELPING ICE Dec 29 '10 at 04:41
  • 6
    But it's hard to do washed out polaroid type colors in YUV. The OP isn't trying to preserve the image they are trying for a certain artistic distortion – Martin Beckett Dec 29 '10 at 04:48
  • Does polaroid really reverse the brightness of samples based on their hue (i.e. make part A of an image look darker than part B, due to its hue, when in fact B is darker than A)? – R.. GitHub STOP HELPING ICE Jan 05 '11 at 16:26
  • The cv::cvtColor docs can be found at the OpenCV site: http://opencv.willowgarage.com/documentation/cpp/miscellaneous_image_transformations.html#cv-cvtcolor – Chris O Jan 10 '11 at 21:52
4

Here is a video showing how to do it in GIMP: http://www.youtube.com/watch?v=1LAUm-SrWJA and here is the tutorial: http://howto.nicubunu.ro/gimp_polaroid_photo/

You can look at various steps (each one of them would be some basic image processing operation) and glue together to make your own code. I think each GIMP operation is in turn available as a script-fu script/code.

1

I would suggest using blend modes along with the HSV conversion.

This website below has been of tremendous help to me while processing images to give them an 'old' look.

http://www.simplefilter.de/en/basics/mixmods.html

Do note that you need to mix and match different blend modes with color tints and blur algorithms to achieve the various Polaroid effects.

Chetan
  • 73
  • 6
1

A good starting point would be look at ImagemMagick. It already does have cmdline options to change the hue and saturation of a photo. Find a parameter set that gives you the result that you want and look at the source code to see what it is doing behind the scenes..

Sridhar Iyer
  • 2,772
  • 1
  • 21
  • 28
0

Programmatically, you'd want to use an image processing library such as OpenCV.
A large part of the effect (besides adding the white frame) is a change in the image color balance and histogram. This is due to the degradation of the chemical elements in the Polaroid film.
The types of operations you would need to apply to the image:

  • Changing color spaces such as HSV;
  • Desaturation;
  • Blending with color filters (this is the suggested way here);
  • Changing the brightness and contrast of the image channels for the chosen color space.

Obviously, most tutorials about how to do this in Photoshop (or other photo editing apps), can be converted into programs using OpenCV.

Adi Shavit
  • 16,743
  • 5
  • 67
  • 137