Brightness (and Darkness)
Increasing brightness is another simple algorithm. All you do is add (or subtract) some
arbitrary value to each pixel:
new_pixel_value = pixel_value + 10
You must also make sure that no pixel goes above an exceeded value. With 8 bit greyscale,
no value can exceed 255. A simple check can be added like this:
if (pixel_value + 10 > 255)
{ new_pixel_value = 255; }
else
{ new_pixel_value = pixel_value + 10; }
And for our lovely and now radiant Mona Lisa:
The problem with increasing brightness too much is that it will result in whiteout.
For example, if your arbitrarily added value was 255, every pixel would be white. It also
does not improve a robot's ability to understand an image, so you probably will not find
a use for this algorithm directly.
Addendum: 1D, 2D, 3D, 4D
A 1D image can be obtained from use of a 1 pixel sensor, such as a photoresistor.
As metioned in part 1 of this vision tutorial,
if you put several photoresistors together, you can generate an image matrix.
You can also generate a 2D image matrix by scanning a 1 pixel sensor,
such as with a scanning Sharp IR.
If you use a ranging sensor, you can easily store 3D info into a much more easily
processed 2D matrix.
4D images include time data. They are actually stored as a set of 2D matrix images,
with each pixel containing range data, and a new 2D matrix being stored after every X seconds of time
passing. This makes processing simple, as you can just analyze each 2D matrix seperately,
and then compare images to process change in time. This is just like film of a movie, which is actually
just a set of 2D images changing so fast it appears to be moving. This is also quite similar to how a human processes temporal
information, as we see about 25 images per second - each processed individually.
Actually, biologically, its a bit more complicated than this. Feel free to read
an email I recieved from Mr Bill concerning biological fps.
But for all intents and purposes, 25fps is an appropriate benchmark.
Now that you understand the basics of computer image processing in our
Computer Vision Tutorial Series, you may continue on
to Part 3: Computer Vision Algorithms.