File:Lichtenstein jpeg2000 difference.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/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 20:07, 17 January 2017 | 512 × 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.
File usage
The following page links to this file: