This repository contains source code of a Computer vision program in Java that can run on any OS that has a JVM.
This program consists of 5 parts:
- Input - Read the streaming video from the webcam at the rate 33ms/frame.
- Image Processing - Detect frace(s) from the frame and append sticker(s) at the calculated location(s)
- Find feature points - Find good feature points to track from the roi (the detected face)
- Tracking - track the faces and move stickers accordingly based on the average distance moved by the valid featrue points
- Output - Display the processed frame to the interface (FXML)
- A webcam is required to run the program.
- OpenCV > v3.0.0
This project can be imported directly into the Eclipse worksapce
File > Import > Git > Projects from Git > Clone URI > copy & paste the URI > put a destination dir > Import as a general project > Decide a name > Finish
In the project folder, edit .project file by adding '''org.eclipse.jdt.core.javanature''' under 'natures > nature'
Eclipse > Preferences > Java > Build Path > User Libraries > New > Name it (e.g. opencv-4.1.0) > Click on the new lib > Add External JARs > browse to your JAR dir > Open > Edit Native library location > External Folder > the dir that contains JAR and dylib > OK
Right click on the project folder > Build Path > Add Libraries > User Library > opencv-XXX > Finish
Select the project folder and click on Run As > 2 Java Application > FXHelloCV
- OpenCV4.1.0
- FXML