
opencv
8BitCat
爱生活,积极向上,喜欢钻研。
展开
-
Ubuntu系统opencv4.4 opencv_contribute安装常见问题
安装下载opencv4.0.1及contribute模块https://github.com/opencv/opencv/releases/tag/4.0.1https://github.com/opencv/opencv_contrib/releases/tag/4.0.1更换国内源使用 ubuntu 原生源下载速度,可替换为国内源,提升下载速度备份 ubuntu 原生源sudo cp /etc/apt/sources.list /etc/apt/sources.list原创 2021-01-28 11:44:41 · 474 阅读 · 0 评论 -
三维点直线拟合
#include <opencv2/opencv.hpp>int main(){ cv::Vec6f& line std::vector<cv::Point3d> points; folat a = 0.1; folat b = 0.2; folat c = 0.3; folat x0 = 8; folat y0 = 9; folat z0 = 10; for(int z = 0;z<1000...原创 2020-12-14 10:05:03 · 1643 阅读 · 0 评论 -
opencv 常用操作 c++
cv::vconcat(B,C,A); // 等同于A=[B ;C]cv::hconcat(B,C,A); // 等同于A=[B C]原创 2020-12-09 15:15:03 · 338 阅读 · 0 评论 -
计算图像的直方图,求峰值点
程序步骤:1.输入图像2.灰度化3.计算直方图4.求峰值点#include "../LaneDetecte_SRC/detector_lane.hpp"#include "../common_src/unity.hpp"#include "../common_src/common_func.hpp"#include <chrono>#include <thread>#include <opencv2/opencv.hpp>int原创 2020-12-07 16:48:57 · 3054 阅读 · 0 评论 -
opencv 读取CV_16U图像 c++
cv::Mat depthImage = cv::imread("../data1/depth0.png",-1);原创 2020-07-16 10:26:42 · 1844 阅读 · 0 评论 -
OpenCV中cornerSubPixel()亚像素求精原理
采用的方法为最小二乘法:首先我们要构建以下方程:我们讨论角点的情况:q是我们要求的角点p0和p1为q周围的点(q-pi)为一个向量Gi为pi处的梯度所以满足一下公式Gi*(q-pi)=0有以下两种情况:(1)p0处的梯度为0,虽然(q-pi)不为0(2)p1处(q-pi)和p1处的梯度垂直,因此乘积为0.Gi*(q-pi)=0我们写成最小...原创 2020-03-09 21:10:17 · 3228 阅读 · 0 评论 -
CV_LOAD_IMAGE_COLOR 和 CV_BGR2RGBA找不到定义
添加下面头文件#include "opencv2/imgcodecs/legacy/constants_c.h"#include "opencv2/imgproc/types_c.h"原创 2020-01-13 18:52:52 · 4890 阅读 · 1 评论 -
视觉算法算法
https://github.com/rayryeng/XiaohuLuVPDetectionhttps://xiaohulugo.github.io/papers/Vanishing_Point_Detection_WACV2017.pdf三维重建http://staff.ustc.edu.cn/~lgliu/pnp问题:https://github.com/ydsf1...原创 2019-10-10 11:02:57 · 2973 阅读 · 0 评论 -
windows 安装tensorflow2.0
预先装好python然后在命令行输入:gpu版本:需要预先装好:cuda 和cudnn 才能使用。pip install numpy pandas matplotlib sklearn tensorflow-GPU==2.0.0-alpha0 -i https://pypi.doubanio.com/simplecpu 版本:alpha0 :pip inst...原创 2019-08-19 23:18:33 · 621 阅读 · 0 评论 -
opencv 图像访问索引
//单通道获取 Scalar intensity = img.at<uchar>(y, x);//行 列 Scalar intensity = img.at<uchar>(Point(x, y)); 0 =< intensity.val[0] <= 255. // 多通道获取 8u Vec3b intensity = img.at...原创 2019-07-31 19:51:30 · 1517 阅读 · 0 评论 -
opencv 读取usb(uvc)摄像头和显示 c++
#include <opencv2/opencv>#include <iostream>using namespace std;using namespace cv;int main(){ VideoCapture camera(0) if(!camera.isOpened()) { std::cout<&l...原创 2019-07-26 10:05:07 · 7044 阅读 · 0 评论 -
“CV_RGB2BGR”: 未声明的标识符
#include "opencv2/imgproc/types_c.h"添加以上头文件原创 2019-07-11 10:44:55 · 9080 阅读 · 1 评论 -
opencv实现几幅图像拼接成一整幅大图
opencv实现几幅图像拼接成一整幅大图标签: 博客opencv2013-10-22 12:05 9846人阅读 评论(3)收藏举报本文章已收录于:分类: opencv(14) 作者同类文章X版权声明:本文为博主原创文章,未经博主允许不得转载。开始尝试merge函数,转载 2017-04-23 20:58:52 · 18780 阅读 · 0 评论 -
opencv mat数据剪裁感兴趣的部分处理方法
opencv mat原创 2017-04-23 18:01:09 · 5901 阅读 · 0 评论 -
关于python 和C++使用cv画矩形并填充颜色同时填充文字
python:font = cv2.FONT_HERSHEY_SIMPLEX # 使用默认字体 cv2.rectangle(im, (10, 10), (110, 110), (0, 0, 255), thickness=2) # cv2.floodFill() cv2.rectangle(im, (11原创 2017-06-16 15:24:54 · 3305 阅读 · 0 评论 -
Python-OpenCV设置摄像头分辨率
opencv转载 2017-06-07 10:43:27 · 5019 阅读 · 0 评论 -
ubuntu16.04下安装opencv3.2版本
ubuntu opencv转载 2017-06-03 16:44:06 · 1224 阅读 · 0 评论 -
IplImage* cvmat* mat 释放
IplImage* c_left;cvReleaseImage(&c_left);cvmat* img1r;cvReleaseMat(&img1r);mat img2;img2.release();原创 2017-06-08 15:34:35 · 527 阅读 · 0 评论 -
linux下gcc编译使用opencv的源文件时报错的处理:undefined reference to symbol '_ZNSsD1Ev@@GLIBCXX_3.4'
这阵子用OpenCV的sift做了一下匹配,在使用gcc编译时遇到这样的一个报错 /usr/bin/ld: /tmp/cceCEx1F.o: undefined reference to symbol '_ZNSsD1Ev@@GLIBCXX_3.4' //usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols:转载 2017-07-05 16:49:28 · 2487 阅读 · 0 评论 -
opencv Mat常用操作
裁剪:int x = 50;int y = 50;int width = 50;int height = 50;cv::Rect rect(x, y, width, height);Mat temp(img, rect);水平和垂直拼接:Mat combine,combine1,combine2;hconcat(a,b,combine1);hconcat(...原创 2019-07-02 15:24:10 · 718 阅读 · 0 评论 -
把图片存成视频 python
tips:1.保存的图片大小一定要一样2.图像做好是标准的视频格式大小3.图片要和视频size一样大小代码如下# -*- coding:utf8 -*-import osimport cv2import numpy as npimport cv2.cv as cvpath = '/home/m/mycode/cv'filelist = os.li原创 2017-05-12 08:52:03 · 7007 阅读 · 2 评论