Show visual difference between original and encoded images.

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, helmut, xnview

Euphoria
Posts: 14
Joined: Sun May 25, 2014 11:51 pm

Show visual difference between original and encoded images.

Post by Euphoria »

:idea: When exporting an image to a lossy format, give the option to view the visual difference of the images side by side to compare the encoding artifacts, and allow adjustment initial auto adjustment of RGB level sliders to enhance the contrast so what might otherwise be faint or invisible, will be able to be seen, on individual channels.
Also allowing for the calculation of PSNR/SSIM for the saved image. This can give a user an idea of what parts of an image will contain the most artifacts from compression, and allow finding the optimal acceptable compression of an image. Whereas just comparing an image side-by-side might render the differences virtually imperceptible, unless this task was performed manually by an image editor, such as Photoshop or the Gimp, which makes it almost intangibly tedious. This task makes it amazingly simple.
It is a feature CompuPIC used to have available when saving JPEGs only, though CompuPic (Which has not been developed since Version 6.23.1364 back in September 25, 2003), almost 10 years ago) but there is no reason it could not apply to any lossless codec that XnView produced.
A feature that would be extremely useful for those optimizing their image compression AND showing people how a codec actually goes about compressing their images by showing only the differences between the original and the compressed image. And allowing the user to to toggle between this mode, and the "normal" mode.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Show visual difference between original and encoded imag

Post by xnview »

you have "export"
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Show visual difference between original and encoded imag

Post by XnTriq »

I support this request.
p121400.gif
p121400.gif (71.99 KiB) Viewed 5365 times
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?t=28093&p=111437#p111437]Compare more than 4 images, show diffs[/url]) wrote:
  • Qt
    • Qt Quarterly: Composition Modes
      “Recent years have seen great improvements in computer graphics hardware, making it possible for developers to add advanced graphical features to applications, such as composition modes and partial transparency, previously only used in specialized graphics applications.”
    • Qt Reference Documentation: Composition Modes Demo
      “Composition Modes demonstrates the range of composition modes available with Qt.”
  • SimpelFilter
  • Kevin Jensen
    • Let’s Learn Math: Photoshop Blend Modes
      “One of the best features of Photoshop is the layer blending modes. They allow you to create spectacular effects with little to no effort. I’ve been taking a closer look into how Photoshop handles the blending of layers (especially the math side of it).”
  • Photoshop Essentials
  • Jim Tilander
    • Aurora: Comparing Images
      “In order to automate testing, you often need an image comparison step. This looks at comparing two different HD images.”
<!--// snip //-->
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: Show visual difference between original and encoded imag

Post by JohnFredC »

Support.

I would use such a feature daily.
John
pic_viewer
Posts: 251
Joined: Sat Nov 17, 2007 7:53 am
Location: Germany

Re: Show visual difference between original and encoded imag

Post by pic_viewer »

Me too. Right now I use RIOT to 'compress' (reduce in size) pics, which at least has a side by side comparison. But the above options are much better.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Show visual difference between original and encoded imag

Post by XnTriq »

In addition, I'd like to be able to switch between side-by-side (original + compressed) and “stacked” (original/compressed/difference) display.
p121414.gif
p121414.gif (62.26 KiB) Viewed 5342 times
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Show visual difference between original and encoded imag

Post by xnview »

Export is not enough???

i can add tab support, and difference view
Pierre.
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: Show visual difference between original and encoded imag

Post by JohnFredC »

Hi Pierre

It's about better tools for tuning the compression. The user would set the difference as the primary display and then adjust the compression, balancing file size against the "extracted" artifacts shown in the difference image.

In many cases it is much easier to inspect a single difference image than to compare two images side-by-side which may differ only subtly.

Jumping the eyes back and forth and relying on visual memory is inefficient and less "accurate". For instance, a user could have focused on issues of jpg compression in the "detailed" portion of an image only to later discover (perhaps in a print) banding in areas that should have been smooth.

There are other uses for an image which is the "difference" between two images, for instance surveillance imagery. Once implemented for Export, such a tool could be usefully exposed in the Compare panel.

Thanks for listening!
John
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Show visual difference between original and encoded imag

Post by XnTriq »

Panning changes preview from compressed to original :idea:
p121433.gif
p121433.gif (25.84 KiB) Viewed 5304 times
Olivier_G ([url=http://newsgroup.xnview.com/viewtopic.php?p=41374#p41374]Export - save zoom value[/url]) wrote:What about a small overview to drag/modify the zoomed area (zoom % remembered, as suggested):
Image
It's a draft: I'll increase window size slightly to give more room to everything -> but what do you think about this idea?
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Show visual difference between original and encoded imag

Post by xnview »

so if i understand correctly is to have a button or click to swap between original/compressed image in export dialog??
Pierre.
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: Show visual difference between original and encoded imag

Post by JohnFredC »

It would be useful to see the original beside the difference, esp. for navigation. So please support (at least) the ability to display the difference image in the right panel.

Also, some adjustment of the difference image would be nice. In a tool I use, it is often necessary to save the difference image and then perform a levels adjustment to see the differences. Perhaps a "Brightness" slider that only appears in the dialog when the Diff mode is enabled?

Image
John
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Show visual difference between original and encoded imag

Post by XnTriq »

xnview wrote:so if i understand correctly is to have a button or click to swap between original/compressed image in export dialog??
  1. Button for switching between two-up (side-by-side) and one-up layout
  2. Button for setting preview to compressed or difference
    • Two-up layout
      • Side-by-side display of original & compressed
      • Side-by-side display of original & difference
    • One-up layout
      • Clicking on the preview lets user pan
      • Clicking on the preview also swtches between compressed & original or difference & original (“blink comparator”)
Kaleidoscope has four connected layouts: Two-Up, One-Up, Split, and Difference.
In Corel PHOTO-PAINT's Export for Web and Image Adjustment Lab dialogs, it's Full-Preview, Before & After (Full), and Before & After (Split).
Euphoria
Posts: 14
Joined: Sun May 25, 2014 11:51 pm

Re: Show visual difference between original and encoded imag

Post by Euphoria »

Some very good mockups. What I had in mind is specifically a "image difference" toggle that would would, when unchecked, or deactivated, simply show the uncompressed image, and the compressed image side-by-side. "Eyeballing" the quality of a compressed image is a very poor way to judge the overall quality of the image in any sense as perception is so subjective. Where one person may not notice artifacts, artifacts might jump right out at yet another person. And side-by-side is all the more difficult compared to other methods of comparing image differences.

So, Ideally there would be a "image difference" toggle than when activated, would show in the first window, the compressed image (rather than the uncompressed image) and would allow you to click on the first image to toggle, or "blink" between the uncompressed image, and the compressed image. This is a much better way of viewing subtle differences between the original and the compressed image.

While the "image difference" was set, in the second pane, you would see the difference of the uncompressed image, and compressed image, with the RGB levels equalized, and an optional "brightness" slider to enhance the contrast/brightness for viewing of more subtle differences.

I feel it is important to calculate the PSNR(SNR) and most importantly the SSIM of images, so users have some values to use, aside from just what they see visually to base the quality of the image. For example, they could aim for a certain SSIM for a batch of images for a measure of constant quality.
Last edited by Euphoria on Sat Aug 30, 2014 8:21 am, edited 1 time in total.
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: Show visual difference between original and encoded imag

Post by JohnFredC »

Euphoria wrote:and would allow you to click on the first image to toggle, or "blink" between the uncompressed image, and the compressed image. This is a much better way of viewing subtle differences between the original and the compressed image.
Yes, blink is very good, esp. with zoom.
John
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Show visual difference between original and encoded imag

Post by XnTriq »

TinEye's comparison of doctored and original photo:
GröFaZ (left) &amp; Blondie spending some quality time together<br />“Compare your submitted image to your result image. Quickly click the ‘Switch’ button to switch back and forth between the two images and highlight any differences. This works best when one of the images has been modified.”
GröFaZ (left) & Blondie spending some quality time together
“Compare your submitted image to your result image. Quickly click the ‘Switch’ button to switch back and forth between the two images and highlight any differences. This works best when one of the images has been modified.”
p121775.gif (185.33 KiB) Viewed 5209 times
Post Reply