Ask Your Question

Revision history [back]

click to hide/show revision 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);


Thanks to @Barek

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);


Thanks to @Barek