Deteksi Objek Kamera Python
Loncat ke navigasi
Loncat ke pencarian
Pertama instal Python.
Kemudian install library numpy melalui cmd dengan mengetik perintah berikut
pip install numpy
akan muncul tampilan berikut
C:\Users\USER>pip install numpy Collecting numpy Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/72/b2/02770e60c4e2f7e158d923ab0dea4e9f146a2dbf267fec6d8dc61d475689/numpy-1.25.2-cp311-cp311- win_amd64.whl.metadata Downloading numpy-1.25.2-cp311-cp311-win_amd64.whl.metadata (5.7 kB) Downloading numpy-1.25.2-cp311-cp311-win_amd64.whl (15.5 MB) ---------------------------------------- 15.5/15.5 MB 5.9 MB/s eta 0:00:00 Installing collected packages: numpy Successfully installed numpy-1.25.2 C:\Users\USER>
Kemudian install opencv-python dengan mengetikan perintah berikut
pip install opencv-python
akan muncul tampilan seperti berikut
C:\Users\USER>pip install opencv-python Collecting opencv-python Obtaining dependency information for opencv-python from https://files.pythonhosted.org/packages/fb/c4/f574ba6f04e6d7bf8c38d23e7a52389566dd7631fee0bcdd79ea07ef2dbf/opencv_python-4.8.0.76-cp37-abi3-win_amd64.whl.metadata Downloading opencv_python-4.8.0.76-cp37-abi3-win_amd64.whl.metadata (20 kB) Requirement already satisfied: numpy>=1.21.2 in c:\users\user\appdata\local\programs\python\python311\lib\site-packages (from opencv-python) (1.25.2) Downloading opencv_python-4.8.0.76-cp37-abi3-win_amd64.whl (38.1 MB) ---------------------------------------- 38.1/38.1 MB 6.0 MB/s eta 0:00:00 Installing collected packages: opencv-python Successfully installed opencv-python-4.8.0.76 C:\Users\USER>