
opencv
光子乘羽
我从来没有长大,也从来没有停止过成长。
展开
-
OpenCV读取视频图像并保存
#include <iostream>#include <opencv2/opencv.hpp>using namespace std;using namespace cv;void main(){ VideoCapture cap; cap.open("C:/Users/Win10/Downloads/live2.avi"); //打开视频,以上两句等价于VideoCapture cap("E ://2.avi"); //cap.open("http://ww.原创 2021-05-31 14:56:24 · 244 阅读 · 4 评论 -
OpenCV同时打开3个摄像头并保存为视频
#include <opencv2/opencv.hpp>#include<iostream>using namespace cv;using namespace std;int main(){ //initialize and allocate memory to load the video stream from camera VideoCapture camera1(1 + cv::CAP_DSHOW); /*camera1.set(CAP_PROP_.原创 2021-05-11 10:47:08 · 829 阅读 · 6 评论 -
OpenCV样例calibration
1. 将图片地址写入到xml创建工程,运行一下文件:C:\Program Files\opencv\sources\samples\cpp\imagelist_creator.cppcmd运行:cd至\工程目录\x64\Debug>,命令:.\工程名.exe imagelist.yaml .rgb1.png rgb2.png rgb3.png rgb4.png rgb5.png rgb6.png rgb7.png rgb8.png rgb9.png rgb10.png rgb11.p.原创 2021-01-01 15:58:30 · 1628 阅读 · 4 评论 -
realsense鼠标点击彩色深度图获取对应位置3D信息
realsense鼠标点击彩色深度图获取对应位置深度// License: Apache 2.0. See LICENSE file in root directory.// Copyright(c) 2017 Intel Corporation. All Rights Reserved.#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API#include <opencv2/openc.原创 2020-12-31 11:10:49 · 810 阅读 · 0 评论 -
realsense鼠标截取彩色深度图区域保存3D信息至csv
realsense鼠标截取彩色深度图区域保存深度信息至csv// License: Apache 2.0. See LICENSE file in root directory.// Copyright(c) 2017 Intel Corporation. All Rights Reserved.#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API#include <opencv2/op原创 2020-12-31 11:00:28 · 277 阅读 · 0 评论 -
realsense鼠标选择区域保存深度信息到csv文件
realsense鼠标选择区域保存深度信息到csv文件// License: Apache 2.0. See LICENSE file in root directory.// Copyright(c) 2017 Intel Corporation. All Rights Reserved.#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API#include <opencv2/openc原创 2020-12-30 14:52:03 · 288 阅读 · 0 评论 -
realsense鼠标点击深度图获取对应位置深度
realsense鼠标点击深度图获取对应位置深度// License: Apache 2.0. See LICENSE file in root directory.// Copyright(c) 2017 Intel Corporation. All Rights Reserved.#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API#include <opencv2/opencv..原创 2020-12-29 21:03:36 · 1571 阅读 · 3 评论 -
摁下p键,保存realsense的rgb、depth和两个IR红外各一张图至工程所在文件夹
实现功能:1. 获取realsense设备的 rgb、depth和两个IR红外视频流;2.摁下p键,保存rgb、depth和两个IR红外各一张图至工程所在文件夹;// License: Apache 2.0. See LICENSE file in root directory.// Copyright(c) 2017 Intel Corporation. All Rights Reserved.#include <librealsense2/rs.hpp> // Inclu原创 2020-12-28 21:20:04 · 885 阅读 · 2 评论 -
OpenCV读取pgm文件并显示
#include <iostream>#include <opencv2/opencv.hpp>using namespace std;using namespace cv;void main(){ Mat img = imread("C:\\Users\\Win10\\Downloads\\rasterImg.pgm", 0); if (empty(img)) { cout<<"NULL"; return; } normaliz..原创 2020-09-04 20:25:59 · 3711 阅读 · 0 评论 -
两张RGB合成pcl深度图像-ssd(平方差之和)块匹配算法
参考:https://github.com/IntelRealSense/librealsense/blob/development/doc/depth-from-stereo.mdStereoscopic VisionDepth from Stereo is a classic computer vision algorithm inspired by human binocula...原创 2019-10-18 19:44:16 · 1585 阅读 · 0 评论 -
改变图像的对比度和亮度(saturate_cast 防溢出)
http://www.opencv.org.cn/opencvdoc/2.3.2/html/doc/tutorials/core/basic_linear_transform/basic_linear_transform.html#basic-linear-transform 两种常用的点过程(即点算子),是用常数对点进行 乘法 和 加法 运算: 两个参数 和 一般称作 ...原创 2019-08-31 11:25:20 · 512 阅读 · 0 评论 -
在VS2019上运行OpenPose样例
环境:vs2019,python3.7,opencv4.1.1代码来源:https://www.learnopencv.com/multi-person-pose-estimation-in-opencv-using-openpose/下载:https://github.com/spmallick/learnopencv/blob/master/OpenPose-Multi-Person/...原创 2019-08-16 20:20:08 · 1900 阅读 · 0 评论 -
opencv处理视频,resize然后取中间ROI,保存成一张张有序号图像
#include <iostream>#include <opencv2/opencv.hpp>using namespace std;using namespace cv;void main() { VideoCapture cap; cap.open("C:\\Users\\87035\\Desktop\\安全帽视频\\V90726-094954...原创 2019-07-26 20:19:40 · 975 阅读 · 2 评论 -
win10 VisualStudio2019配置OpenCV4.1.1
opencv-python的安装创建一个python项目,视图-其他窗口-python环境,右面概述选改为包(PyPI)。在搜索框里输入opencv-python,在下拉框选择 运行命令:pip install tensorflow-gpu。开始安装。C++版本的安装https://blog.youkuaiyun.com/m0_37360684/article/details/89716881...原创 2019-07-26 18:56:59 · 1290 阅读 · 0 评论 -
primesense_Warning: USB events thread - failed to set priority. This might cause loss of data...
sudo -s再roslaunch openni2_launch openni2.launch原创 2017-02-24 20:16:36 · 4303 阅读 · 0 评论 -
primesense_No matching device found.... waiting for devices. Reason: openni2
修改GlobalDefaults.ini配置文件$ sudo gedit /etc/openni/GlobalDefaults.ini 将第60行前面的分号去掉(即取消注释);UsbInterface=2再次尝试运行openni2.launch ,如果不行还需要重启一下电脑原创 2017-02-24 20:01:33 · 1502 阅读 · 0 评论 -
ROS_OpenCV+PCL程序
1.创建ROS程序包cd catkin_wscatkin_create_pkg ImgPcl std_msgs rospy roscpp sensor_msgs cv_bridge image_transport pcl_conversions pcl_ros pcl_msgscd ImgPclmkdir src//在此创建.cpp文件3。添加P原创 2016-08-25 15:48:36 · 1463 阅读 · 0 评论 -
笔记ROS_face recognition using Kinect
http://wiki.ros.org/face_recognition$ cd ~/catkin_ws/src$ git clone https://github.com/procrob/procrob_functional.git --branch catkin //下载程序包,完成后可见在 cd ~/catkin_ws/src下有procrob_functional文件夹$ cd原创 2016-05-20 18:21:57 · 1103 阅读 · 0 评论 -
ROS_OpenCV2_MatchTemplate模板匹配
给一张图片,在视野中找到。获取物体的二维坐标。语音相关的话题注释掉了。//给一个物体,在视野中查找#include #include #include #include #include #include #include #include #include原创 2016-03-24 21:30:07 · 1359 阅读 · 0 评论 -
Ros_OpenCV_cascade分类器检测程序
//Includes all the headers necessary to use the most common public pieces of the ROS system. #include //Use image_transport for publishing and subscribing to images in ROS #include原创 2016-03-16 19:14:49 · 802 阅读 · 0 评论 -
Ros_Opencv_摁下P键获取一定大小图片_显示矩形框
//Includes all the headers necessary to use the most common public pieces of the ROS system. #include //Use image_transport for publishing and subscribing to images in ROS #include原创 2016-03-16 15:19:30 · 699 阅读 · 0 评论 -
Ros_OpenCV_socket_客户端程序_与语音结合训练与测试图像
//Includes all the headers necessary to use the most common public pieces of the ROS system.#include //Use image_transport for publishing and subscribing to images in ROS#include //Use cv_brid原创 2016-03-16 13:18:26 · 1454 阅读 · 0 评论 -
ROS_Hydro_OpenCV2_用鼠标选择图像区域,并保存1,2,3...
ImgCapMouse.cpp文件#include #include #include #include #include #include #include "opencv2/video/tracking.hpp" #include #include #include using namespace cv; u原创 2016-03-10 10:20:17 · 1395 阅读 · 6 评论 -
安装设备 PrimeSense 1.09_openni2
安装openni2-camera和openni2-launchsudo apt-get install ros-hydro-openni2-camerasudo apt-get install ros-hydro-openni2-launch安装一些依赖$ sudo apt-get install git g++ make python libusb-1.0-0-dev l原创 2016-03-01 18:41:31 · 2652 阅读 · 0 评论 -
ROS_OpenCV_socket客户端发送kinect图像及接受图像
//Includes all the headers necessary to use the most common public pieces of the ROS system.#include //Use image_transport for publishing and subscribing to images in ROS#include //Use cv_brid原创 2016-01-26 18:50:52 · 947 阅读 · 1 评论 -
ROS_OpenCV_socket客户端传送图像
//Includes all the headers necessary to use the most common public pieces of the ROS system.#include //Use image_transport for publishing and subscribing to images in ROS#include //Use cv_bridge t原创 2016-01-25 17:12:08 · 653 阅读 · 0 评论 -
ROS_OpenCV_socket传送图像_结果不对
//Includes all the headers necessary to use the most common public pieces of the ROS system.#include //Use image_transport for publishing and subscribing to images in ROS#include //Use cv_bridge t原创 2016-01-25 17:03:10 · 1217 阅读 · 0 评论 -
ros_opencv按下键p获取一张视野中央大小一定的kinect图像并传送整型的imageNumber话题
imageCapture.cpp//Includes all the headers necessary to use the most common public pieces of the ROS system.#include //Use image_transport for publishing and subscribing to images in ROS#include原创 2016-01-23 18:27:07 · 1246 阅读 · 0 评论 -
ros_opencv_按下键p从kinect获取一张一定大小的图片并处理
//Includes all the headers necessary to use the most common public pieces of the ROS system.#include //Use image_transport for publishing and subscribing to images in ROS#include //Use cv_bridge t原创 2016-01-22 12:09:32 · 1667 阅读 · 0 评论 -
ros_hydro_Opencv_with_Kinect_camshiftdemo.cpp
ros下的camshiftdemo.cpp//Includes all the headers necessary to use the most common public pieces of the ROS system.#include //Use image_transport for publishing and subscribing to images in ROS#inc原创 2015-12-21 17:50:14 · 1534 阅读 · 2 评论 -
OpenCV2用均值漂移(Mean Shift)查找物体
colorhistogram.h#if !defined COLHISTOGRAM#define COLHISTOGRAM#include #include class ColorHistogram { private: int histSize[3];float hranges[2]; const float* r原创 2015-12-10 10:30:25 · 1325 阅读 · 0 评论 -
object_recognition
http://wg-perception.github.io/object_recognition_core/http://wg-perception.github.io/object_recognition_core/install.html#install到下面一命令出错:cd .. && rosdep install --from-paths src -i -yE原创 2015-12-07 20:55:22 · 1709 阅读 · 0 评论 -
ros_kinect人脸识别face_recognition
1.下载$ cd ~/catkin_ws/src$ git clone https://github.com/procrob/procrob_functional.git --branch catkin$ cd ~/catkin_ws$ catkin_make$ source ~/catkin_ws/devel/setup.bash1.1文件说明:data文原创 2015-12-07 15:31:19 · 6425 阅读 · 5 评论 -
ros_hydro_OpenCV_kinect_imageconverter
1.创建好的工作空间catkin_ws2.创建程序包beginner_opencv,注意其依赖项 cd ~/catkin_ws/srcatkin_create_pkg beginner_opencv sensor_msgs cv_bridge roscpp std_msgs image_transport3.编写节点image_converter.cpp及相关配置原创 2015-12-04 00:25:57 · 1207 阅读 · 0 评论 -
基于直方图的匹配_视频流
#include #include #include #include #include #include #include using namespace cv; using namespace std; MatND getHistogram(Mat &img)//得到直方图 { int chann原创 2015-11-18 20:54:37 · 555 阅读 · 0 评论 -
模板匹配_从图片到视频流
还是先上我的程序吧,实现了对视频流的匹配,在视频中标出目标物体的位置并计算出物体所在的中心坐标:#include #include #include #include #include #include #include using namespace cv; using namespace std; int m原创 2015-11-05 17:32:48 · 2392 阅读 · 0 评论 -
opencv基于直方图实现图像检索匹配
#include #include #include #include #include #include using namespace cv; using namespace std; MatND getHistogram(Mat &img)//得到直方图 { int channels[]={0};//考察0通道 in原创 2015-10-14 22:29:19 · 1689 阅读 · 0 评论 -
动态手跟踪
原理是:背景差分+肤色检测。背景差分:取前30帧图像取平均值,计算前30帧之差的和,再求均值。在背景平均值上下浮动的阈值之外的被检测出来。肤色检测:利用YCrCb空间。两个结果相与操作。这种方式的优点:1.有效解决了肤色检测结果中总是检测到人脸的情况; 2.解决背景差分检测结果杂乱的情况;转载 2015-05-21 11:11:47 · 815 阅读 · 2 评论 -
C++实现基于离散Hopfield神经网络噪声数字的识别
#include#include"math.h"#include #include #include #include using namespace cv;using namespace std;#define P 7#define N 120int W[N][N]={0};int u[P][N]={ { -1,-1,-1,1,1,1,1,-1,-1,-1,原创 2014-12-20 01:09:42 · 2682 阅读 · 4 评论 -
opencv2实现路线路牌检测_计算机视觉大作业2终版
main.cpp#include#include #include #include #include #include #include #include "linefinder.h"#include#include using namespace cv;using namespace std;int main(){ stringstream ss;原创 2014-12-16 15:32:48 · 2599 阅读 · 2 评论