* For AM5, /dev/video0 has been reserved for VPE. Therefore, set the default 
video port
  for camera capture as /dev/video1 for AM5, and /dev/video0 for the others.

Signed-off-by: Hongmei Gou <[email protected]>
---
 tidl_apps/armnn_demo_livecam/runArmnnLiveCam.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tidl_apps/armnn_demo_livecam/runArmnnLiveCam.sh 
b/tidl_apps/armnn_demo_livecam/runArmnnLiveCam.sh
index 247427e..b01cfa7 100644
--- a/tidl_apps/armnn_demo_livecam/runArmnnLiveCam.sh
+++ b/tidl_apps/armnn_demo_livecam/runArmnnLiveCam.sh
@@ -1,3 +1,12 @@
 cd /usr/bin
 
-./ArmnnExamples -f tflite-binary -i input -s '1 224 224 3' -o 
MobilenetV2/Predictions/Reshape_1 -d 
/usr/share/arm/armnn/testvecs/camera_live_input -m 
/usr/share/arm/armnn/models/mobilenet_v2_1.0_224.tflite -c CpuAcc 
--number_frame 999
+machine_type="`cat /etc/hostname`"
+video_port=0
+
+if [ "$machine_type" = "am57xx-evm" ] || [ "$machine_type" = "am57xx-hs-evm" 
]; then
+    video_port=1
+fi
+
+echo "Camera capture on /dev/video$video_port..."
+
+./ArmnnExamples -f tflite-binary -i input -s '1 224 224 3' -o 
MobilenetV2/Predictions/Reshape_1 -d 
/usr/share/arm/armnn/testvecs/camera_live_input$video_port -m 
/usr/share/arm/armnn/models/mobilenet_v2_1.0_224.tflite -c CpuAcc 
--number_frame 999
-- 
2.17.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to