Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
11f4e102
Commit
11f4e102
authored
Dec 04, 2010
by
Gary Bradski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revamped
parent
0c6fa438
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
image.cpp
samples/cpp/image.cpp
+11
-0
No files found.
samples/cpp/image.cpp
View file @
11f4e102
...
...
@@ -9,11 +9,22 @@ using namespace cv; // all the new API is put into "cv" namespace. Export its co
using
namespace
std
;
using
namespace
cv
::
flann
;
void
help
()
{
cout
<<
"
\n
This program shows how to use cv::Mat and IplImages converting back and forth.
\n
"
"It shows reading of images, converting to planes and merging back, color conversion
\n
"
"and also iterating through pixels.
\n
"
"Call:
\n
"
"./image [image-name Default: lena.jpg]
\n
"
<<
endl
;
}
// enable/disable use of mixed API in the code below.
#define DEMO_MIXED_API_USE 1
int
main
(
int
argc
,
char
**
argv
)
{
help
();
const
char
*
imagename
=
argc
>
1
?
argv
[
1
]
:
"lena.jpg"
;
#if DEMO_MIXED_API_USE
Ptr
<
IplImage
>
iplimg
=
cvLoadImage
(
imagename
);
// Ptr<T> is safe ref-conting pointer class
...
...
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