File:Lichtenstein jpeg2000 difference.png

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
Lichtenstein_jpeg2000_difference.png(512 × 512 pixels, file size: 394 KB, MIME type: image/png)

Summary

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 <a href="//commons.wikimedia.org/wiki/File:Lichtenstein_img_processing_test.png" title="File:Lichtenstein img processing test.png">Image:Lichtenstein img processing test.png</a>, 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');

Licensing

Lua error in package.lua at line 80: module 'strict' not found.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current20:07, 17 January 2017Thumbnail for version as of 20:07, 17 January 2017512 × 512 (394 KB)127.0.0.1 (talk)<p>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 <a href="//commons.wikimedia.org/wiki/File:Lichtenstein_img_processing_test.png" title="File:Lichtenstein img processing test.png">Image:Lichtenstein img processing test.png</a>, that I have renamed <i>castle.png</i> 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: </p> <pre>convert -quality 50 castle.png castle.jp2 </pre> <p>Then I had to reconvert the JPEG2000 version to PNG to be able to read it: </p> <pre>convert castle.jp2 castle_2000.png </pre> <p>The I have used the following Matlab code: </p> <pre> %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'); </pre>
  • You cannot overwrite this file.

The following page links to this file: