Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Nicolas Pope
ftl
Commits
1657cb02
Commit
1657cb02
authored
6 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Small fix for stereo video input reading bug
parent
c971d703
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cv-node/src/calibrate.cpp
+4
-7
4 additions, 7 deletions
cv-node/src/calibrate.cpp
cv-node/src/local.cpp
+4
-0
4 additions, 0 deletions
cv-node/src/local.cpp
cv-node/src/main.cpp
+2
-1
2 additions, 1 deletion
cv-node/src/main.cpp
with
10 additions
and
8 deletions
cv-node/src/calibrate.cpp
+
4
−
7
View file @
1657cb02
...
@@ -191,7 +191,7 @@ Calibrate::Calibrate(ftl::LocalSource *s, const std::string &cal) : local_(s) {
...
@@ -191,7 +191,7 @@ Calibrate::Calibrate(ftl::LocalSource *s, const std::string &cal) : local_(s) {
bool
Calibrate
::
recalibrate
()
{
bool
Calibrate
::
recalibrate
()
{
bool
r
=
_recalibrate
(
0
);
bool
r
=
_recalibrate
(
0
);
if
(
local_
->
isStereo
())
r
|
=
_recalibrate
(
1
);
if
(
local_
->
isStereo
())
r
&
=
_recalibrate
(
1
);
if
(
r
)
calibrated_
=
true
;
if
(
r
)
calibrated_
=
true
;
...
@@ -335,15 +335,12 @@ bool Calibrate::_recalibrate(size_t cam) {
...
@@ -335,15 +335,12 @@ bool Calibrate::_recalibrate(size_t cam) {
//! [output_undistorted]
//! [output_undistorted]
//------------------------------ Show image and check for input commands -------------------
//------------------------------ Show image and check for input commands -------------------
//! [await_input]
//! [await_input]
/*
imshow("Image View", view);
imshow
(
"Image View"
,
view
);
char key = (char)waitKey(s
.inputCapture.isOpened() ? 50 : s
.delay);
char
key
=
(
char
)
waitKey
(
s
ettings_
.
delay
);
if( key ==
ESC_KEY
)
if
(
key
==
27
)
break
;
break
;
if( key == 'u' && mode == CALIBRATED )
s.showUndistorsed = !s.showUndistorsed;*/
/*if( s.inputCapture.isOpened() && key == 'g' )
/*if( s.inputCapture.isOpened() && key == 'g' )
{
{
mode = CAPTURING;
mode = CAPTURING;
...
...
This diff is collapsed.
Click to expand it.
cv-node/src/local.cpp
+
4
−
0
View file @
1657cb02
...
@@ -100,6 +100,10 @@ bool LocalSource::left(cv::Mat &l) {
...
@@ -100,6 +100,10 @@ bool LocalSource::left(cv::Mat &l) {
}
}
bool
LocalSource
::
right
(
cv
::
Mat
&
r
)
{
bool
LocalSource
::
right
(
cv
::
Mat
&
r
)
{
if
(
!
camera_a_
->
grab
())
{
LOG
(
ERROR
)
<<
"Unable to grab from camera A"
;
return
false
;
}
if
(
camera_b_
&&
!
camera_b_
->
grab
())
{
if
(
camera_b_
&&
!
camera_b_
->
grab
())
{
LOG
(
ERROR
)
<<
"Unable to grab from camera B"
;
LOG
(
ERROR
)
<<
"Unable to grab from camera B"
;
return
false
;
return
false
;
...
...
This diff is collapsed.
Click to expand it.
cv-node/src/main.cpp
+
2
−
1
View file @
1657cb02
...
@@ -79,6 +79,7 @@ int main(int argc, char **argv) {
...
@@ -79,6 +79,7 @@ int main(int argc, char **argv) {
Mat
l
,
r
;
Mat
l
,
r
;
calibrate
.
undistort
(
l
,
r
);
calibrate
.
undistort
(
l
,
r
);
//lsrc->get(l,r);
// Feed into sync buffer and network forward
// Feed into sync buffer and network forward
sync
->
feed
(
LEFT
,
l
,
lsrc
->
getTimestamp
());
sync
->
feed
(
LEFT
,
l
,
lsrc
->
getTimestamp
());
...
@@ -96,7 +97,7 @@ int main(int argc, char **argv) {
...
@@ -96,7 +97,7 @@ int main(int argc, char **argv) {
cv
::
imshow
(
"Left"
,
l
);
cv
::
imshow
(
"Left"
,
l
);
if
(
lsrc
->
isStereo
())
cv
::
imshow
(
"Right"
,
r
);
if
(
lsrc
->
isStereo
())
cv
::
imshow
(
"Right"
,
r
);
if
(
cv
::
waitKey
(
1
)
==
27
){
if
(
cv
::
waitKey
(
1
0000
)
==
27
){
//exit if ESC is pressed
//exit if ESC is pressed
break
;
break
;
}
}
...
...
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