percipioxyz / camport3 Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
请问我想使用python-opencv去调用摄像头该如何调用呢?
是FM830-5M。
正常我只需要索引0号的摄像头就可以连接到摄像头了。
def demo():
capture = cv2.VideoCapture(0)
if capture.isOpened():
while True:
ret, frame = capture.read()
cv2.imshow("camera",frame)
if cv2.waitKey(30) & 0xff == 27:
capture.release()
break
else:
print("未检测到摄像头")
demo()
cv2.waitKey()
cv2.destroyAllWindows()
可是用USB连上摄像头之后,仍旧是检测到我的笔记本摄像头。
我用其他的USB摄像头(M)连接的话,就是显示M摄像头的内容。
如题
error detail
/home/dev/workspace/camport3/sample/../include/TYApi.h: In function ‘int32_t TYBitsPerPixel(TY_IMAGE_MODE)’:
/home/dev/workspace/camport3/sample/../include/TYApi.h:1072:12: error: narrowing conversion of ‘TY_PIXEL_48BIT’ from ‘int’ to ‘unsigned int’ [-Wnarrowing]
1072 | case TY_PIXEL_48BIT:
| ^~~~~~~~~~~~~~
/home/dev/workspace/camport3/sample/../include/TYApi.h:1074:12: error: narrowing conversion of ‘TY_PIXEL_64BIT’ from ‘int’ to ‘unsigned int’ [-Wnarrowing]
1074 | case TY_PIXEL_64BIT:
| ^~~~~~~~~~~~~~
can be fixed by
change this:
///Pixel size type definitions
typedef enum TY_PIXEL_BITS_LIST{
TY_PIXEL_8BIT = 0x1 << 28,
TY_PIXEL_16BIT = 0x2 << 28,
TY_PIXEL_24BIT = 0x3 << 28,
TY_PIXEL_32BIT = 0x4 << 28,
TY_PIXEL_10BIT = 0x5 << 28,
TY_PIXEL_12BIT = 0x6 << 28,
TY_PIXEL_14BIT = 0x7 << 28,
TY_PIXEL_48BIT = 0x8 << 28,
TY_PIXEL_64BIT = 0xa << 28,
}TY_PIXEL_BITS_LIST;
typedef uint32_t TY_PIXEL_BITS;
# this type define to
# typedef int32_t TY_PIXEL_BITS;
we want to use the bag file to adjust the algo, but can not parse the bag file well.
So we want the code of load bag file, thanks
It's weird to put the sample code and the dll together into a release version.
用python调用显示:
VIDEOIO ERROR: V4L2: Could not obtain specifics of capture window.
VIDEOIO ERROR: V4L: can't open camera by index 1
您好,我下载的是最新版的代码,库版本是3.6.2,已经拷贝到/usr/lib和/usr/local/lib中,但是执行
cd sample
mkdir build
cd build
cmake ..
make
出错了,我不知道问题出在哪
报错信息如下:
make
Scanning dependencies of target sample_common
[ 2%] Building CXX object CMakeFiles/sample_common.dir/common/MatViewer.cpp.o
[ 4%] Building CXX object CMakeFiles/sample_common.dir/common/TYThread.cpp.o
[ 6%] Building CXX object CMakeFiles/sample_common.dir/common/ImageSpeckleFilter.cpp.o
[ 9%] Building CXX object CMakeFiles/sample_common.dir/common/DepthInpainter.cpp.o
/home/bdca/workspace/camport3/sample/common/DepthInpainter.cpp: In function ‘void _inpaint(cv::InputArray, cv::InputArray, cv::OutputArray, double, int)’:
/home/bdca/workspace/camport3/sample/common/DepthInpainter.cpp:596:18: error: conversion from ‘cv::Mat’ to non-scalar type ‘CvMat’ requested
CvMat c_src = src, c_mask = mask, c_dst = _dst.getMat();
^~~
/home/bdca/workspace/camport3/sample/common/DepthInpainter.cpp:596:32: error: conversion from ‘cv::Mat’ to non-scalar type ‘CvMat’ requested
CvMat c_src = src, c_mask = mask, c_dst = _dst.getMat();
^~~~
/home/bdca/workspace/camport3/sample/common/DepthInpainter.cpp:596:57: error: conversion from ‘cv::Mat’ to non-scalar type ‘CvMat’ requested
CvMat c_src = src, c_mask = mask, c_dst = _dst.getMat();
~~~~~~~~~~~^~
CMakeFiles/sample_common.dir/build.make:120: recipe for target 'CMakeFiles/sample_common.dir/common/DepthInpainter.cpp.o' failed
make[2]: *** [CMakeFiles/sample_common.dir/common/DepthInpainter.cpp.o] Error 1
CMakeFiles/Makefile2:429: recipe for target 'CMakeFiles/sample_common.dir/all' failed
make[1]: *** [CMakeFiles/sample_common.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
Hello! I need your help, i can't install camera tools for my Jetson Nano with ROS2 iron
I do colcon build command and it's broke
Colcon can't do a CMakeLists.txt but i can't use catkin because it's not supported on ROS2 iron
Have u got a solution for this?
演示程序可以使用很多写好的工具包,怎么才能在新建项目中调用??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.