This algorithm comes from author's project homepage and is patented. So use this algorithm carefully when you wish to utilize for commercial purposes. Good luck.