# 使用Raspberry Pi Camera Rev 1.3 ## **安裝所需軟體** 使用 `apt-get` 安裝以下軟體: ```bash sudo apt-get install -y festival \ python3-dev python3-opencv python3-pip \ x11vnc liblivemedia-dev libv4l-dev \ cmake python3-matplotlib vlc ``` 更新 `apt` 套件清單: ```bash sudo apt update ``` 安裝其他必要的 Python 套件: ```bash sudo apt install -y python3-requests python3-flask python3-numpy ``` --- ## **手動啟用 Camera 支援(適用於 Bullseye 或 Bookworm 版本)** 編輯 `config.txt`: ```bash sudo nano /boot/firmware/config.txt ```  🔹 **檢查檔案內是否有以下設定:** ``` camera_auto_detect=1 ``` **如果已存在,可直接退出 (`Ctrl+X`)** **如果沒有,則需手動新增該行,然後儲存並退出 (`Ctrl+X` → `Y` → `Enter`)** --- ## **開啟相機並顯示即時畫面** ```bash libcamera-hello ``` ## **拍攝照片** ```bash libcamera-still -o test.jpg ``` ## **錄製 5 秒鐘的影片** ```bash libcamera-vid -t 5000 -o test.h264 ``` ---
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up