1, problem description: using opencv to call the raspberry PI camera [cv2.videocapture (0)], when running the program, said can not open the camera.
p>
2. Solution:
I looked for a method on the Internet, said to change 0 to -1, I changed, after the change, the system still said can not find the camera, let alone open.
and then I’m going to do the camera test and say
https://www.raspber rypi.org/documentation/configuration/camera.md
raspistill -v -o test.jpg
found that raspberry PI can take photos normally, indicating that there is no problem with the installation interface.
and search on the Internet, said to run the program to enter the following statement, that is, the raspberry PI system’s camera is ok, but opencv can not call. It can be called using this statement.
sudo modprobe bcm2835-v4l2
yes, the camera can be turned on after you type in this statement, but the screen will be bar by bar, for whatever reason, that’s not settled yet. Is the refresh too fast?
###############################################
https://blog.csdn.net/u012005313/article/details/70244747#C0, that’s a great blog p>
raspberry PI can call the camera and show the stripe instead of the original image, because the following two parameters mess up, comment out, it will work properly
# Set camera resolution
camera.set(cv2.cap_prop_frame_width, 620)
camera.set(cv2.cap_prop_frame_height, 480)
Read More:
- Raspberry Pi USB drive-free camera error libv4l2: error setting pixformat: Device or resource busy, etc.
- ROS package ROS_ astra_ Camera cannot open RGB lens
- About the reason why the Raspberry Pi raspistill command cannot find the camera
- Permission denied error: unable to index file .vs/Trip2015/v15/Server/sqlite3/db.lock fatal: adding
- Errors encountered by elasticsearch in creating index and mapping
- Caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0
- Methods of modifying index and columns names by dataframe in pandas
- Docker command error during connect: get http://2F2F.2Fpipe2Fdocker_ engine/v1.36/containers/json: open//.
- Error in creating index by Google elasticsearch head plug-in
- Solution to the problem that the camera can’t display when ROS running
- Error: ‘default’ is not exported by node_ modules/qs/lib/ index.js
- Index error: invalid index to scalar variable
- On set in pandas_ Index and reset_ Usage of index
- [Solved] Es delete all the data in the index without deleting the index structure, including curl deletion
- Error: l6242e: cannot link object arm_ cos_ f32.o as its attributes are incompat
- Cesium uses mediastreamrecorder or mediarecorder to record and download videos, and turn on the camera for recording.
- Unity Cursor Lock& Camera Lock
- ADT:v22.6.2-1085508 Creating Android project and creating appcompat automatically_ V7 solution
- Problems caused by vs project build order: link: fatal error lnk1181: cannot open input file ‘zoom’_ Ui_ style.lib ‘
- Vs2017 cannot open the source file “XXX. H” by adding a file name after creating a new class