Beware of parallelization

A recent question on stackoverflow raised the problem of a fast algorithm to count the unique colors in an image (Faster algorithm to check the colors in a image). My answer what that this kind of problems are suited for parallelization. However, parallelization may only help when used judiciously. To demonstrate the point I have…

Display images as you type in C++

There was a question on Stackoverflow about a C++ project displaying an image as you type. Here is the original question: I am writing a very simple program in C++ that listens to keyboard input, but what I want to output is much more difficult than I expected. For every key I press, I want…

Using ColorMatrix for Creating Negative Image

.NET provides two classes for image transformations: Matrix, used for geometric transformations, and ColorMatrix, used for color transformations. One of such color transformations is inverting or negating. This means subtracting each color component from 255. Black (0,0,0) becomes White (255, 255, 255), and Green (0, 255, 0) becomes Magenta (255, 0, 255). You can find…