Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using an USB camera #35

Open
jjferreira opened this issue May 5, 2021 · 7 comments
Open

Using an USB camera #35

jjferreira opened this issue May 5, 2021 · 7 comments

Comments

@jjferreira
Copy link

Hi there how can make this code run using a usb camera, instead of the camera suggested in your article.

@tomasz-lewicki
Copy link
Owner

Hi @jjferreira !

  1. You're probably better off using CSI camera. Using a USB camera will need more CPU to copy data & decode the video stream from USB.
  2. If you still want to use a USB camera here's how you'd do it:

Substitute this line from

cap = cv2.VideoCapture(gst_string, cv2.CAP_GSTREAMER)

to

cap = cv2.VideoCapture('/dev/video3')

This assumes that your USB camera is on /dev/video3. If you don't know which device node the USB cam is associated with, do dmesg -w and observe the output while plugging the USB camera.

Hope this helps!

@jjferreira
Copy link
Author

Hi @tomek-l , thank you for this response, but I'm a bit confused. This file u asked me to make a change its on a different project and repository. I downloaded the ai-thermometer repository and the changes are on the jetson-cameras repository, do you mind clarifying.

Thank you

@tomasz-lewicki
Copy link
Owner

Hi there!

Solution:

In order to clone everything, including submodules do:

git clone --recursive https://github.com/tomek-l/ai-thermometer

Explanation:

When you see something like this:
image
It means the author is using git submodules. This is basically a git repository containing another git repository inside of it.

I also updated instructions to include --recursive flag.

@jjferreira
Copy link
Author

Hi @tomek-l thank you for your explanation. It runs but not as expected see picture attached.

image

@tomasz-lewicki
Copy link
Owner

Hi @jjferreira ,

What webcam are you using?
Did you have any success so far in getting the image in other applications?

@jjferreira
Copy link
Author

jjferreira commented May 14, 2021 via email

@jjferreira
Copy link
Author

The issued I was having was to do with the lens of the thermal became loose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants