Showing posts with label VLIV. Show all posts
Showing posts with label VLIV. Show all posts

Monday, July 27, 2009

Support for JPEG2000 in VLIV

I have added minimal support for JPEG2000 in VLIV using Jasper. Current support is not very well tested, but I have been able to load sample images. They come from The Library of Congress American Memory Maps, and take quite a while to load (at least one minute, for 5000x2700 pixel image).

The implementation takes the form a a very simple C plugin, source is available on request. It can certainly be improved much, for example I use jas_image_readcmptsample 3 times for every pixel.

Please advise if you have ideas for performance or feature improvements.

UPDATE: it is now much faster using jas_image_readcmpt on whole image width...

Friday, November 21, 2008

Biggest image I have ever created created

While browsing Wikipedia I found some code to generate nice fractals.

I have adapted the code to create really huge images.

The largest I have to date is computed at 512000 x 300000 pixels. The image is black and white, I use a binary fromat to save space (1 bit/pixel), that still makes the uncompressed file about 20 Gigabytes. Computation time on a Core2Duo 2 Ghz is about 4 days (with some pausing).

I then compute a multiresultion tiff of half size (because it looks better). The final image is about 256000 x 150000.

Here is a detail:

Code I have wrtitten uses OpenMP #pragma. I had the opportunity of trying this code in a new Intel machine that has a total of 16 threads (2 CPUs x 4 Cores x 2 Hyperthreads).  Using a single  parallelfor  instruction allowed me to gain a factor of 10 over single threaded code. Not too bad.  Of course dynamic threads ala Intel TBB would have allowed further gains, but at the expense of more code.


Tuesday, July 15, 2008

VLIV on a powerful machine

I had the pleasure to test VLIV on a bi-quad core Xeon 2.5 Ghz.
OS was Windows XP 64 bits.
It is very smooth (who would have guessed ?).
Note that recent VLIV version use multiple threads when possible.

I am now dreaming of a 30 inches display...

Vliv web site is down

It looks like VLIV web site is down.
As I have no time to check what happens, if you are interested in getting VLIV, please send a request to me.

Sunday, February 10, 2008

VLIV plugin for Windows HD images

Following the recent announcement of standardization of HD Photo by the JPEG group as JPEG XR, I have investigated implementation of this format as a VLIV plugin.

My code uses the COM API called Windows Imaging Component, available in Windows XP SP2 and Windows Vista. In theory, any image codec supported by WIC should be accessible by VLIV now, but I have only tested HD Photo images.

The API supports tile loading, even if the native format does not support it.

Microsoft also has a porting kit for non-Windows platforms.

As always, please contact me for plugin code sample, it consists of very few lines of C++.

Sunday, January 27, 2008

Vliv first support for 3D Connexion SpaceNavigator

I have implemented the necessary code to take advantage of my new Space Navigator USB device.
Right now, only panning is supported, but it is yet incredibly fun...
The Personal Edition of the device is quite affordable at $59.

Tuesday, January 8, 2008

Fun with plugins

In a previous post, I was talking about an image that contained all frames of a movie, with precalculated zoom levels.

I have now created a specific plugin, that reads AVI files, thanks to Win32's AVIFile API.

The image from the AVI is now completely virtual, and tiles are created on demand.
It is even possible to zoom out 3 levels, at a performance cost because each time you zoom out, 4 times the previous number of tiles have to be loaded.
On a sample movie (640x352), this does not look so bad and complete movie is browsable.

Here is a screendump:


As usual, source code or dll for this plugin is available on-demand.

Sunday, January 6, 2008

A sample plugin for Markus-Lyapunov fractals

Happy New Year !

I have implemented a very simple plugin for displaying Markus-Lyapunov fractals in VLIV.
For more information, see Wikipedia entry.

They are very simple to implement, but are very CPU intensive, so I have limited the number of iterations to a very low number, and the formula is the simplest (AB) by default.

As usual the image can be zoomed at very high levels.
This plugin benefits very much from multi-core CPUs.

Here is a screendump:



Please send me a message if you are interested in this plugin.

Friday, December 14, 2007

Vliv 2.5.1 handles plugins

The new version of VLIV supports dynamic loading of plugins.

Plugins are easy to write and I provide two samples.
A plugin for BMP, TIF, PPM, PNG and JPEG images is delivered, and now vliv.exe has no knowledge of image formats.

So if you feel that VLIV should know XXX format or that your implementation of YYY format is the best, all you have to do is write a plugin.

Tuesday, December 11, 2007

Vliv 2.5.0 is out

This new version includes a much improved memory manager that allows really huge images to be loaded at very little memory cost.

It also includes a .new sample virtual image loading.

Also included is experimental multi threading support for tile loading.

Saturday, December 8, 2007

The Last Supper 16 gigapixel image

The team from Haltadefinizione has once again created a very detailed image of a large painting, this time it's The Last Supper by Leonardo da Vinci.

While always impressive, I think a limit has been reached, because higher resolution (and thus more gigapixels) would not allow for a better detail, as they have reached the point where at maximum zoom, we can only almost see molecules of paint...

To give an idea, the painting is 880x460 cm while the image is 172181x93611 pixels, so each pixel is only 0.05x0.05 millimeter...

Wednesday, December 5, 2007

Vliv as a fractal viewer

In a previous post, I was talking about dynamically generated tiles.
I have prototyped this and implemented a simple algorithm for generating dynamically tiles, a Newton fractal generator.

The idea is simple, given a point in the complex plane, and a polynomial, apply the Newton method to find out where the point ends. Each starting point eventually converges to one of the roots of the polynomial, that gives the base color. This color is then shaded using the number of iterations it takes to be around the root (there are of course other coloring algorithms, I choose this one because it is really simple to implement). Computation is done at a single tile level.

The beauty of this is that, using VLIV tiling features, the image size is virtually not limited, so viewing an image of size 256000x256000 is possible, and even not slower than a smaller size.

The complete source code for my sample implementation is less than 200 lines of code, most of it beeing my not optimal Newton method implementation.

Here is the result:


Imagine if the idea was implemented in Google Earth (or Maps), using Google storage and computation capabilities, it would make a nice feature...

This Wikipedia page has more information on Newton Fractals.
Simon Tatham has also a very detailed page on this topic.


Sunday, September 30, 2007

Integrating your own gigapixel images in Google Earth

I have found that the processing necessary to integrate very large images in Google Earth 4.2 is, if not easy, possible.

All you need is create a version of your image padded to a power of two in both dimensions, then scale by 2 recursively until image fits in a 256x256 pixels tile.

Then you have to subdivide each image in single tiles.

Finally you have to create a suitable KML file.

The documentation for this feature can be found here.

I have some scripts that automate the process for a given TIFF image.

Saturday, September 22, 2007

Google Maps like nagivation of images

Viewing images on the Web is not always very user friendly, mainly because Web Browsers do not allow arbitrary zooming and panning in images.

A more and more common way to solve this problem is the use of JavaScript with custom nagigation of images, using concepts such as pyramidal organization of images.

A well known implementation of this concept is Google Maps.

While not directly related to very large images, because zooming does not refine information (images are not so-called very large), an interesting work has been conducted by Siva Dirisala, on a variety of Nasa images.

By using more and more of these ideas, we should expect more and more very large images (and more generally all images) to be really in-place zoomable, a nice addition to content of Web pages.

Sunday, August 26, 2007

Gigapxl images now available in Google Earth

Everybody has noticed that Google Earth 4.2 now allows sky view. But few have noticed that it also allows all Gigapxl images viewing.

All you have to do is to allow "selected content" and choose Gigapixl Photos.

Locations are dispatched all around the United States.

Wednesday, August 15, 2007

Vliv source code for sale

During the 3 or 4 years I have proposed Vliv as Shareware, I had exactly 4 registering customers. So I decided to make Vliv Freeware and not crippled in any way. Since then I have had 3 people interested in buying the source code (that is available at a reasonable price), so my revenues have been much more important.

It should be noted that these demands are not regular at all, and since the 3 I had at the beginning, I had no more request for source code.

Tuesday, February 13, 2007

External libraries and tools used to build VLIV

VLIV is written in pure C (about 3000 lines, not counting resource file). I am using numerous external libraries to load some image types, as well as other tools.

Libraries are:
  • libtiff for TIFF files handling
  • IJG JPEG library for JPEG amd JPEG-in-TIFF handling
  • libpng for PNG handling
  • zlib (indirect usage through libpng) for Deflate compression in TIFF images
  • OWND library for intellimouse handling
External tools I use are:
  • UPX for compacting the VLIV executable
  • NSIS for the installer
All these tools are very well designed, and have saved me lot of time in getting VLIV done.