OpenCV

What's the theory behind computing variance of an image?

萝らか妹 提交于 2020-12-29 06:07:33
问题 I am trying to compute the blurriness of an image by using LaplacianFilter. According to this article: https://www.pyimagesearch.com/2015/09/07/blur-detection-with-opencv/ I have to compute the variance of the output image. The problem is I don't understand conceptually how do I compute variance of an image. Every pixel has 4 values for every color channel, therefore I can compute the variance of every channel, but then I get 4 values, or even 16 by computing variance-covariance matrix, but

Template matching with multiple source images in OpenCV and Python

末鹿安然 提交于 2020-12-29 04:57:37
问题 The following is the code in Python and OpenCV for image detection using template matching import numpy as np import cv2 image = cv2.imread('photo.jpg') template = cv2.imread('template.jpg') # resize images image = cv2.resize(image, (0,0), fx=0.5, fy=0.5) template = cv2.resize(template, (0,0), fx=0.5, fy=0.5) # Convert to grayscale imageGray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) templateGray = cv2.cvtColor(template, cv2.COLOR_BGR2GRAY) # Find template result = cv2.matchTemplate(imageGray

Template matching with multiple source images in OpenCV and Python

℡╲_俬逩灬. 提交于 2020-12-29 04:57:33
问题 The following is the code in Python and OpenCV for image detection using template matching import numpy as np import cv2 image = cv2.imread('photo.jpg') template = cv2.imread('template.jpg') # resize images image = cv2.resize(image, (0,0), fx=0.5, fy=0.5) template = cv2.resize(template, (0,0), fx=0.5, fy=0.5) # Convert to grayscale imageGray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) templateGray = cv2.cvtColor(template, cv2.COLOR_BGR2GRAY) # Find template result = cv2.matchTemplate(imageGray

工具---《.264视频 转成 MP4视频》

*爱你&永不变心* 提交于 2020-12-29 03:17:01
《.264 视频 转成 MP4 视频》 安装了“爱奇艺万能播放器”可以打开.264视频,但是opencv却不能直接读取.264视频,还是需要想办法“.264视频 转成 MP4/avi视频”。 折腾大半天,装了卸载,卸载的再装,尝试了各种转换器,都不好使。.264视频 转成 MP4视频,转不成MP4,转成avi也行啊。终于,有了突破,记录一下。 (1)这篇《mp4v2再学习 -- H264视频编码成MP4文件》蛮好,可以在VS下编译使用,也方便以后工作,可惜折腾一圈上不去G网络,放弃。mp4v2在VS2010下的编译与在项目中的使用。 @ https://blog.csdn.net/qq_29350001/article/details/73742075 @ https://blog.csdn.net/ybsun2010/article/details/16336033 (2)也尝试想用FFmpeg,有点复杂。有文档说明,转换效率不高,所以没有直接尝试。 (3)尝试各种转换器:枫叶H.264格式转换器、视频转换大师、极速H.264视频编码器、VideoConver、格式工厂等等。 (4)在吾爱破解上看到一条:( https://www.52pojie.cn/thread-719145-1-1.html ) “ MP4内部,现在全是h.264。 h.264是编码格式,MP4是封装格式

深入理解卷积网络的卷积

谁都会走 提交于 2020-12-28 10:07:00
卷积神经网络是一种特殊的神经网络结构,是自动驾驶汽车、人脸识别系统等计算机视觉应用的基础,其中基本的矩阵乘法运算被卷积运算取代。它们专门处理具有网格状拓扑结构的数据。例如,时间序列数据和图像数据可以看作是一个二维像素网格。 历史 卷积神经网络最初是由福岛核电站在1980年引入的,当时名为Neocognitron。它的灵感来自于Hubel和Weisel提出的神经系统的层次模型。但由于其复杂的无监督学习算法,即无监督学习,该模型并不受欢迎。1989年,Yann LeCun利用反向传播和Neocognitron的概念提出了一种名为LeNet的架构,该架构被美国和欧洲用于手写的邮政编码识别。邮政服务。Yann LeCun进一步研究了这个项目,最终在1998年发布了LeNet-5——第一个引入了我们今天在CNN仍然使用的一些基本概念的现代卷积神经网络。他还发布了MNIST手写数字数据集,这可能是机器学习中最著名的基准数据集。在20世纪90年代,计算机视觉领域转移了它的焦点,许多研究人员停止了对CNN架构的研究。神经网络的研究经历了一个寒冷的冬天,直到2012年,多伦多大学的一组研究人员在著名的ImageNet挑战赛中进入了一个基于CNN的模型(AlexNet),最终以16.4%的错误率赢得了比赛。此后,卷积神经网络不断向前发展,基于CNN的体系结构不断赢得ImageNet, 2015年

Python + OpenCV - Reading the image file name

早过忘川 提交于 2020-12-27 06:24:14
问题 I have the following code snippet: img = cv2.imread('1.jpg') When I print img , I get the result shown below. How can I return the 1.jpg part only? [[[140 149 139] [153 162 152] [155 165 153] ..., [ 44 20 8] [ 46 22 10] [ 46 22 10]] [[151 160 150] [156 165 155] [152 162 150] ..., [ 47 23 11] [ 48 24 12] [ 45 21 9]] [[155 164 154] [152 161 151] [146 156 144] ..., [ 47 23 11] [ 49 25 13] [ 49 25 13]] ..., [[ 28 16 6] [ 33 21 11] [ 32 20 10] ..., [144 131 105] [150 137 111] [151 138 112]] [[ 33

Python + OpenCV - Reading the image file name

故事扮演 提交于 2020-12-27 06:22:19
问题 I have the following code snippet: img = cv2.imread('1.jpg') When I print img , I get the result shown below. How can I return the 1.jpg part only? [[[140 149 139] [153 162 152] [155 165 153] ..., [ 44 20 8] [ 46 22 10] [ 46 22 10]] [[151 160 150] [156 165 155] [152 162 150] ..., [ 47 23 11] [ 48 24 12] [ 45 21 9]] [[155 164 154] [152 161 151] [146 156 144] ..., [ 47 23 11] [ 49 25 13] [ 49 25 13]] ..., [[ 28 16 6] [ 33 21 11] [ 32 20 10] ..., [144 131 105] [150 137 111] [151 138 112]] [[ 33

Python + OpenCV - Reading the image file name

断了今生、忘了曾经 提交于 2020-12-27 06:22:11
问题 I have the following code snippet: img = cv2.imread('1.jpg') When I print img , I get the result shown below. How can I return the 1.jpg part only? [[[140 149 139] [153 162 152] [155 165 153] ..., [ 44 20 8] [ 46 22 10] [ 46 22 10]] [[151 160 150] [156 165 155] [152 162 150] ..., [ 47 23 11] [ 48 24 12] [ 45 21 9]] [[155 164 154] [152 161 151] [146 156 144] ..., [ 47 23 11] [ 49 25 13] [ 49 25 13]] ..., [[ 28 16 6] [ 33 21 11] [ 32 20 10] ..., [144 131 105] [150 137 111] [151 138 112]] [[ 33

Moroccan License Plate Recognition (LPR) using OPENALPR, OpenCV and Tesseract

爷,独闯天下 提交于 2020-12-27 05:28:50
问题 I work currently on my project of end of study: the title of my project is "the detection in real time of the Moroccan license plates of vehicles ( ALPR )", I tried to post this my issue in group ALPR unfortunately ,i received no reply . i decide to contact you when i see your video in youtube,I want to inform you that I have many problem with Moroccan license plates. this is an example of Moroccan license plates: Morrocan alpr i tried to use OPENALPR : When I run the command line " alpr

Moroccan License Plate Recognition (LPR) using OPENALPR, OpenCV and Tesseract

我怕爱的太早我们不能终老 提交于 2020-12-27 05:28:00
问题 I work currently on my project of end of study: the title of my project is "the detection in real time of the Moroccan license plates of vehicles ( ALPR )", I tried to post this my issue in group ALPR unfortunately ,i received no reply . i decide to contact you when i see your video in youtube,I want to inform you that I have many problem with Moroccan license plates. this is an example of Moroccan license plates: Morrocan alpr i tried to use OPENALPR : When I run the command line " alpr