标签:tab title func data- proc pixel size center add
拉普拉斯线性滤波,.边缘检測
Calculates the Laplacian of an image.
Parameters: |
|
---|
The function calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator:
This is done when ksize > 1 . When ksize == 1 , the Laplacian is computed by filtering the image with the following aperture:
Laplace
计算图像的 Laplacian 变换
void cvLaplace( const CvArr* src, CvArr* dst, int aperture_size=3 );
函数 cvLaplace 计算输入图像的 Laplacian变换,方法是先用 sobel 算子计算二阶 x- 和 y- 差分,再求和:
对 aperture_size=1 则给出最快计算结果,相当于对图像採用例如以下内核做卷积:
# -*- coding: utf-8 -*- #线性锐化滤波,拉普拉斯图像变换 #code:myhaspl@myhaspl.com import cv2 fn="test6.jpg" myimg=cv2.imread(fn) img=cv2.cvtColor(myimg,cv2.COLOR_BGR2GRAY) jgimg=cv2.Laplacian(img,-1) cv2.imshow(‘src‘,img) cv2.imshow(‘dst‘,jgimg) cv2.waitKey() cv2.destroyAllWindows()
数学之路-python计算实战(21)-机器视觉-拉普拉斯线性滤波
标签:tab title func data- proc pixel size center add
原文地址:http://www.cnblogs.com/mthoutai/p/6881554.html