随笔分类 - openCV
摘要:测试opencv 图像修复函数inpaint #include <opencv2/opencv.hpp> #include <iostream> int main() { //// 加载图像 // cv::Mat image = cv::imread("D:/material0000.png", c
阅读全文
摘要:分割 vector<Mat> channels; split(image1, channels);//分割image1的通道 split(imageROI2, channels); Mat channels1 = channels[0];//获取通道1 Mat channels2 = channel
阅读全文
摘要:水平镜像 #include <opencv2/opencv.hpp> using namespace cv; int main() { /*载入图像并显示*/ Mat img = imread("C:\\Users\\Yang\\Desktop\\0.bmp", 0); Mat newImg = M
阅读全文
摘要:1、创建图像 image=numpy.zeros((height,width),dtype=numpy.uint8) 2、遍历像素值 import cv2 import numpy as np def access_pixel(img): print(img.shape) height = img.
阅读全文
摘要:#!/usr/bin/python3 # -*- coding: UTF-8 -*- import struct import os # noinspection PyUnresolvedReferences import zlib # noinspection PyUnresolvedRefere
阅读全文
摘要:opencv图像操作常见方法 一、图像初始化方法 Mat M(100,100,CV_8UC3,Scalar(0,0,255)); //彩色图像初始化 Mat M(100,100,CV_8UC1,255); //单通道图像初始化 Mat dst; ///* //深拷贝图像 dst = src.clon
阅读全文
摘要:灰度图单通道实现:for (int i = 0; i < srcImg.rows; i++) { uchar *srcData = srcImg.ptr<uchar>(i); for (int j = 0; j < srcImg.cols; j++) { dstImg.at<uchar>(i, j)
阅读全文
摘要:1、openGL安装 sudo apt-get install build-essential libgl1-mesa-dev sudo apt-get install freeglut3-dev sudo apt-get install libglew-dev libsdl2-dev libsdl
阅读全文
摘要:基于opencv 霍夫变化后 直线融合: 总结:利用“线段自优化”的思想。
阅读全文