| 1 |
|
| 2 |
LiquidRescale library 0.4.0 |
| 3 |
=========================== |
| 4 |
|
| 5 |
Table of contents |
| 6 |
----------------- |
| 7 |
* Introduction |
| 8 |
+ Library features |
| 9 |
* Installation |
| 10 |
+ Requirements |
| 11 |
+ Normal setup |
| 12 |
* Using the library |
| 13 |
* References |
| 14 |
* Copyright |
| 15 |
|
| 16 |
|
| 17 |
+ Introduction |
| 18 |
-------------- |
| 19 |
|
| 20 |
The LiquidRescale (lqr) library provides a C/C++ API for |
| 21 |
performing non-uniform resizing of images by the seam-carving |
| 22 |
technique. |
| 23 |
|
| 24 |
++ Library features |
| 25 |
|
| 26 |
The library takes images in plain array format as input |
| 27 |
and converts them to a multi-size representation. |
| 28 |
Following is a list of features: |
| 29 |
|
| 30 |
* Easy to use and fully documented API |
| 31 |
* Currently supports 8 bit to 64 bit per channel images |
| 32 |
* Support for different color models: grayscale, RGB, CMY |
| 33 |
and their variants, and even custom ones |
| 34 |
* Areas in the image can be marked for preservation or |
| 35 |
discard, or for additional seam rigidity |
| 36 |
* Once the image has been fully processed, the scaling can |
| 37 |
be done in real-time. In fact, the information can be saved |
| 38 |
and read out later without any further processing |
| 39 |
* The resizing is done with a single function which |
| 40 |
automatically performs all the necessary operations; it |
| 41 |
can also work in successive steps without wasting |
| 42 |
computational time |
| 43 |
* Possibility to tune the carving operation by letting the |
| 44 |
seams be less connected, or more rigid, or both (the |
| 45 |
rigidity can be also be modulated through a mask, to get |
| 46 |
a differnet behaviour in different areas of the image) |
| 47 |
* Can export and import the visibility map (the seams) |
| 48 |
* Other images can be attached and undergo the same carving |
| 49 |
process as the parent image |
| 50 |
* The automatic feature detection algorithm can be tuned |
| 51 |
by selecting among different energy gradient functions, |
| 52 |
and easily defining custom ones |
| 53 |
* Reports progress through a customisable interface |
| 54 |
* A signalling system permits to cleanly handle errors |
| 55 |
* Portable to all major OS's |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
+ Installation |
| 60 |
-------------- |
| 61 |
|
| 62 |
++ Dependencies |
| 63 |
|
| 64 |
The lqr library depends on the glib-2.0 libraries |
| 65 |
|
| 66 |
++ Normal setup |
| 67 |
|
| 68 |
The build package uses autotools and libtool, so the installation |
| 69 |
commands on Unix systems are simply |
| 70 |
|
| 71 |
./configure && make && sudo make install |
| 72 |
|
| 73 |
The last step requires administrative privileges. |
| 74 |
(Note: the default installation path is /usr since version 0.4) |
| 75 |
|
| 76 |
If you want to also install the man pages for the library functions, |
| 77 |
add the option `--enable-install-man' in the call to ./configure. |
| 78 |
|
| 79 |
If you want to disable legacy macro names which do not begin with |
| 80 |
LQR_ then add the option `--diable-legacy-macros' |
| 81 |
|
| 82 |
See the INSTALL file for a full description. |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
+ Using the library for development |
| 87 |
------------------------------------- |
| 88 |
|
| 89 |
In order to use the library functions and structures from |
| 90 |
a C or C++ program, you have to add this include line in |
| 91 |
your program: |
| 92 |
|
| 93 |
#include <lqr.h> |
| 94 |
|
| 95 |
At compile time, you can take advantage of pkg-config to set |
| 96 |
the proper flags. |
| 97 |
|
| 98 |
In the `examples' directory you can find a basic example program, |
| 99 |
`liquidrescale-basic', and a full-featured demo program, |
| 100 |
`liquidrescale', together with a simple Makefile. Both |
| 101 |
programs are fully commented. |
| 102 |
|
| 103 |
The "basic" version demonstrates how to use the strictly-needed |
| 104 |
library functions, while the full version uses almost all of the |
| 105 |
API methods provided. The Makefile shows how to set the compilation |
| 106 |
flags. |
| 107 |
|
| 108 |
See the README file in that directory for more information. |
| 109 |
|
| 110 |
The complete manual and reference for the library, together with |
| 111 |
some additional notes, can be found in the `docs' directory in |
| 112 |
docbook format. The reference is also provided in man page format. |
| 113 |
The makefile in that directory (hopefully) generates the manual in |
| 114 |
html format, using xsltproc; then you'll find the index named after |
| 115 |
`liblqr_manual_index.html'. |
| 116 |
See the README file in that directory for further information. |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
+ References |
| 121 |
------------ |
| 122 |
|
| 123 |
The library implements the algorithm described in the paper |
| 124 |
"Seam Carving for Content-Aware Image Resizing" |
| 125 |
by Shai Avidan and Ariel Shamir, which can be found at |
| 126 |
http://www.faculty.idc.ac.il/arik/imret.pdf |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
+ Copyright |
| 131 |
----------- |
| 132 |
|
| 133 |
Copyright (C) 2007-2009 Carlo Baldassi <[email protected]> |
| 134 |
|