Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mvBlueFOX3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
drivers
mvBlueFOX3
Commits
e73831e9
Commit
e73831e9
authored
8 years ago
by
Angel Santamaria-Navarro
Browse files
Options
Downloads
Patches
Plain Diff
working with opencv3.0 and ROS. first draft
parent
b46e3bd2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mvbluefox3.cpp
+9
-9
9 additions, 9 deletions
src/mvbluefox3.cpp
src/mvbluefox3.h
+6
-15
6 additions, 15 deletions
src/mvbluefox3.h
with
15 additions
and
24 deletions
src/mvbluefox3.cpp
+
9
−
9
View file @
e73831e9
...
...
@@ -32,6 +32,7 @@ CMvbluefox3::CMvbluefox3(const std::string &serial)
// Initialize other vars
this
->
timeout_ms_
=
-
1
;
this
->
linepitch_
=
8
;
this
->
depth_
=
8
;
this
->
bytes_per_pixel_
=
1
;
...
...
@@ -220,6 +221,7 @@ void CMvbluefox3::GetImageCV(cv::Mat &image)
int
type
=
CV_8UC1
;
switch
(
this
->
depth_
*
this
->
bytes_per_pixel_
)
switch
(
this
->
linepitch_
)
{
case
8
:
type
=
CV_8UC1
;
break
;
case
16
:
type
=
CV_8UC2
;
break
;
...
...
@@ -252,6 +254,9 @@ void CMvbluefox3::GetImageReqFormat(mvIMPACT::acquire::Request *request)
// Bytes per pixel
ReadProperty
(
this
->
request_
->
imageBytesPerPixel
,
this
->
bytes_per_pixel_
);
// Line pitch
ReadProperty
(
this
->
request_
->
imageLinePitch
,
this
->
linepitch_
);
// Bayer parity of this image if this buffer is part of a larger image
TBayerMosaicParity
bayer_mosaic_parity
;
ReadProperty
(
request_
->
imageBayerMosaicParity
,
bayer_mosaic_parity
);
...
...
@@ -263,17 +268,12 @@ void CMvbluefox3::GetImageReqFormat(mvIMPACT::acquire::Request *request)
}
else
// Bayer pattern
this
->
params_
.
pixel_format
=
BayerPatternToEncoding
(
bayer_mosaic_parity
,
this
->
bytes_per_pixel_
);
this
->
bytes_per_pixel_
);
}
int
CMvbluefox3
::
Get
ChDept
h
(
void
)
int
CMvbluefox3
::
Get
ImgLinePitc
h
(
void
)
{
return
this
->
depth_
;
}
int
CMvbluefox3
::
GetBytesXPixel
(
void
)
{
return
this
->
bytes_per_pixel_
;
return
this
->
linepitch_
;
}
int
CMvbluefox3
::
ReqExposeUs
(
void
)
...
...
@@ -586,7 +586,7 @@ void CMvbluefox3::SetHdr(bool &hdr)
void
CMvbluefox3
::
SetDarkCFilter
(
int
&
dcfm
)
{
if
(
dcfm
!=
dcfmOff
&&
!
this
->
bf_sets_
->
imageProcessing
.
darkCurrentFilterMode
.
isValid
())
throw
CmvBlueFOX3Exception
(
_HERE_
,
"
HDR
option is not available for this model."
);
throw
CmvBlueFOX3Exception
(
_HERE_
,
"
Dark filter
option is not available for this model."
);
try
{
...
...
This diff is collapsed.
Click to expand it.
src/mvbluefox3.h
+
6
−
15
View file @
e73831e9
...
...
@@ -44,7 +44,6 @@ private:
// Acquisition
frame_rate
=
100000
;
frate_limit_mode
=
0
;
pixel_clock
=
66000
;
req_timeout
=
2000
;
...
...
@@ -87,7 +86,6 @@ public:
int
v_binning
;
// Vertical binning factor.
int
frame_rate
;
// Frame rate.
int
frate_limit_mode
;
// Calculation of the maximum frame rate.
int
pixel_clock
;
// Pixel_clock.
int
req_timeout
;
// request timeout [ms].
...
...
@@ -144,13 +142,13 @@ class CMvbluefox3
mvIMPACT
::
acquire
::
GenICam
::
LUTControl
*
lut_ctrl_
;
// LUT.
mvIMPACT
::
acquire
::
Statistics
*
stats_
;
// Statistics.
int
timeout_ms_
;
// Frame request timeout.
int
timeout_ms_
;
// Frame request timeout.
codings_t
coding_
;
// Image coding.
codings_t
coding_
;
// Image coding.
int
linepitch_
;
// Line pitch.
int
depth_
;
// Bits per image channel.
int
bytes_per_pixel_
;
// Bytes per pixel.
/**
* \brief Mutex object to handle the access to the image
*
...
...
@@ -431,18 +429,11 @@ class CMvbluefox3
CParams
GetConfig
(
void
);
/**
* \brief Get channel's depth
*
* Get channel's depth.
*/
int
GetChDepth
(
void
);
/**
* \brief Get bytes-pixel
* \brief Get line pitch
*
* Get
bytes-pixel
.
* Get
line pitch
.
*/
int
Get
BytesXPixel
(
void
);
int
Get
ImgLinePitch
(
void
);
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment