![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
摄像头获取图像
认真搬砖,专心搞钱
全栈方向,前后端、数据库都有接触,希望能将自己用到的技术做成一个个专栏
展开
-
opencv摄像头获取连续图像(一) :单目获取图像
利用摄像头获取连续图像1.设置帧数为30fps2.读取摄像头5秒视频2.将读取到的视频以每5帧采取一幅图像,共计30张,并保存。源代码如下: #include #include using namespace std;using namespace cv;int main(){VideoCapture cap(0);if (cap.isOpened()) cout << "camera is op原创 2017-08-19 12:52:59 · 8613 阅读 · 8 评论 -
opencv摄像头获取连续图像(二): 双目获取图像
原则上获取双目只是单目的程序叠加,但需要注意的是,有时获取外部usb摄像头,需要将cap.set(CV_CAP_PROP_FPS, 30.0)注释掉#include #include using namespace std; using namespace cv; int main() { VideoCapture cap1(1);//开启外接摄像头,顺序要从大到小 VideoCapture ca原创 2017-09-07 11:09:59 · 2465 阅读 · 0 评论 -
读、写连续图片
对有序的文件读取、变换、写入新的文件夹中, 如图所示,分别为读入和写出 对于无序的文件名,可以全选-----对第一幅图像重命名为1,则全部就都改为如图的文件名 附上程序#include #include #include using namespace std; using namespace cv; //define Width and原创 2017-09-24 10:43:04 · 344 阅读 · 0 评论 -
读写图片(改进)
之前在博客写了一种方法,虽然很实用,但是看起来很复杂 在学习中又探索到了新的方法,简单又实用 代码如下: char image_name[1000]; for (int i = 1; i <= count; i++) sprintf(image_name, "..\\pica\\7(%d).jpg", i); //放在当前文件夹pica中,图片顺序分别为7(1),7(2)原创 2017-11-07 20:24:53 · 225 阅读 · 0 评论