0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

raspberry pi 3 でstretch その4

Last updated at Posted at 2017-11-06

概要

raspberry pi 3 でstretchやってみた。
USBカメラやってみた。

写真

MVC-001F.JPG

環境

Raspberry Pi 3 model B v1.2 element14
2017-09-07-raspbian-stretch
usb camera ELECOM UCAM-DLKT130TRD

接続確認

lsusb

Bus 001 Device 007: ID 03ee:6402 Mitsumi 
Bus 001 Device 006: ID 0409:0019 NEC Corp. 109 Japanese Keyboard with Bus-Powered Hub
Bus 001 Device 005: ID 0409:55aa NEC Corp. Hub
Bus 001 Device 004: ID 056e:700f Elecom Co., Ltd 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

カード、デバイスの確認

ls /etc/video*

/etc/video0

opencvインストール

sudo aptitude install python-opencv

サンプルコード

import cv2

c = cv2.VideoCapture(0)
r, img = c.read()
cv2.imwrite('test.jpg', img)
c.release()

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?