All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hongmei Gou <a0271529@ti.com>
To: <meta-arago@arago-project.org>
Cc: Hongmei Gou <a0271529@ti.com>
Subject: [thud/master] [PATCH v2] armnn: ArmnnExamples: set capture resolution when using camera input
Date: Tue, 10 Dec 2019 15:43:09 -0500	[thread overview]
Message-ID: <20191210204309.15705-1-a0271529@ti.com> (raw)

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



                 reply	other threads:[~2019-12-10 20:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191210204309.15705-1-a0271529@ti.com \
    --to=a0271529@ti.com \
    --cc=meta-arago@arago-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.