Ask Your Question

Revision history [back]

extract skin color area from image using opencv in java

i am working on a project in which i want to extract skin color area from image . i have detected the skin color area but that area is white and the non skin area is black so i want to fill that skin color area which is white with skin color to show only skin color object.. here is my code

Mat hsv=new Mat(); Imgproc.cvtColor(srcHSV,hsv,Imgproc.COLOR_BGR2HSV); Core.inRange(hsv,new Scalar(0,58,40),new Scalar(35,174,255),hsv);

i am getting the following result and i want that white area to be filled with skin color

C:\fakepath\hand2.png

click to hide/show revision 2
None

updated 2017-10-05 00:57:48 -0600

berak gravatar image

extract skin color area from image using opencv in java

i am working on a project in which i want to extract skin color area from image . i have detected the skin color area but that area is white and the non skin area is black so i want to fill that skin color area which is white with skin color to show only skin color object.. here is my code

Mat hsv=new Mat(); Imgproc.cvtColor(srcHSV,hsv,Imgproc.COLOR_BGR2HSV); Core.inRange(hsv,new Scalar(0,58,40),new Scalar(35,174,255),hsv);

i am getting the following result and i want that white area to be filled with skin color

C:\fakepath\hand2.pngC:\fakepath\hand2.png

click to hide/show revision 3
retagged

updated 2017-10-05 01:06:40 -0600

berak gravatar image

extract skin color area from image using opencv in java

i am working on a project in which i want to extract skin color area from image . i have detected the skin color area but that area is white and the non skin area is black so i want to fill that skin color area which is white with skin color to show only skin color object.. here is my code

Mat hsv=new Mat(); Imgproc.cvtColor(srcHSV,hsv,Imgproc.COLOR_BGR2HSV); Core.inRange(hsv,new Scalar(0,58,40),new Scalar(35,174,255),hsv);

i am getting the following result and i want that white area to be filled with skin color

C:\fakepath\hand2.png