The picture shows the difference pixel-by-pixel between an image and its JPEG2000 compressed version: white=no-difference; black=big-difference
The original image is Image:Lichtenstein img processing test.png, that I have renamed castle.png on my hard-disk to make it simpler. The I have converted it so JPEG2000 using the "convert" utility by ImageMagik, with the following command:
convert -quality 50 castle.png castle.jp2
Then I had to reconvert the JPEG2000 version to PNG to be able to read it:
convert castle.jp2 castle_2000.png
The I have used the following Matlab code:
%read original image
original=imread('castle.png');
%read compressed image
compressed=imread('castle_2000.png');
original=im2double(original);
compressed=im2double(compressed);
error=abs(original-compressed);
%amplify the error for each color layer
error(:,:,1)=imadjust(error(:,:,1));
error(:,:,2)=imadjust(error(:,:,2));
error(:,:,3)=imadjust(error(:,:,3));
%invert the picture
error=1-error;
%write it to a file
imwrite(error,'castle_error_2000.png');
I, the copyright holder of this work, hereby publish it under the following licenses:
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Reverted to version as of 19:11, 19 May 2007 (UTC) Can't be sure if metadata, color profiles or browser compatiblity was lost. These overwrites are not needed, MediaWiki handles this.
{{Information |Description=The picture shows the difference pixel-by-pixel between an image and its JPEG2000 compressed version: white=no-difference; black=big-difference The original image is Image:Lichtenstein img processing test.png, that I have