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
2a3d7494
Commit
2a3d7494
authored
Jul 12, 2013
by
Davis King
Browse files
Made the integral image swappable
parent
5dace981
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
dlib/image_transforms/integral_image.h
dlib/image_transforms/integral_image.h
+13
-1
dlib/image_transforms/integral_image_abstract.h
dlib/image_transforms/integral_image_abstract.h
+19
-0
No files found.
dlib/image_transforms/integral_image.h
View file @
2a3d7494
...
...
@@ -94,12 +94,24 @@ namespace dlib
return
bottom_right
-
bottom_left
-
top_right
+
top_left
;
}
void
swap
(
integral_image_generic
&
item
)
{
int_img
.
swap
(
item
.
int_img
);
}
private:
array2d
<
T
>
int_img
;
};
};
template
<
typename
T
>
void
swap
(
integral_image_generic
<
T
>&
a
,
integral_image_generic
<
T
>&
b
)
{
a
.
swap
(
b
);
}
// ----------------------------------------------------------------------------------------
...
...
dlib/image_transforms/integral_image_abstract.h
View file @
2a3d7494
...
...
@@ -83,8 +83,27 @@ namespace dlib
are contained within the given rectangle.
!*/
void
swap
(
integral_image_generic
&
item
);
/*!
ensures
- swaps *this and item
!*/
};
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
void
swap
(
integral_image_generic
<
T
>&
a
,
integral_image_generic
<
T
>&
b
)
{
a
.
swap
(
b
);
}
/*!
provides a global swap function
!*/
// ----------------------------------------------------------------------------------------
typedef
integral_image_generic
<
long
>
integral_image
;
...
...
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