随笔分类 - opencv
摘要:# -*- coding: utf-8 -*- import os import subprocess import threading import time import tkinter from tkinter import TOP, LEFT, RIGHT, messagebox, file
阅读全文
摘要:import cv2 import subprocess input_video_path = "/home/navy/Desktop/1.mp4" opencv_video_path = "/home/navy/Desktop/2.mp4" new_video_path = "/home/navy
阅读全文
摘要:#include <opencv2/opencv.hpp> #include <iostream> #include <thread> using namespace cv; using namespace std; void getCameraInfo(int cameraId) { VideoC
阅读全文
摘要:main.cpp #include <istream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; Mat src, gray_src, dst; int threshold_value = 127;
阅读全文
摘要:main.cpp #include <istream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char **argv) { Mat src, up_dst,
阅读全文
摘要:main.cpp #include <istream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char **argv) { Mat src, gray_dst
阅读全文
摘要:main.cpp #include <istream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char **argv) { Mat src, open_dst
阅读全文
摘要:main.cpp #include <istream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char **argv) { Mat src, open_dst
阅读全文
摘要:main.cpp #include <istream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int dilate_size = 1; char dilate_title[] = "dilate_
阅读全文
摘要:main.cpp #include <istream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char **argv) { Mat src, blur_dst
阅读全文
摘要:#include <istream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char **argv) { Mat src; // 加载图片 src = imr
阅读全文
摘要:#include <istream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char **argv) { Mat src, dst; // 加载图片 src
阅读全文
摘要:#include <cstdio> #include <opencv2/opencv.hpp> using namespace cv; int main(int argc, char **argv) { Mat image1, image2, dst; // 加载图片 image1 = imread
阅读全文
摘要:main.cpp #include <cstdio> #include <opencv2/opencv.hpp> using namespace cv; int main(int argc, char **argv) { Mat image; // 加载图片 image = imread("../.
阅读全文
摘要:CMakeLists.txt cmake_minimum_required(VERSION 2.8) project(first) find_package(OpenCV REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS}) add_execut
阅读全文
摘要:1.Scalar是四维点类 2.Size是尺寸类 3.Rect是矩形类 4.cvtColor()函数是颜色空间转换函数,第一个参数是输入图像,第二个参数是输出图像,第三个参数是颜色空间标示符,第四个参数是目标图像的通道数 enum ColorConversionCodes { COLOR_BGR2B
阅读全文
摘要:创建二维点 Point2f p(6,6); cout<<p<<endl; 创建三位点 Point3f p1(1,2,3); cout<<p1<<endl;
阅读全文
摘要:Mat E = Mat::eye(2,2,CV_16F); cout<<"默认风格:\n"<<E<<endl; cout<<"默认风格:\n"<<format(E,Formatter::FMT_DEFAULT)<<endl; cout<<"Python风格:\n"<<format(E,Formatt
阅读全文
摘要:显式创建Mat矩阵的七种方法 1.使用Mat()构造方法创建 //参数:行数,列数,数据类型及通道数,每块的数据 //数据类型及通道数:CV_[位数][是否有符号][数据类型]C[通道数] Mat m(288,288,CV_8UC3,Scalar(0,0,255)); 2.多维度的使用Mat()构造
阅读全文
摘要:图像主要是基于矩阵格式排列的,因此OpenCV中矩阵操作非常重要; 本文总结了: 矩阵的创建; 矩阵初始化; 矩阵运算; 矩阵乘法; 矩阵转置; 矩阵的逆;等操作; 1.OpenCV矩阵的创建: 创建矩阵需要知道矩阵的尺寸大小和数据类型; 矩阵尺寸大小:就是m行n列;Size(5,5); 矩阵数据类
阅读全文