pv - a multiplatform FOSS panorama and image viewer

197 views
Skip to first unread message

kfj

unread,
Apr 6, 2020, 4:44:02 AM4/6/20
to hugin and other free panoramic software
Dear group!

Some time ago I announced 'pv - a new free linux panorama viewer'. I have continued working on this project and on porting it to other platforms. pv now has a branch offering code for a W64 build using msys2/minGW, and the building procedure is well-established, the binaries have been tested successfully on several systems running W7-64bit and W10-64bit. Linux builds can be built from the master branch, as ever. Last summer, I have also managed to build pv on a mac using macports, but since I don't have a mac I haven't been able to work on the mac building procedure recently. with successful Linux, Windows and Mac builds, I feel justified in claiming that pv is now multiplatform. The license is GPLv3. The code is here:


To build the W10 version, you need a working msys2/minGW environment and you'll have to check out the 'msys2' branch. You'll find build instructions on the repo's main page. To make building as painless as possible, I've included sources to vspline (my uniform b-spline library) and some other bits and bobs, into the repo. Most components are readily available via the msys2 packet management, only Vc has to be pulled from it's repo. There's code in the msys2 branch to produce a portable pv 'bundle' which can be used without installation ('stickware').

To whet your appetite, I'd like to list some of pv's features:
  • data handling and image i/o with vigra
  • interpolation with uniform B-splines using vspline
  • explicit hardware vectorization using Vc
  • automatic CPU detection and use of CPU-specific vector code
  • user interface and display engine made with SFML
  • simple GUI for the most common tasks
  • metadata access with libexiv2 to detect panoramic images
  • view spherical, cylindric, fisheye, stereographic, rectilinear and 'flat' images
  • smoothly animated pans, zooms, rotations etc.
  • display and make snapshots in rectilinear, spherical and cylindric projection
  • processing of sRGB and linear RGB data
  • processing of PNG, JPEG, 8bit, 16bit and float TIFF, openEXR
  • handling of data with alpha channel (transparency)
  • brightness, black point, white point and white balance control
  • snapshot function to export the current view to an image file
  • slide show mode
  • 'multi-facetted' images: panoramic views with real-time stitching
  • live HDR blending, simple tonemapping
The last two points are quite new and exciting: I've started out on 'live stitching'. Instead of stitching images into a single panorama image, live stitching just uses an 'ini file' containing the image names, orientation (y,p,r) and brightness, and the viewer shows a synoptic view straight away. Another trick I managed was to do the same for HDR blending, so you can pass an 'ini file' to pv describing a set of registered images (say, from an exposure bracket), and the viewer will display this set like the HDR image you might obtain from HDR-blending the input images, taking fill light from the bright exposures and filling in overexposed bits from dark exposures. You can also capture the HDR result into an openEXR file (using pv's snapshot facility). So far these new features are limited to rectilinear source images. I've included python code to translate PTO files to pv's 'ini file' format - using only hfov, orientation and brightness, which is all that pv can handle so far. All of this is documented in the pv repo at bitbucket.

pv now also supports output to spherical and cylindric format, so the new features can be used to make simple stitches of spherical and cylindric panoramas. pv uses a geometry-based approach to image blending, which is different to traditional layer-by-layer blending. There is no seam optimization (yet), but feathering can be used. The spherical output is also useful for reprojecting (like, to change orientation and horizon of a full spherical). Image quality is very good thanks to b-spline interpolation.

I got so used to using pv with my own images that I decided to add features you'd normally expect in an all-purpose image viewer, namely multi-image support and a slideshow mode. The advantage is that pv will 'notice' panoramas and display them correctly, which makes it unnecessary to call a separate panorama viewer from the image viewer to display the panorama correctly. And using the same program for all images provides the same user interface for all image viewing, so there is no more confusion between different UIs from the image viewer and the panorama viewer, which I always found annoying.

I hope you'll like pv as much  as I do!

Kay

Carlos Eduardo G. Carvalho (Cartola)

unread,
Apr 6, 2020, 9:56:47 AM4/6/20
to hugi...@googlegroups.com
Hi Kay, good job and one more option for us, thank you!

My first impressions after building it on an Ubuntu 18.04:

- I don't know why, but usually my images don't have panoramic metadata, so pv didn't recognize the first test I made. I would suggest that it could treat 2:1 images as spherical panoramas, but don't know it it would be good in a general viewer. Maybe it could ask us when it found this aspect ration.
- The command line options have a not obvious syntax, like --projection:spherical - Even after reading the help it took me some tries to notice that there mustn't be a space. Usually unix command options would accept something like "--projection spherical" (my first try) and besides this, the help shows a space there after the ":", so my second try has been "--projection: spherical" and only got it after third try.
-  Its performance is a little bit worse than Panini, which I usually use. The image flow is slower (my machine is an i7 from 2013 without an Nvidia)

Hope it helps to improve you very good job! Maybe Greg can port it to FreeBSD! :)

Bests!


--
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hugin-ptx+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/ee2814d6-e885-4ed5-a50a-59e0463538d1%40googlegroups.com.

Luís Henrique Camargo Quiroz

unread,
Apr 6, 2020, 10:05:19 AM4/6/20
to hugi...@googlegroups.com

   Hello Kay,

   I just tried to build your pv in a Debian system, but got some errors. Here are the libraries I have:
   libexiv2-dev     0.27.2-8,
   libsfml-dev      2.5.1+dfsg-1,
   libvigraimpex-dev   1.11.1+dfsg-7+b1,
   clang             1:9.0-49.1, and
   vc-dev           1.3.3-4

    The errors so far are:
    pv_rendering.cc:89:10: fatal error: 'set' file not found
#include <set>
    pv_initialize.cc:37:10: fatal error: 'map' file not found
#include <map>
    file_dialog.cc:52:10: fatal error: 'vector' file not found
#include <vector>
    and even something wrong with my exiv2,
    /usr/include/exiv2/slice.hpp:32:10: fatal error: 'cassert' file not found
#include <cassert>

   What I am missing here?  My Debian is 5.4.19-1, bullseye/sid.

   thanks!

   Luís Henrique
   

Em seg., 6 de abr. de 2020 às 05:44, 'kfj' via hugin and other free panoramic software <hugi...@googlegroups.com> escreveu:
--
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hugin-ptx+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/ee2814d6-e885-4ed5-a50a-59e0463538d1%40googlegroups.com.


--

Kay F. Jahnke

unread,
Apr 7, 2020, 3:40:11 AM4/7/20
to hugi...@googlegroups.com
On 06.04.20 15:56, Carlos Eduardo G. Carvalho (Cartola) wrote:
> Hi Kay, good job and one more option for us, thank you!
>
> My first impressions after building it on an Ubuntu 18.04:
>
> - I don't know why, but usually my images don't have panoramic metadata,
> so pv didn't recognize the first test I made. I would suggest that it
> could treat 2:1 images as spherical panoramas, but don't know it it
> would be good in a general viewer. Maybe it could ask us when it found
> this aspect ration.

This is easy to remedy. You can:

- best: produce panoramas with metadata in the first place
- or add metadata with exiftool (see pv's docu to tell you which)
- or pass projection on the command line: full sphericals need
--projection=spherical --hfov=360
- you can put your image filename plus the above into an 'ini file'.

I also think it's not a good idea to automatically assume that certain
aspect ratios mean a specific projection. If you're using hugin, produce
spherical images, and in the hugin settings, go to the second blending
tab and set 'produce Pano Sphere XMP data'. This will give you the best
metadata for work with pv, and your panoramas will be recognized as
such. Oftentimes metadata get lost when postprocessing panoramas after
the stitching with photoshop or such, so make sure you copy the metadata
to the postprocessed image file (e.g. with exiftool).

pv does not do dialogs. The UI is all 'immediate': every interaction
produces an immediate reaction. If you have accidentally launched a
spherical image as a 'flat' one, you can also click into the 'override
line' (bottom right in the GUI) and enter the missing arguments (commit
with return).

> - The command line options have a not obvious syntax, like
> --projection:spherical - Even after reading the help it took me some
> tries to notice that there mustn't be a space. Usually unix command
> options would accept something like "--projection spherical" (my first
> try) and besides this, the help shows a space there after the ":", so my
> second try has been "--projection: spherical" and only got it after
> third try.

Sorry that my options aren't 'obvious'. I may find a way to allow the
syntax you'd like to see, but for now the options are as the
documentation says. One-character 'short' options follow normal unix
argument syntax, long options follow

--{option_name}[=|:]{option_value}

with no white space allowed. Makes argument parsing much easier. It's
like named parameters in python.

> -  Its performance is a little bit worse than Panini, which I usually
> use. The image flow is slower (my machine is an i7 from 2013 without an
> Nvidia)

i7 from 2013 sounds like AVX only, and no graphics card means you're
using chipset graphics. This is quite an old system, AVX2 and the
chipset graphics from the Haswell generation already perform much
better. pv does the rendering on the CPU and up/downscaling on the GPU,
so your system is probably just not powerful enough. If animated
sequences stutter, try lowering 'animation quality':
click on 'AQ DOWN' in the GUI, or hold and press 'M', or pass AQ values
less than one, like --moving_image_scaling=0.5. You'll get a slightly
blurred view during the animation, but the still images will be crisp as
ever. This is my compromise for slower systems: render smaller frames
and send them to the GPU for upscaling. But then, if the GPU is also
slow, you're out of luck. There are more things you can do to lower
rendering times, but they tend to degrade image quality more. you may
want to consider the section 'Hardware Considerations' in the pv
documentation. switching to a lower screen resolution (like 720p instead
of 1080p) is another option. 4K screen resolution is definitely too much
to ask with your hardware.

> Hope it helps to improve you very good job! Maybe Greg can port it to
> FreeBSD! :)

Thanks for the praise. Porting should not be too hard, it already runs
on linux and I had it running on macOS last summer - and msys2 is quite
unixoid as well. If you get the libraries it uses to compile, you should
be fine. I've tried very hard to keep my code as standard as possible.
I'd be glad to hear of a FreeBSD port. It might be as easy as installing
clang++ and the libs and issuing 'make'.

With regards
Kay

Kay F. Jahnke

unread,
Apr 7, 2020, 3:49:43 AM4/7/20
to hugi...@googlegroups.com
On 06.04.20 16:05, Luís Henrique Camargo Quiroz wrote:
>
>    Hello Kay,
>
>    I just tried to build your pv in a Debian system, but got some
> errors. Here are the libraries I have:
>    libexiv2-dev     0.27.2-8,
>    libsfml-dev      2.5.1+dfsg-1,
>    libvigraimpex-dev   1.11.1+dfsg-7+b1,
>    clang             1:9.0-49.1, and
>    vc-dev           1.3.3-4

The libraries look fine to me.

>     The errors so far are:
>     pv_rendering.cc:89:10: fatal error: 'set' file not found
> #include <set>
>     pv_initialize.cc:37:10: fatal error: 'map' file not found
> #include <map>
>     file_dialog.cc:52:10: fatal error: 'vector' file not found
> #include <vector>
>     and even something wrong with my exiv2,
>     /usr/include/exiv2/slice.hpp:32:10: fatal error: 'cassert' file not
> found
> #include <cassert>

set, map, and vector etc. are c++ standard library includes. They should
not fail. I suppose something is wrong with the setup of your compiler,
if it can't find them.

Good luck, come back for more help if you can't figure it out.

Kay

Kay F. Jahnke

unread,
Apr 8, 2020, 5:32:01 AM4/8/20
to hugi...@googlegroups.com
On 06.04.20 15:56, Carlos Eduardo G. Carvalho (Cartola) wrote:
>
> -  Its performance is a little bit worse than Panini, which I usually
> use. The image flow is slower (my machine is an i7 from 2013 without an
> Nvidia)

Three more things concerning performance:

- per default, pv uses bilinear interpolation for moving images. If you
want to squash animation rendering times even further and do not mind
aliasing, you can use nearest neighbour interpolation for moving images
instead:

--fast_interpolator_degree=0

- per default, pv does it's internal calculations in linear RGB and
converts the result to sRGB before sending it to the GPU. This is
mathematically correct, but takes time. You can switch to processing in
sRGB, which is okay for simply viewing images, with this option:

--process_linear=false

- also per default, pv checks if the input image has an alpha channel.
If so, it tests if any pixels at all have transparency. If so, alpha
processing is switched on. Even if there is only a single pixel with an
alpha value of 254, this will trigger alpha processing, which also takes
time. You can force alpha processing off:

--alpha=no

I was surprised to find that some of my panoramas done with hugin had
pixels with transparency, even though I had used automatic cropping.
Seems the automatics don't exclude all pixels with a little transparency
(espacially in the corners). So keep this in mind.

Performance comparisons are a dicey issue, a lot of stuff may go on
behind the scenes, and you may end up comparing apples and pears.

I'd be surprised to see CPU-based rendering code which is significantly
faster than pv, as long as the mathematical operations are the same.
It's very highly optimized.

Kay

kfj

unread,
Jan 16, 2021, 11:55:17 AM1/16/21
to hugin and other free panoramic software
Dear group!

A few weeks ago, a friend of mine managed a pv build on an intel mac using macports. He sent me a build log, and I have included the instructions in my bitbucket repo. So now pv can run on Linux, MS Windows and MacOS. The mac build is simple, it comes down to this:
  • sudo port install vigra -python38
  • sudo port install sfml
  • sudo port install exiv2
  • git clone https://bitbucket.org/kfj/pv
  • cd pv
  • git checkout mac
  • make
Mac users, please give it a shot, and report what you think!

Since pv has matured nicely and all major platforms are now supported, how about including it in the hugin or hugin-tools package? This would give hugin users immediate access to a panorama viewer which is the same across all platforms.

I'd also welcome packagers to produce standalone pv installers/installable packages. Where MS Windows is concerned, pv depends on MinGW/msys2, which is probably not very common, so I could provide an msys2-built binary and the necessary DLLs, if someone would want to build a windows installer but does not have an MinGW/msys2 environment.

Kay

kfj

unread,
Jan 23, 2021, 4:56:43 AM1/23/21
to hugin and other free panoramic software
pv now supports 'standard long argument syntax'. So you can now pass long arguments like

  --option value

instead of pv's 'ini file style'

  --option=value

Cartola schrieb am Montag, 6. April 2020 um 15:56:47 UTC+2:
Hi Kay, good job and one more option for us, thank you!

My first impressions after building it on an Ubuntu 18.04:
...
 
@cartola: sorry it took me so long to fix this. You seem to have lost interest in pv's development - after your initial reply I did not hear from you.

In fact this is the same for the very limited response I got on this mailing list so far. That's a bit sad: here I go spending years of development time to build a rock-solid feature-rich multiplatform panorama viewer, using cutting edge technology, and all I get from the 'vibrant' community is a measly few replies and no follow-up. Where is everybody? Is noone reading the mails on this ML anymore?

Hope it helps to improve you very good job! Maybe Greg can port it to FreeBSD! :)
 
Can Greg? I've managed to port pv to Windows and MacOS, so porting to BSD shouldn't be too hard. Again, where is everybody?

Kay

Luís Henrique Camargo Quiroz

unread,
Jan 23, 2021, 10:43:14 AM1/23/21
to hugi...@googlegroups.com

   Hi Kay,

   I have interest in pv, but have not had success compiling it in the past, with gcc.  Then, as I am busy with an ongoing PhD (and I even was abandoned -- yes, months of emails, messages, even some phone calls! -- and had to ask the intervention of other faculty members) and have lots of things to do, even with an extra additional year, I have not tried any more. But I will do, I will, in a few weeks, try to compile pv again, because I think it will easy a lot the final editing of my panoramas, which I still try to do as my hobby (I think I deserve)

   But, just now, I am cloning my notebook's HD, because it is old and started to emit bad alerts. 

   I put an 'event' in my calendar and will try to compile pv in a month or even sooner, and I will report back.

   go on,

   regards,

  Luís Henrique

--
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hugin-ptx+...@googlegroups.com.

Kay F. Jahnke

unread,
Jan 23, 2021, 11:02:42 AM1/23/21
to hugi...@googlegroups.com
Am 23.01.21 um 16:42 schrieb Luís Henrique Camargo Quiroz:
>
> I have interest in pv, but have not had success compiling it in the
> past, with gcc.

Do yourself a favour and use clang++. The resulting binary is much
faster. I've also made efforts to make compiling easier, it should not
be hard at all. I'll help if you run into problems.

>    I put an 'event' in my calendar and will try to compile pv in a
> month or even sooner, and I will report back.

Looking forward to hear from you then!

All the best
Kay

Luís Henrique Camargo Quiroz

unread,
Feb 3, 2021, 6:57:13 PM2/3/21
to hugi...@googlegroups.com

   Hi Kay!

   I just cloned pv and installed the dependencies, but had a problem.  I am using Debian (testing/unstable, i. e. bullseye/sid), and  vc-dev here is version 1.3.3-4, so I had to remove it and install vc 1.4 from git.  Now I succeeded!

   It is time to see the options, but it is fast and will be extremely useful,

  many thanks!

  Luís Henrique

 

--
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hugin-ptx+...@googlegroups.com.

Kay F. Jahnke

unread,
Feb 4, 2021, 3:57:52 AM2/4/21
to hugi...@googlegroups.com
Am 04.02.21 um 00:56 schrieb Luís Henrique Camargo Quiroz:
>
>    I just cloned pv and installed the dependencies, but had a problem.
> I am using Debian (testing/unstable, i. e. bullseye/sid), and  vc-dev
> here is version 1.3.3-4, so I had to remove it and install vc 1.4 from
> git.  Now I succeeded!

Hey, great! Yes, debian makes an effort to be very stable, so oftentimes
they don't provide the latest packages. I wish I could just add Vc in
source code, like I do for my own library 'vspline' which is used for
the rendering, but Vc has a binary component, so it has to be built or
installed. I think the latest debian and ubuntu versions do distribute
Vc 1.4, so this problem will disappear eventually.

>    It is time to see the options, but it is fast and will be extremely
> useful,

I hope so! I admit there are many, many options and it can be a bit hard
to see which ones are useful - I made an effort to write pv so that it
just does 'the right thing' even without any options, but if you really
want to make it work for you, you'll have to look into the options
eventually. It's a lot of work to run such a large project, and I still
add a lot of new code, so sometimes the documentation is not quite
up-to-date or bits are missing.

>   many thanks!

You're welcome!

Kay

kfj

unread,
Feb 6, 2021, 5:59:54 AM2/6/21
to hugin and other free panoramic software
Dear group!
I've decided to offer Windows binary packages of pv to interested users for evaluation. The software should work on all 64bit W10 systems, and may even run on older Windows versions. You should have at least a dual core system with AVX units, otherwise it won't be fun at all. Best is four cores and up with AVX2 or better SIMD units.
Just drop me a line off-list, and I'll send you a download link to a 'pv bundle' - a ZIP-compressed folder containing pv and all necessary DLLs and associated resources. This is 'stickware' and does not require installation, all you need to do is to unzip the folder, find 'pv.exe' (or plain 'pv' if you've opted to hide extensions in the explorer) and doubleclick on it - it will open a file select dialog and you can take it from there. Documentation is included (see README.html).
The download is via one of my private cloud accounts, that's why I don't want to publish a link here, which might be circulated widely and get me in bandwidth trouble with my service provider.
Kay
Reply all
Reply to author
Forward
0 new messages