Tuesday, May 24, 2011

Vliv support for WebP format

Now that WebP is supported widely, I have created the little plugin for Vliv that allows loading a webp image.
It is very simple, as only two API calls are necessary, WebPGetInfo and WebPDecodeBGRInto

On a sample image found on the web it seem to work fine, and is quite fast. The final plugin dll is only 106496 bytes thanks to a precompiled webp library for Windows (libwebp-0.1.2-windows).

Vliv framework is an ideal way of testing new formats as its API is very simple, the entire code for loading WebP images is 85 lines of C.

Source code is available on demand.

Wednesday, February 9, 2011

Google Art Project

Google Art Project is a collection of very high resolution images of paintings/photos.
Unfortunately it is only available through the Web...
So I made a quick hack to generate offline images suitable for display with my viewer, VLIV.
It is incredibly easy to get the data, but I will not disclose how, since the Google Art Project license prevents it.

Here is a screendump of Van Gogh's Starry Night in Vliv.

Friday, July 30, 2010

New world record for panoramic image

This one is 70 gigapixels (590508 x 120750).
Very impressive.
They are using Silverligh to display on the Web.
Such a large image should be viewable by VLIV, it just need the file (actual format is unknown, looks to be PPM) to be converted to TIFF (actually a 64 bit TIFF).
Final image size is about 200 Gigabytes, not something you download or store easily !

Wednesday, July 28, 2010

Download VLIV latest version 2.5.2

Here is the direct DropBox link, and some sample images :
These are tiff images that have pyramidal organization. You can also load normal Jpegs (preferably large ones), so that you can see virtual tiling in action.
Here is a medium one (15 megabytes)

Thursday, October 22, 2009

OpenGL Vertex Buffer Objects

I recently updated my 3d object rendering code to VBO, introduced in OpenGL 1.5. Using them is very simple, and only need 4 additional API calls. Basically, the vertex data, normals and indexes are sent to the graphics card, stored in there, and accessed through an ID. At draw time, only one or two call with IDs are sufficient and performance is very much improved over using previous Vertex Arrays API, because no data is transfered. My frame rate was multiplied by 2 at least and I can now display up to 150 000 000 tris/s on my GeForce 8800 GTS, hardly the fastest card these days.


I also found GLEW library during this work, very nice and useful to develop OpenGL applications, because of poor header support in MS SDK. It allows using API calls without bothering if they are in headers or not, thanks to clever dynamic loading features at runtime and extensive coverage of OpenGL extensions.

Update: After some tests, the number of tris/s is about 230 000 000 on my 8800 GTS.

Thursday, October 1, 2009

Chmutov surface 3d printed



I received today a new object I have computed, it is a Chmutov 8 order surface (see this for a description). I used Shapeways service and the object is 5cm square. The material is called "white glaze" and was actually quite cheap thanks to a promotion. The result is very nice, with a glossy finish and handling the object is a pleasure.

Here is a picture.

Friday, September 25, 2009

Parallelizing code

I have modified my fractal generation code to use Intel TBB. While before, on an 8 core machine I was only able to get 13% CPU usage, I now have almost 100%.

The first part I did was layer generation. This means a single parallel_for.

I have then parallelized the triangle generation part (the so-called marching cubes). To do so I have a simple parallel_for and each thread writes its computed triangles to a shared concurrent_vector. Very simple and impressively effective.

So this scales quite well and I was able to achieve an overall speedup of 6x on a 8 core machine, over a single core.

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...

Wednesday, July 8, 2009

New version of IJG JPEG library

A new version has appeared on IJG web site. It looks like new version called 7 (dated 27-Jun-2009) has few changes from previous one (6b dated 27-Mar-1998 !). Mostly it says that scaled DCT are implemented, I have found that this version is not binary compatible with previous one wrt scaling. I will have to experiment a little more before using this version in Vliv.

One of the other libs I use is zlib, latest version 1.2.3, dated July 18, 2005.

LibPng has not been updated for a while, only libtiff seems to be work in progress.

I am still looking for a JPEG2000 C library that is as good and simple as these ones.

Monday, July 6, 2009

Another impressive large image

Very large images do not have to be panoramas. This one is created by stitching hundreds of images coming from a Scanning Electron Microscope. You can find more information here.

Monday, January 26, 2009

Gigapixel images becoming mainstream on the web

Here is the latest gigapixel image available on the web. As it is related to Barack Obama's inaugural address, it has received all possible attention and reviews. Image credit goes to David Bergman.

While not new, such a large image is very interesting because of how it has been made, and how it is distributed.

The process for image creation involves a robotic arm called Gigapan Imager, that automatizes completely the process of taking an array of pictures. Having such almost perfectly aligned images allows their custom software to stitch the images with a very impressive quality. Device price is about $279 as Beta ($379 otherwise).

The image is then made available on the Web using a Google Maps like interface provided by Gigapan.org.

This makes creating and distributing giant images much easier than it was before.


Thursday, November 27, 2008

Hacking the Webmail Notifier USB device

Some time ago I ordered the USB Webmail Notifier (only $17). When I received it, I was disapointed to find that the bundled software was very limited, only using the POP3 protocol. This protocol for example has no way of returning number unread mails, so the use cases are rather small.

So I decided to look at how I could code for this device. I found this very useful (albeit quite old) article on USB HID devices, a wery well though standard for this kind of devices (and keyboards, mouses, joysticks).

I also used a USB protocol analyzer to see what data was sent to the device. I managed to make it accept any color I want (whereas the bundled software only has green, red and blinking blue).

Each component is 5 bits, that makes some noticable transitions between adjacent colors. Also not all colors we use to get on LCD displays are available, because there is no black.

Here is a small image of an orange notifier.

I made 3 command line programs (building them requires the Windows DDK):
  • a simple color setter, arguments are R G B
  • a HUE wheel switcher
  • a CPU usage related color, green beeing 0%, red 100%
There is certainly many other possible uses for this cheap device:
  • An IMAP4 mail notifier, making use of all IMAP4 features
  • An automatic build indicator, for example for CruiseControl
  • an event remainder
  • ...
As usual source code will be send on request.

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.


Friday, August 22, 2008

Massive mesh

In order to generate the 3d objects for my fractals, a large number of triangles have to be generated, so that very detailed areas are not badly rendered.
I can generate up to 2 Billion triangles, more than 50 Gigabytes of data.

In order to see the result, I have modified my small viewer so that drawing is done reading directly the triangles on disk. This takes about 1 hour on my machine, but virtually unlimited number of triangles can be displayed, even on a basic computer.

The following object has exactly 1 447 147 377 triangles.

Of course for interactive display the number of triangles is reduced to about 10 000 000.

Sunday, August 3, 2008

Fractal 3d Object Video

Here is a small video I made from one of my objects.
It is a real 3d object, not a ray-traced rendered animation.
My graphics card is a GeForce 7600GT (not very fast these days).
This card is capable to display about 5 000 000 tris/s lit, shaded.
As I have objects with up to 10 000 000 triangles for the most detailed objects, and about 3 000 000 for standard objects, framerate is not very high. I am thinking of upgrading to a more recent card, such as an ATI 4850.

I am using custom software to display the object.

Saturday, August 2, 2008

Quaternion Fractal Slices Video

I have uploaded to Youtube a video that shows slices from one of my quaternion fractal 3d object.

It is created by the same code that is used to create the 3d object.

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.