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
ed9f5bd6
Commit
ed9f5bd6
authored
Sep 11, 2011
by
Davis King
Browse files
Fixed the width_step() member functions. They weren't defined in quite the
way they should have been.
parent
275d7d1a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
dlib/array2d/array2d_kernel_1.h
dlib/array2d/array2d_kernel_1.h
+1
-1
dlib/array2d/array2d_kernel_abstract.h
dlib/array2d/array2d_kernel_abstract.h
+3
-2
dlib/opencv/cv_image_abstract.h
dlib/opencv/cv_image_abstract.h
+3
-2
dlib/test/array2d.cpp
dlib/test/array2d.cpp
+2
-0
No files found.
dlib/array2d/array2d_kernel_1.h
View file @
ed9f5bd6
...
@@ -287,7 +287,7 @@ namespace dlib
...
@@ -287,7 +287,7 @@ namespace dlib
long
width_step
(
long
width_step
(
)
const
)
const
{
{
return
nc_
;
return
nc_
*
sizeof
(
T
)
;
}
}
private:
private:
...
...
dlib/array2d/array2d_kernel_abstract.h
View file @
ed9f5bd6
...
@@ -209,8 +209,9 @@ namespace dlib
...
@@ -209,8 +209,9 @@ namespace dlib
)
const
;
)
const
;
/*!
/*!
ensures
ensures
- returns the pointer offset to step from one row to another.
- returns the size of one row of the image, in bytes.
That is, &item[0][0] + item.width_step() == &item[1][0].
More precisely, return a number N such that:
(char*)&item[0][0] + N == (char*)&item[1][0].
!*/
!*/
private:
private:
...
...
dlib/opencv/cv_image_abstract.h
View file @
ed9f5bd6
...
@@ -146,8 +146,9 @@ namespace dlib
...
@@ -146,8 +146,9 @@ namespace dlib
)
const
;
)
const
;
/*!
/*!
ensures
ensures
- returns the pointer offset to step from one row to another.
- returns the size of one row of the image, in bytes.
That is, &item[0][0] + item.width_step() == &item[1][0].
More precisely, return a number N such that:
(char*)&item[0][0] + N == (char*)&item[1][0].
!*/
!*/
};
};
...
...
dlib/test/array2d.cpp
View file @
ed9f5bd6
...
@@ -545,6 +545,8 @@ namespace
...
@@ -545,6 +545,8 @@ namespace
DLIB_TEST
(
img
[
r
][
c
]
==
img2
[
r
][
c
]);
DLIB_TEST
(
img
[
r
][
c
]
==
img2
[
r
][
c
]);
}
}
}
}
DLIB_TEST
((
char
*
)
&
img
[
0
][
0
]
+
img
.
width_step
()
==
(
char
*
)
&
img
[
1
][
0
]);
}
}
}
}
...
...
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