1 | initial version |
The problem was in Cyrillic symbols in path. I remove these and replace my code by following:
String pathToCascade = Paths.get(
getClass().getResource("/haarcascades/haarcascade_frontalface_alt.xml").toURI()
.normalize()).toString();
faceDetector = new CascadeClassifier(pathToCascade);
2 | No.2 Revision |
The problem was in Cyrillic symbols in path. I remove these and replace my code by following:
String pathToCascade = Paths.get(
getClass().getResource("/haarcascades/haarcascade_frontalface_alt.xml").toURI()
.normalize()).toString();
getClass().getResource("/haarcascades/haarcascade_frontalface_alt.xml")
.toURI().normalize()).toString();
faceDetector = new CascadeClassifier(pathToCascade);