title: Which is color space for HSV Skin detector openCV android?
body: <p>I am newbie in computer vision.
  I make a skin detector on Android based on <a href="http://www.pyimagesearch.com/2014/08/18/skin-detection-step-step-example-using-python-opencv/" rel="nofollow">http://www.pyimagesearch.com/2014/08/18/skin-detection-step-step-example-using-python-opencv/</a></p>
  
  <p>But I am having problem in choosing color space.
  <a href="http://imgur.com/DxNOXd9" rel="nofollow">http://imgur.com/DxNOXd9</a> (Sr, I can't post image without 10 reputations)</p>
  
  <p>I tried a lot of spaces on the Internet and this website but those're wrong. <br/>
  <strong>This is my code:</strong> </p>
  
  <pre><code>public Mat onCameraFrame(CvCameraViewFrame inputFrame) {    
      Mat hsv = new Mat();
      //H,S,V area
      Scalar lower = new Scalar(0, 0.28*255, 0);
      Scalar upper = new Scalar(25, 0.68*255, 255);
      //Skin detector HSV-based
      Imgproc.cvtColor(inputFrame.rgba(), hsv, Imgproc.COLOR_RGBA2RGB);
      Imgproc.cvtColor(hsv, hsv, Imgproc.COLOR_RGB2HSV_FULL);
      Mat result = new Mat(hsv.rows(), hsv.cols(), CvType.CV_8U);
      Core.inRange(hsv, lower, upper, result);
      // Perform and decrease noise
      Mat kernel = Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(2, 2));
      Imgproc.erode(result, result, kernel);
      Imgproc.dilate(result, result, kernel);
      Imgproc.GaussianBlur(result, result, new Size(3,3), 0);
      // Output
      Imgproc.cvtColor(result, result, Imgproc.COLOR_GRAY2RGB);
      Imgproc.cvtColor(result, result, Imgproc.COLOR_RGB2RGBA);
      return result;
  }
  </code></pre>
  
  <p><strong>Update 1:</strong>
  I try to get skin space with face detection example:</p>
  
  <pre><code>        for (int i = 0; i &lt; facesArray.length; i++) {
          Core.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(),
                  FACE_RECT_COLOR, 3);        
          Mat hsv = new Mat(inputFrame.rgba(), facesArray[i]);
          Imgproc.cvtColor(hsv, hsv, Imgproc.COLOR_RGB2HSV_FULL);
          List&lt;Mat&gt; hsv_channel = new ArrayList&lt;Mat&gt;();
          Core.split(hsv, hsv_channel);
          Log.w("Color: ", "H: " + hsv_channel.get(0) + "S: " + hsv_channel.get(1) + "V: " + hsv_channel.get(2));
      }
  </code></pre>
  
  <p>And output: <br/>
  H: Mat [ 261*261*CV_8UC1, isCont=true, isSubmat=false, nativeObj=0xffffffffb8b15658, dataAddr=0xffffffffb983d5f0 ] <br/>
  S: Mat [ 261*261*CV_8UC1, isCont=true, isSubmat=false, nativeObj=0xffffffffb8b15698, dataAddr=0xffffffffb984e030 ]<br/>
  V: Mat [ 261*261*CV_8UC1, isCont=true, isSubmat=false, nativeObj=0xffffffffb8b156d8, dataAddr=0xffffffffb985ea60 ]<br/></p>
  
  <p>How can I apply these to my code?</p>