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
c857543f
Commit
c857543f
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Add missing refactor of vision
parent
7d887a98
No related branches found
No related tags found
No related merge requests found
Pipeline
#9755
passed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vision/CMakeLists.txt
+2
-2
2 additions, 2 deletions
vision/CMakeLists.txt
vision/src/main.cpp
+8
-5
8 additions, 5 deletions
vision/src/main.cpp
with
10 additions
and
7 deletions
vision/CMakeLists.txt
+
2
−
2
View file @
c857543f
...
...
@@ -10,7 +10,6 @@ set(CVNODESRC
src/calibrate.cpp
src/local.cpp
src/sync.cpp
src/display.cpp
src/disparity.cpp
src/streamer.cpp
src/middlebury.cpp
...
...
@@ -40,6 +39,7 @@ endif (CUDA_FOUND)
add_executable
(
ftl-vision
${
CVNODESRC
}
)
add_dependencies
(
ftl-vision ftlnet
)
add_dependencies
(
ftl-vision ftlrender
)
add_dependencies
(
ftl-vision libelas
)
if
(
CUDA_FOUND
)
...
...
@@ -47,6 +47,6 @@ set_property(TARGET ftl-vision PROPERTY CUDA_SEPARABLE_COMPILATION ON)
endif
()
#target_include_directories(cv-node PUBLIC ${PROJECT_SOURCE_DIR}/include)
target_link_libraries
(
ftl-vision Threads::Threads ZLIB::ZLIB libelas
${
OpenCV_LIBS
}
${
LIBSGM_LIBRARIES
}
${
CUDA_LIBRARIES
}
glog::glog ftlnet
)
target_link_libraries
(
ftl-vision
ftlrender
Threads::Threads ZLIB::ZLIB libelas
${
OpenCV_LIBS
}
${
LIBSGM_LIBRARIES
}
${
CUDA_LIBRARIES
}
glog::glog ftlnet
)
This diff is collapsed.
Click to expand it.
vision/src/main.cpp
+
8
−
5
View file @
c857543f
...
...
@@ -140,12 +140,12 @@ static void run(const string &file) {
if
(
config
[
"calibrate"
])
calibrate
.
recalibrate
();
if
(
!
calibrate
.
isCalibrated
())
LOG
(
WARNING
)
<<
"Cameras are not calibrated!"
;
cv
::
Mat
Q_32F
;
calibrate
.
getQ
().
convertTo
(
Q_32F
,
CV_32F
);
// Allow remote users to access camera calibration matrix
net
.
bind
(
string
(
"ftl://utu.fi/"
)
+
(
string
)
config
[
"stream"
][
"name"
]
+
string
(
"/rgb-d/calibration"
),
[
&
calibrate
]()
->
vector
<
unsigned
char
>
{
net
.
bind
(
string
(
"ftl://utu.fi/"
)
+
(
string
)
config
[
"stream"
][
"name"
]
+
string
(
"/rgb-d/calibration"
),
[
&
calibrate
,
Q_32F
]()
->
vector
<
unsigned
char
>
{
vector
<
unsigned
char
>
buf
;
cv
::
Mat
Q_32F
;
calibrate
.
getQ
().
convertTo
(
Q_32F
,
CV_32F
);
buf
.
resize
(
Q_32F
.
step
*
Q_32F
.
rows
);
memcpy
(
Q_32F
.
data
,
buf
.
data
(),
buf
.
size
());
return
buf
;
...
...
@@ -157,7 +157,9 @@ static void run(const string &file) {
Mat
l
,
r
,
disp
;
Display
display
(
calibrate
,
config
[
"display"
]);
Display
display
(
config
[
"display"
]);
display
.
setCalibration
(
Q_32F
);
Streamer
stream
(
net
,
config
[
"stream"
]);
while
(
display
.
active
())
{
...
...
@@ -179,6 +181,7 @@ static void run(const string &file) {
display
.
render
(
l
,
disp
);
stream
.
send
(
l
,
disp
);
display
.
wait
(
1
);
}
}
...
...
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