图像上python中的2D小波滤波 [英] 2D wavelet filtering in python on an image

查看:56
本文介绍了图像上python中的2D小波滤波的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在python中进行2d小波滤波.我发现了有关PyWavelets的信息,并且已经有一段时间了.我正在尝试进行4个级别的转换.当我将其打印出来时,它会产生混杂的输出,我不确定到底是怎么回事.我已经尝试了一些方法,但这是最新的示例:

I'm trying to do 2d wavelet filtering in python. I found out about PyWavelets and I have been messing around with it for awhile. I am trying to do the transformation for 4 levels. When I print it out it gives werid output and I'm not sure exactly what is going on. I've tried a few things but this is the latest as an example:

test = pywt.dwt2(picture,'db1')

任何在PyWavelets图像上或在一般情况下在图像上进行二维小波变换的帮助将不胜感激.谢谢.

Any help on preforming 2d wavelets on images with PyWavelets or just in general would be much appreciated. Thank you.

小波变换的类型无关紧要

The type of wavelet transformation doesn't matter

推荐答案

您能解释一下奇怪的输出是什么吗?您应该获得具有cA,cL,cH和cD系数的输出矢量.如果要查看变换域图像,请按如下所示排列系数:cA,(cH,cV,cD)

Can you explain what exactly is the weird output? you should get output vector with cA,cL,cH and cD coefficients. If you want to view the transform domain image, arrange the coefficients like below: cA, (cH, cV, cD)

输出向量的长度=输入图像的行x列(前提是您有方形图片)

length of output vector = rows x columns of the input image (provided you have a square image)

如果要查看较低分辨率的图像,请以正方形格式排列输出矢量中的前1/4个元素(cA).目前,他们会像[第1行,第2行,第3行...]另外,您是否在pywt.dwt2命令中提供了level参数(可选)?

If you want to view a lower resolution image, arrange the first 1/4th elements (cA) in the output vector in square format. Currently, they will be like [Row 1, Row2, Row3...] Also, are you giving level parameter (optional) in pywt.dwt2 command?

请参考 http://www.pybytes.com/pywavelets/ref/2d-dwt-and-idwt.html

这篇关于图像上python中的2D小波滤波的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆