Skip to content

Instantly share code, notes, and snippets.

@sumit4iit
Last active December 28, 2015 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sumit4iit/7418738 to your computer and use it in GitHub Desktop.
Save sumit4iit/7418738 to your computer and use it in GitHub Desktop.
/*
* eyeExtract.cpp
*
* Created on: Nov 10, 2013
* Author: sumit4iit
*/
#include<iostream>
#include "cv.h"
#include "highgui.h"
#include <cstring>
using namespace cv;
using namespace std;
int main()
{
string path = "res/download.jpg";
Mat src = imread(path,CV_LOAD_IMAGE_GRAYSCALE);
if(!src.data)
{
cout<<"fail\n";
return -1;
}
Mat1i dest;
Point anchor = Point(-1,-1);
double delta = 0;
int ddepth = -1;
Laplacian(src, dest, ddepth, 3, 1, delta, BORDER_DEFAULT);
namedWindow("original",CV_WINDOW_AUTOSIZE);
namedWindow("laplacianX+Y",CV_WINDOW_AUTOSIZE);
imshow("laplacianX+Y",dest);
imshow("original",src);
waitKey(0);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment