Skip to content

Instantly share code, notes, and snippets.

@felipe-araujo
Created October 16, 2011 00:49
Show Gist options
  • Save felipe-araujo/1290372 to your computer and use it in GitHub Desktop.
Save felipe-araujo/1290372 to your computer and use it in GitHub Desktop.
Spatial filtering with OpenCV(C++)
Mat in, out;
Mat kern = ( Mat_<char>(3,3) << 1, 1, 1,
1, -8, 1,
1, 1, 1);
in = imread("DRIVE/training/images/21_training.tif");
filter2D(in, out, in.depth(), kern, Point(-1,-1), 5.0, BORDER_REPLICATE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment