/Human-hair-detection

Java based GUI application for extraction of hair region from human face image using Opencv and JavaFX.

Primary LanguageJavaApache License 2.0Apache-2.0

Human Hair Detection

Java based GUI application for extraction of human hair region from input image of human face using OpenCV.

Build Status

Prerequisities

  • Oracle Java v8.0 (64bit)
  • JavaFX
  • Netbeans >= v8.0
  • OpenCV 3.1.0 native installation

Getting Started

Install Java with NetBeans
  • Visit oracle and download JDK 8 with Netbeans for your platform. JDK 8 comes bundled with JavaFX, so you don't have to install JDK manually. Download JDK with NetBeans
Install OpenCV
Setting up the project in Net Beans
  • Launch NetBeans Launch Net Beans

  • Clone this project in your local machine

HTTPS

git clone https://github.com/sujit25/Human-hair-detection.git

SSH

git clone git@github.com:sujit25/Human-hair-detection.git
  • Add reference to opencv-310.jar available from binaries generated during compilation.

Add reference to opencv-310.jar

  • Go to Hair Detection Netbeans Project > Properties > Run > VM Options : add
-Djava.library.path=/path/to/lib/containing/opencv_libraries

for e.g. on my machine:

-Djava.library.path="/home/sujit25/softwares/opencv-3.1.0-with-cuda8/release/lib"

Note: This application has not been tested with any OpenCV version above 3.1.0.

Running the Project
  • When you launch the project, you will see a window where you can choose source image. Empty Window

  • Choose a source image from your local directory. You can select one from the examples provided in this repository. Source image window

  • Click the button to generate result images. Generated image window

  • All the generated images are saved in your local directory. Generated output