作業系統: 64 Bits
OpenCV Version:4.5.1
裝置:
安裝 libcamera 套件(Command):
git clone https://git.libcamera.org/libcamera/libcamera.git
cd libcamera
sudo apt install libcamera-git
meson setup build
ninja -C build install
重新開機
sudo libcamera-jpeg -o Desktop/image.jpg
圖片:截取到Camera的圖片
相機Camera => OK
===============================
安裝OpenCV (指令)
sudo rpi-update
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libopencv-dev
執行程式碼:
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( int argc, char** argv ) {
cout <<" OpenCV version" <<CV_VERSION<< endl;
// Wait for a keystroke in the window
waitKey(0);
return 0;
}
=========================================
執行OpenCV 程式連接Camera
參考網站:
https://github.com/Qengineering/Libcamera-OpenCV-RPi-Bullseye-64OS
https://qengineering.eu/install-gstreamer-1.18-on-raspberry-pi-4.html
OpenCV Sample Code:
https://docs.opencv.org/4.5.1/examples.html
沒有留言:
張貼留言