Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
b3682d98
Commit
b3682d98
authored
Jul 13, 2011
by
Davis King
Browse files
Moved the /256 from the spatial filtering routine to it's proper place in the pyramid code.
parent
b967f1f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
dlib/image_transforms/image_pyramid.h
dlib/image_transforms/image_pyramid.h
+4
-4
dlib/image_transforms/spatial_filtering.h
dlib/image_transforms/spatial_filtering.h
+1
-1
No files found.
dlib/image_transforms/image_pyramid.h
View file @
b3682d98
...
@@ -459,10 +459,10 @@ namespace dlib
...
@@ -459,10 +459,10 @@ namespace dlib
separable_3x3_filter_block_grayscale
(
block
,
original
,
rr
,
cc
,
3
,
10
,
3
);
separable_3x3_filter_block_grayscale
(
block
,
original
,
rr
,
cc
,
3
,
10
,
3
);
// bi-linearly interpolate block
// bi-linearly interpolate block
assign_pixel
(
down
[
r
][
c
]
,
(
block
[
0
][
0
]
*
9
+
block
[
1
][
0
]
*
3
+
block
[
0
][
1
]
*
3
+
block
[
1
][
1
])
/
(
16
));
assign_pixel
(
down
[
r
][
c
]
,
(
block
[
0
][
0
]
*
9
+
block
[
1
][
0
]
*
3
+
block
[
0
][
1
]
*
3
+
block
[
1
][
1
])
/
(
16
*
256
));
assign_pixel
(
down
[
r
][
c
+
1
]
,
(
block
[
0
][
2
]
*
9
+
block
[
1
][
2
]
*
3
+
block
[
0
][
1
]
*
3
+
block
[
1
][
1
])
/
(
16
));
assign_pixel
(
down
[
r
][
c
+
1
]
,
(
block
[
0
][
2
]
*
9
+
block
[
1
][
2
]
*
3
+
block
[
0
][
1
]
*
3
+
block
[
1
][
1
])
/
(
16
*
256
));
assign_pixel
(
down
[
r
+
1
][
c
]
,
(
block
[
2
][
0
]
*
9
+
block
[
1
][
0
]
*
3
+
block
[
2
][
1
]
*
3
+
block
[
1
][
1
])
/
(
16
));
assign_pixel
(
down
[
r
+
1
][
c
]
,
(
block
[
2
][
0
]
*
9
+
block
[
1
][
0
]
*
3
+
block
[
2
][
1
]
*
3
+
block
[
1
][
1
])
/
(
16
*
256
));
assign_pixel
(
down
[
r
+
1
][
c
+
1
]
,
(
block
[
2
][
2
]
*
9
+
block
[
1
][
2
]
*
3
+
block
[
2
][
1
]
*
3
+
block
[
1
][
1
])
/
(
16
));
assign_pixel
(
down
[
r
+
1
][
c
+
1
]
,
(
block
[
2
][
2
]
*
9
+
block
[
1
][
2
]
*
3
+
block
[
2
][
1
]
*
3
+
block
[
1
][
1
])
/
(
16
*
256
));
cc
+=
size_in
;
cc
+=
size_in
;
}
}
...
...
dlib/image_transforms/spatial_filtering.h
View file @
b3682d98
...
@@ -147,7 +147,7 @@ namespace dlib
...
@@ -147,7 +147,7 @@ namespace dlib
{
{
block
[
rr
][
cc
]
=
(
row_filt
[
rr
][
cc
]
*
fe1
+
block
[
rr
][
cc
]
=
(
row_filt
[
rr
][
cc
]
*
fe1
+
row_filt
[
rr
+
1
][
cc
]
*
fm
+
row_filt
[
rr
+
1
][
cc
]
*
fm
+
row_filt
[
rr
+
2
][
cc
]
*
fe2
)
/
256
;
row_filt
[
rr
+
2
][
cc
]
*
fe2
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment