Python, OpenCV camera capture

Basically, but as a memorandum

usage environment

Mac OSX El Capitan OpenCV3.0.0 Python2.7.10

Planned change in

capture.py

import numpy as np
import cv2

#Camera designation cap = cv2.VideoCapture(0)

while(True):

# Capture frame-by-frame
ret, frame = cap.read()

# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

# Display the resulting frame
cv2.imshow('frame',rad)
if cv2.waitKey(1) & 0xFF == ord('q'):
    break

# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()

Recommended Posts

Python, OpenCV camera capture
Camera capture with Python + OpenCV
Face recognition with camera with opencv3 + python2.7
Python2.7 + CentOS7 + OpenCV3
OpenCV Samples (Python)
[Note] openCV + python
WEB camera capture
Image acquisition from camera with Python + OpenCV
python openCV installation (memo)
Web camera capture Ver 2
Summary about Python3 + OpenCV3
Introduction to OpenCV (python)-(2)
OpenCV3 Python API list
Python OpenCV tutorial memo
OpenCV basic code (python)
WEB camera capture Ver3
OpenCV for Python beginners
Thermal Camera (Thermo AI Device TiD) Python OpenCV Edition
[Windows] [Python] Camera calibration of fisheye lens with OpenCV
Display USB camera video with Python OpenCV with Raspberry Pi
"Apple processing" with OpenCV3 + Python3
Image editing with python OpenCV
[Python] Using OpenCV with Python (Basic)
OpenCV3 installation for Python3 @macOS
Switch camera resolution from OpenCV
Install OpenCV on Ubuntu + python
Make Opencv available in Python
Face detection with Python + OpenCV
Using OpenCV with Python @Mac
Shoot time-lapse from a PC camera using Python and OpenCV
Environment construction of python and opencv
Use PointGrey camera with Python (PyCapture2)
Image capture of firefox using python
[Python] Using OpenCV with Python (Image Filtering)
Neural network with OpenCV 3 and Python 3
Python
[Python] Using OpenCV with Python (Image transformation)
[Python] Using OpenCV with Python (Edge Detection)
Blender 2.8, Python Cube, Lighting, Camera Circumference
Put python, numpy, opencv3 in ubuntu14
How to make a surveillance camera (Security Camera) with Opencv and Python
Background subtraction, python, mog, gmg, opencv3.1
Easy Python + OpenCV programming with Canopy
Try face recognition with python + OpenCV
Cut out face with Python + OpenCV
Load gif images with Python + OpenCV
Find image similarity with Python + OpenCV
Use OpenCV with Python 3 in Window
Draw an illustration with Python + OpenCV
Introduction to image analysis opencv python
Track baseball balls with Python + OpenCV
Graph Based Segmentation with Python + OpenCV
Draw arrows (vectors) with opencv / python
The fastest way to get camera images regularly with python opencv
OpenCV3 & Python3 environment construction on Ubuntu
Basic study of OpenCV with Python
[OpenCV; Python] Summary of findcontours function
Create your own virtual camera with Python + OpenCV and apply original effects
Notes for using OpenCV on Windows10 Python 3.8.3.
Face detection with Python + OpenCV (rotation invariant)
[Python] Face detection by OpenCV (Haar Cascade)