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
bb673f40
"tools/vscode:/vscode.git/clone" did not exist on "077a3b60e704d1dc9e4fc0c903f9b112b84209b7"
Commit
bb673f40
authored
Dec 09, 2014
by
Davis King
Browse files
Added example of accessing individual pixels
parent
ca68fc80
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
examples/image_ex.cpp
examples/image_ex.cpp
+7
-0
No files found.
examples/image_ex.cpp
View file @
bb673f40
...
...
@@ -86,6 +86,13 @@ int main(int argc, char** argv)
// terminate.
win_hot
.
wait_until_closed
();
my_window2
.
wait_until_closed
();
// Finally, note that you can access the elements of an image using the normal [row][column]
// operator like so:
cout
<<
horz_gradient
[
0
][
3
]
<<
endl
;
cout
<<
"number of rows in image: "
<<
horz_gradient
.
nr
()
<<
endl
;
cout
<<
"number of columns in image: "
<<
horz_gradient
.
nc
()
<<
endl
;
}
catch
(
exception
&
e
)
{
...
...
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