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
b8f5fcf3
Commit
b8f5fcf3
authored
Nov 21, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Nov 21, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1776 from philippefoubert:merge_upstream_2.4_ximea
parents
623a02c6
78e16a90
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
OpenCVFindXimea.cmake
cmake/OpenCVFindXimea.cmake
+1
-1
CMakeLists.txt
modules/highgui/CMakeLists.txt
+2
-2
cap_ximea.cpp
modules/highgui/src/cap_ximea.cpp
+8
-7
No files found.
cmake/OpenCVFindXimea.cmake
View file @
b8f5fcf3
...
...
@@ -23,7 +23,7 @@ if(WIN32)
if
(
EXISTS
${
XIMEA_PATH
}
)
set
(
XIMEA_FOUND 1
)
# set LIB folders
if
(
CMAKE_CL
_64
)
if
(
X86
_64
)
set
(
XIMEA_LIBRARY_DIR
"
${
XIMEA_PATH
}
/x64"
)
else
()
set
(
XIMEA_LIBRARY_DIR
"
${
XIMEA_PATH
}
/x86"
)
...
...
modules/highgui/CMakeLists.txt
View file @
b8f5fcf3
...
...
@@ -167,9 +167,9 @@ if(HAVE_XIMEA)
list
(
APPEND highgui_srcs src/cap_ximea.cpp
)
ocv_include_directories
(
${
XIMEA_PATH
}
)
if
(
XIMEA_LIBRARY_DIR
)
link_directories
(
${
XIMEA_LIBRARY_DIR
}
)
link_directories
(
"
${
XIMEA_LIBRARY_DIR
}
"
)
endif
()
if
(
CMAKE_CL
_64
)
if
(
X86
_64
)
list
(
APPEND HIGHGUI_LIBRARIES m3apiX64
)
else
()
list
(
APPEND HIGHGUI_LIBRARIES m3api
)
...
...
modules/highgui/src/cap_ximea.cpp
View file @
b8f5fcf3
...
...
@@ -75,34 +75,35 @@ bool CvCaptureCAM_XIMEA::open( int wIndex )
return
false
;
}
int
width
=
0
;
int
height
=
0
;
int
isColor
=
0
;
// always use auto exposure/gain
mvret
=
xiSetParamInt
(
hmv
,
XI_PRM_AEAG
,
1
);
HandleXiResult
(
mvret
);
int
width
=
0
;
mvret
=
xiGetParamInt
(
hmv
,
XI_PRM_WIDTH
,
&
width
);
HandleXiResult
(
mvret
);
int
height
=
0
;
mvret
=
xiGetParamInt
(
hmv
,
XI_PRM_HEIGHT
,
&
height
);
HandleXiResult
(
mvret
);
int
isColor
=
0
;
mvret
=
xiGetParamInt
(
hmv
,
XI_PRM_IMAGE_IS_COLOR
,
&
isColor
);
HandleXiResult
(
mvret
);
if
(
isColor
)
// for color cameras
if
(
isColor
)
// for color cameras
{
// default image format RGB24
mvret
=
xiSetParamInt
(
hmv
,
XI_PRM_IMAGE_DATA_FORMAT
,
XI_RGB24
);
HandleXiResult
(
mvret
);
// always use auto white bal
l
ance for color cameras
// always use auto white balance for color cameras
mvret
=
xiSetParamInt
(
hmv
,
XI_PRM_AUTO_WB
,
1
);
HandleXiResult
(
mvret
);
// allocate frame buffer for RGB24 image
frame
=
cvCreateImage
(
cvSize
(
width
,
height
),
IPL_DEPTH_8U
,
3
);
frame
=
cvCreateImage
(
cvSize
(
width
,
height
),
IPL_DEPTH_8U
,
3
);
}
else
// for mono cameras
{
...
...
@@ -111,7 +112,7 @@ bool CvCaptureCAM_XIMEA::open( int wIndex )
HandleXiResult
(
mvret
);
// allocate frame buffer for MONO8 image
frame
=
cvCreateImage
(
cvSize
(
width
,
height
),
IPL_DEPTH_8U
,
1
);
frame
=
cvCreateImage
(
cvSize
(
width
,
height
),
IPL_DEPTH_8U
,
1
);
}
//default capture timeout 10s
...
...
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