AI on the Jetson Nano LESSON 12: Moving Video Windows in OpenCV

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 พ.ย. 2024

ความคิดเห็น • 40

  • @pralaymajumdar7822
    @pralaymajumdar7822 4 ปีที่แล้ว +6

    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.

  • @kestergascoyne6924
    @kestergascoyne6924 4 ปีที่แล้ว +3

    It helps a great deal to have someone walk through these examples on their own in the style you're doing it.
    Thank you.

  • @raviyadav-rc1br
    @raviyadav-rc1br ปีที่แล้ว

    This channel should have millions of subscribers 😊

  • @quaternion-pi
    @quaternion-pi 5 ปีที่แล้ว +1

    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!

  • @quaternion-pi
    @quaternion-pi 5 ปีที่แล้ว +3

    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.

  • @danbishop4035
    @danbishop4035 3 ปีที่แล้ว

    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.

  • @TinFoot
    @TinFoot 5 ปีที่แล้ว +4

    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?

  • @vaughntaylor2855
    @vaughntaylor2855 5 ปีที่แล้ว

    Thanks Paul for another great lesson and for opening the door a crack for us on openCV's abilities to manipulate images!

  • @opalprestonshirley1700
    @opalprestonshirley1700 5 ปีที่แล้ว

    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.

  • @on-liner
    @on-liner ปีที่แล้ว

    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.

  • @xacompany
    @xacompany 4 ปีที่แล้ว

    I enjoyed this one a lot! Thanks again Paul!

  • @epixexplorations
    @epixexplorations 4 ปีที่แล้ว

    Another amazing video, i ended up engaging my webcam but the window size was quite larger than the Pi cam nevertheless good progress!

  • @Al-commentario
    @Al-commentario 3 ปีที่แล้ว

    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?

  • @luu1429
    @luu1429 3 ปีที่แล้ว +1

    Paule the code is not working with cv 4.4

  • @ricardobjorkeheim775
    @ricardobjorkeheim775 3 ปีที่แล้ว

    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?

  • @TheKverbeeck
    @TheKverbeeck 4 ปีที่แล้ว +2

    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.

    • @johnc508
      @johnc508 4 ปีที่แล้ว

      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.

  • @tretty07
    @tretty07 3 ปีที่แล้ว

    Another great lesson.

  • @Mystic0Dreamer
    @Mystic0Dreamer 5 ปีที่แล้ว

    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.

  • @michaelhucul6071
    @michaelhucul6071 4 ปีที่แล้ว

    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.

  • @borisfursov9245
    @borisfursov9245 4 ปีที่แล้ว

    Much fun here!

  • @robertharrie6464
    @robertharrie6464 5 ปีที่แล้ว

    i can't wait for the next lesson ;-)

  • @gerritvanstraaten7390
    @gerritvanstraaten7390 5 ปีที่แล้ว

    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.

  • @grelstkoning9373
    @grelstkoning9373 4 ปีที่แล้ว

    I got it working but somehow the gray window won´t move.

  • @Mystic0Dreamer
    @Mystic0Dreamer 5 ปีที่แล้ว

    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.

  • @OZtwo
    @OZtwo 3 ปีที่แล้ว

    Been meaning to ask, do you have a Facebook page or a better way we can chat other then this comment on each video?

    • @paulmcwhorter
      @paulmcwhorter  3 ปีที่แล้ว +1

      I have a discord server for patreon supporters, and I try and hang out there.

    • @OZtwo
      @OZtwo 3 ปีที่แล้ว

      @@paulmcwhorter Very cool and it would be? :)

  • @RobertVaughanLawOffice
    @RobertVaughanLawOffice 4 ปีที่แล้ว

    I am using two MIPI cameras and am getting this error: "gstreamer error pipeline have not been created" Do you know of a resolution.

    • @ilovetechnology8436
      @ilovetechnology8436 4 ปีที่แล้ว +1

      Use sensor-id to specify which camera 0/1 (camSet0='nvarguscamerasrc sensor-id= 0 ! video...)

    • @markhache6756
      @markhache6756 4 ปีที่แล้ว

      @@ilovetechnology8436 Thank-you Yves, I needed that.

  • @youngjoocho2257
    @youngjoocho2257 7 หลายเดือนก่อน

    21:36 ❤lovely

  • @Mystic0Dreamer
    @Mystic0Dreamer 5 ปีที่แล้ว

    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
      @paulmcwhorter  5 ปีที่แล้ว

      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.

    • @Mystic0Dreamer
      @Mystic0Dreamer 5 ปีที่แล้ว +1

      @@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.

  • @codecage9333
    @codecage9333 5 ปีที่แล้ว

    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?

    • @quaternion-pi
      @quaternion-pi 5 ปีที่แล้ว

      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.

  • @javiercr7
    @javiercr7 4 ปีที่แล้ว +2

    Boooomm