File:Jpeg2000 2-level wavelet transform-lichtenstein.png

页面内容不支持其他语言。
這個文件來自維基共享資源
维基百科,自由的百科全书

Jpeg2000_2-level_wavelet_transform-lichtenstein.png(512 × 512像素,文件大小:189 KB,MIME类型:image/png


摘要

描述

The picture shows a 2 level wavelet transform. For the low-pass and high-pass filters, I have used the same of the JPEG2000, lossy transform, so that this is the wavelet that is used in the JPEG2000 format. In general, it is quite hard to show a wavelet transform properly, because of the different ranges of the different parts. I have made the following choices.

First of all, I wanted to use a picture with both flat surfaces, sharp edges and details. The standard test image Lenna is commonly used for this purpose, but I didn't want to use it because it is not in the public domain. I took a look at the big featured picture gallery con Commons and I have chosen Image:Lichtenstein img processing test.png because it has lots of details in the bottom left, while the top right has almost no details because of the sky. Moreover, the edges of the castle are really sharp, so they can be clearly seen in the wavelet transform.

I have saved the original image in a file called lichtenstein.png, to make it simpler.

Then I have used the following Matlab script:

clear all

%input must be 512x512
img=imread('lichtenstein.png');

img=im2double(img);
img=rgb2gray(img);

% filters in JPEG2000
Lo_D=[0.0267 -0.0168 -0.0782 0.2668 0.6029 0.2668 -0.0782 -0.0168 0.0267];
Hi_D=[0.0912 -0.0575 -0.5912 1.1150 -0.5912 -0.0575 0.0912];

%calculate the 2-level Wavelet transform
[scaled, vertical, horizontal, diagonal]=dwt2(img,Lo_D,Hi_D);
[scaled2, vertical2, horizontal2, diagonal2]=dwt2(scaled,Lo_D,Hi_D);

%crop pictures (for displaying purpose)
scaled2=imcrop(scaled2,[4 4 127 127]);
horizontal2=imcrop(horizontal2,[4 4 127 127]);
vertical2=imcrop(vertical2,[4 4 127 127]);
diagonal2=imcrop(diagonal2,[4 4 127 127]);
horizontal=imcrop(horizontal,[4 4 255 255]);
vertical=imcrop(vertical,[4 4 255 255]);
diagonal=imcrop(diagonal,[4 4 255 255]);

%increase contrast (for displaying purpose)
vertical=imadjust(abs(vertical));
horizontal=imadjust(abs(horizontal));
diagonal=imadjust(abs(diagonal));
vertical2=imadjust(abs(vertical2));
horizontal2=imadjust(abs(horizontal2));
diagonal2=imadjust(abs(diagonal2));

%put them all together
transform=zeros(512,512);

transform(1:128,1:128)=scaled2;
transform(1:128,129:256)=horizontal2;
transform(129:256,1:128)=vertical2;
transform(129:256,129:256)=diagonal2;
transform(1:256,257:512)=horizontal;
transform(257:512,1:256)=vertical;
transform(257:512,257:512)=diagonal;

imwrite(transform,'Jpeg2000_2-level_wavelet_transform-lichtenstein.png');

If I had placed all the transforms one next to the other, I would have got a picture wider than 512x512, with some odd behaviour close to the edges. In order to avoid those problems, I have cropped the transforms so that I can easily put one next to the other to get a 512x512 picture. In general, it is not a good idea to discard information, but here I just wanted to create a simple and clear example.

In order to show the derivatives, I have taken the absolute values (I want to show the magnitude of the derivative), then I have improved the contrast to make them look clearer.
日期
来源 自己的作品
作者 Alessio Damato
其他版本
The original picture

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
GNU head 已授权您依据自由软件基金会发行的无固定段落及封面封底文字(Invariant Sections, Front-Cover Texts, and Back-Cover Texts)的GNU自由文件许可协议1.2版或任意后续版本的条款,复制、传播和/或修改本文件。该协议的副本请见“GNU Free Documentation License”。
w:zh:知识共享
署名 相同方式共享
本文件采用知识共享署名-相同方式共享 3.0 未本地化版本许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
本许可协议标签作为GFDL许可协议更新的组成部分被添加至本文件。
w:zh:知识共享
署名 相同方式共享
本文件采用知识共享署名-相同方式共享2.5 通用2.0 通用1.0 通用许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
您可以选择您需要的许可协议。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2019年7月6日 (六) 08:272019年7月6日 (六) 08:27版本的缩略图512 × 512(189 KB)Alexis JazzReverted to version as of 12:28, 17 May 2007 (UTC) Can't be sure if metadata, color profiles or browser compatiblity was lost. These overwrites are not needed, MediaWiki handles this.
2019年7月5日 (五) 23:282019年7月5日 (五) 23:28版本的缩略图512 × 512(183 KB)C 1File size reduced by 7KB using OptiPNG, a lossless optimizer/recompressor for PNG images. No changes made to image or metadata.
2007年5月17日 (四) 12:282007年5月17日 (四) 12:28版本的缩略图512 × 512(189 KB)Alejo2083{{Information |Description= The picture shows a 2 level wavelet transform. For the low-pass and high-pass filters, I have used the same of the JPEG2000, lossy transform, so that this is the wavelet that is used in the JPEG2000 format. In general, it is qu

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据