Java Code Examples for org.opencv.core.Core.bitwise_not()

The following are Jave code examples for showing how to use bitwise_not() of the org.opencv.core.Core class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: kronometer   File:   Source Code and License Vote up 5 votes
private void setFilter() {
    //Apply gaussian blur to remove noise
    Imgproc.GaussianBlur(image, image, new Size(5, 5), 0);

    Imgproc.adaptiveThreshold(image, image, 255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C, Imgproc.THRESH_BINARY, 7, 1);
    //Invert the image
    Core.bitwise_not(image, image);

    Mat kernel = Imgproc.getStructuringElement(Imgproc.MORPH_DILATE, new Size(3, 3), new Point(1, 1));
    Imgproc.dilate(image, image, kernel);
Example 2
Project: SudoCAM-Ku   File:   Source Code and License Vote up 4 votes
public static Mat InvertImageColor(Mat img){
	Mat im = new Mat();;
    Core.multiply(im,new Scalar(255),im);
	return im;