Implement the complex steerable pyramid decomposition. And perceptual image metrics such as STSIM, STSTIM 2 and STSIM M
Install:
sudo pip install perceptual
Usage:
Use perceptual.filterbank.Steerable() and perceptual.metric.Metric classes
When reconstructing the image from the decomposition, some of the frequency information appears to be missing. The original code returns the real portion of the inverse DFT of outdft
but when returning the raw outdft
, some of the frequency info appears to be missing. See example below, this seems to happen for all images.
from skimage.data import camera
test_image = camera()
s = Steerable(5)
coeff, lo0mask, hi0mask = s.buildSCFpyr(test_image)
resdft = s.reconSCFpyr(coeff) # modified to return resdft
plt.imshow(np.log(np.abs(np.fft.fftshift(np.fft.fft2(test_image)))))
plt.imshow(np.log(np.abs(resdft)))
Hi Dr. Dzung,
Thanks a lot for your code! Can I know what's the filter you use for steerable decomposition?
Thanks!
In filterbank.py, at line 152:
lostart = np.ceil((dims+0.5)/2) - np.ceil((np.ceil((dims-0.5)/2)+0.5)/2)
loend = lostart + np.ceil((dims-0.5)/2)
nlog_rad = log_rad[lostart[0]:loend[0], lostart[1]:loend[1]]
Variables lostart and loend are both of float type. Using their values to slice into nlog_rad causes the following:
packages/perceptual/filterbank.py", line 155, in reconSCFpyrLevs
nlog_rad = log_rad[lostart[0]:loend[0], lostart[1]:loend[1]]
TypeError: slice indices must be integers or None or have an __index__ method
in
./perceptual/filterbanl.py
line 241
sc.factorial
AttributeError: module 'scipy.misc' has no attribute 'factorial'
can be changed to sc.special.factorial
can see this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.