This file contains 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; | |
} |
0 件のコメント:
コメントを投稿