diff options
author | Pedro Silva <sparta14gaming@gmail.com> | 2022-05-11 19:20:14 +0100 |
---|---|---|
committer | Pedro Silva <sparta14gaming@gmail.com> | 2022-05-11 19:20:14 +0100 |
commit | c4efa268c0bd783cd8b04ed1cd6601ab5d3d398a (patch) | |
tree | bacf4ee1ed636f0e2e578607d276e1d6833888c0 | |
parent | 1227e6ba5d23dad303761d57a85b6d4b221282b2 (diff) |
Added support for MJPEG compression for neuralnet
- Added support for MJPEG compression for neuralnet tracker
-rw-r--r-- | tracker-neuralnet/ftnoir_tracker_neuralnet.cpp | 3 | ||||
-rw-r--r-- | tracker-neuralnet/ftnoir_tracker_neuralnet.h | 1 | ||||
-rw-r--r-- | tracker-neuralnet/lang/nl_NL.ts | 4 | ||||
-rw-r--r-- | tracker-neuralnet/lang/ru_RU.ts | 4 | ||||
-rw-r--r-- | tracker-neuralnet/lang/stub.ts | 4 | ||||
-rw-r--r-- | tracker-neuralnet/lang/zh_CN.ts | 4 | ||||
-rw-r--r-- | tracker-neuralnet/neuralnet-trackercontrols.ui | 24 |
7 files changed, 42 insertions, 2 deletions
diff --git a/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp b/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp index afee8a68..3687a6cd 100644 --- a/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp +++ b/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp @@ -607,6 +607,8 @@ bool neuralnet_tracker::open_camera() if (fps) args.fps = fps; + args.use_mjpeg = s.use_mjpeg; + if (!camera->start(args)) { qDebug() << "neuralnet tracker: can't open camera"; @@ -786,6 +788,7 @@ neuralnet_dialog::neuralnet_dialog() : tie_setting(s.offset_up, ui.ty_spin); tie_setting(s.offset_right, ui.tz_spin); tie_setting(s.show_network_input, ui.showNetworkInput); + tie_setting(s.use_mjpeg, ui.use_mjpeg); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); diff --git a/tracker-neuralnet/ftnoir_tracker_neuralnet.h b/tracker-neuralnet/ftnoir_tracker_neuralnet.h index 7f496dc6..5f9c6fbe 100644 --- a/tracker-neuralnet/ftnoir_tracker_neuralnet.h +++ b/tracker-neuralnet/ftnoir_tracker_neuralnet.h @@ -58,6 +58,7 @@ struct settings : opts { value<int> fov { b, "field-of-view", 56 }; value<fps_choices> force_fps { b, "force-fps", fps_default }; value<bool> show_network_input { b, "show-network-input", false }; + value<bool> use_mjpeg { b, "use-mjpeg", false }; settings(); }; diff --git a/tracker-neuralnet/lang/nl_NL.ts b/tracker-neuralnet/lang/nl_NL.ts index fb6c3348..a2dcd958 100644 --- a/tracker-neuralnet/lang/nl_NL.ts +++ b/tracker-neuralnet/lang/nl_NL.ts @@ -60,6 +60,10 @@ Don't roll or change position.</source> <source>Show Network Input</source> <translation type="unfinished"></translation> </message> + <message> + <source>MJPEG</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>neuralnet_tracker_ns::neuralnet_dialog</name> diff --git a/tracker-neuralnet/lang/ru_RU.ts b/tracker-neuralnet/lang/ru_RU.ts index f1ba9a92..7e8a9c09 100644 --- a/tracker-neuralnet/lang/ru_RU.ts +++ b/tracker-neuralnet/lang/ru_RU.ts @@ -60,6 +60,10 @@ Don't roll or change position.</source> <source>Show Network Input</source> <translation type="unfinished"></translation> </message> + <message> + <source>MJPEG</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>neuralnet_tracker_ns::neuralnet_dialog</name> diff --git a/tracker-neuralnet/lang/stub.ts b/tracker-neuralnet/lang/stub.ts index 52b8aded..66e1695c 100644 --- a/tracker-neuralnet/lang/stub.ts +++ b/tracker-neuralnet/lang/stub.ts @@ -60,6 +60,10 @@ Don't roll or change position.</source> <source>Show Network Input</source> <translation type="unfinished"></translation> </message> + <message> + <source>MJPEG</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>neuralnet_tracker_ns::neuralnet_dialog</name> diff --git a/tracker-neuralnet/lang/zh_CN.ts b/tracker-neuralnet/lang/zh_CN.ts index 655d2118..8e9513b3 100644 --- a/tracker-neuralnet/lang/zh_CN.ts +++ b/tracker-neuralnet/lang/zh_CN.ts @@ -60,6 +60,10 @@ Don't roll or change position.</source> <source>Show Network Input</source> <translation type="unfinished"></translation> </message> + <message> + <source>MJPEG</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>neuralnet_tracker_ns::neuralnet_dialog</name> diff --git a/tracker-neuralnet/neuralnet-trackercontrols.ui b/tracker-neuralnet/neuralnet-trackercontrols.ui index f16b5807..5f72a809 100644 --- a/tracker-neuralnet/neuralnet-trackercontrols.ui +++ b/tracker-neuralnet/neuralnet-trackercontrols.ui @@ -60,7 +60,7 @@ <string>Camera Configuration</string> </property> <layout class="QGridLayout" name="gridLayout_4"> - <item row="2" column="1"> + <item row="3" column="1"> <widget class="QComboBox" name="cameraName"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> @@ -97,6 +97,13 @@ </widget> </item> <item row="2" column="0"> + <widget class="QLabel" name="label_11"> + <property name="text"> + <string>MJPEG</string> + </property> + </widget> + </item> + <item row="3" column="0"> <widget class="QLabel" name="label_10"> <property name="text"> <string>Camera name</string> @@ -120,7 +127,20 @@ </property> </widget> </item> - <item row="3" column="1"> + <item row="2" column="1"> + <widget class="QCheckBox" name="use_mjpeg"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="4" column="1"> <widget class="QPushButton" name="camera_settings"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> |