Hqm996
January 31, 2022, 4:37pm
1
Hello There,
I’m doing object detection and trying to see if can make it auto snap images/photos whenever object detected and save into a folder.
I am not sure what line to add. Appreciate your guidance.
I am really new into this.
while display.IsOpen():
img, width, height = camera.CaptureRGBA()
detections = net.Detect(img, width, height)
display.RenderOnce(img, width, height)
Hi @Hqm996 , I just added a script for doing this here:
#!/usr/bin/env python3
#
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
This file has been truncated. show original
Hope that helps!
Hqm996
February 1, 2022, 6:21am
5
Thanks dusty_nv!
I managed to change the script to capture the images.
Thanks for your great support!!
No problem @Hqm996 , glad that you got it working!
system
Closed
February 15, 2022, 6:44pm
7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.