質問編集履歴
4
opencvの詳細です。
title
CHANGED
File without changes
|
body
CHANGED
@@ -37,6 +37,121 @@
|
|
37
37
|
cv2.destroyAllWindows()
|
38
38
|
|
39
39
|
### 試したこと
|
40
|
+
追記の.ver3,4は解決したので削除してあります。
|
41
|
+
|
42
|
+
[追記.ver6]
|
43
|
+
opencvの詳細です。やり方まで説明して頂いきありがとうございます。
|
44
|
+
```
|
45
|
+
General configuration for OpenCV 3.4.3 =====================================
|
46
|
+
Version control: 3.4.3
|
47
|
+
|
48
|
+
Platform:
|
49
|
+
Timestamp: 2018-09-09T12:23:20Z
|
50
|
+
Host: Linux 4.4.0-101-generic x86_64
|
51
|
+
CMake: 3.9.0
|
52
|
+
CMake generator: Unix Makefiles
|
53
|
+
CMake build tool: /usr/bin/gmake
|
54
|
+
Configuration: Release
|
55
|
+
|
56
|
+
CPU/HW features:
|
57
|
+
Baseline: SSE SSE2 SSE3
|
58
|
+
requested: SSE3
|
59
|
+
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
|
60
|
+
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
|
61
|
+
SSE4_1 (3 files): + SSSE3 SSE4_1
|
62
|
+
SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
|
63
|
+
FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
|
64
|
+
AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
|
65
|
+
AVX2 (9 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
|
66
|
+
|
67
|
+
C/C++:
|
68
|
+
Built as dynamic libs?: NO
|
69
|
+
C++ Compiler: /opt/rh/devtoolset-2/root/usr/bin/c++ (ver 4.8.2)
|
70
|
+
C++ flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
|
71
|
+
C++ flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
|
72
|
+
C Compiler: /opt/rh/devtoolset-2/root/usr/bin/cc
|
73
|
+
C flags (Release): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
|
74
|
+
C flags (Debug): -Wl,-strip-all -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
|
75
|
+
Linker flags (Release): -L/root/ffmpeg_build/lib
|
76
|
+
Linker flags (Debug): -L/root/ffmpeg_build/lib
|
77
|
+
ccache: NO
|
78
|
+
Precompiled headers: NO
|
79
|
+
Extra dependencies: /opt/Qt4.8.7/lib/libQtGui.so /opt/Qt4.8.7/lib/libQtTest.so /opt/Qt4.8.7/lib/libQtCore.so /lib64/libz.so /opt/libjpeg-turbo/lib64/libjpeg.a avcodec avformat avutil swscale dl m pthread rt
|
80
|
+
3rdparty dependencies: ittnotify libprotobuf libwebp libpng libtiff libjasper IlmImf
|
81
|
+
|
82
|
+
OpenCV modules:
|
83
|
+
To be built: calib3d core dnn features2d flann highgui imgcodecs imgproc java_bindings_generator ml objdetect photo python3 python_bindings_generator shape stitching superres video videoio videostab
|
84
|
+
Disabled: js world
|
85
|
+
Disabled by dependency: -
|
86
|
+
Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 ts viz
|
87
|
+
Applications: -
|
88
|
+
Documentation: NO
|
89
|
+
Non-free algorithms: NO
|
90
|
+
|
91
|
+
GUI:
|
92
|
+
QT: YES (ver 4.8.7 EDITION = OpenSource)
|
93
|
+
QT OpenGL support: NO
|
94
|
+
GTK+: NO
|
95
|
+
VTK support: NO
|
96
|
+
|
97
|
+
Media I/O:
|
98
|
+
ZLib: /lib64/libz.so (ver 1.2.3)
|
99
|
+
JPEG: /opt/libjpeg-turbo/lib64/libjpeg.a (ver 62)
|
100
|
+
WEBP: build (ver encoder: 0x020e)
|
101
|
+
PNG: build (ver 1.6.34)
|
102
|
+
TIFF: build (ver 42 - 4.0.9)
|
103
|
+
JPEG 2000: build (ver 1.900.1)
|
104
|
+
OpenEXR: build (ver 1.7.1)
|
105
|
+
HDR: YES
|
106
|
+
SUNRASTER: YES
|
107
|
+
PXM: YES
|
108
|
+
|
109
|
+
Video I/O:
|
110
|
+
DC1394: NO
|
111
|
+
FFMPEG: YES
|
112
|
+
avcodec: YES (ver 58.21.104)
|
113
|
+
avformat: YES (ver 58.17.101)
|
114
|
+
avutil: YES (ver 56.18.102)
|
115
|
+
swscale: YES (ver 5.2.100)
|
116
|
+
avresample: NO
|
117
|
+
GStreamer: NO
|
118
|
+
libv4l/libv4l2: NO
|
119
|
+
v4l/v4l2: linux/videodev.h linux/videodev2.h
|
120
|
+
|
121
|
+
Parallel framework: pthreads
|
122
|
+
|
123
|
+
Trace: YES (with Intel ITT)
|
124
|
+
|
125
|
+
Other third-party libraries:
|
126
|
+
Lapack: NO
|
127
|
+
Eigen: NO
|
128
|
+
Custom HAL: NO
|
129
|
+
Protobuf: build (3.5.1)
|
130
|
+
|
131
|
+
OpenCL: YES (no extra features)
|
132
|
+
Include path: /io/opencv/3rdparty/include/opencl/1.2
|
133
|
+
Link libraries: Dynamic load
|
134
|
+
|
135
|
+
Python 3:
|
136
|
+
Interpreter: /opt/python/cp36-cp36m/bin/python (ver 3.6.5)
|
137
|
+
Libraries: libpython3.6m.a (ver 3.6.5)
|
138
|
+
numpy: /opt/python/cp36-cp36m/lib/python3.6/site-packages/numpy/core/include (ver 1.11.3)
|
139
|
+
packages path: lib/python3.6/site-packages
|
140
|
+
|
141
|
+
Python (for build): /opt/python/cp36-cp36m/bin/python
|
142
|
+
|
143
|
+
Java:
|
144
|
+
ant: NO
|
145
|
+
JNI: NO
|
146
|
+
Java wrappers: NO
|
147
|
+
Java tests: NO
|
148
|
+
|
149
|
+
Matlab: NO
|
150
|
+
|
151
|
+
Install to: /io/_skbuild/linux-x86_64-3.6/cmake-install
|
152
|
+
-----------------------------------------------------------------
|
153
|
+
```
|
154
|
+
|
40
155
|
[追記.ver5]print('確認')に変更しました。
|
41
156
|
基本的なミスでお恥ずかしいです。
|
42
157
|
しかし、
|
@@ -51,20 +166,7 @@
|
|
51
166
|
|
52
167
|
となり、動画は取得できませんでした。
|
53
168
|
|
54
|
-
[追記.ver4]openCVについて
|
55
|
-
バージョンは'3.4.3'です。
|
56
|
-
すみません、他に何を書けばいいか思いつきませんでした。
|
57
|
-
基本的には公式のダウンロードそのままです。
|
58
169
|
|
59
|
-
[追記.ver3]
|
60
|
-
[import cv2 print(cv2.getBuildInformation())]
|
61
|
-
を導入したときの実行結果です。
|
62
|
-
File "test6.py", line 2
|
63
|
-
import cv2 print(cv2.getBuildInformation())
|
64
|
-
^
|
65
|
-
SyntaxError: invalid syntax
|
66
|
-
|
67
|
-
|
68
170
|
[追記.ver2]「ls /dev」にて「video0」の存在は確認できました。
|
69
171
|
|
70
172
|
|
3
まとめて3つの追記をしました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -37,13 +37,42 @@
|
|
37
37
|
cv2.destroyAllWindows()
|
38
38
|
|
39
39
|
### 試したこと
|
40
|
+
[追記.ver5]print('確認')に変更しました。
|
41
|
+
基本的なミスでお恥ずかしいです。
|
42
|
+
しかし、
|
43
|
+
VIDIOC_QBUF: Invalid argument
|
44
|
+
確認
|
45
|
+
False
|
46
|
+
^CVIDIOC_QBUF: Invalid argument
|
47
|
+
Traceback (most recent call last):
|
48
|
+
File "test6.py", line 8, in <module>
|
49
|
+
ret,frame = cap.read()
|
50
|
+
KeyboardInterrupt
|
51
|
+
|
52
|
+
となり、動画は取得できませんでした。
|
53
|
+
|
54
|
+
[追記.ver4]openCVについて
|
55
|
+
バージョンは'3.4.3'です。
|
56
|
+
すみません、他に何を書けばいいか思いつきませんでした。
|
57
|
+
基本的には公式のダウンロードそのままです。
|
58
|
+
|
59
|
+
[追記.ver3]
|
60
|
+
[import cv2 print(cv2.getBuildInformation())]
|
61
|
+
を導入したときの実行結果です。
|
62
|
+
File "test6.py", line 2
|
63
|
+
import cv2 print(cv2.getBuildInformation())
|
64
|
+
^
|
65
|
+
SyntaxError: invalid syntax
|
66
|
+
|
67
|
+
|
40
68
|
[追記.ver2]「ls /dev」にて「video0」の存在は確認できました。
|
41
69
|
|
70
|
+
|
71
|
+
[追記.ver1]コマンドプロンプトにてLinuxのコマンド「lsusb」で確認しました。これによりWebカメラが接続されていることが分かりました。チャンネルの確認というのは語弊がありましたね。すみません。しかし、デバイス指定を”0”番としてWindows上で動作の確認ができているので問題ないのかと...。一番の問題はUbuntuでカメラが使用できないことにあると考えています。
|
72
|
+
|
42
73
|
同様のプログラムをWindows10でも実行しましたが、正常な動作が確認されました。
|
43
74
|
webカメラの接続は確認済みです。
|
44
75
|
|
45
|
-
[追記.ver1]コマンドプロンプトにてLinuxのコマンド「lsusb」で確認しました。これによりWebカメラが接続されていることが分かりました。チャンネルの確認というのは語弊がありましたね。すみません。しかし、デバイス指定を”0”番としてWindows上で動作の確認ができているので問題ないのかと...。一番の問題はUbuntuでカメラが使用できないことにあると考えています。
|
46
|
-
|
47
76
|
他のPCでも同様の不具合が確認されています。
|
48
77
|
webカメラはlogicoolのオーソドックスなものを使用していますが、他の機種も試しました。
|
49
78
|
|
2
ls /dev の実行結果を追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -37,11 +37,12 @@
|
|
37
37
|
cv2.destroyAllWindows()
|
38
38
|
|
39
39
|
### 試したこと
|
40
|
+
[追記.ver2]「ls /dev」にて「video0」の存在は確認できました。
|
40
41
|
|
41
42
|
同様のプログラムをWindows10でも実行しましたが、正常な動作が確認されました。
|
42
43
|
webカメラの接続は確認済みです。
|
43
44
|
|
44
|
-
[追記]コマンドプロンプトにてLinuxのコマンド「lsusb」で確認しました。これによりWebカメラが接続されていることが分かりました。チャンネルの確認というのは語弊がありましたね。すみません。しかし、デバイス指定を”0”番としてWindows上で動作の確認ができているので問題ないのかと...。一番の問題はUbuntuでカメラが使用できないことにあると考えています。
|
45
|
+
[追記.ver1]コマンドプロンプトにてLinuxのコマンド「lsusb」で確認しました。これによりWebカメラが接続されていることが分かりました。チャンネルの確認というのは語弊がありましたね。すみません。しかし、デバイス指定を”0”番としてWindows上で動作の確認ができているので問題ないのかと...。一番の問題はUbuntuでカメラが使用できないことにあると考えています。
|
45
46
|
|
46
47
|
他のPCでも同様の不具合が確認されています。
|
47
48
|
webカメラはlogicoolのオーソドックスなものを使用していますが、他の機種も試しました。
|
1
チャンネルの確認方法について追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -39,7 +39,10 @@
|
|
39
39
|
### 試したこと
|
40
40
|
|
41
41
|
同様のプログラムをWindows10でも実行しましたが、正常な動作が確認されました。
|
42
|
-
webカメラの接続
|
42
|
+
webカメラの接続は確認済みです。
|
43
|
+
|
44
|
+
[追記]コマンドプロンプトにてLinuxのコマンド「lsusb」で確認しました。これによりWebカメラが接続されていることが分かりました。チャンネルの確認というのは語弊がありましたね。すみません。しかし、デバイス指定を”0”番としてWindows上で動作の確認ができているので問題ないのかと...。一番の問題はUbuntuでカメラが使用できないことにあると考えています。
|
45
|
+
|
43
46
|
他のPCでも同様の不具合が確認されています。
|
44
47
|
webカメラはlogicoolのオーソドックスなものを使用していますが、他の機種も試しました。
|
45
48
|
|