Код: Выделить всё
@Service
public class ReconhecimentoFacialService {
static{
System.loadLibrary(Core.NATIVE_LIBRARY_NAME); // load opencv_java
}
@Autowired
private AlunoRepository alunoRepository;
private CascadeClassifier faceDetector;
@PostConstruct
public void init() throws URISyntaxException {
System.out.println("\nPOST CONSTRUCT ReconhecimentoFacialService");
String xmlFilePath = "C:/Users/MeuUsuario/Documents/GitHub/projeto/backend/src/main/resources/haarcascade_frontalface_alt.xml";
System.out.println("XML File Path: " + xmlFilePath);
this.faceDetector = new CascadeClassifier(xmlFilePath);
}
Код: Выделить всё
org.openpnp
opencv
4.9.0-0
исключение:
Код: Выделить всё
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reconhecimentoFacialService': Invocation of init method failed z
Caused by: java.lang.UnsatisfiedLinkError: 'long org.opencv.objdetect.CascadeClassifier.CascadeClassifier_1(java.lang.String)'
Подробнее здесь: https://stackoverflow.com/questions/791 ... a-e-spring