[Algorithms] Image compression
Brought to you by:
vexxed72
|
From: Richard F. <ra...@gm...> - 2009-08-07 10:41:57
|
Not sure if i'm reinventing the wheel here, but I've been working on an in house image compressor for our DS games, and had an idea that i thought was a novel approach to solving the lossy compression problem. I started with DCTs (which were terribly slow on the DS, so were soon discouraging), then tried wavelets, which did provide a great speed increase, and good image quality, but after working with them for a while i had the idea that maybe what we need to encode is the terrain of the image. not the two distinct 1D signals. So, with the idea of "doing it in 2D" in mind, i tried to develop an algorithm that instead of taking the differences between pixels, it assumes that the pixels are part of a larger image and starts from an assumption that anything other than the predicted value of a pixel is notable. I took the vertical gradient, horizontal gradient, and the _saddle_ (diagonal difference / Determinant), and these were then the values recorded for later use in the compression. This 2D approach made a small but significant difference in the compressability of the image over wavelets, but I'm not brilliant at compression, just not incompetent, so I requested the right to start a source-forge project based on the library so that all the other games developers could both benefit and help me make this fast and quite good compressor into something really cool for us all to use. https://sourceforge.net/projects/mergelet/ Sorry that my code is a bit wandery in places, and I don't use comments much, I tend to comment with variable names and structure of code instead. Also, I'm new to source-forge, so don't know how everything works yet. -- fabs(); Just because the world is full of people that think just like you, doesn't mean the other ones can't be right. |