Monochrome Photo PCA
file_upload
file_download
help
Help

Monochrome Photo PCA Help

×

Monochrome Photo PCA is a tool to convert color photos to black and white using principal component analysis.

It is developed by Jonas Wagner. You can read more about it in this blog post.

Usage

Open an image by drag & dropping it onto the page or by clicking Open Photo.

You can then try out the different conversions and histogram equalization.

Please note that the differences between the conversions can be subtle. You will need a decent monitor to appreciate them.

Conversions

Original

Displays the original image. Auto Contrast and Equalize Histogram do nothing.

PCA Monochrome

Uses the values on the first principal component converted back to sRGB. The PCA is calculated on the centered color values in gamma space. The actual projection of the colors onto the first principal component is then performed using the linear color values.

Y = pc1 (pc1 · color)

PCA Black and White

Calculates the PCA as in PCA Monochrome.

But rather than using the colors on the first principal component it uses the coordinate directly.

Y = color · pc1

The resulting values are then gamma encoded again for display.

PCA Black and White (scaled)

The same as PCA Black and White but the color values are divided by their variance first to normalize them.

PCA Black and White (flipped)

The same as PCA Black and White but the eigenvector of the first pca component are swapped so that the biggest component will become the smallest and vica versa.

PCA Black and White (complementary)

The same as PCA Black and White but using the 'compmenentary color' of the eigenvector of the first principal component.

Luminosity

Straight black and white conversion using the relative luminance values of the sRGB Primaries.

Y = 0.216R + 0.7162G + 0.0722B

Average

Conversion using the following coefficients:

Y = 0.333R + 0.333G + 0.333B

Red Filter

Conversion using the following coefficients:

Y = R

Green Filter

Conversion using the following coefficients:

Y = G

Blue Filter

Conversion using the following coefficients:

Y = B

Auto Contrast

Stretches the contrast by setting the black point to one above the minimal values and the white point to one bellow the maximal value.

Histogram equalization

Performs a simple histogram equalization on the image and blends the result with the image. At the left position the histogram equalization is of. In the right position it's a 50/50 blend. This is very basic code and does not even take into account gamma encoding.

Dithering

To avoid banding and for optimal representation of all the tonality in the image this tool employs a dithering scheme. For each RGB channel half of the quantization error is diffused via stucki dithering. The other half of the error is resolved via random dithering. Thereby the error is both spread among the colors withing a pixel and to neighboring pixels. This process is the result of me playing around. Experimentally this seems to be a good compromise but I'm sure a better solution could be found with some more research.

FAQ

Are my images uploaded to your server?

No! I respect your privacy. All of your images stay on your computer. They are never uploaded to any cloud or server.

Can I open RAW images using this app?

No, RAW images are not supported. The highest quality format you can use is 24-bit PNG. PNG images are also saved as PNG to minimize losses. If you need support for higher bit depths or RAW please have a look at the gmic plugin for the gimp.

Changelog

1.0.0 (2016-07-07)

  • Initial release

Open Source Libraries

This software was built using the following open source components. I want to thank all of their authors for making my life easier and projects like this possible.

Fonts / Icons

Contact

You can find my contact details on 29a.ch/about.
Close