I am working with a Nvidia Jetson 2GB DevKit SD. I have been able to download some sample code off the internet that’s intent is to take the image from a USB camera, and push it to a web server it hosts. I started developing the code earlier this week, and had success with it hosting a web server, although I could not find the correct camera port. After looking online, and testing out many terminal commands I found a way to find which port was correct for the Jetson, with turned tout to be port 4. I then plugged that into the code, and I could not get the code to work. It looped the statement
Restarting service 'main sha256:a0e9de1e8976cdfb1093271fbae7baa94ee7a5a81ebb5034ad5114d4154c4e37' Service exited 'main sha256:a0e9de1e8976cdfb1093271fbae7baa94ee7a5a81ebb5034ad5114d4154c4e37'
I first assumed that I might have broken something in the Jetson itself. So I downloaded a new .ISO for the project, and loaded it onto the Jetson. It then continued to produce the same result. After this, I thought to try to put print statements in the first couple lines of code to see if it was running the main.py file. I have the code shown below:
print("first Line") from flask import Flask, render_template, Response print("Second Line") import cv2 print("Third Line") import time print("Fourth Line")
This was an improvement, the logs then showed the first two prints as shown:
Restarting service 'main sha256:a0e9de1e8976cdfb1093271fbae7baa94ee7a5a81ebb5034ad5114d4154c4e37' main first Line main Second Line Service exited 'main sha256:a0e9de1e8976cdfb1093271fbae7baa94ee7a5a81ebb5034ad5114d4154c4e37'
What this signals to me is that there is a problem with the open cv package. Importing onto the Jetson, because the program works well on my computer.
I have linked the Github link to the code below, do you have any recommendations for moving forward? or ways of further debugging on why it errors out when calling the open cv? Also if anyone has sample code they know works that has openCV, and are willing to share it, it would be appreciated.
Github link: https://github.com/NateDKing/Camera-Streamer