Google
 
HomePhotography / GalleryComputers InvestmentLinks
ComputersPDAProgrammingWeb

Programming and Algorithm tips & trick

I will share some algorithm (not source code) that I learnt from the IOI training here. 

For new IT/CS students, you will need to think in a computer's way to to be able to understand computer.  If you have some problem in learning computer, please feel free to contact me and I'll help you to understand computer, but please don't ask me to do your assignment!

Digital Image Stabiliser

Algorithm concept for real Digital Image Stabiliser for digital camera.  Digital camera's sensor receives photon from light.  The brighter the light, the more photon will be received in a given moment.  On the darkness, there will be less photon available, so photographer uses slow shutter to put more photon to the sensor, which without tripod result in blurry images.  The core of this trick is by using multiple fast exposure to get the same amount of photon with single slow exposure.  Then combine the shots together using pattern matching algorithm to get it aligned properly.  When done properly, this will result in almost the same shot with single long exposure, but much sharper.  To proof this technique, you can try to shot dark scene at fast shutter. Then align the image and combine it using add function manually in Corel/Photoshop.  This will result in a supersharp image with good exposure.  My idea is to do it automatically in digital camera's firmware.  You can see this example below to have a better idea

  1. To shot at 1/10 of a second, can be shot into 10 images at 1/100 seconds, or may be 100 images at 1/1000 seconds.
  2. The algorithm will then properly align the images together with the image 1 as the reference image and then adding image 2, 3, 4 etc to get a properly exposure image.

Advangate

  1. We can do real exposure compensation!  If the image is overexposed at 10 images, then we can use 8 or 9 images to produce less exposed image.

At what costs? 

  1. Loss of resolution (10 MP camera might only produce 9 MP image)
  2. Requires fast processor and large memory
  3. Not suitable for panning and moving subjects