How to detect (Count) Hair from image using OpenCV?
I have try below code using OpenCV functions cvtColor , Canny and HoughLinesP but not able to get accurate result or not work in some cases. private boolean opencvProcessCount(Uri picFileUri) { hairCount = 0; totalC = 0; //Log.e(">>>>>>>>","count " + picFileUri); try { InputStream iStream = getContentResolver().openInputStream(picFileUri); byte[] im = getBytes(iStream); BitmapFactory.Options opt = new BitmapFactory.Options(); opt.inDither = true; opt.inPreferredConfig = Bitmap.Config.ARGB_8888; Bitmap image = BitmapFactory.decodeByteArray(im, 0, im.length); Mat mYuv = new Mat(); Utils