Created
January 9, 2013 16:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//============================================================================ | |
// 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