FIASCO—An Open-Source Fractal Image and Sequence Codec
The coding method of FIASCO is basically a straightforward generalization of the JPEG method. The JPEG algorithm subdivides an image into a set of image blocks of 8x8 pixels. Each of these blocks is then independently encoded by a linear combination of 64 basis images (the cosine basis, see Resources for details) as shown in Figure 2. The coefficients of these block approximations are then quantized and stored in the output file.
In Figure 2 the image is subdivided into 8x8 pixel blocks. Each of them is approximated by a linear combination of the cosine basis. The approximation coefficients (a and b in the figure) are then quantized and stored in the JPEG file. FIASCO extends this concept in the following ways:
The image is adaptively subdivided into subblocks (squares or rectangles) of different size. Smaller blocks than those used in smooth regions are used in difficult areas.
Each image block is approximated by image blocks of a dynamic dictionary. The dictionary not only contains a fixed set of basis images (e.g., the well-known JPEG cosine images) but also all previously encoded image blocks. This method is related to text compression algorithms, which also use dynamically generated dictionaries (e.g., LZW compression).
When coding videos, only the difference between subsequent frames is encoded by hierarchical motion compensation.
FIASCO exploits self-similarities within single pictures, and also sequences of pictures, to remove spatial, spectral and temporal redundancies, making it a typical fractal coding method.
The FIASCO package is released under the terms of the GNU General Public License and is built up of command line applications and a library to compress, decode and visualize images and videos. You just have to run the typical GNU build process (./configure;make;make install) to compile and install the FIASCO package. FIASCO is entirely written in ANSI C and should compile on most UNIX platforms.
Usage of the commandline FIASCO coder and decoder is similar to the cjpeg and djpeg applications of the IJPEG package (Independent JPEG group), which should be part of every Linux distribution.
cfiasco --quality=10 --output=video.fco frame0*.ppm
The above encodes the given video files (in raw PNM format) with quality ten, writing a single FIASCO file video.fco. Please note that you cannot compare the quality settings of FIASCO with JPEG. The typical quality range of FIASCO is 1-100, which corresponds to a JPEG quality less than five. FIASCO is intended for very low bit rates only; i.e., you cannot compute compressed images that correspond to a JPEG quality of 75.
dfiasco, the FIASCO decoder, is also used like djpeg:
dfiasco --output=image.ppm image.fco
This decodes the given FIASCO file and writes a new image in PNM format. But dfiasco also contains a display module to show video frames in an X11 window. Currently, only an Xlib-based window with the typical set of control buttons is available (play, stop, forward, etc.). Hopefully, this simple decoder and the FIASCO library provides a good starting point for developers to support the FIASCO format in their favorite image and video programs (Mozilla, GIMP, etc.). Please visit the home page of FIASCO to get some compressed images and videos (see Resources).
The coding and decoding functionality of FIASCO is available in a shared library. Data type definitions and function prototypes are provided by the include file fiasco.h, which is installed in the $prefix/include directory.
You can simply compress images or videos in your application by a function call:
fiasco_coder (image_names, fiasco_name, quality, NULL)
This call compresses the image file(s) given by the array image_names with the predefined approximation quality (1.0-100.0) and creates the new FIASCO output file fiasco_name. Several advanced compression parameters can be adjusted by using an optional parameter object which I don't describe here, see the FIASCO manual pages for details.
In order to decode a FIASCO file in your application, you have to instantiate an object of the decoder class fiasco_decoder_t with a call of the constructor function fiasco_decoder_new (fiasco_name, NULL). fiasco_name specifies the file to decode whereas the second parameter is an optional parameter object to adjust the behavior of the decoder.
Individual frames are then decoded by subsequent calls of the method fiasco_decoder_get_frame. These frames are returned in an internal FIASCO format, which then can be rendered in different ways to fit the needs of your application. For more information about the compression library, refer to the manual pages shipped with FIASCO.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Stunnel Security for Oracle
- SourceClear Open
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Google's SwiftShader Released
- Tech Tip: Really Simple HTTP Server with Python
- Parsing an RSS News Feed with a Bash Script
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide