Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
70068e46
Commit
70068e46
authored
Dec 25, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a mat() overload for cv_image.
parent
e3743b5f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
cv_image.h
dlib/opencv/cv_image.h
+16
-0
cv_image_abstract.h
dlib/opencv/cv_image_abstract.h
+18
-0
No files found.
dlib/opencv/cv_image.h
View file @
70068e46
...
...
@@ -6,6 +6,7 @@
#include "cv_image_abstract.h"
#include "../algs.h"
#include "../pixel.h"
#include "../matrix/matrix_mat.h"
namespace
dlib
{
...
...
@@ -123,6 +124,21 @@ namespace dlib
long
_nc
;
};
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
const
matrix_op
<
op_array2d_to_mat
<
cv_image
<
T
>
>
>
mat
(
const
cv_image
<
T
>&
m
)
{
typedef
op_array2d_to_mat
<
cv_image
<
T
>
>
op
;
return
matrix_op
<
op
>
(
op
(
m
));
}
// ----------------------------------------------------------------------------------------
}
#endif // DLIB_CvIMAGE_H_
...
...
dlib/opencv/cv_image_abstract.h
View file @
70068e46
...
...
@@ -229,6 +229,24 @@ namespace dlib
!*/
};
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
const
matrix_exp
mat
(
const
cv_image
<
T
>&
img
);
/*!
ensures
- returns a matrix R such that:
- R.nr() == img.nr()
- R.nc() == img.nc()
- for all valid r and c:
R(r, c) == img[r][c]
!*/
// ----------------------------------------------------------------------------------------
}
...
...
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