From c4efa268c0bd783cd8b04ed1cd6601ab5d3d398a Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Wed, 11 May 2022 19:20:14 +0100 Subject: Added support for MJPEG compression for neuralnet - Added support for MJPEG compression for neuralnet tracker --- tracker-neuralnet/ftnoir_tracker_neuralnet.cpp | 3 +++ tracker-neuralnet/ftnoir_tracker_neuralnet.h | 1 + tracker-neuralnet/lang/nl_NL.ts | 4 ++++ tracker-neuralnet/lang/ru_RU.ts | 4 ++++ tracker-neuralnet/lang/stub.ts | 4 ++++ tracker-neuralnet/lang/zh_CN.ts | 4 ++++ 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 fov { b, "field-of-view", 56 }; value force_fps { b, "force-fps", fps_default }; value show_network_input { b, "show-network-input", false }; + value 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. Show Network Input + + MJPEG + + neuralnet_tracker_ns::neuralnet_dialog 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. Show Network Input + + MJPEG + + neuralnet_tracker_ns::neuralnet_dialog 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. Show Network Input + + MJPEG + + neuralnet_tracker_ns::neuralnet_dialog 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. Show Network Input + + MJPEG + + neuralnet_tracker_ns::neuralnet_dialog 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 @@ Camera Configuration - + @@ -97,6 +97,13 @@ + + + MJPEG + + + + Camera name @@ -120,7 +127,20 @@ - + + + + + 0 + 0 + + + + + + + + -- cgit v1.2.3