Sir, I am from India & I want to tell one thing that I never saw a teacher like you who is so honest in his job and having clear and vast knowledge...Thank you very much sir...carry on..we r with u.
Getting really interesting now! If you are tired of using R mouse click to 'run python file in terminal', consider adding the code-runner extension to visual studio code. Then you can just press CTRL+ALT+n instead of using R mouse click. This keyboard shortcut to run the python file works great even with two cams installed. The only configuration is to set python3 as the default in code-runner instead of the python 2.7 version, since both versions are on the nano. Trying to use keyboard shortcuts for everything possible - very fast. Thanks for a great series, very exciting possibilities!
Changing logitech webcam width and height from default 640X480: 1. pip (or pip3 ) install imutils from the terminal- you need this module to resize the webcam frame; must be installed to python3 lib, not python 2.7. Just use the version (pip or pip3) that uses python3 2. import imutils # add to top of python file along with import cv2 3. frame = imutils.resize(frame, width=320) #add this to the while loop after making the frame; this is the frame you made for the webcam: ret, frame = cam.read() This allows you to change the window size of the webcam just as you did with the Pi cam. I have both cams 320X240 with gray and color in 4 separate windows. I also noticed the locations needed to not overlap the windows was not exactly right - just as you did. Hope this works for you. I have had no problems with it so far.
this was a lot of fun...I had to improvise a little because I'm working with some usb web cams that I bought for .50 cents each at an amazon closeout store. I bought about 10 of them and so far found 2 that would work with this project. I had to dig a little through the open cv docs but I think I'm on page with you until my pi cam arrives.
I know some have been complaining about releasing the project quicker; however, for me the speed of the learning process is perfect as it gives me a couple of days to experiment with the new items we learn. If I wish to contribute other than using Patron, where could I send my check?
Great video. I'll be glad to get the piCam fixed. I do like the video from piCam better than the webCam, but the ability to have multiple cameras and multiple videos running is really exciting. Thanks Paul.
Hello, Sir! I use IMX219 Binocular Camera and I have two streams from left and right halves, but the video from right lens lags about 1s behind that from the left one. In the code I refer to both cameras as you did to your Pi camera, but in the camSet string there is one more parameter 'sensor-id = 0' (or 1). After several code string swapping I found that it depends on cam/cam2 initialization order. If I initialize cam first, then video from cam2 comes faster and that one from cam is 1 second late and vice versa. I do not think it can affect my studying of your lessons, but I'll be very grateful for your advice in this matter.
thank you for the lessons Paul. Everything is working but I noticed that the Raspberry cam is extremely slow, it takes 3-4 second before it show the video image in comparation from the webcam. The Nano is also very slow when I write the code, like one second delay with my keyboard. How can I see if I am using al the CPUs in the Jetson Nano?
Another issue i faced was the autocomplete function not working for CV2, issue and solution described here >> donjayamanne.github.io/pythonVSCodeDocs/docs/troubleshooting_intellisense/ In Code-OSS: press CTRL + SHIFT + p , then look for "settings.json and the autoComplete.extraPaths line as wel as the location where openCV was installed (the extra path), you can find this in a terminal window using : sudo find / -name cv2 Mine is located in /usr/lib/python3.6/dist-packages/cv2/python-3.6 Hope this solution can help for people with the same issue.
Koen, Thanks for leg up on this. On Raspberry Pi to find where a package is installed try dpkg -L python3-opencv amongst the directories displayed I selected "/usr/lib/python3/dist-packages" so the value to add is "/usr/lib/python3/dist-packages" as you said press CTRL + SHIFT + P and search for 'settings.json' open Settings(JSON) (not 'default' or 'user' or 'workspace' ones) in my machine the value ends up "python.autoComplete.extraPaths": [ "/usr/lib/python3/dist-packages" ] restart the IDE and it seems to work.
Question about Webcams on OpenCV? I have an older Microsoft LifeCam Cinema HD. It says on the box 720p HD. I tried this on the Jetson Nano and while it works it has extreme delays between my motion and the video. It's really bad and not something you would want to use. However, I plugged this camera into an old notebook computer (not a fast computer at all), and the camera is very quick to respond on that computer. So it can't be the camera. I'm wondering if there are ways to adjust the parameters when setting up a webcam in OpenCV? Surely this camera should be able to perform at least as well as it does on the old slow notebook computer.
I was working through this series of videos and I noticed that code-OSS started identifying "Problems" in the code that it wasn't doing yesterday. One of the Problems displayed is: "Module 'cv2' has no 'VideoCapture' member (pylint no member) [8,6]" Here is the code referenced above: import cv2 . . cam= cv2.VideoCapture(camSet) . The code works find. I also noticed that when typing new code into the editor I am no longer seeing the code helper options being displayed. Any help would be appreciated.
If I run openCV-moveWindow.py I get the warning: (python3: 10221): Gtk-WARNING **: 19: 10: 10.062: Locale not supported by C library. Using the fallback 'C' locale. I am a beginner with Linux. I have already done sudo apt-get update. How do I fix this, any idea? Excellent tutorial, by the way.
QUESTION to ANYONE,... CAD program for Jetson Nano? Of course Paul is more than welcome to answer this too. I was trying to use Fusion 360 on the Nano (the online browser version of course). But it's formidably slow. Possibly due to my slow Internet connection? Or maybe it's just the Jetson Nano? In any case, I'm wondering if anyone knows of a 3D CAD software that might run on the Jetson Nano? Any suggestions? Thanks.
System Program Problem Detected At one point I accidentally closed out the video window by clicking on the X instead of using the q key. This messed up the whole system and I had to shut down and reboot. After a reboot I got the message "System Program Problem Detected". However after closing that message I was able to reopen OpenCV and everything seems to work fine again. But now every time I boot up the Jetson Nano I get that same message. I just click Cancel, and the computer appears to work ok. But that message come up every time I boot up. I wonder if there's anything I can do to discover why I'm getting this error message and maybe fix the problem. Like I say, the system appears to be working just fine. But something is causing this message to be launched every time I boot up.
@@paulmcwhorter I did a sudo apt-get update and that appears to have fixed it. Maybe. I was also looking for a way to disable the X that closes the window just to be sure I can't close it that way by accident. I've been searching for ways to do that on Google but so far I haven't been able to figure out how to disable the close window X-button. If you have a window that will cause a program to crash if closed with the X button there should be a way to disable that button. Or if it can't be disabled then maybe there's a way from within the program to determine that it had been pressed and be able to clean up the program that way before it actually closes? It's not good to have a lot of windows open that will crash the system if close with the mouse.
Me again! Today's lesson didn't go well for me, as my Jetson kept giving me "Segmentation fault (core dumped)" when starting the "openCV2-moveWindow.py" Python program. From last week's lesson we had written a program named "pyScratch.py" and it was working just fine while I was waiting on today's lesson to start. Then it would also give the "Segmentation fault" error message when I retried it after getting the error on today's "moveWindow" program. Anyone with any ideas. Has my Jetson developed a hardware problem?
Sir, I am from India & I want to tell one thing that I never saw a teacher like you who is so honest in his job and having clear and vast knowledge...Thank you very much sir...carry on..we r with u.
It helps a great deal to have someone walk through these examples on their own in the style you're doing it.
Thank you.
This channel should have millions of subscribers 😊
Getting really interesting now! If you are tired of using R mouse click to 'run python file in terminal', consider adding the code-runner extension to visual studio code. Then you can just press CTRL+ALT+n instead of using R mouse click. This keyboard shortcut to run the python file works great even with two cams installed. The only configuration is to set python3 as the default in code-runner instead of the python 2.7 version, since both versions are on the nano. Trying to use keyboard shortcuts for everything possible - very fast.
Thanks for a great series, very exciting possibilities!
Changing logitech webcam width and height from default 640X480:
1. pip (or pip3 ) install imutils from the terminal- you need this module to resize the webcam frame; must be installed to python3 lib, not python 2.7. Just use the version (pip or pip3) that uses python3
2. import imutils # add to top of python file along with import cv2
3. frame = imutils.resize(frame, width=320) #add this to the while loop after making the frame; this is the frame you made for the webcam: ret, frame = cam.read()
This allows you to change the window size of the webcam just as you did with the Pi cam. I have both cams 320X240 with gray and color in 4 separate windows.
I also noticed the locations needed to not overlap the windows was not exactly right - just as you did.
Hope this works for you. I have had no problems with it so far.
Most excellent!
thank you!
this was a lot of fun...I had to improvise a little because I'm working with some usb web cams that I bought for .50 cents each at an amazon closeout store. I bought about 10 of them and so far found 2 that would work with this project. I had to dig a little through the open cv docs but I think I'm on page with you until my pi cam arrives.
I know some have been complaining about releasing the project quicker; however, for me the speed of the learning process is perfect as it gives me a couple of days to experiment with the new items we learn.
If I wish to contribute other than using Patron, where could I send my check?
Thanks Paul for another great lesson and for opening the door a crack for us on openCV's abilities to manipulate images!
Great video. I'll be glad to get the piCam fixed. I do like the video from piCam better than the webCam, but the ability to have multiple cameras and multiple videos running is really exciting. Thanks Paul.
Hello, Sir!
I use IMX219 Binocular Camera and I have two streams from left and right halves, but the video from right lens lags about 1s behind that from the left one. In the code I refer to both cameras as you did to your Pi camera, but in the camSet string there is one more parameter 'sensor-id = 0' (or 1). After several code string swapping I found that it depends on cam/cam2 initialization order. If I initialize cam first, then video from cam2 comes faster and that one from cam is 1 second late and vice versa. I do not think it can affect my studying of your lessons, but I'll be very grateful for your advice in this matter.
I enjoyed this one a lot! Thanks again Paul!
Another amazing video, i ended up engaging my webcam but the window size was quite larger than the Pi cam nevertheless good progress!
Great lesson..just one question. My vscode doesnt show the docstring on functions like on 9:14 Any suggestions how this needs to be turned on?
Paule the code is not working with cv 4.4
thank you for the lessons Paul.
Everything is working but I noticed that the Raspberry cam is extremely slow, it takes 3-4 second before it show the video image in comparation from the webcam.
The Nano is also very slow when I write the code, like one second delay with my keyboard.
How can I see if I am using al the CPUs in the Jetson Nano?
Another issue i faced was the autocomplete function not working for CV2, issue and solution described here >> donjayamanne.github.io/pythonVSCodeDocs/docs/troubleshooting_intellisense/
In Code-OSS: press CTRL + SHIFT + p , then look for "settings.json and the autoComplete.extraPaths line as wel as the location where openCV was installed (the extra path), you can find this in a terminal window using : sudo find / -name cv2
Mine is located in /usr/lib/python3.6/dist-packages/cv2/python-3.6
Hope this solution can help for people with the same issue.
Koen, Thanks for leg up on this.
On Raspberry Pi to find where a package is installed try
dpkg -L python3-opencv
amongst the directories displayed I selected "/usr/lib/python3/dist-packages"
so the value to add is "/usr/lib/python3/dist-packages"
as you said press CTRL + SHIFT + P and search for 'settings.json'
open Settings(JSON) (not 'default' or 'user' or 'workspace' ones)
in my machine the value ends up
"python.autoComplete.extraPaths": [
"/usr/lib/python3/dist-packages"
]
restart the IDE and it seems to work.
Another great lesson.
Question about Webcams on OpenCV?
I have an older Microsoft LifeCam Cinema HD. It says on the box 720p HD.
I tried this on the Jetson Nano and while it works it has extreme delays between my motion and the video. It's really bad and not something you would want to use. However, I plugged this camera into an old notebook computer (not a fast computer at all), and the camera is very quick to respond on that computer. So it can't be the camera.
I'm wondering if there are ways to adjust the parameters when setting up a webcam in OpenCV? Surely this camera should be able to perform at least as well as it does on the old slow notebook computer.
I was working through this series of videos and I noticed that code-OSS started identifying "Problems" in the code that it wasn't doing yesterday. One of the Problems displayed is:
"Module 'cv2' has no 'VideoCapture' member (pylint no member) [8,6]"
Here is the code referenced above:
import cv2
.
.
cam= cv2.VideoCapture(camSet)
.
The code works find. I also noticed that when typing new code into the editor I am no longer seeing the code helper options being displayed. Any help would be appreciated.
Much fun here!
i can't wait for the next lesson ;-)
If I run openCV-moveWindow.py I get the warning:
(python3: 10221): Gtk-WARNING **: 19: 10: 10.062: Locale not supported by C library. Using the fallback 'C' locale.
I am a beginner with Linux. I have already done sudo apt-get update. How do I fix this, any idea?
Excellent tutorial, by the way.
I got it working but somehow the gray window won´t move.
QUESTION to ANYONE,... CAD program for Jetson Nano?
Of course Paul is more than welcome to answer this too.
I was trying to use Fusion 360 on the Nano (the online browser version of course). But it's formidably slow. Possibly due to my slow Internet connection? Or maybe it's just the Jetson Nano?
In any case, I'm wondering if anyone knows of a 3D CAD software that might run on the Jetson Nano? Any suggestions?
Thanks.
Been meaning to ask, do you have a Facebook page or a better way we can chat other then this comment on each video?
I have a discord server for patreon supporters, and I try and hang out there.
@@paulmcwhorter Very cool and it would be? :)
I am using two MIPI cameras and am getting this error: "gstreamer error pipeline have not been created" Do you know of a resolution.
Use sensor-id to specify which camera 0/1 (camSet0='nvarguscamerasrc sensor-id= 0 ! video...)
@@ilovetechnology8436 Thank-you Yves, I needed that.
21:36 ❤lovely
System Program Problem Detected
At one point I accidentally closed out the video window by clicking on the X instead of using the q key. This messed up the whole system and I had to shut down and reboot. After a reboot I got the message "System Program Problem Detected". However after closing that message I was able to reopen OpenCV and everything seems to work fine again.
But now every time I boot up the Jetson Nano I get that same message. I just click Cancel, and the computer appears to work ok. But that message come up every time I boot up. I wonder if there's anything I can do to discover why I'm getting this error message and maybe fix the problem.
Like I say, the system appears to be working just fine. But something is causing this message to be launched every time I boot up.
And that my friend is why we put the waitKey command in the program. Probably you can just ignore the error, or rebuild with a fresh SD card.
@@paulmcwhorter I did a sudo apt-get update and that appears to have fixed it. Maybe.
I was also looking for a way to disable the X that closes the window just to be sure I can't close it that way by accident. I've been searching for ways to do that on Google but so far I haven't been able to figure out how to disable the close window X-button. If you have a window that will cause a program to crash if closed with the X button there should be a way to disable that button.
Or if it can't be disabled then maybe there's a way from within the program to determine that it had been pressed and be able to clean up the program that way before it actually closes?
It's not good to have a lot of windows open that will crash the system if close with the mouse.
Me again! Today's lesson didn't go well for me, as my Jetson kept giving me "Segmentation fault (core dumped)" when starting the "openCV2-moveWindow.py" Python program. From last week's lesson we had written a program named "pyScratch.py" and it was working just fine while I was waiting on today's lesson to start. Then it would also give the "Segmentation fault" error message when I retried it after getting the error on today's "moveWindow" program. Anyone with any ideas. Has my Jetson developed a hardware problem?
Consider putting a fresh SD card image in place of your current one. Card corruption is a big problem. Good luck, let us know how you fix it.
Boooomm