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
e037800e
Commit
e037800e
authored
Jan 29, 2020
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15714 from neurodroid:patch-1
parents
5542dcb2
1358c0ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
videoio.hpp
modules/videoio/include/opencv2/videoio.hpp
+10
-0
cap_aravis.cpp
modules/videoio/src/cap_aravis.cpp
+18
-0
No files found.
modules/videoio/include/opencv2/videoio.hpp
View file @
e037800e
...
@@ -485,6 +485,16 @@ enum { CAP_PROP_XI_DOWNSAMPLING = 400, //!< Chan
...
@@ -485,6 +485,16 @@ enum { CAP_PROP_XI_DOWNSAMPLING = 400, //!< Chan
//! @} XIMEA
//! @} XIMEA
/** @name XIMEA Camera API
* @{
*/
//! Properties of cameras available through ARAVIS backend
enum
{
CAP_PROP_ARAVIS_AUTOTRIGGER
=
600
//!< Automatically trigger frame capture if camera is configured with software trigger
};
//! @} ARAVIS
/** @name AVFoundation framework for iOS
/** @name AVFoundation framework for iOS
OS X Lion will have the same API
OS X Lion will have the same API
@{
@{
...
...
modules/videoio/src/cap_aravis.cpp
View file @
e037800e
...
@@ -148,6 +148,8 @@ protected:
...
@@ -148,6 +148,8 @@ protected:
double
exposureCompensation
;
double
exposureCompensation
;
bool
autoGain
;
bool
autoGain
;
double
targetGrey
;
// Target grey value (mid grey))
double
targetGrey
;
// Target grey value (mid grey))
bool
softwareTriggered
;
// Flag if the camera is software triggered
bool
allowAutoTrigger
;
// Flag that user allowed to trigger software triggered cameras automatically
gint64
*
pixelFormats
;
gint64
*
pixelFormats
;
guint
pixelFormatsCnt
;
guint
pixelFormatsCnt
;
...
@@ -189,6 +191,7 @@ CvCaptureCAM_Aravis::CvCaptureCAM_Aravis()
...
@@ -189,6 +191,7 @@ CvCaptureCAM_Aravis::CvCaptureCAM_Aravis()
exposureCompensation
=
0
;
exposureCompensation
=
0
;
targetGrey
=
0
;
targetGrey
=
0
;
frameID
=
prevFrameID
=
0
;
frameID
=
prevFrameID
=
0
;
allowAutoTrigger
=
false
;
num_buffers
=
10
;
num_buffers
=
10
;
frame
=
NULL
;
frame
=
NULL
;
...
@@ -275,6 +278,7 @@ bool CvCaptureCAM_Aravis::open( int index )
...
@@ -275,6 +278,7 @@ bool CvCaptureCAM_Aravis::open( int index )
exposure
=
exposureAvailable
?
arv_camera_get_exposure_time
(
camera
)
:
0
;
exposure
=
exposureAvailable
?
arv_camera_get_exposure_time
(
camera
)
:
0
;
gain
=
gainAvailable
?
arv_camera_get_gain
(
camera
)
:
0
;
gain
=
gainAvailable
?
arv_camera_get_gain
(
camera
)
:
0
;
fps
=
arv_camera_get_frame_rate
(
camera
);
fps
=
arv_camera_get_frame_rate
(
camera
);
softwareTriggered
=
(
strcmp
(
arv_camera_get_trigger_source
(
camera
),
"Software"
)
==
0
);
return
startCapture
();
return
startCapture
();
}
}
...
@@ -290,6 +294,9 @@ bool CvCaptureCAM_Aravis::grabFrame()
...
@@ -290,6 +294,9 @@ bool CvCaptureCAM_Aravis::grabFrame()
ArvBuffer
*
arv_buffer
=
NULL
;
ArvBuffer
*
arv_buffer
=
NULL
;
int
max_tries
=
10
;
int
max_tries
=
10
;
int
tries
=
0
;
int
tries
=
0
;
if
(
softwareTriggered
&&
allowAutoTrigger
)
{
arv_camera_software_trigger
(
camera
);
}
for
(;
tries
<
max_tries
;
tries
++
)
{
for
(;
tries
<
max_tries
;
tries
++
)
{
arv_buffer
=
arv_stream_timeout_pop_buffer
(
stream
,
200000
);
arv_buffer
=
arv_stream_timeout_pop_buffer
(
stream
,
200000
);
if
(
arv_buffer
!=
NULL
&&
arv_buffer_get_status
(
arv_buffer
)
!=
ARV_BUFFER_STATUS_SUCCESS
)
{
if
(
arv_buffer
!=
NULL
&&
arv_buffer_get_status
(
arv_buffer
)
!=
ARV_BUFFER_STATUS_SUCCESS
)
{
...
@@ -494,6 +501,12 @@ double CvCaptureCAM_Aravis::getProperty( int property_id ) const
...
@@ -494,6 +501,12 @@ double CvCaptureCAM_Aravis::getProperty( int property_id ) const
return
out
;
return
out
;
}
}
break
;
break
;
case
CAP_PROP_ARAVIS_AUTOTRIGGER
:
{
return
allowAutoTrigger
?
1.
:
0.
;
}
break
;
}
}
return
-
1.0
;
return
-
1.0
;
}
}
...
@@ -578,6 +591,11 @@ bool CvCaptureCAM_Aravis::setProperty( int property_id, double value )
...
@@ -578,6 +591,11 @@ bool CvCaptureCAM_Aravis::setProperty( int property_id, double value )
}
}
break
;
break
;
case
CAP_PROP_ARAVIS_AUTOTRIGGER
:
{
allowAutoTrigger
=
(
bool
)
value
;
}
break
;
default
:
default
:
return
false
;
return
false
;
...
...
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