opencv
文章平均质量分 66
Simplicity_
这个作者很懒,什么都没留下…
展开
-
freetype,harfbuzz,opencv-contribute编译
1. 编译安装freetype下载默认Configure,Generate,OpenProject. 需要生成Debug和Release. VS2019 选择ALL_BUILD后INSTALL,得到相应的include和lib.系统变量添加变量FREETYPE_DIR,目录与CMAKE_INSTALL_PREFIX保持一致.2.编译安装harfbuzz下载初次Configure后,钩选HB_HAVE_FREETYE,再次Configure.Configure后再次设置freetype变量原创 2022-02-23 11:05:11 · 3358 阅读 · 0 评论 -
opencv之轮廓检测findContours
官方demo如下python版:ret, thresh = cv.threshold(imgray, 127, 255, 0)contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)java版:Mat cannyOutput = new Mat();Imgproc.Canny(srcGray, cannyOutput, threshold, threshold * 2);List&l原创 2021-08-18 13:42:29 · 869 阅读 · 0 评论 -
Android OpenCV 启动初始化问题
Error:No implementation found for long org.opencv.core.Mat.n_Mat()No implementation found for long org.opencv.core.Mat.n_Mat() when trying to initialize Matopencv new Mat() java No implementation found for longSolution:错误在于OpenCV未经初始化就使用,所以在onResum原创 2021-08-16 18:30:16 · 1339 阅读 · 0 评论 -
opencv 之 双边滤波bilateralFilter
bilateralFilter函数可以对图像进行双边滤波双边滤波器可以去除无关噪声,同时保持较好的边缘信息。其速度比绝大多数滤波器都慢。void bilateralFilter( InputArray src, OutputArray dst, int d, double sigmaColor, double sigmaS原创 2021-04-11 15:29:31 · 512 阅读 · 0 评论 -
基于canny的亚像素的Devernay Algorithm
Block scheme of the algorithmThe two block schemes below show the differences between our algorithm and a classical Canny edge detector. We can see that the two block schemes are different only by the interpolation and the gradient stage. This shows that原创 2021-01-13 12:07:51 · 2652 阅读 · 0 评论 -
canny边缘检测
边缘检测的一般标准包括:以低的错误率检测边缘,也即意味着需要尽可能准确的捕获图像中尽可能多的边缘。检测到的边缘应精确定位在真实边缘的中心。图像中给定的边缘应只被标记一次,并且在可能的情况下,图像的噪声不应产生假的边缘。Canny边缘检测算法分为5个步骤:1) 使用高斯滤波器,以平滑图像,滤除噪声。2) 计算图像中每个像素点的梯度强度和方向。3) 非极大值(Non-Maximum Suppression)抑制,以消除边缘检测带来的杂散响应。4) 双阈值(Double-Threshold)检原创 2021-01-13 11:48:41 · 760 阅读 · 0 评论 -
图像质量评估
评估算法信息熵图像信息熵:从信息论的角度反映图像信息丰富程度。图像信息熵越大,信息量越丰富,质量越好。计算:图像的pixs[256]像素的count累计和sum,图像的像素size=row*col,像素概率p_i=pixs[i]*size,信息熵result += pixs[i]*log2(pixs[i]);平均梯度(mean gradient)指图像的边界或影线两侧附近灰度有明显差异,即灰度变化率大,这种变化率的大小可用来表示图像清晰度。它反映了图像微小细节反差变化的速率,即图像多维方向上密度变原创 2020-08-28 10:31:27 · 3968 阅读 · 0 评论 -
Cmake+opencv+mingw
win:Cmake 配置opencv到mingw configure时候碰到的error:CMake was unable to find a build program corresponding to “MinGW Makefiles”. CMAKE_MAKE_PROGRAM is not set.先确保mingw32-make已经安装好,没安装好:mingw-get install ...原创 2020-04-08 10:35:00 · 892 阅读 · 0 评论 -
Image格式转换
PIL.Image转换成OpenCV格式:import cv2from PIL import Imageimport numpypath = '1.jpg'img = Image.open(path).convert("RGB")#.convert("RGB")可不要,默认打开就是RGBimg.show()"""key line PIL-->CV"""#img = cv2.c...转载 2019-12-13 09:26:49 · 2406 阅读 · 0 评论