Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
applications
BallTracking
Commits
a400fe73
Commit
a400fe73
authored
Apr 22, 2020
by
Ahmed Diab
Browse files
balls are being tracked!
parent
9ca74dff
Pipeline
#271204
failed with stage
in 23 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
build.sh
View file @
a400fe73
rm
-rf
target
java
-jar
embedded-montiarc-math-generator-0.1.16-SNAPSHOT-jar-with-dependencies.jar
-m
src/main/emam/
-r
ba.ballTracking
-o
target
-flag-generate-cmake
cd
target
sed
-i
's/cube/Cube<unsigned char>/g'
ba_ballTracking.h
cd
..
rm
-rf
build
mkdir
build
&&
cd
build
...
...
src/cpp/BallTracking.cpp
View file @
a400fe73
...
...
@@ -3,8 +3,6 @@
#include
<opencv2/highgui/highgui.hpp>
#include
<armadillo>
using
namespace
arma
;
using
std
::
string
;
...
...
@@ -46,7 +44,7 @@ int main(int argc, const char** argv) {
ballT_Object
.
lineTypeIn
=
4
;
//
cv::namedWindow("w", 1);
cv
::
namedWindow
(
"w"
,
1
);
for
(
;
;
)
{
capture
>>
frame
;
...
...
@@ -56,10 +54,10 @@ int main(int argc, const char** argv) {
ballT_Object
.
execute
();
cv
::
Mat
output_frame
=
to_cvmat
<
unsigned
char
>
(
ballT_Object
.
modImageOut
);
cv
::
flip
(
output_frame
,
output_frame
,
0
);
//
cv::flip(output_frame, output_frame, 0);
//video.write(output_frame);
cv
::
imshow
(
"w"
,
output_frame
);
cv
::
waitKey
(
1
);
cv
::
waitKey
(
30
);
}
cv
::
waitKey
(
0
);
}
\ No newline at end of file
}
src/cpp/CMakeLists.txt
View file @
a400fe73
...
...
@@ -10,6 +10,7 @@ find_package(OpenCV REQUIRED)
set
(
INCLUDE_DIRS
${
INCLUDE_DIRS
}
${
OpenCV_INCLUDE_DIRS
}
)
set
(
LIBS
${
LIBS
}
${
OpenCV_LIBS
}
)
target_link_libraries
(
BallTracking ba_balltracking
${
LIBS
}
-lblas -lopenblas
)
target_include_directories
(
BallTracking PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
)
target_link_libraries
(
BallTracking ba_ballTracking
${
LIBS
}
-lblas -lopenblas
)
export
(
TARGETS BallTracking FILE BallTracking.cmake
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment