Image Sharpness Setting Option? Bring Back Moire?

Q&A about the latest versions
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

Important:
Maybe we should take a step back and ask 4 questions to establish a starting point:

1. What camera (360 camera or Lens /DSLR) are you currently using ?
2. If you are not satisfied with your current camera ... which one are you looking to purchase ?
3. What is your intent for camera use? Business or Personal ?
4. Are you currently using Pano2vr Lite or Pro version ?

Following question:
If business what presentation software are you planning to use?

I am curious but not sales soliciting.
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

360Texas wrote: Thu Jul 09, 2020 10:26 pm Important:
Maybe we should take a step back and ask 4 questions to establish a starting point:

1. What camera (360 camera or Lens /DSLR) are you currently using ?
2. If you are not satisfied with your current camera ... which one are you looking to purchase ?
3. What is your intent for camera use? Business or Personal ?
4. Are you currently using Pano2vr Lite or Pro version ?

Following question:
If business what presentation software are you planning to use?

I am curious but not sales soliciting.
None of that is really going to help even if you knew any of the answers. :) It's a softer image. I'm using Lite, although if you think Pro would be any sharper: why?

You can take literally any image you like from any camera, put it through any number of 360 panoramic viewers - including the one I posted the link to previously - as well as through Pano2VR. Its viewer produces the softest image. I want it to not do that. I'll make up a video that makes it absolutely clear, although I've also got to make up something demonstrating bad stitching for Martin; so might not be tomorrow.

It's fine, if you've never compared Pano2vr's viewer to anything else there's no reason why you'd have noticed how soft it was. But, once you have seen it: you can't ever unsee it.

So, just try that until I put together a video showing the problem? There's no experience you'll value higher than your own. ;) Then we'll both be on the same page.
Last edited by Branigan on Sun Jul 12, 2020 12:07 am, edited 1 time in total.
SteveL58
Posts: 34
Joined: Fri Dec 04, 2015 6:18 pm

I had noticed a softer image as well in Pano2VR using the Insta360 One R with a resolution of 6080 x 3040.

I played around with some things and I think I stumbled upon something....maybe.

At 6080 x 3040 the image in Pano2VR was soft. However, if I resized the image down to 4288 x 2144....the image appeared to be sharper in Pano2VR.

Maybe you could try that and see if that helps. I would be interested to hear the outcome.

I am not sure what or if there is a maximum Equirectangular size for Pano2VR.
SteveL58
Posts: 34
Joined: Fri Dec 04, 2015 6:18 pm

Ok...some further experimentation.

I resized the Insta360 One R Pano from 6080 x 3040 to the size of the Theta V output which is 5376 x 2688 and that also seemed to show a sharper image.

So I decided to take the same image original and resize it to 6000 x 3000 and this also was softer/blurry.

So I think that Pano2VR max size....again I am guessing must be for the Ricoh Theta V Dimensions of 5376 x 2688 as that seems to be the best image sharpness I could get.
User avatar
k.ary.n
Gnome
Posts: 616
Joined: Wed Aug 15, 2007 1:02 pm

Luckily, Pano2VR allows you to change the defaults. You can change the interpolation filter to Lanczos 3. If that doesn’t work to your liking, try Lanczos 2. And if that doesn’t work, change to Box or Blackman-sinc. The beauty here is that you’ve got options.

You can also change the the output factor to width/Pi, which you said you’ve done but did not get any change in results. This is probably because you didn’t create a new output folder or remove the existing tiles before re-outputting the project. Pano2VR will not recreate the tiles if they already exist. So you have to use a new output folder or remove the old tiles. When you do this, you will notice a change and if not visually, certainly in the file size of the tiles folder.

Also keep in mind that size does matter. A 6k image isn’t necessarily big.

Take a look at the following projects. They are all great examples of different use-cases and different cameras and different post-processing techniques. But more importantly, they are all using the same player.

http://hi360v.com/other/wroclaw/
https://marshalltx.360pano.tours/servic ... index.html
https://360.wilhelm-busch-land.de/tieri ... pjuafg0z1k
https://bienesraicespiura.com/tour-360- ... 5TelgaRLKQ
https://pano.szenerien.de/XPhase_Pro_S/ ... QXwVbU2_Ig
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

OK, I found where it's doing it, I just don't understand why some other options that might be available, aren't.

If you Unminify the viewer, you can see all the many places where the filtering is set - and there are about a dozen, possibly for Multi-res textures when I'm exclusively using Single-res, or other browser environments - but, this single line is what changes everything - in a Firefox browser, anyway.

c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MIN_FILTER, c.LINEAR);

Changing this line to:
c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MIN_FILTER, c.NEAREST);

Turns off the blending and it looks as expected when scaling down: quite jagged at default FoV, but definitely sharper when zooming in. Not ideal, though. :|

Theres is no corresponding TEXTURE_MAG_FILTER line here (as there is everywhere else in those dozen or so places) and it's always smooth when scaling upwards.

However, adding a new line: c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MAG_FILTER, c.NEAREST); made scaling up also jagged, as the default setting of MAG is LINEAR.

I deleted the line again, as that's not the problem I'm trying to solve.

Deleting the _MIN_ line caused a blank screen, so it apparently needs set to something other than its default (See below).

Changing the Interpolation filter back to Mitchell from Lancsoz3 - so the source tiles were softer - made a very slight improvement, but not enough.

TEXTURE_MAG_FILTER only has two options in WebGL1: LINEAR (default value) and NEAREST.

There are supposed to be other options available for TEXTURE_MIN_FILTER , which are: LINEAR, NEAREST, NEAREST_MIPMAP_NEAREST, LINEAR_MIPMAP_NEAREST, NEAREST_MIPMAP_LINEAR (default value (Really? :? )) , LINEAR_MIPMAP_LINEAR

Setting it to any of those just produces a blank screen, so something else might need to be changed, but I know nothing about Javascript, so wouldn't know where to look.

I don't know if any of those other options would be less jagged, but also slightly clearer, than LINEAR, so does whoever wrote this area have any input?
The Insta 360 One X viewer (and others) is less jagged than this is in NEAREST, as if it's working with a higher resolution canvas, or only adding a tiny bit of blending, so is there a way to get closer to that?

Finally, I thought I'd check out if NEAREST really is just picking the nearest pixel or doing any more work. It seems it is doing something like a slight colour blend, as there are traces of colours not actually present in the original pixels.

This first image is a section of the tile with some non-anti-aliased lines drawn on it in green. The second is a screen grab from the viewer when it's scaled the image down slightly, then that's scaled up to make it more clear. There are lighter green pixels in there, rather than just either "line" or "sky". Where are they coming from?

Not sure any of this is particularly useful - although it does show you can use smaller tile sizes if you're never going to zoom in far enough to see the details - but if the programmers can say whether or not it's possible to have some variation on the blending mode, other than LINEAR, that would be cool. :D

Meanwhile I'm going to see about adding some slight blur to the high contrast areas of some tiles to see if I can give it something to work with when in NEAREST mode that makes it look less jagged there, but retains the detail elsewhere.
.
tile section.png
tile section.png (47.43 KiB) Viewed 4200 times
nearest.jpg
nearest.jpg (34.22 KiB) Viewed 4200 times
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

k.ary.n wrote: Fri Jul 10, 2020 6:03 pm Luckily, Pano2VR allows you to change the defaults. You can change the interpolation filter to Lanczos 3. If that doesn’t work to your liking, try Lanczos 2. And if that doesn’t work, change to Box or Blackman-sinc. The beauty here is that you’ve got options.

You can also change the the output factor to width/Pi, which you said you’ve done but did not get any change in results. This is probably because you didn’t create a new output folder or remove the existing tiles before re-outputting the project. Pano2VR will not recreate the tiles if they already exist. So you have to use a new output folder or remove the old tiles. When you do this, you will notice a change and if not visually, certainly in the file size of the tiles folder.
That's nice, but the Interpolation filter is not where the (or my, anyway) problem lies. I did delete the Output folder Image files because so many times it ignores changes that I make and refuses to make files when it should, that I do that almost as a matter of course now.

But, just to be thorough: I just deleted, then recreated a set of tiles with Width/Pi set to On and then saved the folder as "images-copy". I closed Pano2VR, restarted it, changed the Width/Pi flag back to Off, closed it again, restarted it. No chance it didn't get the message or cached anything different.

I then deleted the contents of the original 'images' folder and created the tiles again, this time with that flag off. Then compared the results. All the tiles in 'images' and 'images-copy' are identical down to the pixel and down to the byte in file sizes.

Setting or not setting Width/Pi makes no different whatsoever. :(

BTW, I'm using Single-Res tiles, in case that's relevant?

Just like in the last thread where I 'probably' did something that I didn't: it still does not create new Preview images when you change their quality, or even if you delete them all from the images folder. You need to either delete a single full sized tile, or change its quality - then change it back - for it to recreate all the tiles again, including the Previews.

As I now always have the images folder open in another window: I delete a full-sized tile to trigger it.
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

SteveL58 wrote: Fri Jul 10, 2020 2:27 am I had noticed a softer image as well in Pano2VR using the Insta360 One R with a resolution of 6080 x 3040.

I played around with some things and I think I stumbled upon something....maybe.

At 6080 x 3040 the image in Pano2VR was soft. However, if I resized the image down to 4288 x 2144....the image appeared to be sharper in Pano2VR.

Maybe you could try that and see if that helps. I would be interested to hear the outcome.

I am not sure what or if there is a maximum Equirectangular size for Pano2VR.
Thanks for chiming in, I'd accidentally skipped over your posts when I was replying before. I did not find it sharper at a lower resolution. A slightly misleading result is that if you get the Zoom/FoV 'right' you're barely scaling the image up or down and so you're seeing almost a 1:1 view of the original pixels - in the centre, anyway - so it can seem sharper than if you have a larger image that gets softened as it's scaled down.

This would depend on so many factors: width of screen display, browser implementation, actual FoV/Zoom that it's hard to judge or plan for. But, you can experiment and see that if you're likely to disable, or significantly reduce the Zoom range, there's little point in having a larger panoramic image/tile size that will only ever be scaled down and look softer. You might find that 'sweet spot' where the smaller image scales less and so 'looks sharper'. Some/more of the time...? :?

I've tried with a largish 20000x10000 aerial panorama and in Multi-Res it stays sharp as you'd expect when zooming in, but looks soft when at the default FoV, like there is a very slight mismatch between the tiles chosen for the display at a specific zoom level? In Single-Res it's softer than it needs to be at the resolution you set for the tiles compared to that same panorama, resized to say 8000x4000 and tiles of 2000, when viewed in another viewer. I.e resized to 8000x4000 in another viewer looks sharper than tiles of 2000 (8000/4) in Single-Res in Pano2vr.

It very slightly suggests - and the 'extra' light green pixels that appear in my example above hint that - either the canvas is slightly larger than the display and is being softened as it's scaled down to fit, or that the browser itself is applying some slight anti-aliasing of its own? There is reference to Anti-Aliasing being toggled in the code, but I couldn't see when or how it was triggered, and from what I've read: not all browsers support it, so maybe the 'scaling down' is used to get around that? The weird thing is I can remove great big chunks of the code and it all still works fine - even if a few "compilation etc." errors come up and I just 'OK' them. There are evidently lots of 'special cases' in there for things other than my specific browser: Firefox on a PC.

Might it be an either/or? Anti-aliasing if it's supported, scaling if it's not? But this is all just speculation from poking around in the code, and without something to debug and step through it: I've no real idea what it's doing; just that the results are different when given the same source as other viewers at the same resolution/zoom/FoV and I'm unable to find that 'sweet spot' for my specific use case, which is pretty simple: 6080x3040 (or 6720x3360 for Ricoh Z1) and an FoV of 90 and FoV Mode: Diagonal. :(
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

If the official reponse is to ignore the problem, maybe some other users can chip in when they see how soft the renderer is and how it's ruining their images.

So there is no mistake, you can check things out with a very good 8192x4096 HDRI image from here:
https://hdrihaven.com/hdri/?c=outdoor&h=chinese_garden

There are several options, but the 8K JPG is the easiest and drops right into a 360 Viewer, or Pano2vr.

https://hdrihaven.com/files/hdri_images ... garden.jpg

This looks great in any other 360 viewer, and even shrinking it to 6080x3040 still looks nice and sharp.

It's still as soft as a baby's bottom in Pano2VR at both 8K and 6K resolutions though; and even massively turning up the sharpness and contrast can't get anywhere near the original quality.

BTW, the images are all slightly different shapes, because they're taken from the original panorama (near the middle, so not too distorted), a Cube Face Tile and from the viewer and Pano2vr when in exactly the same place on screen, so at the same resize/anti-aliasing/up/down scaling etc.

(As an aside I played around with toggling c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MIN_FILTER, c.LINEAR/c.NEAREST); and c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MAG_FILTER, c.LINEAR/c.NEAREST); on and off as well as turning off the "high performance" antialiasing switch, but it made no difference, other than making things look jagged and lumpy at different scaling positions. The detail and contrast is somehow lost before it gets to the final render stage - or what I could find of it.)

Just to show the differences, the first image is a section of a treetop after the 8K panorama was reduced in size to 6080x3040, then over-sharpened to death. It's noisy and quite messy.
However, it comes out looking like the second image when put into another 360 Viewer. The noise is reduced but the overall sharpness and contrast is the same. The Panorama itself looks very clean.

The third image is that image's tile after it's been generated by Pano2VR. From image tile sizes resolutions of 1520 (6080/4) up to 3040 (6080/2) and 2048 (8192/4) makes no difference to the final output, and higher resolution images are wasted when they all look like blurry low-resolution ones lacking in contrast.

The Tile's sharpness is quite a bit less than the original source image, but looks fairly close to the section from the other 360 Viewer. The noise has gone, as have the over-sharpening halos, but the detail is still there and most of the contrast; although it looks very slightly lower contrast than from the other viewer (using Lancsoz3 Filter), but pretty close.

The last image is when that tile (and the other 5) is viewed in Pano2vr in the browser on a PC (Firefox). Result: Soft, mushy, lower contrast and lacking in detail. :cry:

If it all looks like a mess of pixels to you: it's most obvious in the thin twig indicated by the small arrow. See how it travels through the process of sharp and obvious to blurry and almost gone.

What is the point of having clean, high resolution, detailed, nicely contrasting images if Pano2vr is going to display them through a layer of soft gauze?

Again, just to see what it could/should be looking like, get the Insta360 Player (Mac/Windows, etc.) from about halfway down this page: https://www.insta360.com/download/insta360-one

So, could we perhaps have an official response about attempting to improve this in the next release?
.
Original.jpg
Original.jpg (36.68 KiB) Viewed 4082 times
360Viewer.jpg
360Viewer.jpg (56.26 KiB) Viewed 4082 times
Image_Tile.jpg
Image_Tile.jpg (50.25 KiB) Viewed 4082 times
Pano2vr.jpg
Pano2vr.jpg (47.9 KiB) Viewed 4082 times
Last edited by Branigan on Wed Jul 29, 2020 10:55 pm, edited 3 times in total.
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

This is not Branigan's imaging work. The Image is copyrighted to:

Chinese Garden Sample
Andreas Mischok taken 24 June 2020 16:18
7.599mb

downloaded from site and directly loaded into Pano2vr 6.1.8

[EDIT]
Screen Capture from Pano2vr main spherical projection viewer both images look good to me.

Looks good from where I sit.
chinesegarden.jpg
chinesegarden.jpg (136.96 KiB) Viewed 4077 times
zoomed in 100%
chinesezoom100pct.jpg
chinesezoom100pct.jpg (35.78 KiB) Viewed 4071 times
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
Neal
Posts: 193
Joined: Thu Dec 12, 2013 11:14 am
Contact:

A quick question so I can understand what you are saying. When you say you are viewing it in pano2VR, are you talking about the view screen in the pano creation software or are you talking about viewing the output in your browser?
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

360Texas wrote: Wed Jul 29, 2020 9:53 pm Chinese Garden Sample
Andreas Mischok taken 24 June 2020 16:18
7.599mb

downloaded from site and directly loaded into Pano2vr 6.1.8

[EDIT]
Screen Capture from Pano2vr main spherical projection viewer both images look good to me.

Looks good from where I sit.

chinesegarden.jpg

zoomed in 100%

chinesezoom100pct.jpg
It's not mine, but it's not copyrighted. From the website itself: :wink:

-------------------
All HDRIs on this site are licensed as CC0 - which is the most liberal license I know of.

Here's an exerpt from the CC0 FAQ page to clarify:
"Once the creator or a subsequent owner of a work applies CC0 to a work, the work is no longer his or hers in any meaningful sense under copyright law. Anyone can then use the work in any way and for any purpose, including commercial purposes, subject to other laws and the rights others may have in the work or how the work is used. Think of CC0 as the "no rights reserved" option. CC0 is a useful tool for clarifying that you do not claim copyright in a work anywhere in the world."

In other words:

You can use the HDRIs for any purpose, including commercial work.
You do not need to give credit or attribution when using them (although it is appreciated).
You can redistribute them, share them around, include them when sharing your own work, or in a product you sell.


-------------------

What are you trying to compare with what, exactly? The same image compared to a zoomed in version of itself? :?

It's not about what looks good to you, it's what can be compared with other examples at close to the same size/resolution and pixel size by anyone at all.
Sit a little closer to the screen and put on some reading glasses if it's not clear?

There are 4 states you can compare:
1) Original Panoramic image
2) Original Tile generated from that image by Pano2VR as Cube Tiles.
3) Same Tiles viewed in the Browser with Pano2vr_player.js (edited my previous post to make that more clear)
4) Same Panoramic image (doesn't need to be made into tiles) viewed in a different Viewer - in this instance: Insta360 Player - although seeing examples of other panoramic software being much clearer and sharper: try any one of those as well?

Compare images 2 and 4. They are the same size, same angle, same zoom, FoV, everything. But the blurry, less contrasting one is viewed in the Browser via Pano2VR.

It's clear that the image data is softened once during Tile creation - even using the sharper Filters - but that is displayed even softer and with less contrast at the same pixel sizes in the browser, so not blurring caused by antialising/upscaling itself. It's very much comparing like with like.

Presumably if/when this is fixed, there won't be a need for the workround of a mask to hide the fact that video overlays are in the wrong colourspace with respect to the images they're overlaying.

How someone looked at that problem and thought: "I know! Hide it with a blurry mask edge!" is beyond me. :shock:
Last edited by Branigan on Wed Jul 29, 2020 11:00 pm, edited 8 times in total.
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

Neal wrote: Wed Jul 29, 2020 10:00 pm A quick question so I can understand what you are saying. When you say you are viewing it in pano2VR, are you talking about the view screen in the pano creation software or are you talking about viewing the output in your browser?
Yes, I could have been clearer: Viewed in the browser, on a PC, using Firefox, with pano2vr_player.js :)
Neal
Posts: 193
Joined: Thu Dec 12, 2013 11:14 am
Contact:

I'm also am using the Insta360 One R for panoramics, in fact I am working on a project right now.

I changed the Interpolation Filter to "Gaussian Sharp".

So I compared the original TIFF, with the Pano2VR6 tile, and with the panoramic displayed in Edge, Firefox, and Chrome using the localhost server. Using the local server will eliminate any server bandwidth saving issues that could occur.

Doing a comparison, I found no loss in detail between the tile stored on my computer and the image displayed in the three browsers.
Both the tile and the browser image appeared to be a sharpened version of the TIFF file. Since I selected "Gaussian Sharp" I expected that.

-- edit addition ----
I pulled up the original DNG file from the camera. I'm still not seeing what you are seeing.
-----------------------

(Sorry if I'm misinterpreting the above conversation or under-estimating your knowledge. )
So, what does this mean for what you are seeing? I'm going to take some guesses. It should be noted that these guesses and a $1.50 will get you a cup of coffee.

I'm not sure how you are magnifying those images. But, a browser will take whatever image it gets and downsample it to fit the display area. A 2000x4000 image displayed in a 100X200 box will have the details of a 100x200 image. So if you are using screen capture or the magnification feature in the browser, the starting point will always be the pixel size in the browser.

Now, if you are viewing the output on a remote server, it is possible that it is set up to provide images that match your browser requirements. This is a common setup were the browser and the server will exchange info and the server will rescale the image to only the size needed by the browser. So if your browser says it needs a 1000x2000 image, the server only sends a 1000x2000 image.

There also appears to be a misunderstanding of the term "resolution" and how it relates to the number of pixels stored in a file. So instead, I'm going to use the word "details". The amount of details in an image is set when the photo is taken. Increasing the number of pixels will change nothing except for the file size. So going from 2000 x 4000 to 4000 x 8000 does nothing. Reducing the file size reduces the details. However, that may not be apparent depending on how the image is displayed. Two identical images at 6000x3000 and at 4000x2000, would display similarly on a 1920 x 1080 monitor. Because in both cases, the image would have to be downsized to fit.
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

Thank you Neal.
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
Post Reply