summaryrefslogtreecommitdiffhomepage
path: root/tracker-aruco
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2020-03-29 12:40:24 +0200
committerStanislaw Halik <sthalik@misaki.pl>2020-03-29 12:40:24 +0200
commit4ed107dcc0889d8267d9a69bb6077576f81790ce (patch)
tree4fccd8bc12bcee8ab12dfd938c4432da98935d49 /tracker-aruco
parent8babfb4caff1c32d74a4f58d28eba13bd3b23f21 (diff)
tracker/aruco: add 720p to dropbox
Fixes #1062
Diffstat (limited to 'tracker-aruco')
-rw-r--r--tracker-aruco/aruco-trackercontrols.ui5
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp5
-rw-r--r--tracker-aruco/lang/nl_NL.ts4
-rw-r--r--tracker-aruco/lang/ru_RU.ts4
-rw-r--r--tracker-aruco/lang/stub.ts4
-rw-r--r--tracker-aruco/lang/zh_CN.ts4
6 files changed, 23 insertions, 3 deletions
diff --git a/tracker-aruco/aruco-trackercontrols.ui b/tracker-aruco/aruco-trackercontrols.ui
index 9c3bd78a..4d40b6ef 100644
--- a/tracker-aruco/aruco-trackercontrols.ui
+++ b/tracker-aruco/aruco-trackercontrols.ui
@@ -113,6 +113,11 @@
</item>
<item>
<property name="text">
+ <string>1280x720</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
<string>Default (not recommended!)</string>
</property>
</item>
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 0cdf4c2c..6e94e618 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -56,6 +56,7 @@ static const resolution_tuple resolution_choices[] =
{
{ 640, 480 },
{ 320, 240 },
+ { 1280, 720 },
{ 0, 0 }
};
@@ -157,9 +158,7 @@ static int enum_to_fps(int value)
bool aruco_tracker::open_camera()
{
- int rint = s.resolution;
- if (rint < 0 || rint >= (int)(sizeof(resolution_choices) / sizeof(resolution_tuple)))
- rint = 0;
+ int rint = std::clamp(*s.resolution, 0, (int)std::size(resolution_choices)-1);
resolution_tuple res = resolution_choices[rint];
int fps = enum_to_fps(s.force_fps);
diff --git a/tracker-aruco/lang/nl_NL.ts b/tracker-aruco/lang/nl_NL.ts
index 87040565..c9213ea0 100644
--- a/tracker-aruco/lang/nl_NL.ts
+++ b/tracker-aruco/lang/nl_NL.ts
@@ -59,6 +59,10 @@
<source>Toggle calibration</source>
<translation>Schakel tussen kalibratie</translation>
</message>
+ <message>
+ <source>1280x720</source>
+ <translation>1280x720</translation>
+ </message>
</context>
<context>
<name>aruco_dialog</name>
diff --git a/tracker-aruco/lang/ru_RU.ts b/tracker-aruco/lang/ru_RU.ts
index 57c8170d..f78a7cae 100644
--- a/tracker-aruco/lang/ru_RU.ts
+++ b/tracker-aruco/lang/ru_RU.ts
@@ -59,6 +59,10 @@
<source>Toggle calibration</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>1280x720</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>aruco_dialog</name>
diff --git a/tracker-aruco/lang/stub.ts b/tracker-aruco/lang/stub.ts
index 67cb36b8..82ccd296 100644
--- a/tracker-aruco/lang/stub.ts
+++ b/tracker-aruco/lang/stub.ts
@@ -59,6 +59,10 @@
<source>Toggle calibration</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>1280x720</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>aruco_dialog</name>
diff --git a/tracker-aruco/lang/zh_CN.ts b/tracker-aruco/lang/zh_CN.ts
index b5093b4e..e060c387 100644
--- a/tracker-aruco/lang/zh_CN.ts
+++ b/tracker-aruco/lang/zh_CN.ts
@@ -59,6 +59,10 @@
<source>Toggle calibration</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>1280x720</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>aruco_dialog</name>