All of lore.kernel.org
 help / color / mirror / Atom feed
* [thud/master] [PATCH v2] armnn: ArmnnExamples: set capture resolution when using camera input
@ 2019-12-10 20:43 Hongmei Gou
  0 siblings, 0 replies; only message in thread
From: Hongmei Gou @ 2019-12-10 20:43 UTC (permalink / raw)
  To: meta-arago; +Cc: Hongmei Gou

Signed-off-by: Hongmei Gou <a0271529@ti.com>
---
v2 changes: exclude the test clip (test2.avi)

 ...ting-capture-resolution-for-the-came.patch | 48 +++++++++++++++++++
 .../recipes-support/armnn/armnn_git.bb        |  3 +-
 2 files changed, 50 insertions(+), 1 deletion(-)
 create mode 100644 meta-arago-extras/recipes-support/armnn/armnn/0013-ArmnnExample-setting-capture-resolution-for-the-came.patch

diff --git a/meta-arago-extras/recipes-support/armnn/armnn/0013-ArmnnExample-setting-capture-resolution-for-the-came.patch b/meta-arago-extras/recipes-support/armnn/armnn/0013-ArmnnExample-setting-capture-resolution-for-the-came.patch
new file mode 100644
index 00000000..bce697d1
--- /dev/null
+++ b/meta-arago-extras/recipes-support/armnn/armnn/0013-ArmnnExample-setting-capture-resolution-for-the-came.patch
@@ -0,0 +1,48 @@
+From dc175c00a317cdd693772f7dbf9de6ddeef46f19 Mon Sep 17 00:00:00 2001
+From: Hongmei Gou <a0271529@ti.com>
+Date: Tue, 10 Dec 2019 13:07:26 -0500
+Subject: [PATCH] ArmnnExample: setting capture resolution for the camera input
+
+Upstream-Status: Inappropriate [TI only example code]
+
+Signed-off-by: Hongmei Gou <a0271529@ti.com>
+---
+ tests/ArmnnExamples/ArmnnExamples.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tests/ArmnnExamples/ArmnnExamples.cpp b/tests/ArmnnExamples/ArmnnExamples.cpp
+index 1bd76a47..7fdaa167 100644
+--- a/tests/ArmnnExamples/ArmnnExamples.cpp
++++ b/tests/ArmnnExamples/ArmnnExamples.cpp
+@@ -349,6 +349,10 @@ int MainImpl(const char* modelPath,
+       }
+       std::cout << "Using video" << vport << std::endl;
+       cap = VideoCapture(vport);
++      // Setting the capture resolution
++      cap.set(CV_CAP_PROP_FRAME_WIDTH, 352);
++      cap.set(CV_CAP_PROP_FRAME_HEIGHT, 288);
++
+       namedWindow("ARMNN MobileNet Example", WINDOW_AUTOSIZE | CV_GUI_NORMAL);
+       input_type = INPUT_CAMERA; //camera input
+     }
+@@ -452,7 +452,7 @@ int MainImpl(const char* modelPath,
+         cv::putText(test_image, predict_target_name,
+                     cv::Point(rectCrop.x + 5,rectCrop.y + 20), // Coordinates
+                     cv::FONT_HERSHEY_COMPLEX_SMALL, // Font
+-                    1.0, // Scale. 2.0 = 2x bigger
++                    0.75, // Scale. 2.0 = 2x bigger
+                     cv::Scalar(0,0,255), // Color
+                     1, // Thickness
+                     8); // Line type
+@@ -462,7 +462,7 @@ int MainImpl(const char* modelPath,
+         cv::putText(test_image, preformance_ret_string,
+                     cv::Point(rectCrop.x + 5,rectCrop.y + 40), // Coordinates
+                     cv::FONT_HERSHEY_COMPLEX_SMALL, // Font
+-                    1.0, // Scale. 2.0 = 2x bigger
++                    0.75, // Scale. 2.0 = 2x bigger
+                     cv::Scalar(0,0,255), // Color
+                     1, // Thickness
+                     8); // Line type
+-- 
+2.17.1
+
diff --git a/meta-arago-extras/recipes-support/armnn/armnn_git.bb b/meta-arago-extras/recipes-support/armnn/armnn_git.bb
index 38571091..29142a04 100644
--- a/meta-arago-extras/recipes-support/armnn/armnn_git.bb
+++ b/meta-arago-extras/recipes-support/armnn/armnn_git.bb
@@ -5,7 +5,7 @@ LICENSE = "MIT & Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3e14a924c16f7d828b8335a59da64074 \
                     file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
 
-PR = "r3"
+PR = "r4"
 PV = "19.08"
 PV_MAJOR = "${@d.getVar('PV',d,1).split('.')[0]}"
 
@@ -34,6 +34,7 @@ SRC_URI = " \
     file://0010-armnnexamples-update-for-19.08-modifications.patch \
     file://0011-Generate-versioned-library-for-armnnTfLiteParser.patch \
     file://0012-ArmnnExample-Fix-exception-for-help-command-line-opt.patch \
+    file://0013-ArmnnExample-setting-capture-resolution-for-the-came.patch \
     http://download.tensorflow.org/models/mobilenet_v1_2018_02_22/mobilenet_v1_1.0_224.tgz;name=mobilenet;subdir=${WORKDIR}/tfmodel;destsuffix=tfmodel \
     https://storage.googleapis.com/mobilenet_v2/checkpoints/mobilenet_v2_1.0_224.tgz;name=mobilenetv2;subdir=${WORKDIR}/tfmodel;destsuffix=tfmodel \
     git://git.ti.com/tidl/tidl-api.git;name=tidl-api;branch=${BRANCH_tidl-api};subdir=${WORKDIR}/tidl-api;destsuffix=tidl-api \
-- 
2.17.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-10 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 20:43 [thud/master] [PATCH v2] armnn: ArmnnExamples: set capture resolution when using camera input Hongmei Gou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.