Show visual difference between original and encoded images.

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, xnview

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

Show visual difference between original and encoded images.

Post by Euphoria » Mon Aug 11, 2014 10:37 pm

: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: 31887
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Show visual difference between original and encoded imag

Post by xnview » Tue Aug 12, 2014 12:22 pm

you have "export"
Pierre.

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

Re: Show visual difference between original and encoded imag

Post by XnTriq » Sat Aug 16, 2014 7:30 am

I support this request.
p121400.gif
p121400.gif (71.99 KiB) Viewed 2845 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 » Sun Aug 17, 2014 1:57 pm

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 » Sun Aug 17, 2014 4:16 pm

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: 5456
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Show visual difference between original and encoded imag

Post by XnTriq » Sun Aug 17, 2014 5:00 pm

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 2822 times

User avatar
xnview
Author of XnView
Posts: 31887
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Show visual difference between original and encoded imag

Post by xnview » Mon Aug 18, 2014 2:22 pm

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 » Mon Aug 18, 2014 2:54 pm

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: 5456
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Show visual difference between original and encoded imag

Post by XnTriq » Mon Aug 18, 2014 9:00 pm

Panning changes preview from compressed to original :idea:
p121433.gif
p121433.gif (25.84 KiB) Viewed 2784 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: 31887
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Show visual difference between original and encoded imag

Post by xnview » Tue Aug 19, 2014 1:25 pm

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 » Tue Aug 19, 2014 2:46 pm

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: 5456
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Show visual difference between original and encoded imag

Post by XnTriq » Tue Aug 19, 2014 8:00 pm

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: 8
Joined: Sun May 25, 2014 11:51 pm

Re: Show visual difference between original and encoded imag

Post by Euphoria » Thu Aug 28, 2014 4:28 pm

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 » Thu Aug 28, 2014 4:35 pm

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: 5456
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Show visual difference between original and encoded imag

Post by XnTriq » Mon Sep 08, 2014 3:00 am

TinEye's comparison of doctored and original photo:
p121775.gif
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 2689 times

Post Reply