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
a4bf6e1e
Commit
a4bf6e1e
authored
Dec 28, 2019
by
Davis King
Browse files
cleanup cv_image code. This also fixes a build error with the very latest version of OpenCV.
parent
34dc7303
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
93 deletions
+1
-93
dlib/opencv/cv_image.h
dlib/opencv/cv_image.h
+1
-29
dlib/opencv/cv_image_abstract.h
dlib/opencv/cv_image_abstract.h
+0
-64
No files found.
dlib/opencv/cv_image.h
View file @
a4bf6e1e
...
@@ -23,7 +23,7 @@ namespace dlib
...
@@ -23,7 +23,7 @@ namespace dlib
typedef
pixel_type
type
;
typedef
pixel_type
type
;
typedef
default_memory_manager
mem_manager_type
;
typedef
default_memory_manager
mem_manager_type
;
cv_image
(
const
cv
::
Mat
img
)
cv_image
(
const
cv
::
Mat
&
img
)
{
{
DLIB_CASSERT
(
img
.
depth
()
==
cv
::
DataType
<
typename
pixel_traits
<
pixel_type
>::
basic_pixel_type
>::
depth
&&
DLIB_CASSERT
(
img
.
depth
()
==
cv
::
DataType
<
typename
pixel_traits
<
pixel_type
>::
basic_pixel_type
>::
depth
&&
img
.
channels
()
==
pixel_traits
<
pixel_type
>::
num
,
img
.
channels
()
==
pixel_traits
<
pixel_type
>::
num
,
...
@@ -119,34 +119,6 @@ namespace dlib
...
@@ -119,34 +119,6 @@ namespace dlib
long
nc
()
const
{
return
_nc
;
}
long
nc
()
const
{
return
_nc
;
}
long
width_step
()
const
{
return
_widthStep
;
}
long
width_step
()
const
{
return
_widthStep
;
}
cv_image
&
operator
=
(
const
cv_image
&
item
)
{
_data
=
item
.
_data
;
_widthStep
=
item
.
_widthStep
;
_nr
=
item
.
_nr
;
_nc
=
item
.
_nc
;
return
*
this
;
}
cv_image
&
operator
=
(
const
IplImage
*
img
)
{
init
(
img
);
return
*
this
;
}
cv_image
&
operator
=
(
const
IplImage
img
)
{
init
(
&
img
);
return
*
this
;
}
cv_image
&
operator
=
(
const
cv
::
Mat
img
)
{
IplImage
temp
=
img
;
init
(
&
temp
);
return
*
this
;
}
private:
private:
void
init
(
const
IplImage
*
img
)
void
init
(
const
IplImage
*
img
)
...
...
dlib/opencv/cv_image_abstract.h
View file @
a4bf6e1e
...
@@ -181,70 +181,6 @@ namespace dlib
...
@@ -181,70 +181,6 @@ namespace dlib
of this image
of this image
!*/
!*/
cv_image
&
operator
=
(
const
cv_image
&
item
);
/*!
ensures
- #*this is an identical copy of item
- returns #*this
!*/
cv_image
&
operator
=
(
const
IplImage
*
img
);
/*!
requires
- img->dataOrder == 0
(i.e. Only interleaved color channels are supported with cv_image)
- (img->depth&0xFF)/8*img->nChannels == sizeof(pixel_type)
(i.e. The size of the pixel_type needs to match the size of the pixels
inside the OpenCV image)
ensures
- #nr() == img->height
#nc() == img->width
- using the operator[] on this object you will be able to access the pixels
inside this OpenCV image.
- returns #*this
!*/
cv_image
&
operator
=
(
const
IplImage
img
);
/*!
requires
- img->dataOrder == 0
(i.e. Only interleaved color channels are supported with cv_image)
- (img->depth&0xFF)/8*img->nChannels == sizeof(pixel_type)
(i.e. The size of the pixel_type needs to match the size of the pixels
inside the OpenCV image)
ensures
- #nr() == img->height
#nc() == img->width
- using the operator[] on this object you will be able to access the pixels
inside this OpenCV image.
- returns #*this
!*/
cv_image
&
operator
=
(
const
cv
::
Mat
img
);
/*!
requires
- img.depth() == cv::DataType<pixel_traits<pixel_type>::basic_pixel_type>::depth
(i.e. The pixel_type template argument needs to match the type of pixel
used inside the OpenCV image)
- img.channels() == pixel_traits<pixel_type>::num
(i.e. the number of channels in the pixel_type needs to match the number of
channels in the OpenCV image)
ensures
- #nr() == img.rows
- #nc() == img.cols
- using the operator[] on this object you will be able to access the pixels
inside this OpenCV image.
- returns #*this
!*/
long
width_step
(
long
width_step
(
)
const
;
)
const
;
/*!
/*!
...
...
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