Giter VIP home page Giter VIP logo

raspi_camera's Introduction

raspi_camera

説明

dockerコンテナ内部でカメラを使用する

設定方法

ラズパイのローカルにてカメラの有効化する

#カメラへのアクセスの有効化
sudo echo SUBSYSTEM=="vchiq",MODE="0666" >> /etc/udev/rules.d/99-camera.rules
#GUI表示の許可
xhost +local:

ライブカメラ

index.htmlのipアドレスをローカルのIPに変更する

起動方法

git clone https://github.com/kmchord9/raspi_camera.git
cd raspi_camera

#コンテナ起動
docker-compose up -d
#コンテナにログイン
docker exec -it camera /bin/bash

使用したdockerイメージについて

dockerイメージは公式のraspiOS(2021-05-07-raspios-buster-armhf-lite.zip)から
作成したものを使用している。

作成したイメージは下記で得られる

docker pull kmchord9/raspios-buster-armhf-lite:2021-05-07

参考

DockerとOpenCV内のRaspberryPiカメラにアクセスする方法
ARM環境のRaspbianイメージをx86上のDockerで動かす
How to Let Non-Root Users Access the Raspberry Pi Camera
ArchlinuxARM Need to Use sudo to Access Camera
Raspberry pi 3で暗視カメラシステムの構築 その2

raspi_camera's People

Contributors

kmchord9 avatar nmiri-kmatsubara avatar

Watchers

James Cloos avatar  avatar

raspi_camera's Issues

dockerコンテナからカメラの使用

mmal: mmal_vc_shm_init: could not initialize vc shared memory service
mmal: mmal_vc_component_create: failed to initialise shm for 'vc.camera_info' (7:EIO)
mmal: mmal_component_create_core: could not create component 'vc.camera_info' (7)
Traceback (most recent call last):
File "testcamera.py", line 4, in
camera = PiCamera()
File "/usr/local/lib/python3.7/dist-packages/picamera/camera.py", line 367, in init
with mo.MMALCameraInfo() as camera_info:
File "/usr/local/lib/python3.7/dist-packages/picamera/mmalobj.py", line 2346, in init
super(MMALCameraInfo, self).init()
File "/usr/local/lib/python3.7/dist-packages/picamera/mmalobj.py", line 633, in init
prefix="Failed to create MMAL component %s" % self.component_type)
File "/usr/local/lib/python3.7/dist-packages/picamera/exc.py", line 184, in mmal_check
raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to create MMAL component b'vc.camera_info': I/O error

opencv依存ライブラリ

apt-get update && apt-get install -y --no-install-recommends
python3-pip
libhdf5-103
libharfbuzz0b
liblapack3
libatlas-base-dev
libwebp6
libtiff5
libjasper1
libilmbase23
libopenexr23
libavcodec-extra58
libavformat58
libswscale5
libqtgui4
libqt4-test
libgtk-3-0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.