Raspberry Pi LESSON 45: Using the Raspberry Pi Camera in Bullseye with OpenCV

Поділитися
Вставка
  • Опубліковано 22 жов 2024

КОМЕНТАРІ • 102

  • @AronAyub
    @AronAyub Рік тому +14

    Hi Proff, you taught me a lot back then when I was a fresher in my early career journey, 7 years ago. Now I'm an Electrical/Electronic Engineer working as an IoT/AI Solutions dev and a tutor. Lot of thanks and I salute you !

    • @paulmcwhorter
      @paulmcwhorter  Рік тому +5

      Well done! Congratulations on your success.

    • @AronAyub
      @AronAyub Рік тому +3

      @@paulmcwhorter forever grateful !

  • @stephenlightkep1621
    @stephenlightkep1621 Рік тому +1

    Thanks Paul. What I love about these courses is that it ties together classes I took in the past.

  • @markbooco1719
    @markbooco1719 Рік тому +5

    Excellent lesson. Python would not work until I had to updated my bullseye firmware to get libcamera library by using: sudo rpi-update.
    Also, updated /boot/config.txt file with the following changes:
    #start_x=1
    camera_auto_detect=1
    gpu_mem=256
    Found libcamera-hello command was a good way to confirm camera is wired up correctly.

    • @pranav08112
      @pranav08112 4 місяці тому

      I am still getting " no camera available" when I am testing with libcamera-hello ..any suggestions..?

  • @krizz5825
    @krizz5825 Рік тому

    OMG,you are my lifesaver,I tried so much ways including pi camera2 face detection program on their official repo but idk it is not working for me,but you are rockingg,Thankyou Somuuchh.If didn't saw this video my last opt was to restart all from 32bit os which will drain my entire work on 64bit.Once Thank you Paul

  • @training_demo
    @training_demo 9 місяців тому

    Thanks a lot sir,.
    I was trying to connect the camera since last two day, But You code is so simple. I don't know why, But I was not getting any blog regarding the same.
    Thanks again

  • @drzwithcrow6075
    @drzwithcrow6075 Місяць тому

    So perpetually envious of the environment that you inhabit. Sometimes I think I watch your vids for the background as much as anything.
    Nah, just joshing, the content is great! as always. Stimulation for the imagination!

    • @paulmcwhorter
      @paulmcwhorter  Місяць тому

      We really are blessed to live in such a beautiful place. My wife are very deliberate to not become blind to the beautiful spot on the river. We have lunch every day outside on the balcony to enjoy the beautiful view of the river.

  • @PM_Ace
    @PM_Ace 8 місяців тому

    Hi Paul,
    Thanks for the series. Ive learned a ton. One small note to others watching the new 5 pi cables from this kit dont fit a raspberry pi 5 slot as it is to small.

    • @paulmcwhorter
      @paulmcwhorter  8 місяців тому +1

      These lessons are better suited for earlier version of the Pi. The 5 is really trying to become more of a desktop type machine, and less of an embedded platform. Maybe pickup a used, earlier version of the pi for the class.

    • @PM_Ace
      @PM_Ace 8 місяців тому

      Thanks for the response! I have enjoyed the class a lot and learned a ton.
      Would a raspberry 3 work for this class or only a 4?
      Thanks!

  • @eei2036
    @eei2036 Рік тому

    Its perfect and the best pick. I tried 10 -15 videos , this gave me the desired output
    ☺☺☺☺☺

  • @qzorn4440
    @qzorn4440 2 місяці тому +1

    Thanks! I love the Raspberry Pi Camera videos with OpenCV. Thank you Paul. Also, I just found a SunFounder Video Robot Car Kit for Raspberry Pi 5 /4/3B+/3B.
    Python/Blockly (Scratch), Video Courses, Rechargeable Battery (Raspberry Pi NOT Included) Amazon $89.99 This might be one way to learn the RPi5???

    • @paulmcwhorter
      @paulmcwhorter  2 місяці тому

      Thanks! Really appreciate the support.

  • @RobertWood-mg4ro
    @RobertWood-mg4ro Рік тому +1

    I have followed you loosely on many of your posts. Arduino, Fusion 360, etc. You're an excellent teacher. I find all of your content intriguing and I normally browse your posts as my hobby needs dictate. Thank you for all you do. Unfortunately, I popped into this lesson w/o fully understanding the 64-bit operating repercussions. As a heads up for any of your followers. If they do not install the 64-bit version, i.e. go with default settings on the PI page even though it is a 'fresh install'; they will not be successful in installing the CV-2. At some level I thought the 64-bit vs 32 would just be a performance Hicky...but no...the files structures, etc. are a bit different. Anyway, you earned a Patrion visit from me. Just for the pure tenacity of putting that all together for us. If only I would have popped into lesson 44 1st * smile * . Please keep up the good fight. Rob

  • @cbrombaugh
    @cbrombaugh Рік тому

    It is great to see the Pi camera come to life! Having done the FPS calculation in the AI course, it was a pretty quick addition to the Pi lesson. I am seeing around 18 FPS. It looks good, but is not the 30 FPS that Paul expected. Thanks for the great lesson Paul!

  • @RicardoMaciasYepez6913
    @RicardoMaciasYepez6913 10 місяців тому +1

    A lot of thanks you made my University carrer a lot easier, masive thanks proff!!!

  • @cadmanof50s
    @cadmanof50s 7 місяців тому

    Hello Paul. Firstly thank you for putting on these great tutorials. I am having a problem with lesson 45, Getting some errors when installing opencv. Is there somewhere I can go to get assistance? Thank you in advance. Vic

  • @andrewnorburn
    @andrewnorburn Рік тому

    excellent Video - got the camera working in minutes

  • @BerndBraun-qp9dt
    @BerndBraun-qp9dt Рік тому +2

    Hello Paul. I enjoy your tutorial in this series very much here in Solingen in Germany. Thanks al lot for that. As I'm using Visual Studio Code on my PC, I was very pleased to see that in bullseye this is shown as a Recommended Software. So I installed it and it works very fine with all that very helpfull stuff in programming. It makes coding much easier than in Geany or Thony, which of course I tried as well. Perhaps it's usefull for your community to know that and try that tool. Best regards Bernd

  • @martinlewis645
    @martinlewis645 Рік тому

    Hi Paul. This is awesome!
    It is hard to keep up during the summer, but I'm trying to catch up. Thanks again.

  • @MichaelCarbaugh-q3n
    @MichaelCarbaugh-q3n Рік тому +1

    Paul just completed 1 thru 44 no issues went great. THANKS Now lesson 45 I installed cv2 as shown in lesson 45
    Says sucessfully installed . If type python it says not found. If I type python3 details are show. When I type import cv2 i get the same error as the other student import error can not open shared drives .
    Please advised im lost. 1 to 44 went great

    • @MichaelCarbaugh-q3n
      @MichaelCarbaugh-q3n Рік тому

      Found the issue. Had not installed 64 bit yet. Folded like a cheap WM lawn chair

  • @Michael197155
    @Michael197155 7 місяців тому

    Thanks Paul. I like this video training course. It's useful.

  • @LorenBurdette
    @LorenBurdette Рік тому

    Think I got the home work. I also tried different resolutions. When I went to 640x360 seems to slow my fps but not as much as 1920x1080. Thanks for this lesson.

  • @stefan_balint_youtube
    @stefan_balint_youtube Рік тому

    thank you for this valuable lesson

  • @EnergySeeker
    @EnergySeeker 10 місяців тому

    nice ideo i love it , can we put this video in format mjpeg and how ? and one more question can we stream that video and how , thanks

  • @henkoegema6390
    @henkoegema6390 Рік тому

    Thanks for this interesting new way of using the Pi camera. 😀

  • @tntragan
    @tntragan Рік тому

    This is exciting stuff. Looking forward to seeing where you take us from here.

  • @larryplatzek9017
    @larryplatzek9017 Рік тому

    Great lesson today! Will be working on updating my bullseye and doing homework and getting pico w loaded with micropython. I am up for live stream tomorrow night!!

  • @TheUnofficialMaker
    @TheUnofficialMaker Рік тому

    That was a lot of fun, thanks for your effort and great video production.

    • @paulmcwhorter
      @paulmcwhorter  Рік тому +1

      Things get fun now we can use the camera.

  • @Gerald-iz7mv
    @Gerald-iz7mv Рік тому

    Hi nice video. Do you have a like to the pir sensor you mention?

  • @WilliamBurlingame
    @WilliamBurlingame Рік тому +1

    I now have three CSI cameras. I tested each of them and the results are listed below. I did notice some lag, but I was using VNC viewer. I dont have a spare screen to verify if that is the cause of the lag. I set the start time prior to the capture statement and the end time after the show statement. I then increment the frame count and add the calculated frame time to the total time. After quit, I divide the frame count by the total time to get the FPS.
    Arducam Camera OV5647
    5MP 1080P day/night
    FPS Res
    31.04 1920X1080
    44.44 1280X720
    24.01 480x360
    Sunfounder Camera
    FPS Res
    30.238 1920X1080
    48.939 1280X720
    19.371 480x360
    Raspberry Pi Camera V2
    FPS Res
    35.809 1920X1080
    65.226 1280X720
    40.724 480x360

  • @bkairosh8164
    @bkairosh8164 Рік тому

    Hi Paul, the recommended Raspberry Pi kit is not available currently on Amazon. Any other kit you might recommend for compatibility with your tutorials.

  • @escheytt9326
    @escheytt9326 Рік тому

    Hi Paul, Another high value session. I will be trying to add camera to my current Pico W project and expect this knowledge will be transferrable to Pico. Best regards, Ed

    • @Gerald-iz7mv
      @Gerald-iz7mv Рік тому

      I think you cant use pico with raspberry pi camera modules…

  • @floridian080
    @floridian080 Рік тому

    on the fps script, I had to remove the line picam2.preview_configuration.controls.FrameRate=30 to obtain the video with FPS. I am using the USB camera from your previous AI series on the pi400 and obtain FPS of about 20.

  • @robakers6127
    @robakers6127 Рік тому +1

    I cannot seem to catch up. I am on 14. Can start here or is there stuff I really need to know before I start this lesson

    • @paulmcwhorter
      @paulmcwhorter  Рік тому +2

      This is sort of a late place to start. I would try to do the earlier lessons.

  • @marcindyba4774
    @marcindyba4774 Рік тому

    Hi Paul, first of all thank you for your time and very useful tutorials. Could you put somewhere source code of program you created on tutorials?

    • @paulmcwhorter
      @paulmcwhorter  Рік тому

      No, my objective is to teach people to code, and do not want to tempt people to just copy and paste my code.

    • @marcindyba4774
      @marcindyba4774 Рік тому

      @@paulmcwhorter Once again thank you for your time.

  • @MichaelCarbaugh-q3n
    @MichaelCarbaugh-q3n Рік тому +2

    Lesson 45 new 64bit Pi added downloads as instructed . Python echoed 3.9.2 cv2 echoed 4.6.0 vcgencmd getcamera returns zeros
    Run program I get :
    Traceback (most recent call last):
    File "", line 3, in
    File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 254, in __init__
    raise RuntimeError("Camera __init__ sequence did not complete.")
    RuntimeError: Camera __init__ sequence did not complete.
    I even copy paste you program Same thing. Paul love you videos and you are a great teacher.
    Also configuration on the new 64 bit Bullseye does not show option to select camera , Should it ?
    Just need someone outthere to point me in the right direction .

  • @inderjitsaini9303
    @inderjitsaini9303 Рік тому

    Hello Paul, Thank you very much for the video. I have a doubt regarding the camera module. So, I am trying to use ROS on Raspberry pi to build a RC Car due to which I had to install Ubuntu on my Raspberry pi. However, the camera that I have (Freenove 8MP) does get detected by Raspberry pi but does not capture any frames. Can you please assist what I should do in this case?

  • @Ducerobot
    @Ducerobot Рік тому

    Ok i got it working 😁👍i don't know what it was i couldn't find it . But it works ❤

  • @niveshagarwal9849
    @niveshagarwal9849 5 місяців тому

    i do not have a pi camera, I am using a USB webcam instead, what shoud i change in my code to get the same results.

  • @paulzhu8436
    @paulzhu8436 10 місяців тому

    Paul, you are awesome!

  • @MyWTFName
    @MyWTFName Місяць тому

    I was confused why the output was lagging on my machine, I recorded it to an AVI file and playback quality was excellent. I assume the lagging I saw while running the code real time was from the VNC viewer WiFi connection.

  • @carloscoelho7790
    @carloscoelho7790 Рік тому

    Can i use this in a virtual enviornment?

  • @arihantsinghi9110
    @arihantsinghi9110 11 місяців тому

    Hey, i am working in a virtual environment. I successfully installed cv2 library in it, but I am unable to install Picamera2 library. Can you help. Thanks

  • @lontongtepungroti2777
    @lontongtepungroti2777 11 місяців тому

    thank you very much Mr. Paul you're awesome :)

  • @humanperson2798
    @humanperson2798 Рік тому

    Hey Paul, I have completed your Arduino series and am now looking to get into this series. I just have one question, can I complete this series with the pi 4 model b or does it have to be the pi 4 model a. Thanks.

  • @budinnahum9081
    @budinnahum9081 Рік тому

    Hi,
    Many thanks for one more excellent tutorial.
    I have followed the instructions using the Raspberry Pi HQ camera.
    It all works smoothly, however, it looks like the Red and the Blue channels are interchanged.
    Blue things look Red, Red things look Blue, and Green things look Green (as well as white).
    Looks like an RGB BGR issue.
    Do you have any idea what's wrong?
    Thanks.
    Nahum Budin.

    • @budinnahum9081
      @budinnahum9081 Рік тому

      To prove the interchanging, the following fixes the display: frame[:, :, [2,0] = frame[:, :, [0,2]]. Nahum.

  • @ronniemunez6670
    @ronniemunez6670 Рік тому

    Hi sir, I'm doing a project, for now, can you help me? How can I enable two web cameras at the same time?

  • @burakay3609
    @burakay3609 5 місяців тому

    it's working but the footage I am getting looks zoomed. any solutions?

  • @granatapfel6661
    @granatapfel6661 Рік тому

    So far so good, but what if you use OpenCV to open the camera and grab a frame. Did you find a solution, why it's not possible to use cv2.VideoCapture(-1, cv2.CAP_V4L2)

  • @davidhenry2927
    @davidhenry2927 16 днів тому

    After starting with a fresh install of Bullseye 64 and installing opencv-python, import cv2 complains about a host of missing dependencies. A few minutes with google shows this to be a common problem but I never found the correct solution. Any help greatly appreciated.

    • @davidhenry2927
      @davidhenry2927 16 днів тому

      Well that was interesting. Upon making a fresh SD with Bullseye I noticed that there are 2 desktop images, one with security updates and desktop environment and another with recommended applications. On my previous attempt I'd used the first option, now I tried the second option. Bingo!! Everything works just fine. I suppose it stands to reason that importing applications also drags in a lot more python libraries.

  • @WilliamBurlingame
    @WilliamBurlingame Рік тому

    I fired up a new my newly delivered RPi 4B today. I tried to install opencv as I did last on my older 4B running Bullseye and it didn't work. A newer version of opencv is available. I installed opencv without specifying the version number and I didn't get any errors installing it. pip install opencv-python

    • @paulmcwhorter
      @paulmcwhorter  Рік тому

      The possible issue will come in that we will be on different versions of opencv, and will my future demos work on your version. I would really try and see if you can get my version installed, that would be safest.

  • @RIPlly
    @RIPlly 2 місяці тому

    I wonder, will this also work with raspi 5 and camera v3?

    • @paulmcwhorter
      @paulmcwhorter  2 місяці тому +1

      The lessons will work with a pi 4. Lots of things changed on the pi 5

  • @oussamabenmazhar5365
    @oussamabenmazhar5365 Рік тому

    you're just amazing ! Thank you very much ❤️

  • @gooberminther3tik25
    @gooberminther3tik25 Рік тому

    A shift to Python from Debian Linux enabling expanding market for Pi Camera for the several knock-off SBC on the market today. RaspberryPiOrg, et al, showing lack of loyalty by not including the breadth of required code to operate PiCam with Bullseye before its release.🤬
    Backward compatibility is a fable.
    looking anxiously for saving video to file??

  • @chinthanakarunathilake9759
    @chinthanakarunathilake9759 8 місяців тому

    Hello I tried this but I can’t get a good frame rate even if I lowered my resolution. I get around 20fps when I reduce the resolution to 360x360. Please help me fix this guys. Thanks in advance.

  • @lukasb7013
    @lukasb7013 Рік тому

    Does picamera2 have the possibility to access two different cameras in one script? Would be nice to know!

    • @paulmcwhorter
      @paulmcwhorter  Рік тому

      I think it is possible but would run slow with two cameras

    • @lukasb7013
      @lukasb7013 Рік тому

      @@paulmcwhorter Thanks for the Response. What would you recommend for using 2 cameras?

  • @emedosichijioke4557
    @emedosichijioke4557 Рік тому

    Greetings from Nigeria, did you use Python programming language for the pi camera

  • @BrianBeam-nl4lw
    @BrianBeam-nl4lw Рік тому +1

    Hello all. All went well with no errors until i type "import cv2" i get " ImportError: libcblas.so.3: cannot open shared object file: no such file or directory" any suggestions

  • @nicolasbassano3697
    @nicolasbassano3697 Рік тому

    Hi Paul, I wonder if you have a Discord server to get in touch with followers of the channel. They work great to share and ask for help on common topics of interest.

    • @paulmcwhorter
      @paulmcwhorter  Рік тому

      No, just too much to try and moderate and monitor a discord server. Maybe at some point.

  • @keithlohmeyer
    @keithlohmeyer Рік тому

    Homework posted ua-cam.com/video/c6Jr0tHpXKc/v-deo.html
    I also show my design of a holder for the Pi Cam and included the Fusion 360 file in the description. I also added a little show and tell of what I have been up to over the holidays.

  • @jameslewellen150
    @jameslewellen150 Рік тому +1

    Here is link to my homework for this lesson, ua-cam.com/video/5r9Raz-hIlM/v-deo.html. There was a considerable amount of head scratching to get it done. Thanks Paul for doing these videos.

    • @paulmcwhorter
      @paulmcwhorter  Рік тому

      James, nice work, but I think you are not getting an accurate number. There are lots of lines of code not between your two measurements of time. You need as much of the loop code as possible between these two lines of code, as each line takes some time to execute, and hence code not between your two time measureuments are not being accounted for. Nice work, think on it a little more.

  • @jameslewellen150
    @jameslewellen150 Рік тому +1

    Here is an update to my homework for lesson 45, ua-cam.com/video/FMmEJTisfFA/v-deo.html

  • @DrDave327
    @DrDave327 Рік тому +1

    Another great learning exercise, Paul! Here is the link to my homework: ua-cam.com/video/iEcdQCwPulo/v-deo.html
    I cannot figure out why I am only measuring about 15 fps. I took out the print statement that I was using for troubleshooting, but surprisingly, that doesn't do anything to the fps.

  • @hammadahmed3409
    @hammadahmed3409 8 місяців тому

    Homework ua-cam.com/users/shortsH0ovfTPWvVM?si=eC-46tTcvTullI43
    FPS is based on lighting