Skip to content

Instantly share code, notes, and snippets.

@masazdream
Created January 9, 2013 16:00
//============================================================================
// Name : Sample243_01.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <cv.h>
#include <highgui.h>
using namespace cv;
int main(int argc, char** argv){
Mat jpeg, gray, tmp_img;
jpeg = imread("your file path", 1);
cvtColor(jpeg, gray, CV_BGR2GRAY);
Mat laplacian_img;
Laplacian(jpeg, tmp_img, CV_32F, 3);
convertScaleAbs(tmp_img, laplacian_img, 1, 0);
namedWindow("Display Image", CV_WINDOW_AUTOSIZE);
imshow("Display Image", laplacian_img);
waitKey(0);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment