I use this one often:
Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!
-
Bonjour tout le monde ! Veillez consulter la Politique de forum pour comprendre nos règles, Merci a vous !Rejeter la notice
TUTO OpenCv Face detection WM 25
Discussion dans 'Windev Mobile' créé par redha2010, Mai 10, 2021.
Page 1 sur 2
Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!
curieux de savoir comment tu integre du c++ dans windev mobile Android ?
A ma connaissance c'est pas possible.
Gemini1961 apprécie ceci.
Good Morning, how are you,
I´m getting lost, it´s givinme this error, and I don´t have any idea what is this ! Can you , please, help me ?
Thank you so much
===== Error =====
Date and time=11/02/2023 13:25:15
Message=Internal error.
System message=cv::Exception: OpenCV(4.4.0) /home/quickbirdstudios/opencv/opencv/modules/objdetect/src/cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'detectMultiScale'
Process=Click WIN_FaceRecog.BTN_Detectar_Face
WLanguage stack=Click WIN_FaceRecog.BTN_Detectar_Face
Java stack=org.opencv.objdetect.CascadeClassifier.detectMultiScale_5(Native Method)
org.opencv.objdetect.CascadeClassifier.detectMultiScale(CascadeClassifier.java:291)
com.mycompany.sigmaapontamento.wdgen.GWDCPCOL_OpenCVFaceRecog.DetectFaceOpenCv(GWDCPCOL_OpenCVFaceRecog.java:121)
com.mycompany.sigmaapontamento.wdgen.GWDFWIN_FaceRecog$GWDBTN_Detectar_Face.clicSurBoutonGauche(GWDFWIN_FaceRecog.java:400)
fr.pcsoft.wdjava.ui.h.executerTraitement(Unknown Source:125)
fr.pcsoft.wdjava.ui.champs.w.executerTraitement(Unknown Source:9)
fr.pcsoft.wdjava.ui.g.a(Unknown Source:4)
fr.pcsoft.wdjava.ui.g.appelPCode(Unknown Source:88)
fr.pcsoft.wdjava.ui.h.appelPCode(Unknown Source:0)
fr.pcsoft.wdjava.ui.champs.t.appelPCode(Unknown Source:9)
fr.pcsoft.wdjava.ui.h.appelPCode_TLM(Unknown Source:17)
fr.pcsoft.wdjava.ui.champs.bouton.WDBouton$a.onClick(Unknown Source:119)
android.view.View.performClick(View.java:8160)
android.widget.TextView.performClick(TextView.java:16222)
android.view.View.performClickInternal(View.java:8137)
android.view.View.access$3700(View.java:888)
android.view.View$PerformClick.run(View.java:30236)
android.os.Handler.handleCallback(Handler.java:938)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:246)
android.app.ActivityThread.main(ActivityThread.java:865
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Thread=id=2
name=main
priority=5
groupName=main
when I try to add the xml frontalface, give me this error too. ! Your source, I can´t open it in the version 28 !
Thank you in advance again !
**********************************************
The XML document has not been loaded.
System error details:
Row 16, Column 76: Specification mandates value for attribute crossorigin
Row 79, Column 90: Specification mandates value for attribute data-turbo-transient
Row 85, Column 70: Specification mandates value for attribute data-turbo-transient
Row 145, Column 161: Specification mandates value for attribute data-turbo-transient
Row 165, Column 10: Opening and ending tag mismatch: link line 163 and head
Row 168, Column 26: Specification mandates value for attribute data-turbo-body
Row 168, Column 26: attributes construct error
Row 168, Column 26: Couldn't find end of Start Tag div line 168
Row 201, Column 23: Entity 'nbsp' not defined
Row 553, Column 52: Opening and ending tag mismatch: div line 552 and option
....
when I try to add the xml frontalface, give me this error too. ! Your source, I can´t open it in the version 28 !
Thank you in advance again !
**********************************************
The XML document has not been loaded.
System error details:
Row 16, Column 76: Specification mandates value for attribute crossorigin
Row 79, Column 90: Specification mandates value for attribute data-turbo-transient
Row 85, Column 70: Specification mandates value for attribute data-turbo-transient
Row 145, Column 161: Specification mandates value for attribute data-turbo-transient
Row 165, Column 10: Opening and ending tag mismatch: link line 163 and head
Row 168, Column 26: Specification mandates value for attribute data-turbo-body
Row 168, Column 26: attributes construct error
Row 168, Column 26: Couldn't find end of Start Tag div line 168
Row 201, Column 23: Entity 'nbsp' not defined
Row 553, Column 52: Opening and ending tag mismatch: div line 552 and option
....Cliquez pour agrandir...
try using this clean version off the code source in attached files
the xml file i used located in EXE folder
Bonne Chance
Fichiers attachés:
WX1331 apprécie ceci.
Merci ! I´ll return the results ! Merci beacoup !
You do a great job showing us the possibilities with Java,k to a non java programmers !
Thanks !
Fichiers attachés:
Cliquez pour agrandir...
sorry
no, now the windev are integrated, It executes windev mobile, windev and webdev at the same place , it´s integrated !
Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!
, c'est une erreur dl
Cela signifie que le projet à été fait avec une version pirate de windev mobile
Pour pouvoir l'ouvrir, il faut ouvrir le projet en windev mobile 25 , faire une réparation puis recouvrir en windev mobile 28.
Il est préférable de ne pas utiliser windev mais bien windev mobile.
Bonjour visiteur, Merci de vous Inscrire ou de vous connectez pour voir les liens!
, em erro dl
Isso significa que o projeto Faith feito com a versão pirata do windev mobile
Para poder abri-lo, você deve abrir o projeto no windev mobile 25, fazer um reparo e depois cobri-lo no windev mobile 28.
É melhor não usar windev, mas windev mobile.Cliquez pour agrandir...
Isto é o que estou fazendo, sozinho:
importar android.widget.Toast;
importar android.graphics.BitmapFactory;
importar org.opencv.android.OpenCVLoader;
importar org.opencv.android.Utils;
importar android.widget.ImageView;
importar android.graphics.Bitmap;
importar android.os.Environment;
import org.opencv.core.*;
import org.opencv.core.MatOfRect;
import org.opencv.core.Rect;
import org.opencv.imgproc.Imgproc;
import org.opencv.objdetect.CascadeClassifier;
public static void DetectFaceOpenCv(String filePath)
{
OpenCVLoader.initDebug();
ImageView imsrc = (ImageView) getView("IMG_Src");
Bitmap capturadoImg = nulo;
captureImg = BitmapFactory.decodeFile(filePath);
Mat original = new Mat();
Usos. bitmapToMat(capturedImg, src);
CascadeClassifier faceDetector = new CascadeClassifier(Environment.getExternalStorageDirectory().toString()+"/lbpcascade_frontalface.xml");
//gray img --> equalizar histograma --> entrada para o classificador
Mat grayFrame = new Mat();
Imgproc.cvtColor(src, grayFrame, Imgproc.COLOR_BGR2GRAY);
Imgproc.equalizeHist(grayFrame, grayFrame);
MatOfRect facesDetetadas = new MatOfRect();
faceDetector.detectMultiScale(grayFrame, facesDetected); //as faces detectadas são retornadas em facesDetected
for (Rect faces: facesDetected. toArray()) {
imgproc.rectangle(
src, // onde desenhar a caixa
new Point(faces.x, faces.y), // canto inferior esquerdo
new Point(faces.x + faces.width, faces.y + faces.height), // canto superior direito
novo Escalar(0, 0, 255),
3 // chifre RGB
);
}
Utils.matToBitmap(src, captureImg);
imsrc.setScaleType(ImageView.ScaleType.FIT_XY);
imsrc.setImageBitmap(capturedImg);
}
Obrigado pela atenção!