Closed wydonglove closed 1 year ago
Hi @wydonglove, this code is unrelated to jetson-inference - I'd recommend posting this question to the Xavier NX forum instead: https://forums.developer.nvidia.com/c/agx-autonomous-machines/jetson-embedded-systems/jetson-xavier-nx/258
I want to invoke the came to take photos and save when the NX is power on start, i write a start script like this:
#################################### [Unit] Description=Python After=network.service
[Service] Type=simple User=nx Group=nx WorkingDirectory=/home/nx/Ai_project/Pet ExecStart=/usr/bin/python3 /home/nx/Ai_project/Pet/Fetch/detection.py PrivateTmp=true Restart=on-failure
[Install] WantedBy=multi-user.target ####################################
My call camera program function like this: ####################################
def show_camera(save_path,width,hight,rate): #save_path,width,hight,rate) window_title = "CSI Camera" video_capture = cv2.VideoCapture(gstreamer_pipeline(capture_width=width,capture_height=hight,framerate=rate,flip_method=0),cv2.CAP_GSTREAMER)
#################################### I can run it right in local , but when i power on start to run script , the video_capture.read() is None , why and how to solve this problem?