pvQt -- a new portable OpenGL panorama viewer

853 views
Skip to first unread message

Tom Sharpless

unread,
Oct 10, 2008, 4:15:26 PM10/10/08
to hugin and other free panoramic software
Another panorama viewer? Well, yes, I think some of you might be
interested in this one. It began as an exercise for learning Qt and
OpenGL, which I hoped might produce a useful viewer for Linux. But it
works so well (on the right hardware) that I've decided to release it
to the world (https://sourceforge.net/projects/pvqt/).

pvQt uses the advanced texture mapping capabilities of OpenGL version
2.0 or better, to generate true 3D views: the panorama is projected on
a cylinder or sphere, whose interior is seen in perspective from a
movable point of view. That makes it possible to rotate the view in
all 3 dimensions (yaw, pitch, and roll) and to change the perspective
continuously from rectilinear (when the eye is at the center) through
increasingly "fisheye-like" views, out to a "super fisheye" that can
show almost 288 degrees of the panosphere.

At present pvQt only knows how to display spherical panoramas, in
equirectangular or cubic formats (including cubic QTVRs). But it is
designed to handle all the common pano formats and show "flat" photos
too. It has a few glitches, the worst of which is that it can't tell
whether it is running on an OpenGL implementation that actually
supports it -- if not, it just shows all white images.

Building pvQt requires the Qt development framework, which is huge but
reliable and easy to use, and zlib, which is tiny and ubiquitous.
There is a prebuilt win32 (MinGW) executable on SF, along with the
needed MinGW and Qt DLLs. It is in a self extractor that only runs on
Windows, but soon there will be a source tar too. And you can check
out the source tree with "svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt
pvqt ".

Cheers, Tom

Erik Krause

unread,
Oct 10, 2008, 4:59:55 PM10/10/08
to hugin-ptx
Am Friday, October 10, 2008 um 13:15 schrieb Tom Sharpless:

> It has a few glitches, the worst of which is that it can't tell
> whether it is running on an OpenGL implementation that actually
> supports it -- if not, it just shows all white images.

I can see a grid after it started, I can move this grid, but if I
load images they are all white. Does this mean my OpneGL version is
too low?

best regards
--
Erik Krause
Offenburger Str. 33
79108 Freiburg

mike watson

unread,
Oct 10, 2008, 6:11:10 PM10/10/08
to hugi...@googlegroups.com
Tom Sharpless wrote:

> Building pvQt requires the Qt development framework, which is huge but
> reliable and easy to use, and zlib, which is tiny and ubiquitous.
> There is a prebuilt win32 (MinGW) executable on SF, along with the
> needed MinGW and Qt DLLs. It is in a self extractor that only runs on
> Windows, but soon there will be a source tar too. And you can check
> out the source tree with "svn co https://pvqt.svn.sourceforge.net/svnroot/pvqt
> pvqt ".

Built on ubuntu intrepid (well once I realised my default ws qt3). Seems
to work fine and proved to be an amusing distraction this evening.

Tim Nugent

unread,
Oct 10, 2008, 9:28:13 PM10/10/08
to hugi...@googlegroups.com
Any tips on building in Ubuntu?

Installed qtopengl-dev e

I got:

tnugent@ubuntu-desktop:~/src/pvqt$ make
g++ -Wl,--no-undefined -o bin/pvQt build/main.o build/pvQtPic.o build/pvQtView.o build/MainWindow.o build/GLwindow.o build/pvQt_QTVR.o build/picTypeDialog.o build/pictureTypes.o build/moc_pvQtPic.o build/moc_pvQtView.o build/moc_MainWindow.o build/moc_GLwindow.o build/moc_picTypeDialog.o build/moc_pictureTypes.o    -L/usr/lib -L/usr/X11R6/lib -lQtOpenGL -lQtGui -lQtCore -lGLU -lGL -lpthread
build/GLwindow.o: In function `GLwindow::equi_file(QStringList)':
/home/tnugent/src/pvqt/src/GLwindow.cpp:114: undefined reference to `pvQtView::showPic(pvQtPic*)'
build/GLwindow.o: In function `GLwindow::cube_files(QStringList)':
/home/tnugent/src/pvqt/src/GLwindow.cpp:137: undefined reference to `pvQtView::showPic(pvQtPic*)'
build/GLwindow.o: In function `GLwindow::QTVR_file(QString)':
/home/tnugent/src/pvqt/src/GLwindow.cpp:90: undefined reference to `pvQtView::showPic(pvQtPic*)'
build/GLwindow.o: In function `GLwindow':
/home/tnugent/src/pvqt/src/GLwindow.cpp:13: undefined reference to `pvQtView::pvQtView(QWidget*)'
/home/tnugent/src/pvqt/src/GLwindow.cpp:13: undefined reference to `pvQtView::pvQtView(QWidget*)'
build/moc_pvQtView.o: In function `pvQtView::qt_metacall(QMetaObject::Call, int, void**)':
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:92: undefined reference to `pvQtView::setPan(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:93: undefined reference to `pvQtView::setTilt(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:94: undefined reference to `pvQtView::setSpin(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:95: undefined reference to `pvQtView::setZoom(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:96: undefined reference to `pvQtView::setDist(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:97: undefined reference to `pvQtView::step_pan(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:98: undefined reference to `pvQtView::step_tilt(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:99: undefined reference to `pvQtView::step_zoom(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:100: undefined reference to `pvQtView::step_roll(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:101: undefined reference to `pvQtView::step_dist(int)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:102: undefined reference to `pvQtView::reset_view()'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:103: undefined reference to `pvQtView::home_view()'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:104: undefined reference to `pvQtView::full_frame()'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:105: undefined reference to `pvQtView::super_fish()'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:106: undefined reference to `pvQtView::showPic(pvQtPic*)'
/home/tnugent/src/pvqt/build/moc_pvQtView.cpp:107: undefined reference to `pvQtView::picChanged()'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0x14): undefined reference to `pvQtView::~pvQtView()'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0x18): undefined reference to `pvQtView::~pvQtView()'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0x40): undefined reference to `pvQtView::sizeHint() const'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0x44): undefined reference to `pvQtView::minimumSizeHint() const'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0x50): undefined reference to `pvQtView::mousePressEvent(QMouseEvent*)'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0x5c): undefined reference to `pvQtView::mouseMoveEvent(QMouseEvent*)'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0xe8): undefined reference to `pvQtView::initializeGL()'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0xec): undefined reference to `pvQtView::resizeGL(int, int)'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0xf0): undefined reference to `pvQtView::paintGL()'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0x110): undefined reference to `non-virtual thunk to pvQtView::~pvQtView()'
build/moc_pvQtView.o:(.rodata._ZTV8pvQtView[vtable for pvQtView]+0x114): undefined reference to `non-virtual thunk to pvQtView::~pvQtView()'
collect2: ld returned 1 exit status
make: *** [bin/pvQt] Error 1

2008/10/10 mike watson <mi...@prog99.com>

Harry van der Wolf

unread,
Oct 11, 2008, 7:59:29 AM10/11/08
to hugi...@googlegroups.com


2008/10/11 Tim Nugent <timn...@gmail.com>

Any tips on building in Ubuntu?

Or on MacOSX ?

Harry

Tom Sharpless

unread,
Oct 11, 2008, 8:53:30 AM10/11/08
to hugin and other free panoramic software
Hi Tim,

Try "qmake pvQt.pro" then "make clean" then "make".

It builds fine on my Ubuntu (amd64).

-- Tom
> 2008/10/10 mike watson <m...@prog99.com>

Tom Sharpless

unread,
Oct 11, 2008, 8:56:27 AM10/11/08
to hugin and other free panoramic software
Hi Harry,

You are the OSX expert, I'm an ignoramus. All I can say is it builds
just like any Qt app, so I'd poke around Trolltech.com and the Qt
sites for more info.

Cheers


On Oct 11, 7:59 am, "Harry van der Wolf" <hvdw...@gmail.com> wrote:
> 2008/10/11 Tim Nugent <timnug...@gmail.com>

Tom Sharpless

unread,
Oct 11, 2008, 9:03:49 AM10/11/08
to hugin and other free panoramic software
Hello Erik

Yes, I expect the OpenGL version is too low. I found that only the
most recent of my 4 machines supports OGL 2.0 -- I'm trying to upgrade
an older desktop with a new video card, but my laptops will never run
pvQt.

There is a good "GPU capabilities viewer" at oZone3D.net which will
give you all the details of your card's and drivers' capabilities.

Of course pvQt should check the capabilities itself and tell you
nicely when it can't work.

Regards, Tom

Harry van der Wolf

unread,
Oct 11, 2008, 11:12:41 AM10/11/08
to hugi...@googlegroups.com
Hi Tom,

I did the "qmake pvQt.pro" which created an XCode project. I could open this in XCode and compile. I needed to patch "some things" and now it compiles fine. I'll work out the patch and send it to you.
The problem is that if I open the OutsideSionHillCampus.move I only get a white screen. Does this also mean that my OpenGL.framework on OSX is too low?
the small_eqr.tiff does display and works fine. I'll test the others tonight.

Hoi,
Harry


2008/10/11 Tom Sharpless <TKSha...@gmail.com>

Tom Sharpless

unread,
Oct 11, 2008, 12:29:21 PM10/11/08
to hugin and other free panoramic software
Hey thanks Harry

Good to hear that you got pvQt to build on OSX (I knew you would,
though :>).

I'm still pretty new to OpenGL, so I can't say why it may or may not
work in a given instance. What I do know is that OpenGL's policy is
to do as much as it can and fail gracefully when it can't.

Maybe I will make an OGL 1.5 compatibility patch, because a lot of
machines at that level could actually show useful (if not magnificent)
pictures. I believe it is mainly a matter of forcing the texture
images to have power-of-two dimensions.

Cheers, Tom

On Oct 11, 11:12 am, "Harry van der Wolf" <hvdw...@gmail.com> wrote:
> Hi Tom,
>
> I did the "qmake pvQt.pro" which created an XCode project. I could open this
> in XCode and compile. I needed to patch "some things" and now it compiles
> fine. I'll work out the patch and send it to you.
> The problem is that if I open the OutsideSionHillCampus.move I only get a
> white screen. Does this also mean that my OpenGL.framework on OSX is too
> low?
> the small_eqr.tiff does display and works fine. I'll test the others
> tonight.
>
> Hoi,
> Harry
>
> 2008/10/11 Tom Sharpless <TKSharpl...@gmail.com>

Harry van der Wolf

unread,
Oct 11, 2008, 2:35:58 PM10/11/08
to hugi...@googlegroups.com
Hi Tom,

I wanted to send you a patch, but you mention that you build against QT3. I have QT 4.4.1 on my system as I need that to build Avidemux (which I maintain for OSX). The "qmake pvQt.pro" modified an enormous lot resulting in a 28Kb patch file which might not run at all on your system. So I copy the minor changes I needed to make in this mail. It's only the top of pvQtView.cpp

/* pvQtView.cpp for freepvQt  08Sep2008 TKS
*/
#include "pvQtView.h"
#include <QtOpenGL/QtOpenGL>
#ifdef __APPLE__
   #include "glext.h"
   #include "glu.h"
#else
   #include <GL/glext.h>
   #include <GL/glut.h>
#endif
#include <cmath>

Later on we might include the XCode project into the svn.

Does your viewer only work on 360x180 images? The small_eqr.tiff work. My partial eqr's and full 360 eqr's don't work but neither of them is a 180 degree eqr.
I tried pvQT on Yuval's "hugin_6aroundtilted_testcase".  I know I violate the license as Yuval clearly states "You are herewith granted the license to use these images solely forthe purpose of testing hugin. Other use explicitly forbidden."  I just took my chances and used an eqr with pcqt ;-)
I can't get this one to work either: not as jpg and not as tiff (compression none, lzw and packbits). What's the difference with your small_eqr.tiff?

Harry


2008/10/11 Tom Sharpless <TKSha...@gmail.com>

Tom Sharpless

unread,
Oct 11, 2008, 2:56:06 PM10/11/08
to hugin and other free panoramic software
Hi Harry

No, not Qt3. pvQt absolutely depends on Qt4, and I am using version
4.4.1 too.

Thanks for the header file patch, I'll apply it tonight. At which
time I also hope to add some basic checks of OpenGL capabilities.

Regards, Tom

On Oct 11, 2:35 pm, "Harry van der Wolf" <hvdw...@gmail.com> wrote:
> Hi Tom,
>
> 2008/10/11 Tom Sharpless <TKSharpl...@gmail.com>

Tom Sharpless

unread,
Oct 11, 2008, 3:05:58 PM10/11/08
to hugin and other free panoramic software
Hi again Harry

At present pvQt only displays 360 x 180 degree panos correctly.

I guess small_eqr.tiff works because it is 1024 x 512. Before version
2.0, OGL would only accept texture images having power of 2
dimensions. I haven't had any trouble with Qt not being able to read
image files. Please try resizing/padding some of your eqrs to power-
of 2 sizes and see if pvQt displays them, and at what size it starts
to fail. Similarly for cubic image sets too, if you have the time.

Regards, Tom



On Oct 11, 2:35 pm, "Harry van der Wolf" <hvdw...@gmail.com> wrote:
> Hi Tom,
>
> 2008/10/11 Tom Sharpless <TKSharpl...@gmail.com>

Harry van der Wolf

unread,
Oct 11, 2008, 3:48:25 PM10/11/08
to hugi...@googlegroups.com
Hi Tom,

It's not only a power of 2 issue.
Yuvals hugin_6aroundtilted_testcase is a perfect power of 2 example. The size is 7726 × 3863 pixels, which turns out to be way too big. I had to go down to 2048x1024 (209752 pixels). The 3072x1536 (4718592 pixels) was too big already as well as the 2560x1280. I did not further test, but it looks like it can't display images bigger than (slightly over?) 2048x1024.

pvQt also displays my downsized eqr's which are absolutely not a power of 2 ratio. However, they are heavily distorted.

Harry


2008/10/11 Tom Sharpless <TKSha...@gmail.com>

Harry van der Wolf

unread,
Oct 11, 2008, 3:51:51 PM10/11/08
to hugi...@googlegroups.com
Hi Tom,

I might sound a bit negative (when I read my mail in retrospective), but I didn't mean it that way. I think you made a very nice viewer.
Sorry if I upset you.

Harry

2008/10/11 Harry van der Wolf <hvd...@gmail.com>

Tom Sharpless

unread,
Oct 11, 2008, 10:24:39 PM10/11/08
to hugin and other free panoramic software
Hi Harry

Not a bit upset. Thanks for your research.

If you can find out the 'official' OGL capabilities of your machine
(version level, max_texture, video RAM size,...) I'd be most
interested. Does Apple now use the same kinds of display adapters as
are found on PC's?

Regards, Tom

On Oct 11, 3:51 pm, "Harry van der Wolf" <hvdw...@gmail.com> wrote:
> Hi Tom,
>
> I might sound a bit negative (when I read my mail in retrospective), but I
> didn't mean it that way. I think you made a very nice viewer.
> Sorry if I upset you.
>
> Harry
>
> 2008/10/11 Harry van der Wolf <hvdw...@gmail.com>
>
> > Hi Tom,
>
> > It's not only a power of 2 issue.
> > Yuvals hugin_6aroundtilted_testcase is a perfect power of 2 example. The
> > size is 7726 × 3863 pixels, which turns out to be way too big. I had to go
> > down to 2048x1024 (209752 pixels). The 3072x1536 (4718592 pixels) was too
> > big already as well as the 2560x1280. I did not further test, but it looks
> > like it can't display images bigger than (slightly over?) 2048x1024.
>
> > pvQt also displays my downsized eqr's which are absolutely not a power of 2
> > ratio. However, they are heavily distorted.
>
> > Harry
>
> > 2008/10/11 Tom Sharpless <TKSharpl...@gmail.com>

Bob Bright

unread,
Oct 12, 2008, 3:50:39 AM10/12/08
to hugi...@googlegroups.com
Hi Tom,

I'm seeing the same behaviour as Harry.  Toshiba satellite laptop with ubuntu hardy.  I can view equirectangular tifs and jpgs up to 2050x1025, but anything larger than that just displays as white.  It doesn't appear to be a power of 2 issue, since powers of 2 above 2048 are all white, and non-powers of 2 <= 2050 display fine.

A couple of other things: (1) The display responds nicely to keyboard input, but doesn't respond to the mouse (perhaps that's just because you haven't implemented it yet?).  (2) The up and down arrow keys work as one would expect when viewing equirectangulars (up arrow pans up, down arrow pans down), but are reversed when viewing QTVRs and cubic panoramas.

The display quality is excellent on my system, considering that I haven't been able to view anything > 2050x1025.  I think this is going to be a really superb viewer when you've got some of the bugs worked out, Tom.  Nice work!

Cheers,
BBB

Harry van der Wolf

unread,
Oct 12, 2008, 4:21:08 AM10/12/08
to hugi...@googlegroups.com
Hi Tom,
All Mac's as of mid 2005 are Intels having standard "PC"  video chipsets.
The video in my Intel 2GHz Macbook

Intel GMA 950:
  Chipset Model:    GMA 950
  Type:    Display
  Bus:    Built-In
  VRAM (Total):    64 MB of shared system memory
  Vendor:    Intel (0x8086)
  Device ID:    0x27a2
  Revision ID:    0x0003
  Displays:
Color LCD:
  Display Type:    LCD
  Resolution:    1280 x 800
  Depth:    32-bit Color
  Built-In:    Yes
  Core Image:    Hardware Accelerated
  Main Display:    Yes
  Mirror:    Off
  Online:    Yes
  Quartz Extreme:    Supported
Display Connector:
  Status:    No display connected

I give the version info for GLUT and OpenGL for both the (previous) version 10.4.11 (Tiger)  and 10.5.5 (Leopard)

Software status
MacOSX 10.4.11 (Tiger)

GLUT:

  Version: 3.3.9

  Last Modified: 23-9-08 19:22

  Get Info String: 3.3.9, Copyright (c) 2001-2005 Apple Computer Inc., All Rights Reserved

  Location: /System/Library/Frameworks/GLUT.framework

  Privaat: Needsf

OpenGL

Version: 1.4.16

Last Modified: 23-9-08 19:22

Get Info String: OpenGL 1.4.16.0.0

Location: /System/Library/Frameworks/OpenGL.framework


MacOSX 10.5.5 (Leopard)


GLUT:

  Version:    3.4.0

  Last Modified:    01-09-08 17:41

  Get Info String:    3.4.0, Copyright (c) 2001-2007 Apple Computer Inc., All Rights Reserved

  Location:    /System/Library/Frameworks/GLUT.framework


OpenGL:
  Version:    1.5.7
  Last Modified:    20-09-08 09:51
  Get Info String:    OpenGL 1.5.7.31.0
  Location:    /System/Library/Frameworks/OpenGL.framework

After some googling I now understand what max_texture is but I have no idea how and where to find it.

Hoi,
Harry


2008/10/12 Tom Sharpless <TKSha...@gmail.com>

Bruno Postle

unread,
Oct 12, 2008, 6:01:08 AM10/12/08
to Hugin ptx
On Sat 11-Oct-2008 at 11:56 -0700, Tom Sharpless wrote:
>
>Thanks for the header file patch, I'll apply it tonight. At which
>time I also hope to add some basic checks of OpenGL capabilities.

Hi Tom, not sure how useful this is, but both enblend and (now)
hugin use 'glew' to figure out the opengl capabilities of the
system:

http://glew.sourceforge.net/

--
Bruno

sergi34

unread,
Oct 12, 2008, 7:24:42 AM10/12/08
to hugin and other free panoramic software
How can I install OpenGL 2.0 on my system?

I have ubuntu hardy 8.04. I've compiled pvQt from svn and everything
ok, but when I load an equirectangular image, I only got a white
screen, but no panorama.
I suppose it could be I don't have opengl 2.

thanks,
Sergi
> out the source tree with "svn cohttps://pvqt.svn.sourceforge.net/svnroot/pvqt
> pvqt ".
>
> Cheers, Tom

Harry van der Wolf

unread,
Oct 12, 2008, 7:35:11 AM10/12/08
to hugi...@googlegroups.com
Did you try with images < 2048x1024 like mentioned in the previous posts? Currently the viewer can only handle relatively small image sizes.

Harry

2008/10/12 sergi34 <sergi...@gmail.com>

Tom Sharpless

unread,
Oct 12, 2008, 1:11:18 PM10/12/08
to hugin and other free panoramic software
Thanks, Bob; thanks, Harry; thanks, Bruno

It has become clear that I don't know enough about OpenGL. So I'm
going to stop pretending to answer questions about all this and start
learning something.

First I'll put some code in pvQtView to probe the OGL capabilities,
make power-of-2 textures where required, and use the "proxy texture"
method to find the real size limit for each picture. Then I'll read
some more books, ask some more questions, and test things on my
various older machines.

Cheers, Tom

sergi34

unread,
Oct 12, 2008, 1:18:30 PM10/12/08
to hugin and other free panoramic software
Thanks!! It was exactly that. I've tried with a 6000x3000 tif file ;-)

really amazing options. This project is really good. Well done Tome!

Sergi

On 12 oct, 13:35, "Harry van der Wolf" <hvdw...@gmail.com> wrote:
> Did you try with images < 2048x1024 like mentioned in the previous posts?
> Currently the viewer can only handle relatively small image sizes.
>
> Harry
>
> 2008/10/12 sergi34 <sergi.ma...@gmail.com>

Tom Sharpless

unread,
Oct 12, 2008, 1:23:48 PM10/12/08
to hugin and other free panoramic software
Hi Sergi

OpenGL support is basically in the system video drivers; you can't
just install it as a software package.

If your Ubuntu box has an nVidia display adapter, you should install
the nVidia drivers for it, if you have not already done so (they are
in nVidia's support pages). Ubuntu won't ship these drivers because
they are closed source (and issues warnings when you install them)
however they make the display hardware work as it was designed to. On
my machine that includes supporting OpenGL 2.0.

Something similar may be true for recent ATI adapters.

Cheers, Tom

Reply all
Reply to author
Forward
0 new messages