![](https://img-blog.csdnimg.cn/20191019154523623.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
OpenCV
文章平均质量分 87
机器视觉001
熟悉Visual C++、HALCON、机器视觉;10 年开发经验!
展开
-
Python: PyCharm中导入matplotlib时报错:“Backend Qt5Agg is interactive backend”的解决方案
Python: PyCharm中导入matplotlib时报错:“Backend Qt5Agg is interactive backend”的解决方案在使用PyCharm时,在PyCharm的Python Console中import matplotlib.pyplot as plt时,会出现:Backend Qt5Agg is interactive backend. Turning interactive mode on.或者其他跟Qt5Agg相关的错误,导致程序中断。虽然现在还不得而.原创 2020-12-07 14:44:52 · 4023 阅读 · 0 评论 -
Python: PIL基本代码
Python: PIL基本代码# 声明使用字符库# -*- coding: utf-8 -*-# 导入系统库import os# 导入文件读写库import io# 导入数学库import math# 导入 PIL 图像库(The Image Module)from PIL import Image# 导入 PIL 图像通道运算库(The ImageChops Module)from PIL import ImageChops# 导入 PIL 图像绘制库(The ImageDr原创 2020-12-05 09:52:04 · 965 阅读 · 0 评论 -
Python+OpenCV:OpenCV-Python绑定是如何工作的?
Python+OpenCV:OpenCV-Python绑定是如何工作的?目标How OpenCV-Python bindings are generated?How to extend new OpenCV modules to Python?How OpenCV-Python bindings are generated?In OpenCV, all algorithms are implemented in C++. But these algorithms can be used f原创 2020-12-03 10:53:51 · 349 阅读 · 0 评论 -
Python+OpenCV:训练级联分类器(Cascade Classifier Training)
Python+OpenCV:训练级联分类器(Cascade Classifier Training)IntroductionWorking with a boosted cascade of weak classifiers includes two major stages: the training and the detection stage.The detection stage using either HAAR or LBP based models, is described i原创 2020-12-03 10:31:46 · 1556 阅读 · 0 评论 -
Python+OpenCV:级联分类器(Cascade Classifier)
Python+OpenCV:级联分类器(Cascade Classifier)目标We will learn how the Haar cascade object detection works. We will see the basics of face detection and eye detection using the Haar Feature-based Cascade Classifiers. We will use thecv::CascadeClassifiercla..原创 2020-12-03 09:38:42 · 1795 阅读 · 0 评论 -
Python+OpenCV:高动态范围(High Dynamic Range, HDR)
Python+OpenCV:高动态范围(High Dynamic Range, HDR)目标Learn how to generate and display HDR image from an exposure sequence. Use exposure fusion to merge an exposure sequence.理论High-dynamic-range imaging (HDRI or HDR) is a technique used in imaging and pho原创 2020-12-02 22:18:29 · 2320 阅读 · 0 评论 -
Python+OpenCV:图像修复(Image Inpainting)
Python+OpenCV:图像修复(Image Inpainting)理论Most of you will have some old degraded photos at your home with some black spots, some strokes etc on it. Have you ever thought of restoring it back?We can't simply erase them in a paint tool because it is will原创 2020-12-02 09:48:52 · 2621 阅读 · 0 评论 -
Python+OpenCV:图像去噪(Image Denoising)
Python+OpenCV:图像去噪(Image Denoising)理论We have seen many image smoothing techniques like Gaussian Blurring, Median Blurring etc and they were good to some extent in removing small quantities of noise.In those techniques, we took a small neighbourhood a原创 2020-12-01 23:56:28 · 4229 阅读 · 0 评论 -
Python+OpenCV:K-Means聚类
Python+OpenCV:K-Means聚类目标Learn to usecv.kmeans()function in OpenCV for data clustering.理解参数输入参数:samples: It should be ofnp.float32data type, and each feature should be put in a single column. nclusters(K): Number of clusters required at end...原创 2020-12-01 17:07:44 · 597 阅读 · 0 评论 -
Python+OpenCV:理解K-Means聚类(K-Means Clustering)
Python+OpenCV:理解K-Means聚类(K-Means Clustering)理论We will deal this with an example which is commonly used.T-shirt size problemConsider a company, which is going to release a new model of T-shirt to market. Obviously they will have to manufacture mode原创 2020-12-01 15:59:08 · 606 阅读 · 0 评论 -
Python+OpenCV:基于SVM手写数据OCR(OCR of Hand-written Data using SVM)
Python+OpenCV:基于SVM手写数据OCR(OCR of Hand-written Data using SVM)dsize = 20affine_flags = lmc_cv.WARP_INVERSE_MAP | lmc_cv.INTER_LINEARbin_number = 16####################################################################################################原创 2020-12-01 15:41:31 · 342 阅读 · 0 评论 -
Python+OpenCV:理解支持向量机(SVM)
Python+OpenCV:理解支持向量机(SVM)理论线性可分数据(Linearly Separable Data)Consider the image below which has two types of data, red and blue.In kNN, for a test data, we used to measure its distance to all the training samples and take the one with minimum distanc原创 2020-12-01 14:33:38 · 446 阅读 · 0 评论 -
Python+OpenCV:基于KNN手写数据OCR(OCR of Hand-written Data using kNN)
Python+OpenCV:基于KNN手写数据OCR(OCR of Hand-written Data using kNN)OCR of Hand-written Digits##################################################################################################### 基于KNN手写数据OCR(OCR of Hand-written Data using kNN)def lmc_cv_原创 2020-11-30 11:31:05 · 347 阅读 · 0 评论 -
Python+OpenCV:理解k近邻(kNN)算法(k-Nearest Neighbour (kNN) algorithm)
Python+OpenCV:理解k近邻(kNN)算法(k-Nearest Neighbour (kNN) algorithm)理论kNN is one of the simplest classification algorithms available for supervised learning.The idea is to search for the closest match(es) of the test data in the feature space.We will lo原创 2020-11-30 10:39:56 · 718 阅读 · 0 评论 -
Python+OpenCV:立体图像深度图(Depth Map from Stereo Images)
Python+OpenCV:立体图像深度图(Depth Map from Stereo Images)理论If we have two images of same scene, we can get depth information from that in an intuitive way.Below is an image and some simple mathematical formulas which prove that intuition.The above diag原创 2020-11-27 20:15:40 · 2938 阅读 · 0 评论 -
Python+OpenCV:对极几何(Epipolar Geometry)
Python+OpenCV:对极几何(Epipolar Geometry)理论When we take an image using pin-hole camera, we loose an important information, ie depth of the image.Or how far is each point in the image from the camera because it is a 3D-to-2D conversion.So it is an impor原创 2020-11-27 16:57:04 · 1985 阅读 · 0 评论 -
Python+OpenCV:姿态估计(Pose Estimation)
Python+OpenCV:姿态估计(Pose Estimation)##################################################################################################### 姿态估计(Pose Estimation)def lmc_cv_pose_estimation(method): """ 函数功能: 姿态估计(Pose Estimation)。 """原创 2020-11-27 15:48:58 · 2118 阅读 · 0 评论 -
Python+OpenCV:摄像机标定(Camera Calibration)
Python+OpenCV:摄像机标定(Camera Calibration)理论Some pinhole cameras introduce significant distortion to images. Two major kinds of distortion are radial distortion (径向畸变)and tangential distortion (切向畸变).Radial distortion causes straight lines to appear cu.原创 2020-11-26 21:57:39 · 4420 阅读 · 0 评论 -
Python+OpenCV:Optical Flow(光流)
Python+OpenCV:Optical Flow(光流)理论Optical flow is the pattern of apparent motion of image objects between two consecutive frames caused by the movement of object or camera.It is 2D vector field where each vector is a displacement vector showing the mov原创 2020-11-26 20:56:00 · 2728 阅读 · 0 评论 -
Python+OpenCV:Meanshift and Camshift
Python+OpenCV:Meanshift and CamshiftMeanshiftConsider you have a set of points. (It can be a pixel distribution like histogram backprojection).You are given a small window (may be a circle) and you have to move that window to the area of maximum pixe原创 2020-11-26 18:57:31 · 370 阅读 · 0 评论 -
Python+OpenCV:How to Use Background Subtraction Methods
Python+OpenCV:How to Use Background Subtraction MethodsBackground subtraction (BS) is a common and widely used technique for generating a foreground mask (namely, a binary image containing the pixels belonging to moving objects in the scene) by using sta原创 2020-11-26 08:01:45 · 454 阅读 · 0 评论 -
Python+OpenCV:Feature Matching + Homography to find Objects
Python+OpenCV:Feature Matching + Homography to find Objects##################################################################################################### 图像特征匹配(Feature Matching with Homography)def lmc_cv_image_feature_matching_homography():原创 2020-11-25 23:45:18 · 363 阅读 · 0 评论 -
Python+OpenCV:特征匹配(Feature Matching)
Python+OpenCV:特征匹配(Feature Matching)Basics of Brute-Force MatcherBrute-Force matcher is simple. It takes the descriptor of one feature in first set and is matched with all other features in second set using some distance calculation. And the closest on原创 2020-11-25 23:33:34 · 1871 阅读 · 0 评论 -
Python+OpenCV:ORB: An efficient alternative to SIFT or SURF
Python+OpenCV:ORB: An efficient alternative to SIFT or SURF理论As an OpenCV enthusiast, the most important thing about the ORB is that it came from "OpenCV Labs".This algorithm was brought up by Ethan Rublee, Vincent Rabaud, Kurt Konolige and Gary R. B原创 2020-11-25 22:50:35 · 324 阅读 · 0 评论 -
Python+OpenCV:图像二进制鲁棒独立基本特征(BRIEF, Binary Robust Independent Elementary Features)
Python+OpenCV:图像二进制鲁棒独立基本特征(BRIEF, Binary Robust Independent Elementary Features)理论We know SIFT uses 128-dim vector for descriptors. Since it is using floating point numbers, it takes basically 512 bytes.Similarly SURF also takes minimum of 256 bytes .原创 2020-11-25 22:26:23 · 392 阅读 · 0 评论 -
Python+OpenCV:图像快速角点检测算法(FAST Algorithm for Corner Detection)
Python+OpenCV:图像快速角点检测算法(FAST Algorithm for Corner Detection)理论Feature Detection using FASTSelect a pixelpin the image which is to be identified as an interest point or not. Let its intensity beIp. Select appropriate threshold valuet. Conside...原创 2020-11-25 22:05:01 · 884 阅读 · 0 评论 -
Python+OpenCV:尺度不变特征变换(SIFT)的加速健壮特性(SURF)
Python+OpenCV:尺度不变特征变换(SIFT)的加速健壮特性(SURF)理论In SIFT, Lowapproximated Laplacian of Gaussian with Difference of Gaussian for finding scale-space.SURF goes a little further and approximates LoG with Box Filter.Below image shows a demonstration of such.原创 2020-11-25 21:36:20 · 596 阅读 · 0 评论 -
Python+OpenCV:尺度不变特征变换 (SIFT, Scale-Invariant Feature Transform)
Python+OpenCV:尺度不变特征变换 (SIFT, Scale-Invariant Feature Transform)理论A corner in a small image within a small window is flat when it is zoomed in the same window. So Harris corner is not scale invariant.SIFT算法主要包括五个步骤:1. Scale-space Extrema Detectio原创 2020-11-25 16:49:01 · 678 阅读 · 0 评论 -
Python+OpenCV:图像Shi-Tomasi角点检测器
Python+OpenCV:图像Shi-Tomasi角点检测器理论The scoring function in Harris Corner Detector was given by:Instead of this, Shi-Tomasi proposed:If it is a greater than a threshold value, it is considered as a corner. If we plot it in λ1−λ2 space as we did in H原创 2020-11-24 16:47:40 · 339 阅读 · 0 评论 -
Python+OpenCV:图像Harris角点检测(Harris Corner Detection)
Python+OpenCV:图像Harris角点检测(Harris Corner Detection)理论corners are regions in the image with large variation in intensity in all the directions.It basically finds the difference in intensity for a displacement of(u,v)in all directions. This is expres..原创 2020-11-22 23:46:34 · 2036 阅读 · 0 评论 -
Python+OpenCV:交互式图像前景提取(Interactive Foreground Extraction using GrabCut Algorithm)
Python+OpenCV:交互式图像前景提取(Interactive Foreground Extraction using GrabCut Algorithm)##################################################################################################### 交互式图像前景提取(Interactive Foreground Extraction using GrabCut Algorithm)原创 2020-11-20 21:59:18 · 489 阅读 · 0 评论 -
Python+OpenCV:基于分水岭算法的图像分割(Image Segmentation with Watershed Algorithm)
Python+OpenCV:基于分水岭算法的图像分割(Image Segmentation with Watershed Algorithm)##################################################################################################### 基于分水岭算法的图像分割(Image Segmentation with Watershed Algorithm)def lmc_cv_image_segm原创 2020-11-20 17:42:46 · 1344 阅读 · 0 评论 -
Python+OpenCV:Hough圆检测(Hough Circle Transform)
Python+OpenCV:Hough圆检测(Hough Circle Transform)##################################################################################################### Hough圆检测(Hough Circle Transform)def lmc_cv_image_hough_circle_transform(): """ 函数功能: Hough圆原创 2020-11-16 22:37:26 · 1152 阅读 · 0 评论 -
Python+OpenCV:Hough直线检测(Hough Line Transform)
Python+OpenCV:Hough直线检测(Hough Line Transform)理论A line can be represented asor in a parametric form, aswhereρis the perpendicular distance(垂直距离) from the origin to the line,andθis the angle formed by this perpendicular line and the horizontal ...原创 2020-11-16 21:56:38 · 1127 阅读 · 0 评论 -
Python+OpenCV:模板匹配(Template Matching)
Python+OpenCV:模板匹配(Template Matching)Template Matching with Single Objects##################################################################################################### 图像模板匹配(Template Matching)def lmc_cv_image_template_matching(): """原创 2020-11-16 21:02:10 · 1359 阅读 · 0 评论 -
Python+OpenCV:傅里叶变换(Fourier Transform)
Python+OpenCV:傅里叶变换(Fourier Transform)Fourier Transform in NumpyNumpy has an FFT package to do Fourier Transform.np.fft.fft2()provides us the frequency transform which will be a complex array.Its first argument is the input image, which is graysca.原创 2020-11-16 10:28:33 · 793 阅读 · 0 评论 -
Python+OpenCV:直方图反向投影(Histogram Backprojection)
Python+OpenCV:直方图反向投影(Histogram Backprojection)Algorithm in Numpy1. First we need to calculate the color histogram of both the object we need to find (let it be 'M') and the image where we are going to search (let it be 'I').import numpy as npimpor原创 2020-11-15 18:37:18 · 428 阅读 · 0 评论 -
Python+OpenCV:二维直方图(2D Histograms)
Python+OpenCV:二维直方图(2D Histograms)##################################################################################################### 图像二维直方图(Image 2D Histograms)def lmc_cv_image_2d_histograms(): """ 函数功能: 图像二维直方图(Image 2D Histograms)。原创 2020-11-15 17:52:25 · 1358 阅读 · 0 评论 -
Python+OpenCV:图像对比度受限自适应直方图均衡化(CLAHE, Contrast Limited Adaptive Histogram Equalization)
Python+OpenCV:图像对比度受限自适应直方图均衡化(CLAHE, Contrast Limited Adaptive Histogram Equalization)##################################################################################################### 图像对比度受限自适应直方图均衡化(CLAHE, Contrast Limited Adaptive Histogram Equ原创 2020-11-15 15:52:14 · 1357 阅读 · 0 评论 -
Python+OpenCV:直方图均衡化(Histogram Equalization)
Python+OpenCV:直方图均衡化(Histogram Equalization)##################################################################################################### 图像直方图均衡化(Image Histogram Equalization)def lmc_cv_image_histogram_equalization(): """ 函数功能: 图像原创 2020-11-15 15:43:54 · 808 阅读 · 0 评论