Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ChessTrack
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
Model registry
Operate
Environments
Monitor
Incidents
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
Aylen Ricca
ChessTrack
Commits
2ef78fa3
Commit
2ef78fa3
authored
10 years ago
by
Aylen Ricca
Browse files
Options
Downloads
Patches
Plain Diff
uploading sample corners
parent
7fd732b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
samples/CMakeLists.txt
+3
-0
3 additions, 0 deletions
samples/CMakeLists.txt
samples/Corners.cpp
+39
-0
39 additions, 0 deletions
samples/Corners.cpp
with
42 additions
and
0 deletions
samples/CMakeLists.txt
+
3
−
0
View file @
2ef78fa3
...
...
@@ -3,3 +3,6 @@ project( SubsBackground )
find_package
(
OpenCV REQUIRED
)
add_executable
(
SubsBackground SubsBackground.cpp
)
target_link_libraries
(
SubsBackground
${
OpenCV_LIBS
}
)
project
(
Corners
)
add_executable
(
Corners Corners.cpp
)
target_link_libraries
(
Corners
${
OpenCV_LIBS
}
)
This diff is collapsed.
Click to expand it.
samples/Corners.cpp
0 → 100644
+
39
−
0
View file @
2ef78fa3
#include
<string>
#include
<iostream>
#include
<vector>
#include
"opencv2/opencv.hpp"
using
namespace
std
;
using
namespace
cv
;
//----------------------------------------------------------
// MAIN
//----------------------------------------------------------
int
main
(
int
argc
,
char
*
argv
[])
{
// src image
Mat
src
;
// dst image
Mat
dst
;
// Image loading
namedWindow
(
"result"
);
namedWindow
(
"src"
);
src
=
imread
(
"image.png"
,
0
);
cv
::
cvtColor
(
src
,
dst
,
cv
::
COLOR_GRAY2BGR
);
Mat
corners
;
cv
::
goodFeaturesToTrack
(
src
,
corners
,
100
,
0.01
,
20.0
);
for
(
int
i
=
0
;
i
<
corners
.
rows
;
++
i
)
{
circle
(
dst
,
cv
::
Point
(
corners
.
at
<
float
>
(
i
,
0
),
corners
.
at
<
float
>
(
i
,
1
)),
3
,
Scalar
(
255
,
0
,
0
),
-
1
,
CV_AA
);
}
imshow
(
"src"
,
src
);
imshow
(
"result"
,
dst
);
//----------------------------------------------------------
// Wait key press
//----------------------------------------------------------
while
(
waitKey
(
0
)
!=
'q'
);
destroyAllWindows
();
return
0
;
}
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