L-3 Install OpenCV 4.5 on NVIDIA Jetson Nano | Set Up a Camera for NVIDIA Jetson Nano

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ม.ค. 2023
  • Learn how to set up Python Environment on Jetson Nano.
    Learn How to Set Up a Camera for NVIDIA Jetson Nano.
    Learn How to Install OpenCV 4.5 on NVIDIA Jetson Nano.
    ************************************************************************************
    For queries: You can comment in comment section or you can mail me at aarohisingla1987@gmail.com
    ************************************************************************************
    LIST OF COMMANDS PINNED IN COMMENT SECTION. Please Check there.
    Join this channel to get access to perks:
    / @codewithaarohi
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @CodeWithAarohi
    @CodeWithAarohi  ปีที่แล้ว +24

    List of commands:
    sudo apt-get install python3-pip
    pip3 install virtualenv
    python3 -m virtualenv -p python3 env --system-site-packages
    source env/bin/activate
    python -c 'import cv2; print(cv2.__version__)'
    Create SwapFile:
    sudo fallocate -l 4G /var/swapfile
    sudo chmod 600 /var/swapfile
    sudo mkswap /var/swapfile
    sudo swapon /var/swapfile
    sudo bash -c 'echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab’
    Reboot your PC: sudo reboot
    After rebooting check swap space by using this command: free -h
    Install these Dependencies before installing OpenCV:
    sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf“
    sudo ldconfig
    sudo apt-get install build-essential cmake git unzip pkg-config
    sudo apt-get install libjpeg-dev libpng-dev libtiff-dev
    sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
    sudo apt-get install libgtk2.0-dev libcanberra-gtk*
    sudo apt-get install python3-dev python3-numpy python3-pip
    sudo apt-get install libxvidcore-dev libx264-dev libgtk-3-dev
    sudo apt-get install libtbb2 libtbb-dev libdc1394-22-dev
    sudo apt-get install libv4l-dev v4l-utils
    sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
    sudo apt-get install libavresample-dev libvorbis-dev libxine2-dev
    sudo apt-get install libfaac-dev libmp3lame-dev libtheora-dev
    sudo apt-get install libopencore-amrnb-dev libopencore-amrwb-dev
    sudo apt-get install libopenblas-dev libatlas-base-dev libblas-dev
    sudo apt-get install liblapack-dev libeigen3-dev gfortran
    sudo apt-get install libhdf5-dev protobuf-compiler
    sudo apt-get install libprotobuf-dev libgoogle-glog-dev libgflags-dev
    Download OpenCV:
    cd ~
    wget -O opencv.zip github.com/opencv/opencv/archive/4.5.1.zip
    wget -O opencv_contrib.zip github.com/opencv/opencv_contrib/archive/4.5.1.zip
    unzip opencv.zip
    unzip opencv_contrib.zip
    Now rename the directories. Type each command below, one after the other.
    mv opencv-4.5.1 opencv
    mv opencv_contrib-4.5.1 opencv_contrib
    rm opencv.zip
    rm opencv_contrib.zip
    Lets build OpenCV now:
    cd ~/opencv
    mkdir build
    cd build
    copy and paste this entire block of commands below into your terminal.
    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D EIGEN_INCLUDE_PATH=/usr/include/eigen3 -D WITH_OPENCL=OFF -D WITH_CUDA=ON -D CUDA_ARCH_BIN=5.3 -D CUDA_ARCH_PTX="" -D WITH_CUDNN=ON -D WITH_CUBLAS=ON -D ENABLE_FAST_MATH=ON -D CUDA_FAST_MATH=ON -D OPENCV_DNN_CUDA=ON -D ENABLE_NEON=ON -D WITH_QT=OFF -D WITH_OPENMP=ON -D WITH_OPENGL=ON -D BUILD_TIFF=ON -D WITH_FFMPEG=ON -D WITH_GSTREAMER=ON -D WITH_TBB=ON -D BUILD_TBB=ON -D BUILD_TESTS=OFF -D WITH_EIGEN=ON -D WITH_V4L=ON -D WITH_LIBV4L=ON -D OPENCV_ENABLE_NONFREE=ON -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=OFF -D BUILD_NEW_PYTHON_SUPPORT=ON -D BUILD_opencv_python3=TRUE -D OPENCV_GENERATE_PKGCONFIG=ON -D BUILD_EXAMPLES=OFF ..
    Build OpenCV. This command below will take a long time (around 2 hours), make -j4 # (make then space single dash and then j4)
    Finish the install:
    cd ~
    sudo rm -r /usr/include/opencv4/opencv2
    cd ~/opencv/build
    sudo make install
    sudo ldconfig
    make clean
    sudo apt-get update
    Verify OpenCV Installation
    #open python3 shell
    python3
    import cv2
    cv2.__version__
    Install jtop, a system monitoring software for Jetson Nano.
    cd ~
    sudo -H pip3 install -U jetson-stats
    sudo reboot
    jtop
    Test Your Camera on Jetson Nano:
    Turn on your Jetson Nano.
    Open a new terminal window, and type:
    ls /dev/video0 #csi camera
    ls /dev/video* # show you a list of cameras
    Take a Photo:
    nvgstcapture-1.0 --orientation=2 # for testing CSI camera
    # V4L2 USB camera
    nvgstcapture-1.0 --camsrc=0 --cap-dev-node=1

    • @CANDAL1980
      @CANDAL1980 ปีที่แล้ว

      Hi Aarohi. When i do the "make -j4" process it doesn´t finish, stops at 100%. Already triede 3 times, the same result. Can you help me, please?

    • @soutrikmaiti4133
      @soutrikmaiti4133 ปีที่แล้ว

      @@CANDAL1980 I am also having the same issues. I can't seem to have cv2 installed.

    • @gumstuckinmypocket
      @gumstuckinmypocket 9 หลายเดือนก่อน +3

      Problem : some commands leave it hanging with >
      Error: different font or character style of quote ( " ) or apostrophe ( ' ) at the end of some lines
      Solution: Retype the last apostrophe or quote to match the first.
      Create SwapFile >> sudo bash -c 'echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab’
      #> sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf“
      #

    • @amartuvshinch4755
      @amartuvshinch4755 3 หลายเดือนก่อน

      @@CANDAL1980 same issue did you solved? if you solved pls guide me.

    • @jirayuvijjakajohn295
      @jirayuvijjakajohn295 3 หลายเดือนก่อน

      @@amartuvshinch4755 Actually, If you kill other task that's unnecessary might help. I tried that it worked

  • @user-sr3yf7gz4w
    @user-sr3yf7gz4w 11 หลายเดือนก่อน +1

    Hello, I am a college student studying Jetson Nano in Korea. I had been struggling for a week because I couldn't install opencv on Jetson Nano, but after watching the video, I succeeded at once. Thank you so much!!!!!!!!!!!!!!!

    • @CodeWithAarohi
      @CodeWithAarohi  11 หลายเดือนก่อน

      Glad to hear that my video is helpful 🙂

    • @user-yy8ub8rc1g
      @user-yy8ub8rc1g 3 หลายเดือนก่อน

      선생님 저도 도와주세요 😢

  • @user-is5vn8ie5v
    @user-is5vn8ie5v 10 หลายเดือนก่อน

    Thank you my lady !! You did a great job!

    • @CodeWithAarohi
      @CodeWithAarohi  10 หลายเดือนก่อน

      Glad it was helpful!

  • @user-fh5jo3ci7b
    @user-fh5jo3ci7b 21 วันที่ผ่านมา

    Thank you for the good video. I did what you told me to do and also checked that the video came out of the camera. But the window where the camera comes out is so big that there is no 'x' button to close the window. Is there any way to make the camera window appear small on the monitor like you? The camera window I came out of takes up about half of the monitor.

  • @williamlightfoot5711
    @williamlightfoot5711 11 หลายเดือนก่อน

    Hi Arohee, why do you have a prefence for virtual environments ? If I want to make an application that runs on a device from startup, surely the use of virtual environments makes things more difficult ? Although I have read that there is a route to deployment even when you use virtual environments, even though I haven't used them. Thanks for your videos, I found them to be a useful starting point.

    • @CodeWithAarohi
      @CodeWithAarohi  11 หลายเดือนก่อน +1

      Glad my video is helpful. Virtual environments are better choice when you are running multiple different kind of applications on same machine. But if you are using jetson nano for only 1 application then there is no need of virtual environment.

  • @abdullahmemon6908
    @abdullahmemon6908 6 หลายเดือนก่อน

    I am following your video series, my task was to install archiconda and yolov5. I installed archiconda but in phase of yolov5. At the end , I need to make some project with jetson nano. Can you give me some ideas? And any flow that how to do it...

  • @checksumff1248
    @checksumff1248 ปีที่แล้ว

    Thank you! I know that video was a lot of work. I appreciate it!

  • @PalaniRamu1
    @PalaniRamu1 ปีที่แล้ว

    Thanks you very much for your contribution. We are very happyt because the program aree running on our jetson kit.

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

    Hi Aarohi. I followed your steps, however, I still get CV2 version 4.1.1 at the end. After increasing memory to 4G with swap and rebooting do we install the long list of dependancies in default folder that appears when I open again the terminal, namely user@user-desktop, or do we have to activate the environment again before installing the dependancies? Thank you, I appreciate your help.

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      You need to activate the environment first. And then install the dependencies.

  • @natureloverJ
    @natureloverJ 11 หลายเดือนก่อน

    Awesome series!. Any idea which camera is compatible with Jetson Orin NX 16GB (Jetpack 5.1)?
    I bought IMX477 (12MP) camera but it is not compatible with JP 5.1.

    • @CodeWithAarohi
      @CodeWithAarohi  11 หลายเดือนก่อน

      Sorry, I am not sure.

  • @Aron-0-1
    @Aron-0-1 4 หลายเดือนก่อน

    Hey @CodeWithAarohi, thank you for insightful video. I followed same steps. Unfortunately after it has completed i am getting an error of cv2 module being unavailable in my virtual ent. What fascinates me is that it was able to install the latest opencv for cuda. Do you have an idea how to go about this ?

    • @Wheelie1999
      @Wheelie1999 3 หลายเดือนก่อน

      i get the same issue, were you able to resolve this?

  • @christianmunguia2070
    @christianmunguia2070 หลายเดือนก่อน +1

    In a video you explained how to update to Python 3.8, I understand that yolov8 can only run on that version of python, is it possible to install opencv as samples in this video to version of python 3.8 in a virtual environment?

  • @anilsarode6164
    @anilsarode6164 27 วันที่ผ่านมา

    Great Work !! Thanks

  • @pifordtechnologiespvtltd5698
    @pifordtechnologiespvtltd5698 3 หลายเดือนก่อน

    Lovely video content

  • @anilvashisth16
    @anilvashisth16 ปีที่แล้ว

    Good Work .. Aarohi..Carry on

  • @kumarsheshankshekhar7259
    @kumarsheshankshekhar7259 ปีที่แล้ว

    Very Good video, mam, please bring more videos on Jetson nano

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Yes, I will. Working on a Jetson. nano playlist

  • @grantbarbone3789
    @grantbarbone3789 5 หลายเดือนก่อน +2

    Marry me, you saved me years of pain trying to download opencv correctly, fr fr all of the old tutorials were so un-updated that most of the lib files wouldn't install correctly, so opencv would never be fully operational. THANK YOU!!!!

    • @CodeWithAarohi
      @CodeWithAarohi  5 หลายเดือนก่อน +1

      I'm thrilled to hear that my tutorial on installing OpenCV was so helpful to you! It's always great to know that the content is not only useful but also a time-saver. It's true that keeping up with the latest changes and updates can be challenging, so I try my best to provide the most current and efficient methods. If you have any more questions or need further assistance, feel free to ask.

  • @lazymusicc
    @lazymusicc 4 หลายเดือนก่อน

    Hello, on the file "info" of Jtop, i don't have the 4.5.1 version of OpenCV but the 4.1.1, and it's written "No" instead of "yes". Can you help me ? Maybe there is a step that i didn't do well, but which one ? Thanks

  • @user-zp2rg6rw9p
    @user-zp2rg6rw9p 9 หลายเดือนก่อน +1

    hi mam ,
    I installed python 3.8 and made it default for python
    in python3.6 cv2 module in present of version 4.1.1
    when i created virtual environment of python3.8 with --system-packages like as you are mention their cv2 module is not found
    please guide me where i am doing wrong

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

    Is this video in graphical mode or headless mode?

  • @YigalBZ
    @YigalBZ 11 หลายเดือนก่อน

    Thank you for a great video and for the list of commands. It is working well on my Jetson Nano. Few questions: 1) Why do we have to install dependencies for the OpenCV? Isn't that done automatically when installing the OpenCV? 2) If we do have to install, can't we use a script with the list of all these commands, so no need to run them one by one?

    • @CodeWithAarohi
      @CodeWithAarohi  11 หลายเดือนก่อน

      Yes we can do that

    • @waqasashraf8035
      @waqasashraf8035 10 หลายเดือนก่อน

      Can u please explain how to make script which can install all dependencies collectively@@CodeWithAarohi

  • @leonripa8028
    @leonripa8028 ปีที่แล้ว

    i find it hard to implement a Region of Intrest Mask for YOLOv7 (to help speed up FPS More) not farmilliar with Argeparss and what variables to use. maybe you could touch on that on a video ?

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Have you tried converting your model into tensorrt. That way you can increase fps

  • @osamazulfiqar2042
    @osamazulfiqar2042 ปีที่แล้ว

    Hi Ma'am!
    I have been following this video series of yours step by step from the start. You are very good.
    But when I execute the command make -j4 and it reaches near to completion, I start facing memory issues. I'm using a 64GB SD card. What should I do?

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Although you have a 64GB SD card, it doesn't necessarily mean that you have enough RAM. The SD card is used for storage, not for running processes. If you have too many processes running simultaneously, it can cause memory issues. Check your RAM usage using the command "free -h" and see if you have enough free memory.

  • @snehitvaddi
    @snehitvaddi ปีที่แล้ว

    Hello!
    Would you mind recommending a good camera for the Jetson nano please?
    To give you context, I am working on potato analysis where there are hundreds of potatoes coming out of conveyer belt. I will be performing OpenCV and ML stuff

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      One option to consider is the Raspberry Pi High Quality Camera, which is compatible with the Jetson Nano and provides 12-megapixel resolution with excellent image quality. Another option is the Sony IMX219 camera, which is commonly used with the Jetson Nano and provides 8-megapixel resolution with good image quality.

    • @snehitvaddi
      @snehitvaddi ปีที่แล้ว

      @@CodeWithAarohi Noted. Thank you

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

    Hi Aarohi, thank you for making this video! It has been very helpful. I have run into an issue where it seems following your steps I only have OpenCV with CUDA for Python 2.x and not Python 3.x. When I try run in a Python2 shell I am able to import CV2 and find CUDA devices however Python3 cannot import CV2. When I run jtop I do find OpenCV is 4.5.1 with CUDA: YES. Is there a different way I can get it to work for Python3? I am assuming I need Python 3.x to run YoloV7 later and this cannot all be done with Python 2.x. I have followed all your steps exactly from this video although I have done some work on my Jetson before - this is not a fresh Jetpack installation (although I am using Jetpack 4.6). Thank you!

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      I understand that you have followed the steps in my video tutorial for installing OpenCV with CUDA, but you are unable to import CV2 in Python 3.x. I apologize for the inconvenience caused and will try my best to help you resolve this issue.One possible reason for this issue could be that the OpenCV package was installed for Python 2.x and not Python 3.x. To resolve this, you can try reinstalling OpenCV with CUDA specifically for Python 3.x by using the following command: sudo apt-get install python3-opencv
      This should install OpenCV with CUDA for Python 3.x, and you should be able to import CV2 in Python 3.x.If the issue still persists, you may want to check if the OpenCV package is installed in the correct Python 3.x environment. You can do this by running the following command in your Python 3.x environment: python3 -c "import cv2; print(cv2.__version__)"

    • @jorgealfaro7576
      @jorgealfaro7576 10 หลายเดือนก่อน

      @@CodeWithAarohi This will sound odd... but you need to uninstall opencv for python3: sudo apt-get remove python3-opencv ... and then it will use vercion 4.5.1 ... really! it works

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

      @@jorgealfaro7576 The problem is not solved for me.

  • @kailu8872
    @kailu8872 5 หลายเดือนก่อน

    thank you very much!!!

  • @LetsWalkTogether4k
    @LetsWalkTogether4k ปีที่แล้ว

    you are perfect!

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

      Thankyou! Glad my video helped you!

  • @rockatang2189
    @rockatang2189 3 หลายเดือนก่อน

    Hello, I met some problem when I tried to install dependencies. It showed a message said, "configuring incomplete, errors occurred!". How can I fix this issue?

  • @DRACO_TALIX
    @DRACO_TALIX 2 หลายเดือนก่อน

    Hi Arohi!
    I somehow deleted my env after doing all these steps. Now I have open cv 4.5.1 on global but in env its only showing 4.1.1. Any help will be appreciated.

  • @aswath_tamilan
    @aswath_tamilan ปีที่แล้ว

    Mam the list of comamnds you shown on white background image before install open cv . Commands need to paste inside config file right

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Execute the commands on terminal

    • @aswath_tamilan
      @aswath_tamilan ปีที่แล้ว

      @@CodeWithAarohi it's getting cmake error after that big command mam

    • @aswath_tamilan
      @aswath_tamilan ปีที่แล้ว

      @@CodeWithAarohi i have jetpack 4.3 ,in my SDK manager official opencv 4 + cuda + deep stream it's showing.can i install like that ,will it work with imx camera's cause it's 4.3 pack so asked

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

    Hi ma'am! We have encountered error on the code ls/dev/video0, it says no such file or directory. How can we possibly resolve this problem? Thank you.

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      the system is unable to find the device file for video0 in the /dev directory. This error commonly occurs when the video device is not properly recognized or not connected to the system. Make sure the video device (e.g., webcam) is properly connected. Try running the command with elevated privileges using sudo or ensure that the user has the required permissions to access the device.

  • @user-hu6zr5ld1o
    @user-hu6zr5ld1o 8 หลายเดือนก่อน +1

    after i completed all the steps when i run jtop open cv : 4.5 with cuda : No. and also my cuda version is 11.4.315. what can i do for this?

  • @CANDAL1980
    @CANDAL1980 ปีที่แล้ว

    Hi Aarohi. When i do the "make -j4" process it does not finish,. and don´t complete the task. it is memory problem?

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      It is possible that the "make -j4" process is not completing due to a memory problem. When you run the "make" command with the "-j" option, it specifies the number of jobs that can be run simultaneously. In this case, the "-j4" option is telling the "make" command to run up to 4 jobs at the same time.
      If your system does not have enough memory to handle 4 jobs simultaneously, it could be causing the process to slow down or even stop altogether. To check if this is the case, you can monitor the system resources (such as memory and CPU usage) while the "make" process is running.
      If you find that the memory usage is high, you may need to free up some memory by closing other applications or processes running on your system. Alternatively, you could try reducing the number of jobs to a lower value (e.g., "-j2") to see if that helps the process complete successfully.
      Another possibility is that there is an issue with the build process itself. In this case, you may want to check the build log for any error messages or warnings that could indicate a problem with the code or the build environment.

  • @leemurphybrazil1258
    @leemurphybrazil1258 ปีที่แล้ว

    Hello there, this is the error message that I encountered about three hours into my build operation after entering the "make -j4" command. Do you have any suggestions?
    [ 84%] Built target opencv_ximgproc
    Makefile:162: recipe for target 'all' failed
    make: *** [all] Error 2

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Sometimes, build issues can be resolved by cleaning the project and then rebuilding it from scratch. You can try running the following commands to clean the project:
      make clean
      make distclean
      Afterward, try rebuilding the project.Instead of just using "make -j4," you can try "make -j4 VERBOSE=1" to see if it provides additional information about the error.

  • @vijaylaxmijain5717
    @vijaylaxmijain5717 8 หลายเดือนก่อน

    HI Aarohi.. did all the steps you mentioned, but my jtop says openCV: 4.5.1 with CUDA: No, please suggest what to do

    • @vijaylaxmijain5717
      @vijaylaxmijain5717 8 หลายเดือนก่อน

      fixed this issue but there is no space on disk. i used 32GB card, how to free up space

  • @Dr.pabloschmirtz
    @Dr.pabloschmirtz ปีที่แล้ว

    Eres realmente buenisima. Hay mucho trabajo aqui detras de este video y te agradezco muchisimo por tu buena voluntad en publicar este tremendo esfuerzo. Desde Chile, un gran abrazo y muchas gracias¡

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

      Glad you liked my content and Thanks for appreciating my work 🙂

    • @Dr.pabloschmirtz
      @Dr.pabloschmirtz ปีที่แล้ว

      @@CodeWithAarohi Funciona todo realmente a la perfección. Hay un inconveniente, pero que es mio no es de tus instrucciones, que esta asociado a que mi jetson nano 4GB no reconoce a la camara "Near Infrared (NIR) Camera - See3CAM_12CUNIR" th-cam.com/video/WZunwZxxrls/w-d-xo.html , de la empresa E-CON Systems. Saludos y nuevamente muchisimas gracias¡

    • @Dr.pabloschmirtz
      @Dr.pabloschmirtz ปีที่แล้ว

      Acabo de realizar un ajuste en la lectura de frames y ahora funciona todo ok con la camara y la jetson¡. Saludos¡¡¡

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

    Mam please make video on how to implement yolov5 in jetson nano

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

    Can you do a video on tensorflow installation in jetson nano.. plssssss plssss plsssss

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

      yes yes.... tensorflow instalation with cuda support

  • @jefinsam6166
    @jefinsam6166 11 หลายเดือนก่อน +1

    Hello ma'am, when i create the swap file
    After the © sudo bash -c 'echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab'
    Outputs ">" what to do after this

    • @khenpahilanga9596
      @khenpahilanga9596 10 หลายเดือนก่อน

      we have the same issue, plz assist

    • @gumstuckinmypocket
      @gumstuckinmypocket 9 หลายเดือนก่อน +1

      OK I got it to work... Hope this helps you too.
      The font of the final quote or apostrophe does not match the first. Retype the final character to standard ( " or ' )
      It assumes the statement is not closed because they don't match.
      The lazy copy paste also copies typos.... yes I had this problem too.

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

    I have a problem "Encoder null, cannot set bitrate!". I'am using IXM219 camera so how can i fix it? Please help me

    • @ecebncr6584
      @ecebncr6584 4 หลายเดือนก่อน

      I'm using the same camera but I couldn't get it to work.

  • @pramodkumar-yh3bu
    @pramodkumar-yh3bu 12 วันที่ผ่านมา

    Ma'am can't I use jupyter notebook directly here in jetson?

    • @CodeWithAarohi
      @CodeWithAarohi  11 วันที่ผ่านมา

      You need to install the jupyter notebook and then you can use it.

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

    Good Evening ma'am, when I execute the make -j4 command, it runs well but it stops at the 100% & can't go to the further process. What should I do ma'am

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

      When you execute the make -j4 command, it means you are running the make command with four threads to speed up the build process. However, the build process stopping at 100% can indicate that there might be an issue in your build process.
      Check system resources: Make sure that your system has enough resources (such as CPU and RAM) to complete the build process. Check the resource utilization using the "top" command or other similar tools to see if there is any resource bottleneck.
      Try running the make command with a single thread: Sometimes, running the make command with multiple threads can cause issues. Try running the make command with a single thread to see if the build process completes successfully.
      Clean the build directory: Try cleaning the build directory by running the "make clean" command and then re-building the project.
      Try running the make command with debug flags: If none of the above steps work, try running the make command with debug flags enabled (e.g., make -j4 VERBOSE=1) to get more detailed output on what's going wrong.

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

      @@CodeWithAarohi Thank You Ma'am. Eventually, I got the OpenCV: 4.5.1 - with CUDA: YES

    • @fizzamasood1553
      @fizzamasood1553 ปีที่แล้ว

      @@mctmani2261 how you resolved this issue? I have the same issue occurred.

    • @fizzamasood1553
      @fizzamasood1553 ปีที่แล้ว

      Also the low memory warning occurred.

  • @badiayosafat1874
    @badiayosafat1874 11 หลายเดือนก่อน

    My jtop says openCV: 4.5.1 with CUDA: YES instead of "compiled CUDA"
    is that the same?

    • @CodeWithAarohi
      @CodeWithAarohi  11 หลายเดือนก่อน

      It indicates that OpenCV has been successfully compiled with CUDA support. This means that OpenCV can utilize CUDA-enabled GPUs.

  • @minhhnguyen88
    @minhhnguyen88 ปีที่แล้ว

    madam, i checked again, after restarting the swap memory is still 1.9G, what should i do?

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Make sure that swap memory is actually enabled on your Jetson Nano. You can check this by running the following command in a terminal: cat /proc/swaps
      This should output a list of all the swap partitions or swap files currently in use. If there are no entries in the output, it means that swap is not currently enabled.
      2- Ensure that there is enough free space on your Jetson Nano to create a swap file. You can check the amount of available space on your system by running the following command:
      df -h

  • @shashwatmahindroo
    @shashwatmahindroo 5 หลายเดือนก่อน

    After reboot, the swapped memory gets reset and goes back to 1.9gb. I always need to run those 4 swap commands before starting. What's the solution to this?

    • @iohanaa.6905
      @iohanaa.6905 3 หลายเดือนก่อน

      You have to activate the environment you created before after reboot

  • @abhishekgowda-hn2id
    @abhishekgowda-hn2id หลายเดือนก่อน

    created a swap file it shows 5.9g
    after reboot it shows 1.9g why it show like this why it couldn't save

  • @arhamimran4999
    @arhamimran4999 4 หลายเดือนก่อน

    This tutorial was very helpful and I was able to compile opencv. However the problem I am facing is that opencv is installed for python2 and not for python3. Any method to solve this?

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

      bro did you solved the problem ?

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

      @@aymeneboucha4974 yea. Generating the build config again fixed it.

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

      @@arhamimran4999 how did you generated it ?

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

      @@aymeneboucha4974 The cmake command generates it.

  • @user-ym7so1vr8f
    @user-ym7so1vr8f 10 หลายเดือนก่อน

    Where can I get the commands to build the opencv in the directory build?

    • @CodeWithAarohi
      @CodeWithAarohi  10 หลายเดือนก่อน

      Commands are pinned in comment section.

  • @lazymusicc
    @lazymusicc 5 หลายเดือนก่อน

    Hello, I have some problem. On my jetson, it doesn't find packages (like python3-pip for exemple). Do you know why ?

    • @CodeWithAarohi
      @CodeWithAarohi  5 หลายเดือนก่อน

      Sometimes, the package lists might be outdated. Try updating them with:
      sudo apt-get update
      sudo apt-get upgrade
      sudo apt-get install python3-pip

    • @lazymusicc
      @lazymusicc 4 หลายเดือนก่อน

      I tried, it doesn't work too. when i write "sudo apt-get update", the jetson write that updates from such a repository cannot be done securely, and are therefore disabled by default. Do you know what can i do ? Thanks @@CodeWithAarohi

    • @lazymusicc
      @lazymusicc 4 หลายเดือนก่อน

      Finally it works, i just needed to have a private WiFi, because with a public WiFi, the update doesn't work. Thanks

  • @incinci27
    @incinci27 ปีที่แล้ว

    it say `[100%] Built target opencv_perf_superres` and waiting for 1 hour / what should I do please ansver maam _

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      It is not normal for the OpenCV installation process to take one hour to build the opencv_perf_superres target. While building OpenCV can take some time, especially on resource-constrained devices like the Jetson Nano, it should not take that long.
      There are a few things you can try to speed up the build process:
      Increase the swap space on your Jetson Nano: If your Jetson Nano is running out of memory during the build process, increasing the swap space can help. You can follow the instructions in this NVIDIA forum post to increase the swap space: forums.developer.nvidia.com/t/how-to-increase-swap-partition-on-jetson-nano/77429
      Limit the number of CPU cores used during the build: You can limit the number of CPU cores used during the build process by adding the -j flag followed by the number of cores to use. For example, -j2 will limit the build process to use only two CPU cores. This can be useful if the Jetson Nano is running out of resources during the build process.

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

    after reboot swap memory is still 1.9G, what shoul i do?

    • @iohanaa.6905
      @iohanaa.6905 3 หลายเดือนก่อน

      You have to activate the environment you created before after reboot

  • @ViridiRobotics
    @ViridiRobotics ปีที่แล้ว

    Hello, after executing long "cmake -D CMAKE_BULD_TYPE..." command I get "Configuring incomplete, errors occured!" I have installed all the dependencies and completed all previous steps without problems. Could you help?

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      I am not sure why are you getting errors but common reasons are:
      1- Incorrect or missing configuration options passed to CMake.
      2- Issues with the CMake build files or the project's source code.

    • @ayseerdansman4779
      @ayseerdansman4779 ปีที่แล้ว

      Hello, i got the same error. Were you able to fix it?

  • @dakshayinialuri
    @dakshayinialuri 6 หลายเดือนก่อน

    Hello Mam, im getting an error cmake command the error is no cmake script
    provided ,cmake error: problem processing arguments. aborting
    what to do?
    please help..

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

      did you fix the problem and how ?

  • @adnanahmad4168
    @adnanahmad4168 ปีที่แล้ว

    My opencv version changed from 4.1.1(cuda not comaptible) to 4.1.2(cuda comaptible). But why not to 4.5.1? I followed whole process

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Try to download again. Maybe you have downloaded the wrong versions by mistake:
      wget -O opencv.zip github.com/opencv/opencv/archive/4.5.1.zip
      wget -O opencv_contrib.zip github.com/opencv/opencv_contrib/archive/4.5.1.zip

    • @adnanahmad4168
      @adnanahmad4168 ปีที่แล้ว

      @@CodeWithAarohi okay I will try again.
      Dear Aarohi!! I tried to follow your lecture 5 of this series. There when i cloned the repo of yolov5. the requirement.txt files have many different versions and new things than yours. Which i resolved somehow BUT THERE IS A LIBRARY NAMED ULTRAYLYTICS>=8.0.111 IT IS CONSTINUOUSLY GIVING ME ERROR. ======>couldn't find a version that satisfies the module the requirement ultralytics(from versions: none).
      I DID BIT RESEARCH AND WHAT I CAME TO KNOW IS THAT WE NEED PYTHONV3.7 FOR INSTALLING IT. AND YOU SUGGESTED THAT THE DEFAULT PYTHON VERSION SHOULD BE CHANGED.
      BUT STILL I TRIED TO UPGRADE PYTHON AND I WASN'T UNABLE TO DO THAT UPGRADE. SO, WHAT SHOULD I DO NOW, PLEASE SUGGEST?
      Btw you used jupyter notebook and I wanted to do it in myenv using terminal

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      @@adnanahmad4168 You can mail me your same query on my email id (aarohisingla1987@gmail.com). I will send you the code which I have.

  • @gurucharank9798
    @gurucharank9798 11 หลายเดือนก่อน

    hello mam i am getting the following error when i import pandas in my python environment
    illegal core dumped .
    pls make a video on this issue madam

    • @CodeWithAarohi
      @CodeWithAarohi  11 หลายเดือนก่อน

      Make sure you are using compatible versions of Python and pandas.

  • @suryamohithmaddi2
    @suryamohithmaddi2 10 หลายเดือนก่อน

    how to reset the system mam please tell me, i want to reset everything and i wanna follow your videos...please help me out..

    • @CodeWithAarohi
      @CodeWithAarohi  10 หลายเดือนก่อน

      You want to perform a factory reset ( reinstall the operating system)?

    • @suryamohithmaddi2
      @suryamohithmaddi2 10 หลายเดือนก่อน

      @@CodeWithAarohi can u help me how to do it mam please.... I'm going to do my project on object detection -self driving vehicle

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

    should I do the same for Jetson Orin Nano ?

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

      I never tried on Jetson Orin but I think steps should be same.

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

      @@CodeWithAarohi
      I had only one problem after I execute make clean I get an error when I import cv2

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

      so I tried agai without cleaning and it worked and also for headless mode I tried hard with your method but It didn't work so I tried No Machine software from jetson hacks channel and it worked at once.

  • @hasnainhasib4548
    @hasnainhasib4548 ปีที่แล้ว

    how can i install this on python 3.7

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      JetPack SDK 4.6 comes with Python 3.6 as the default Python version. If you want to install Python 3.7 on JetPack SDK 4.6, you can follow these steps:
      Add the deadsnakes PPA to your system by running the following command:
      sudo add-apt-repository ppa:deadsnakes/ppa
      Update the package list by running the following command:
      sudo apt-get update
      Install Python 3.7 by running the following command:
      sudo apt-get install python3.7
      Once the installation is complete, you can check the version of Python 3.7 by running the following command:
      python3.7 --version
      This should output the version number of Python 3.7.
      Note that installing Python 3.7 may not be compatible with other software installed on your JetPack SDK 4.6 system, and may cause conflicts or compatibility issues. Therefore, it is recommended to proceed with caution and thoroughly test your system after installing Python 3.7.

  • @emrecavdar6867
    @emrecavdar6867 ปีที่แล้ว

    hi Aarohi
    cmake -D CMAKE_BUILD_........ ı am getting error message
    how can ı fix

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      I am sorry, I can't help you without knowing the exact error.

  • @minhhnguyen88
    @minhhnguyen88 ปีที่แล้ว

    after running make -j4 command to 100%: built target opencv_perf_superres. then it freezes, it's been 1 hour and it's still the same, what can i do to fix it ma'am
    madam, can you show me each command to fix dc, i have read the comments but still don't understand because i'm a newbie, sorry for my stupidity, please help

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      mail me at aarohisingla1987@gmail.com . I will help you. Don't worry

    • @minhhnguyen88
      @minhhnguyen88 ปีที่แล้ว

      after getting 5.9gb swap, i don't reboot, because reboot will return to 1.9gb swap. then i ran make -j1 instead of make -j4 and it worked, because if i run j4 it will freeze

    • @akashpatel9884
      @akashpatel9884 3 หลายเดือนก่อน

      @minhhnguyen88 Did you found the answer of how to avoid freezing at %

    • @minhhnguyen88
      @minhhnguyen88 2 หลายเดือนก่อน

      @@akashpatel9884 Sorry, my project was completed a long time ago so I don't remember what I did to it to make it work. after all, I still use the default libraries after installing jetpack. Please comment and wait for admin to answer your questions

  • @user-is5vn8ie5v
    @user-is5vn8ie5v 10 หลายเดือนก่อน

    Hi, I executed : sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf“
    then the prompt became like this : >
    is this correct ? or I did something wrong .... thank you for your hard work

    • @tsaashik8048
      @tsaashik8048 9 หลายเดือนก่อน

      see the double quotes.. its wrong erase and put again

  • @amanimurera
    @amanimurera 10 หลายเดือนก่อน

    trying to increase swap file using your steps, now my Jetson Nano is not able to boot

    • @CodeWithAarohi
      @CodeWithAarohi  10 หลายเดือนก่อน

      When you try to boot the Jetson Nano, pay close attention to any error messages that appear on the screen. These messages might give you clues about what went wrong during the boot process.
      Jetson Nano has a recovery mode that allows you to reflash the operating system. Try booting into recovery mode and flashing the system image again. This should revert your system to a known working state.

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

    My pip is not installing what might be the error?

    • @CodeWithAarohi
      @CodeWithAarohi  6 หลายเดือนก่อน +1

      What is the error message?

    • @strongwarrior0210
      @strongwarrior0210 6 หลายเดือนก่อน

      Ah that is solved, as i was giving the wrong ip address to my internet. But now i have another problem, i have jetson orin nano, but i installed the old opencv version which is not compatible with my cuda, i should use sudo apt-get install opencv command right?? But my question is, should i uninstall the previous version or just deleting the folder will be enough?

    • @strongwarrior0210
      @strongwarrior0210 6 หลายเดือนก่อน

      If i have to uninstall then what steps should i follow? Plz guide

  • @orugantimadhu
    @orugantimadhu ปีที่แล้ว

    make: *** No targets specified and no makefile found. Stop.

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Check if you are in the correct directory: Make sure that you are in the correct directory where the Makefile is located. You can use the ls command to list the files in the current directory and check if the Makefile is present.

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Check your system for make: Finally, make sure that the make command is installed on your system. If it is not installed, you will need to install it before you can use the make command.

    • @orugantimadhu
      @orugantimadhu ปีที่แล้ว

      @@CodeWithAarohi yes mam, I am in build file. cmake is in opencv folder.

    • @orugantimadhu
      @orugantimadhu ปีที่แล้ว

      @@CodeWithAarohi how to install it madam. Thank you

    • @orugantimadhu
      @orugantimadhu ปีที่แล้ว

      @@CodeWithAarohi make is already installed. Yes mam, CMakeFiles existed in build file. verified through ls command.

  • @112fkdldjs
    @112fkdldjs ปีที่แล้ว +1

    Hi. My terminal stopped for 1 hour on [100%] Built traget opencv_perf_superres
    Do you figure out the reason?(It took about 3 hour to get 0% to 100%)

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

      Yes, It is a time consuming process. Also building OpenCV can consume a significant amount of system resources, including CPU, memory, and disk I/O. If your system is resource-constrained, it can slow down the build process or cause it to hang. You can check your system's resource utilization using tools like top or htop to see if any resources are maxed out.

    • @112fkdldjs
      @112fkdldjs ปีที่แล้ว

      @@CodeWithAarohi I waited about 30 minutes more and solved

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      @@112fkdldjs Great 👍

  • @abdikaniali4421
    @abdikaniali4421 ปีที่แล้ว

    Hi Aarohi, once I run the code make -j4 it is giving me an error that says "make: *** No targets specified and no makefile found. Stop."
    I followed everything the way you have up there not sure why it is giving this error. Any help to solve this will be appreciated.
    I am suspecting these two commands might have impacted.
    sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf“
    sudo ldconfig
    the first one gives you prompts and if you type the rest of the codes they just run and give you nothing so I exited and typed the rest of the dependencies.

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      In this command please delete the last double quote and write again. sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf“

    • @abdikaniali4421
      @abdikaniali4421 ปีที่แล้ว

      @@CodeWithAarohi Got it thanks a lot!

    • @abdikaniali4421
      @abdikaniali4421 ปีที่แล้ว

      @@CodeWithAarohi after following the steps I have OpenCV version 3.2.0 but when I do jtop it shows me I have 4.7.0 -dev with CUDA: YES. Do you know why that is the case? Thank You!

  • @markthestark
    @markthestark ปีที่แล้ว

    here typo in your command wrong symbol at the end:
    sudo bash -c 'echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab’
    correct way:
    sudo bash -c 'echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab'
    this should be at the end ( ' ) not this ( ’ )
    same with this command :
    sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf“
    you have this a the end ( “ ) has to be ( " )
    Please edit your comment with command and stop confusing people !

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Thankyou, I appreciate this. I will correct the command.

    • @CodeWithAarohi
      @CodeWithAarohi  ปีที่แล้ว

      Oh, I remember now. I don't know what is the reason but I was not able to correct it. Whenever I put double quotes here, it shows like the way you were seeing it.

    • @chrismartinez9735
      @chrismartinez9735 ปีที่แล้ว

      wo@@CodeWithAarohi I'm a little confused. How should these to lines be written?

  • @ujjawalbhushan1782
    @ujjawalbhushan1782 ปีที่แล้ว

    sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf“
    this command should be sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf"
    it takes almost 2 hours for me to understand

  • @urvashimesariya1263
    @urvashimesariya1263 ปีที่แล้ว

    Hello, I am following your code for builidng opencv, Howerver i ma getting configuring incomplete msg after running this block of code : cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D EIGEN_INCLUDE_PATH=/usr/include/eigen3 -D WITH_OPENCL=OFF -D WITH_CUDA=ON -D CUDA_ARCH_BIN=5.3 -D CUDA_ARCH_PTX="" -D WITH_CUDNN=ON -D WITH_CUBLAS=ON -D ENABLE_FAST_MATH=ON -D CUDA_FAST_MATH=ON -D OPENCV_DNN_CUDA=ON -D ENABLE_NEON=ON -D WITH_QT=OFF -D WITH_OPENMP=ON -D WITH_OPENGL=ON -D BUILD_TIFF=ON -D WITH_FFMPEG=ON -D WITH_GSTREAMER=ON -D WITH_TBB=ON -D BUILD_TBB=ON -D BUILD_TESTS=OFF -D WITH_EIGEN=ON -D WITH_V4L=ON -D WITH_LIBV4L=ON -D OPENCV_ENABLE_NONFREE=ON -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=OFF -D BUILD_NEW_PYTHON_SUPPORT=ON -D BUILD_opencv_python3=TRUE -D OPENCV_GENERATE_PKGCONFIG=ON -D BUILD_EXAMPLES=OFF ..
    Kindly help.

    • @ayseerdansman4779
      @ayseerdansman4779 ปีที่แล้ว

      Hello, i got the same error. Were you able to fix it?

    • @yousafzada_2
      @yousafzada_2 2 หลายเดือนก่อน

      @@ayseerdansman4779 were you?

  • @codeviagaurav5220
    @codeviagaurav5220 ปีที่แล้ว

    sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf“ , I'm stuck at this command, after executing this command is got this output only " > "

    • @study_inTAMIL
      @study_inTAMIL 10 หลายเดือนก่อน

      yeah same

    • @denisokhrimenko8078
      @denisokhrimenko8078 6 หลายเดือนก่อน

      The last symbol is wrong: Need ' instead "