Skip to content

Commit a0314a9

Browse files
add init to sensor-mode=2 (RAW8) but still no image
1 parent 71e2910 commit a0314a9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

video_flux_and_capture_numpy_matplotlib.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import numpy as np
88
import matplotlib.pyplot as plt
99
import matplotlib.animation as animation
10+
import api
1011

1112
vd = open('/dev/video0', 'rb+', buffering=0)
1213

@@ -15,8 +16,9 @@
1516
fcntl.ioctl(vd, VIDIOC_QUERYCAP, cp)
1617

1718
print(">> device setup")
18-
fmt = v4l2_format()
19-
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE
19+
#fmt = v4l2_format()
20+
#fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE
21+
api.initialize(vd,sensor_mode=2)
2022

2123
print(">> init mmap capture")
2224
req = v4l2_requestbuffers()

0 commit comments

Comments
 (0)