pv - a powerful multiplatform FOSS image and panorama viewer


_kfj
 

Dear group!

It's been a while since I've posted to you lot, but I take the migration to groups.io as an opportunity to do so again. Some of you may remember me from times when I've been more active. To give you a brief update: I'm a developer, coding in C++ and python, and I'm also a panorama photographer. I've been involved a lot with hugin, but in the past few years I've turned more to my own projects and focused on two of them:

- vspline, a library for processing b-splines
- pv, an image and panorama viewer based on vspline

Work on the library has been going on for six years or so, and the viewer, which started out as a demo for the library, took off a couple of years later, and has evolved a great deal since. AFAICT both projects are not well known, and I'd like to draw some attention to them, hence this post.

Members of this group will be more interested in the viewer, so that's what I'll focus on. First technicalities: As of this writing, I offer source code only. I have established working branches for debian-based linux and msys2/mingw for Windows, and proof of portability to macOS, though no established branch for it yet. If you want to give my software a try, you'll have to build it yourself, or find someone to do it for you. I don't have the resources to do the packaging and distribution on top of the development - after all it's pretty much just a one-man show. My repository is here:

https://bitbucket.org/kfj/pv

There, you'll also find the documentation and build instructions.
To whet your appetite, I'll give a short feature list here:

- view spherical, cylindric, fisheye, stereographic, rectilinear
and flat source images
- display in rectilinear, spherical, cylindric, fisheye and
stereographic 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 produce high quality image files from
the current view
- 'source-like' snapshots in the source image's aspect ratio and
projection
- 'multi-faceted' images: panoramic views with 'live stitching'
- read and display PTO files made with software like hugin
- live HDR blending, simple tonemapping
- slideshows
- simple scripting with 'ini files'
- data handling and image i/o with vigra
- HQ interpolation with uniform B-splines using vspline
- exploits all CPU cores
- hardware vectorization (SIMD), optionally using Vc
- automatic CPU detection and use of CPU-specific SIMD code
- user interface and display engine made with SFML
- metadata access with libexiv2 to detect panoramic images

In short, I put pretty much everything I ever wanted in a panorama viewer into it. Producing still images with geometrical transformations is not too hard, what's more difficult is animating smoothly, so that when the user pans or scrolls, there are no dropped frames or stutter. pv is CPU-based, so you need a reasonably powerful CPU for smooth animation in good resolution. pv can adapt to less powerful hardware by lowering animation quality, but I'd recommend four physical cores with AVX2 units or better.

Once I had implemented the panorama viewer, I noticed that I got very much used to it's user interface, and found it annoying to have to use anything else when viewing 'ordinary' images. That's why I added functionality which is more common with 'ordinary' image viewers, especially the slide show mode. Now I use pv for everything.

When I had single-image display up and running, I started with cubemaps, and this got me into multi-image synoptic views, where you don't just have six cube faces in fixed places, but a set of images 'somewhere' around you. While, initially, I wrote my own file format to describe such views, I soon started reading PTO files as well, which have all the information that's needed - in image processing speak, it has the 'image registration'. pv can use this information and display a synoptic view of the images in a PTO file *without first stitching them*. I call this 'live stitching'. This has several implications:

- it's faster than having to wait for the stitch to complete
- if you have tele shots mixed in, you can zoom in to their full
resolution

It's particularly fast to re-read a PTO file - just save the PTO in your favourite panorama stitcher, like hugin, an then press F1 in pv to update the view. There are drawbacks, of course: 'live stitching' takes a lot of processing power, so animation tends to stutter and frame rates may go down to a few fps. And it may take considerable time to load all images into memory, and a lot of memory to acommodate them in high resolution. Synoptic views are quite new in pv. They require good registration, and the 'live stitch' is less capable at masking registration errors or avoiding ghosting, using only geometrical considerations - and optionally feathering - for the synopsis.

pv can also do synoptic views of registered exposure brackets, which can be HDR-blended from the registration information in the PTO file. What it can't do - yet - is displaying panoramas made from image stacks; for those, you'll have to HDR-blend the stacks first and then register them into another PTO.

pv has high-quality export facilities, and you can export everything you see into image files - including, for example, the 'live' HDR blends, which can be exported to openEXR. When displaying image (sets) in non-rectilinear projection, you can export those views as well, so you can use pv as a simple stitcher to produce, e.g., full sphericals. This can be automated to do batch processing of sets of input files. I had the notion of a 're-take' software: I do trekking, and oftentimes, when 'out there', I don't have time to focus on the take, so I just hold out a short lens and capture an exposure bracket. Back at home I register the data and load them into pv, and then I have time to 'redo the take' and produce appealing images from the raw data.

Have I whetted your appetite? Maybe I'll have to add a word of warning: to use the more advanced features of pv, you'll have to spend time reading the documentation, and a lot of pv's more advanced features require passing arguments on the command line. It's hard to 'harness' powerful software to make it usable for the general public, and my focus is clearly on writing powerful software. As a developer, I'm probably not very good at making it's use easy. For casual users, there's a bit of a GUI for the most common operations, so all it takes is launching pv and picking some images in a file select dialog.

The windows version has code to package the binary, resources and DLLs into a 'bundle' which can be used without installation ('stickware'). This would make distribution easy, but I'm not totally confident that re-distributing all the DLLs is legally possible. I'd like advice on the matter, and I'd also like to invite packagers: I'd like to see linux packages and windows installers. If any of you are in a position to help with packaging, this would be appreciated!

With regards

Kay

Join ptng@groups.io to automatically receive all group messages.