Wolfram.com
WolframAlpha.com
WolframCloud.com
Wolfram Language
Example Repository
Ready-to-use examples of Wolfram Language
Primary Navigation
Categories
Astronomy
Audio Processing
Calculus
Cellular Automata
Chemistry
Complex Systems
Computer Science
Computer Vision
Control Systems
Creative Arts
Data Science
Engineering
Finance & Economics
Finite Element Method
Food & Nutrition
Geography
Geometry
Graphs & Networks
Image Processing
Life Sciences
Machine Learning
Mathematics
Optimization
Physics
Puzzles and Recreation
Quantum Computation
Signal Processing
Social Sciences
System Modeling
Text & Language Processing
Time-Related Computation
Video Processing
Visualization & Graphics
Alphabetical List
Submit a New Example
Learn More about
Wolfram Language
Related Pages
Related Symbols
ImagePyramid
ImagePyramidApply
GradientFilter
ImageSaliencyFilter
SetAlphaChannel
Related Categories
Image Processing
Computer Vision
Multiscale Feature Detection
Apply gradient filtering or saliency filtering to images
Example Notebook
Open in Cloud
Download Notebook
Start with an image:
I
n
[
1
]
:
=
i
m
g
=
;
Apply a gradient filter at several scales simultaneously:
I
n
[
2
]
:
=
p
y
r
a
m
i
d
=
I
m
a
g
e
P
y
r
a
m
i
d
[
i
m
g
,
"
G
a
u
s
s
i
a
n
"
,
4
]
O
u
t
[
2
]
=
I
m
a
g
e
P
y
r
a
m
i
d
T
y
p
e
:
G
a
u
s
s
i
a
n
L
e
v
e
l
s
:
4
D
i
m
e
n
s
i
o
n
s
:
{
4
8
0
,
3
2
0
}
↔
{
6
0
,
4
0
}
Apply gradient filtering to all levels of the pyramid:
I
n
[
3
]
:
=
p
y
r
a
m
i
d
G
=
I
m
a
g
e
P
y
r
a
m
i
d
A
p
p
l
y
[
i
m
g
G
r
a
d
i
e
n
t
F
i
l
t
e
r
[
i
m
g
,
1
.
4
]
,
p
y
r
a
m
i
d
]
;
Reconstruct assuming a Laplacian pyramid to add up features extracted from all levels:
I
n
[
4
]
:
=
I
n
v
e
r
s
e
I
m
a
g
e
P
y
r
a
m
i
d
[
p
y
r
a
m
i
d
G
,
"
L
a
p
l
a
c
i
a
n
"
]
/
/
I
m
a
g
e
A
d
j
u
s
t
O
u
t
[
4
]
=
Compare the result with the gradient filter at a single fixed scale:
I
n
[
5
]
:
=
G
r
a
d
i
e
n
t
F
i
l
t
e
r
[
i
m
g
,
1
.
4
]
/
/
I
m
a
g
e
A
d
j
u
s
t
O
u
t
[
5
]
=
Next, consider a different image to compute interesting or important regions of the image using multiscale saliency filtering:
I
n
[
6
]
:
=
i
m
g
=
;
Apply a saliency filter to all levels of an image pyramid to get a multiscale result:
I
n
[
7
]
:
=
p
d
=
I
m
a
g
e
P
y
r
a
m
i
d
[
i
m
g
,
"
G
a
u
s
s
i
a
n
"
,
4
]
;
Apply saliency filtering to all levels of the pyramid:
I
n
[
8
]
:
=
p
d
S
=
I
m
a
g
e
P
y
r
a
m
i
d
A
p
p
l
y
[
I
m
a
g
e
S
a
l
i
e
n
c
y
F
i
l
t
e
r
,
p
d
]
;
Reconstruct the image assuming a Laplacian pyramid to add up features extracted from all levels:
I
n
[
9
]
:
=
S
e
t
A
l
p
h
a
C
h
a
n
n
e
l
[
i
m
g
,
I
n
v
e
r
s
e
I
m
a
g
e
P
y
r
a
m
i
d
[
p
d
S
,
"
L
a
p
l
a
c
i
a
n
"
]
/
/
I
m
a
g
e
A
d
j
u
s
t
]
O
u
t
[
9
]
=
Compare with image saliency filtering at a single scale:
I
n
[
1
0
]
:
=
S
e
t
A
l
p
h
a
C
h
a
n
n
e
l
[
i
m
g
,
I
m
a
g
e
S
a
l
i
e
n
c
y
F
i
l
t
e
r
[
i
m
g
]
]
O
u
t
[
1
0
]
=
See Also
ImageSaliencyCrop
Multiscale Image Representation with Image Pyramids
Related Symbols
ImagePyramid
ImagePyramidApply
GradientFilter
ImageSaliencyFilter
SetAlphaChannel
Publisher Information
Contributed by:
Wolfram Staff