Documente Academic
Documente Profesional
Documente Cultură
BLOG DE CODEONION
Tutoriales visualmente ricos
2 5 D E N OV I E M B R E D E 2 0 1 5 P O R C O D EO N I O N
En este tutorial, crearemos un nuevo proyecto OpenCV en Android Studio. Como ya tiene
todo descargado , estamos listos para seguir adelante. Al nal de este tutorial, tendr una
nueva con guracin del proyecto, que puede usar para construir sus proyectos. As que
vamos a hacer un poco de CV!
En resumen, los pasos son, (2) Crear proyecto simple. (3) Importe OpenCV SDK como un
Mdulo en Android Studio. (4) Establecer la versin de OpenCV. en Project (5) Fix Library
association in project. (6) Hecho! Ahora el cdigo OpenCV real puede escribirse en el
futuro. El tutorial guiado ms largo y detallado se proporciona a continuacin.
Para importar OpenCV SDK como un mdulo en su proyecto, vaya a F ile> Nuevo>
Importar mdulo .
A continuacin, indique la ruta a su OpenCV como ... \ OpenCV-android-sdk \ sdk \
java
Puede elegir modi car el nombre de su mdulo.
Presione Siguiente y Termine el Dilogo.
Todo el proceso se da aqu:
Tenga en cuenta que, al nal, hay algunos errores en el cdigo y en la consola. Esto se
debe a que necesita corregir el nmero de versin y vincular las bibliotecas con su
propio proyecto. Esto se muestra en los siguientes dos pasos.
4. En este paso, reparar la informacin del SDK de Android Project en el archivo OpenCV
build.gradle .
En el explorador de proyectos, cambie a la vista Proyecto.
Vaya a OpenCVLibrary300> archivo build.gradle y bralo.
He actualizado el contenido del archivo con el siguiente cdigo
10 }
11
12 buildTypes {
13 release {
14 minifyEnabled false
15 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'progu
16 }
17 }
18 }
Tenga en cuenta que la informacin del SDK del proyecto de Android se puede
obtener a partir del propio archivo build.gradle del proyecto.
Una vez que se actualicen las con guraciones de Android SDK, presione el botn
"Volver a intentarlo".
Todo este proceso se da a continuacin:
Presiona Ok y Ok.
Despus de unos segundos, las bibliotecas se asociarn con su proyecto de Android.
Todo este proceso se muestra aqu:
Esto concluye este tutorial. Ahora est listo para comenzar a crear su propio Android
Studio Project que consiste en funciones de OpenCV SDK limitadas nicamente por su
imaginacin. En el siguiente tutorial, MOSTRAR LA CMARA en la pantalla de la
aplicacin de Android usando OpenCV . Asegrate de leerlo. No se olvide de
COMPARTIR esta publicacin y escribir sus opiniones, ideas y puntos de vista en la
seccin COMENTARIO a continuacin.
Gracias por leer :). Por favor, dale me gusta a mi pgina de Facebook y sigue mi Twitter
para ms tutoriales.
52 12 13
Relacionado
Use OpenCV para mostrar la OpenCV SDK para la estructura Aprendiendo los paquetes de
cmara en la aplicacin de de archivos de Android OpenCV SDK para Android
Android con la orientacin 15 de noviembre de 2015 17 de noviembre de 2015
correcta En "Android" En "Android"
9 de abril de 2016
En "Android"
ANDROID , OPENCV ,
P R O G R A M AC I N
ANDROID
,
A S O C I AC I N
,
A R R EG LO
,
TIL
,
CMO
,
I N S TA L A C I N
,
J AVA
,
APRENDER
,
Permite hablar en Facebook Messenger
http://blog.codeonion.com/2015/11/25/creating-a-new-opencv-project-in-android-studio/ 6/17
22/10/2017 Crear un nuevo proyecto OpenCV en Android Studio
B I B L I OT ECA S
,
N U E VO
,
OPENCV4ANDROID
,
P R OY EC T O
,
SDK
,
SOLUCIN
,
T U TO R I A L
Annimo
6 D E S E P T I E M B R E D E 2 0 1 7 A L A S 2 : 5 1 P. M .
Varun
2 8 D E A G O S T O D E 2 0 1 6 A L A S 4 : 1 3 P. M .
Muchas gracias. Me salvaste el da. Publica ms. Por favor, no puedo ejecutar mi emulador.
Dios te bendiga.
Varun
2 8 D E AG O S TO D E 2 0 1 6 A L A S 1 6 : 0 5
Muchas gracias, Rock. Por favor, contina compartiendo tu conocimiento, Dios te bendiga.
Por favor, despeja mis dudas. Funcionar en emulador o directamente tengo que ejecutar en
mi dispositivo. Gracias de antemano
codeonion
Permite hablar en Facebook Messenger
http://blog.codeonion.com/2015/11/25/creating-a-new-opencv-project-in-android-studio/ 7/17
22/10/2017 Crear un nuevo proyecto OpenCV en Android Studio
1 8 D E J U L I O D E 2 0 1 7 A L A S 3 : 2 1 P. M .
Te sugiero que pruebes un dispositivo Android real. Porque, entonces hars todo por el
producto correcto.
Annimo
1 5 D E AG O S TO D E 2 0 1 6 A L A S 8 : 4 4 A . M .
Annimo
2 9 D E J U L I O D E 2 0 1 6 A L A S 2 : 0 3 P. M .
Thank You SO much. I literally searched the entire web for something like this>
codeonion
A U G U S T 1 0 , 2 0 1 6 AT 5 : 3 6 P M
Thank you very much for your kind words. My happiness level for you in nite.
Santhosh Rangaswamy
J U LY 2 3 , 2 0 1 6 AT 1 : 3 1 P M
this tutorial is one of the best and simplest explanation to run.. thanks a lot mate
codeonion
J U LY 2 4 , 2 0 1 6 AT 1 : 1 2 P M
Sumeet Batra
J U N E 2 2 , 2 0 1 6 AT 1 : 2 8 A M
When I try to import module I get select modules to import and it will not let me import the
java folder in opencv sdk.
codeonion
J U N E 2 2 , 2 0 1 6 AT 7 : 4 8 A M
d:\some_folder\..\OpenCV-android-sdk\sdk\java
I hope it solves the issue and lets you proceed. If not, then let me know.
Anonymous
A U G U S T 5 , 2 0 1 6 AT 3 : 2 0 A M
had the same error: check if your sdk folder is sane. Download again if its not
Anonymous
J U N E 1 0 , 2 0 1 6 AT 1 0 : 4 6 P M
karthi
J U N E 6 , 2 0 1 6 AT 4 : 5 4 P M
sundi
M AY 3 1 , 2 0 1 6 AT 1 0 : 4 8 P M
i followed your tutorial but when i perform the last step that is project structure and add
module. no errors are removed. please tell me what to do
codeonion
J U N E 2 , 2 0 1 6 AT 9 : 4 7 P M
I know when that happens. I myself was making a new project and it was missing something.
If there was any unclear point in the tutorial, then let me know. I will update and make it more
clear to understand
Patrycja
M AY 2 6 , 2 0 1 6 AT 3 : 5 8 A M
Hi! Thats a good article! Ive been looking for something like this sometime ago. And I found
this one: http://blog.zaven.co/opencv-in-android-studio-project/ It is really good and it was so
helpful. Maybe it can be useful for you or other users as well.
Coldus
M AY 2 3 , 2 0 1 6 AT 9 : 1 8 P M
Hello!
Followed your tutorial, but when i got to run my program i got an exception once again which
says:
java.lang.Unsatis edLinkError: Couldnt load opencv_java310 from loader
dalvik.system.PathClassLoader[]
Permite hablar en Facebook Messenger
http://blog.codeonion.com/2015/11/25/creating-a-new-opencv-project-in-android-studio/ 10/17
22/10/2017 Crear un nuevo proyecto OpenCV en Android Studio
This is the exception i always seem to run into, ive tried to install opencv with all methods i
could nd on the net, but this exception keeps popping up, and i dont know why, since
opencv is where it is supposed to be and arrrghh
codeonion
M AY 2 3 , 2 0 1 6 AT 1 1 : 0 8 P M
Coldus
M AY 2 4 , 2 0 1 6 AT 1 2 : 0 0 A M
I wasnt, now I installed it through the android studio, but it didnt seem to x the problem,
maybe this is part of the reason why my app doesnt seem to work, i wonder how many of
these obvious, and stupid mistakes i made.
Coldus
M AY 2 4 , 2 0 1 6 AT 9 : 2 0 P M
Shawn
M AY 1 7 , 2 0 1 6 AT 6 : 4 4 P M
Thank you for posting this. I have a lot experience with OpenCv with python wrappings but
trying to move over to making a simple android app was driving me insane. All the tutorials,
even on the OpenCV site still show how to do start working with Eclipse IDE. The even
without the animated gifs this tutorial was a god send. The animated gifs was just added
butter.
codeonion
M AY 1 9 , 2 0 1 6 AT 1 1 : 1 2 P M
Thank you very much. I am very happy to read this. So much positive energy that I cant
comprehend.
Labib
A P R I L 2 0 , 2 0 1 6 AT 7 : 0 4 P M
Hello,
I need to put the minSdkVersion 9 is this a problem does it affect the openCV
functionalities??
codeonion
A P R I L 2 0 , 2 0 1 6 AT 7 : 2 8 P M
It will prevent you from using latest android functions. OpenCV will still be providing you the
latest functionalities. You can go ahead and try it.
Just make sure that version numbers match in both gradle and downloaded version.
Be sure to check out the next tutorial to show camera on your phone.
Chi
A P R I L 1 2 , 2 0 1 6 AT 2 : 5 2 P M
I followed these steps in Android Studio 2 and OpenCV 3, it worked. The only thing that I
have done differently is the buildToolsVersion in build.gradle(Module: app). I downgraded to:
buildToolsVersion 23.0.2
This is so that build errors are xed. Thanks for this good posting.
codeonion
A P R I L 1 2 , 2 0 1 6 AT 6 : 2 0 P M
Teresa
A P R I L 5 , 2 0 1 6 AT 4 : 1 6 P M
Thank you! I nally after two days of struggling managed to install it. When will you publish
new articles?
codeonion
A P R I L 5 , 2 0 1 6 AT 4 : 5 3 P M
Teresa, I am glad that it worked. I will be writing more on OpenCV for Android tutorials very
soon. Let me know what you wish to see and I will see what I can write about it
Teresa
A P R I L 6 , 2 0 1 6 AT 2 : 3 3 P M
Well, I have a question- after following your tutorial I tried to import some samples to a
project and encountered some dif culties Did you try out samples from openCV or you
started with your own programs?
codeonion
A P R I L 1 0 , 2 0 1 6 AT 5 : 2 1 P M
I just wrote the next tutorial in the series, it is about implementing the sample into the same
project.
Now that you have mentioned about the dif culties, I will now implement every sample one
by one.
Alexander
M A R C H 3 1 , 2 0 1 6 AT 1 1 : 5 5 A M
codeonion
M A R C H 3 1 , 2 0 1 6 AT 1 1 : 5 6 P M
I have moved it up my list. You will nd it soon. Subscribe, like and follow
Anonymous
M A R C H 3 0 , 2 0 1 6 AT 1 1 : 2 2 P M
codeonion
M A R C H 3 1 , 2 0 1 6 AT 5 : 1 6 P M
Piero
M A R C H 2 6 , 2 0 1 6 AT 1 1 : 1 1 P M
good evening,
thank,
Piero
Rashmi
M A R C H 1 5 , 2 0 1 6 AT 1 2 : 5 8 P M
codeonion
M A R C H 1 5 , 2 0 1 6 AT 6 : 4 1 P M
Anonymous
M A R C H 1 3 , 2 0 1 6 AT 1 : 2 4 P M
codeonion
M A R C H 1 3 , 2 0 1 6 AT 2 : 5 4 P M Permite hablar en Facebook Messenger
http://blog.codeonion.com/2015/11/25/creating-a-new-opencv-project-in-android-studio/ 15/17
22/10/2017 Crear un nuevo proyecto OpenCV en Android Studio
Anonymous
M A R C H 1 1 , 2 0 1 6 AT 3 : 0 7 A M
codeonion
M A R C H 1 1 , 2 0 1 6 AT 1 1 : 4 5 P M
Anonymous
M A R C H 4 , 2 0 1 6 AT 1 : 3 0 A M
codeonion
M A R C H 4 , 2 0 1 6 AT 1 2 : 3 9 P M
Anonymous
J A N U A R Y 2 8 , 2 0 1 6 AT 1 1 : 4 8 A M
Thanks,
codeonion
J A N U A R Y 2 8 , 2 0 1 6 AT 9 : 2 2 P M
Anonymous
J A N U A R Y 2 5 , 2 0 1 6 AT 1 1 : 2 4 A M
codeonion
28 DE ENERO DE 2016 A LAS 11:44 A.M.