Available Methods
Related Classes
- java.util.Arrays
- java.io.File
- android.util.Log
- java.io.FileInputStream
- java.io.FileOutputStream
- android.graphics.Bitmap
- android.os.Environment
- android.os.Message
- java.awt.Color
- javax.swing.JFrame
- android.content.pm.ActivityInfo
- javax.swing.JLabel
- java.awt.Graphics
- java.awt.BorderLayout
- android.os.RemoteException
- javax.swing.BorderFactory
- java.awt.geom.AffineTransform
- org.opencv.core.Mat
- org.opencv.imgproc.Imgproc
- org.opencv.core.Size
- org.opencv.core.Scalar
- org.opencv.core.CvType
- org.opencv.core.Point
- org.opencv.core.Rect
- org.opencv.imgcodecs.Imgcodecs
Java Code Examples for org.opencv.core.Core#bitwise_and()
The following examples show how to use
org.opencv.core.Core#bitwise_and() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenCVoperation.java From Human-hair-detection with Apache License 2.0 | 6 votes |
public void skinSegmentation() { matrix3_skindetection = new Mat(matrix2_grabcut.size(),matrix2_grabcut.type()); matrix3_skindetection.setTo(new Scalar(0,0,255)); Mat skinMask = new Mat(); Mat hsvMatrix = new Mat(); Scalar lower = new Scalar(0,48,80); Scalar upper = new Scalar(20,255,255); Imgproc.cvtColor(matrix2_grabcut, hsvMatrix, Imgproc.COLOR_BGR2HSV); Core.inRange(hsvMatrix, lower, upper, skinMask); Mat kernel =Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE,new Size(11,11)); Imgproc.erode(skinMask, skinMask, kernel); Imgproc.dilate(skinMask, skinMask, kernel); Imgproc.GaussianBlur(skinMask,skinMask, new Size(3,3), 0); Core.bitwise_and(matrix2_grabcut, matrix2_grabcut, matrix3_skindetection,skinMask); Imgcodecs.imwrite(resultDirectory+skinDetectionOutput , matrix3_skindetection); }