Main Page | Report this Page
 
   
Science Forum Index  »  Image Processing Forum  »  Smooth Zoom and Pan...
Page 1 of 1    
Author Message
Pete...
Posted: Fri May 09, 2008 4:20 pm
Guest
Hello

I've noticed that several programs such as Google's Picassa provide a very
impressive smooth zoom and pan which is highly responsive and maintains good
quality even with very large images.

Does anyone have any idea about the technology behind this? Is this done
with a simple filter running on the CPU or is it likely that the programs
are addressing my GPU directly. Can anyone point me to any sample source
code that might do a comparable pan and zoom?

Many thanks for any help

Pete
Frank Mertens...
Posted: Fri May 09, 2008 7:32 pm
Guest
Pete wrote:
Quote:
Hello

I've noticed that several programs such as Google's Picassa provide a very
impressive smooth zoom and pan which is highly responsive and maintains good
quality even with very large images.

Does anyone have any idea about the technology behind this? Is this done
with a simple filter running on the CPU or is it likely that the programs
are addressing my GPU directly. Can anyone point me to any sample source
code that might do a comparable pan and zoom?

Many thanks for any help

Pete



The technique I now, is using tiled image pyramids.

The image is low-pass filtered into several pyramid levels and each is
tiled into smaller tiles (e.g. 256x256). When a certain part of
the image is requested in a certain resolution tiles become loaded
on-demand. Thereby those viewers usually can show any-sized images.
The TIFF image format is widely used to store image pyramids
(although limited to 4GB), most pixel-suites have their own
working format.

--
Frank
Jeff...
Posted: Sat May 10, 2008 8:35 am
Guest
"Frank Mertens" <frank at (no spam) cyblogic.de> wrote in message
news:g02qf4$77u$1 at (no spam) cb.generation-online.de...
Quote:
Pete wrote:


The technique I now, is using tiled image pyramids.

The image is low-pass filtered into several pyramid levels and each is
tiled into smaller tiles (e.g. 256x256). When a certain part of
the image is requested in a certain resolution tiles become loaded
on-demand. Thereby those viewers usually can show any-sized images.
The TIFF image format is widely used to store image pyramids
(although limited to 4GB), most pixel-suites have their own
working format.


Thanks.

Yes, that sounds sensible. But for a really smooth zoom you need to include
lots of intermediate resolutions (ie not just 2x,4x etc).
Do you think those intermediate resolutions are scaled down from the nearest
half-resolution greater than the required resolution - or is there a nice
(ie quick) way to combine the two resolutions that bound the required
resolution?

Thanks again
Pete
Frank Mertens...
Posted: Sat May 10, 2008 11:26 am
Guest
Jeff wrote:
Quote:
"Frank Mertens" <frank at (no spam) cyblogic.de> wrote in message
news:g02qf4$77u$1 at (no spam) cb.generation-online.de...
Pete wrote:

The technique I now, is using tiled image pyramids.

The image is low-pass filtered into several pyramid levels and each is
tiled into smaller tiles (e.g. 256x256). When a certain part of
the image is requested in a certain resolution tiles become loaded
on-demand. Thereby those viewers usually can show any-sized images.
The TIFF image format is widely used to store image pyramids
(although limited to 4GB), most pixel-suites have their own
working format.


Thanks.

Yes, that sounds sensible. But for a really smooth zoom you need to include
lots of intermediate resolutions (ie not just 2x,4x etc).
Do you think those intermediate resolutions are scaled down from the nearest
half-resolution greater than the required resolution - or is there a nice
(ie quick) way to combine the two resolutions that bound the required
resolution?

Thanks again
Pete




I think logarithmic resolution levels work best:

-- sum of scaled images => about 30% added storage costs
----
--------
================ <= full resolution image

"-" ... a single tile

I think google's apps use a lot of OpenGL.
OpenGL knows the concept of linear interpolation between
mipmapping levels. The nearest resolution tiles could be
loaded on-demand into two mipmapping levels.
See wikipedia on "mipmap".

Frank
--
Gaurav...
Posted: Mon May 12, 2008 9:59 pm
Guest
Quote:
I've noticed that several programs such as Google's Picassa provide a very
impressive smooth zoom and pan which is highly responsive and maintains good
quality even with very large images.

I too have been trying to implement something similar and have been
using the programming language IDL. As far as various image formats
go, I have come to the conclusion that the JPEG2000 format has the
best features that are needed.
* It can save multiple layers of information,
* enables you to read small portions out of it and
* even supports geographic information.

The IDL sample codes even have an application that make use of pyramid
of images and zoom and pan quite fluidly.

Hope this helps in someway.

Regards
Gaurav
Dave Martindale...
Posted: Tue May 13, 2008 10:48 am
Guest
"Jeff" <someone at (no spam) somewhere.com> writes:

Quote:
Yes, that sounds sensible. But for a really smooth zoom you need to include
lots of intermediate resolutions (ie not just 2x,4x etc).
Do you think those intermediate resolutions are scaled down from the nearest
half-resolution greater than the required resolution - or is there a nice
(ie quick) way to combine the two resolutions that bound the required
resolution?

It's pretty common in computer graphics to use a pyramid of resolutions
for a texture, each level having half the resolution of the level above.
This takes only 4/3 as much space as a single maximum-resolution image.

When applying the texture, just linearly interpolate between the two
nearest texture resolutions.

On the other hand, modern graphics cards with programmable shaders have
enormous computational power - tens or hundreds of times as much as the
main CPU. Resampling an existing 2D image to a new size and position is
actually a pretty simple operation, easily distributed among all the
shaders available on the card. My home computer's graphics card has 96
stream (shader) processors; the one at work has 128. That's a lot of
parallellism that can be put to work on resampling.

The programs you mention may be completely recalculating the
displayed image every frame. With the power to do that, it's trivial
to use a new scale factor and center point location every frame, giving
perfectly smooth panning and zooming.

Dave
Jeff...
Posted: Wed May 14, 2008 2:42 pm
Guest
"Gaurav" <selfishgaurav at (no spam) gmail.com> wrote in message
news:8b78a0a8-cc76-48c0-b608-d1f90b263a0c at (no spam) w34g2000prm.googlegroups.com...
Quote:
I've noticed that several programs such as Google's Picassa provide a
very
impressive smooth zoom and pan which is highly responsive and maintains
good
quality even with very large images.

I too have been trying to implement something similar and have been
using the programming language IDL. As far as various image formats
go, I have come to the conclusion that the JPEG2000 format has the
best features that are needed.
* It can save multiple layers of information,
* enables you to read small portions out of it and
* even supports geographic information.

The IDL sample codes even have an application that make use of pyramid
of images and zoom and pan quite fluidly.

Hope this helps in someway.



Thanks.
Yes, I've also been considering Jpeg2000. I'm particularly impressed by the
Kakadu stuff at http://www.kakadusoftware.com/jpip.html
Has anyone any real-world experience of this?

Thanks again
Jeff
Jeff...
Posted: Wed May 14, 2008 2:45 pm
Guest
"Dave Martindale" <davem at (no spam) cs.ubc.ca> wrote in message
news:g0cuqb$ogb$1 at (no spam) swain.cs.ubc.ca...
Quote:
"Jeff" <someone at (no spam) somewhere.com> writes:

Yes, that sounds sensible. But for a really smooth zoom you need to
include
lots of intermediate resolutions (ie not just 2x,4x etc).
Do you think those intermediate resolutions are scaled down from the
nearest
half-resolution greater than the required resolution - or is there a nice
(ie quick) way to combine the two resolutions that bound the required
resolution?

It's pretty common in computer graphics to use a pyramid of resolutions
for a texture, each level having half the resolution of the level above.
This takes only 4/3 as much space as a single maximum-resolution image.

When applying the texture, just linearly interpolate between the two
nearest texture resolutions.

On the other hand, modern graphics cards with programmable shaders have
enormous computational power - tens or hundreds of times as much as the
main CPU. Resampling an existing 2D image to a new size and position is
actually a pretty simple operation, easily distributed among all the
shaders available on the card. My home computer's graphics card has 96
stream (shader) processors; the one at work has 128. That's a lot of
parallellism that can be put to work on resampling.

The programs you mention may be completely recalculating the
displayed image every frame. With the power to do that, it's trivial
to use a new scale factor and center point location every frame, giving
perfectly smooth panning and zooming.


Thanks a lot.

Yes, I think you're right. Once the data has been downloaded the business of
providing an arbitrary zoom and pan is easy for modern h/w.

The real bottleneck is in getting the pixels from the server to the client.
As far as I can see you have two objectives:-
Overall speed - mostly down to compression effeciency
Latency - mostly down to granularity with which the image can be randomly
accessed.

Thanks
Jeff
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Sat Jul 26, 2008 5:08 pm