OpenCV | Laplacian算子的使用
博主github:https://github.com/MichaelBeechan
博主CSDN:https://blog.csdn.net/u011344545
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
using namespace cv;
/** @函數 main */
int main( int argc, char** argv )
{
Mat src, src_gray, dst;
int kernel_size = 3;
int scale = 1;
int delta = 0;
int ddepth = CV_16S;
char* window_name = "Laplace Demo";
int c;
/// 裝載圖像
src = imread( argv[1] );
if( !src.data )
{ return -1; }
/// 使用高斯濾波消除噪聲
GaussianBlur( src, src, Size(3,3), 0, 0, BORDER_DEFAULT );
/// 轉換為灰度圖
cvtColor( src, src_gr
總結
以上是生活随笔為你收集整理的OpenCV | Laplacian算子的使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OpenCV | OpenCV中cvgo
- 下一篇: Python练习 | Python 可迭