OpenCV on Android native with C++

  Рет қаралды 36,710

The Coding Notebook

The Coding Notebook

Күн бұрын

Пікірлер: 66
@sonatuzun7020
@sonatuzun7020 Жыл бұрын
It is fun to watch someone so familiar with the tools they are using :) Thanks for the tutorial
@TheCodingNotebook
@TheCodingNotebook Жыл бұрын
You're very welcome!
@codingwithsam4992
@codingwithsam4992 2 жыл бұрын
Please continue this tutorial series, we need it badly
@TheCodingNotebook
@TheCodingNotebook 2 жыл бұрын
This was not planned to be a series, just how to setup and use opencv on Android... For example, what else would you want to see?
@statwizard
@statwizard 3 жыл бұрын
Well done! This is very clear and to the point, even with typos that happen to us all. Lol 😂 If I could give you two thumbs up I would. 👍👍 +1 Subscribed!
@TheCodingNotebook
@TheCodingNotebook 3 жыл бұрын
Thank you!! Happy you liked it.
@Kuchen181
@Kuchen181 2 жыл бұрын
Thank you. This helped a lot! Had to switch to C++ so i can reuse the code on iOS
@TheCodingNotebook
@TheCodingNotebook 2 жыл бұрын
Great!
@paulorjr10
@paulorjr10 3 жыл бұрын
Really nice and clean explanation, man. Amazing work. Thank you.
@TheCodingNotebook
@TheCodingNotebook 3 жыл бұрын
Glad it was helpful!
@x32gx
@x32gx 3 жыл бұрын
Excellent tutorial! Thank you so much! I have a question, Would it be possible to detect motion and speed by processing camera input using OpenCv? Does it have the functionality for that? As an example: your device is capturing the environment while it is inside a moving vehicle. Would it be possible to image process the environtment and determine the vehicle is moving and also gauge its speed? Thank you!
@TheCodingNotebook
@TheCodingNotebook 3 жыл бұрын
If you can find an algorithm to gauge car speed from a stream of images then doing this with opencv on Android should be possible, I'm not familiar with such an algorithm... If you want to see how to process camera frames in opencv you can follow my playlist "crossolatform tensorflow lite" I hope to upload soon a video about object detection from the camera stream, which has some part using opencv.
@x32gx
@x32gx 3 жыл бұрын
@@TheCodingNotebook That would be great! Yeah any info about how to process camera frames would help. Thank you for the answer. There are a couple of algorithms that can extrapolate speed using parallax. I am hoping OpenCv can provide the pixel tracking that is needed for those algorithms.
@shidqi100
@shidqi100 2 жыл бұрын
Thank you so much for this video, in depth explanation indeed. Just asking would this image processing is better than image processing using java/kotlin in term of performance?
@TheCodingNotebook
@TheCodingNotebook 2 жыл бұрын
I never tried to do any image processing with java/kotlin, reason I chose opencv is due to all its capabilities and image processing algorithms. Although I never compared performance intuition is that it would be faster in c++, but again, never measured.
@mahdibazei7020
@mahdibazei7020 4 жыл бұрын
Found package configuration file: C:/tools/OpenCV-android-sdk/sdk/native/jni/OpenCVConfig.cmake but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND. I get this error, how can I fix it? opencv Version 4.5 android Studio Version 4.1
@vananh199
@vananh199 4 жыл бұрын
did you fix it? I have the same problem
@TheCodingNotebook
@TheCodingNotebook 4 жыл бұрын
@vananh199 Check here: (maybe you can contact him thru GH) github.com/ValYouW/AndroidOpenCVDemo/issues/1
@adrianm9078
@adrianm9078 3 жыл бұрын
Has anyone fixed it?
@andrejtimoshenko5297
@andrejtimoshenko5297 3 жыл бұрын
@@adrianm9078 Hi, if you have in CMakeLists.txt file smth like "project("prjName")", try to add all #opencv install stuff {set(OpenCV_STATIC on) set(OpenCV_DIR $ENV{OPENCV_ANDROID}/sdk/native/jni) find_package(OpenCV REQUIRED)} under "project("prjName")"
@VasilyAksenov
@VasilyAksenov 3 жыл бұрын
After adding the environment variable OPENCV_ANDROID the machine have to be restarted. That might be the cause of the error.
@danielrotnemer2564
@danielrotnemer2564 3 жыл бұрын
Oh, Thank you so much my friend !!!!! very nice tutorial with clear explanation! You saved me a lot of time. Tnx a lot!
@TheCodingNotebook
@TheCodingNotebook 3 жыл бұрын
Glad to hear that!
@cocacola7535
@cocacola7535 2 жыл бұрын
Sorry. I don't understand why you need to copy the code for converting bitmap to mat (and also from mat to bitmap) and paste it into native-lib.cpp. Because those functions are already provided by jnigraphics, why don't we just invoke them from native-lib.cpp?
@TheCodingNotebook
@TheCodingNotebook 2 жыл бұрын
Maybe you are right, can you show an example?
@programming_hut
@programming_hut 3 жыл бұрын
wonderful tutorial Huge THANKS
@TheCodingNotebook
@TheCodingNotebook 3 жыл бұрын
Thx!
@TeamBabeth
@TeamBabeth 4 жыл бұрын
Hi buddy good video i wanted to know where you leart all ndk developement as i want to learn but not having much access to study material.
@TheCodingNotebook
@TheCodingNotebook 4 жыл бұрын
Hi, just thru googling and collecting examples...
@mohsendhdh3444
@mohsendhdh3444 3 жыл бұрын
using OpenCv makes application size very large . can you compile it for some modules only?
@TheCodingNotebook
@TheCodingNotebook 3 жыл бұрын
I dont see any significant size increase. It uses opencv as a static library, it takes only the code it needs. For example, using the app from this video, the libnative-lib.so is only 3MB for the arm64-v8a arch
@Saman6633
@Saman6633 3 жыл бұрын
Good code from Great man, thank you so much
@asifadam93
@asifadam93 3 жыл бұрын
Nice man, thanks
@RicardoRodriguez-nn5jw
@RicardoRodriguez-nn5jw 4 жыл бұрын
hello! nice tutorial! do you know how to load dnn models using also c++native code? where to copy the files and how to read them?
@TheCodingNotebook
@TheCodingNotebook 4 жыл бұрын
Hi, it depends, I did an example of object detection using tensorflow lite, here: www.thecodingnotebook.com/2019/11/cross-platform-object-detection-with.html
@kunalkumar9399
@kunalkumar9399 2 жыл бұрын
it is expecting Sigma to be jobject rather than jfloat. This is throwing error. Can anyone please help...
@TheCodingNotebook
@TheCodingNotebook 2 жыл бұрын
I really show the entire process on the video, try to clone the code and build it...
@Cristian-ew4in
@Cristian-ew4in 3 жыл бұрын
Nice video, do you know if it's possible to count objects in real time using opencv+object detector model tflite in android?
@TheCodingNotebook
@TheCodingNotebook 3 жыл бұрын
Should be possible to combine object detection with tflite and opencv, can check my tutorial: www.thecodingnotebook.com/2019/11/cross-platform-object-detection-with.html As for the counting logic itself you'll have to implement on your own of course. Also worth checking is (the great) MediaPipe box tracking: google.github.io/mediapipe/solutions/box_tracking
@Cristian-ew4in
@Cristian-ew4in 3 жыл бұрын
@@TheCodingNotebook Thank you very much!
@ahmadooof
@ahmadooof Жыл бұрын
That's super
@TheCodingNotebook
@TheCodingNotebook Жыл бұрын
Thx!
@linhphan3805
@linhphan3805 3 жыл бұрын
thank you so much
@TheCodingNotebook
@TheCodingNotebook 3 жыл бұрын
You're welcome!
@melihcankilic5918
@melihcankilic5918 4 жыл бұрын
Can you make Tensorflow Lite on Android native with C++ video ?
@TheCodingNotebook
@TheCodingNotebook 4 жыл бұрын
Hi, I blogged about it in length here: www.thecodingnotebook.com/2019/11/cross-platform-object-detection-with.html I'll try to make a "code review" video if I'll find the time...
@melihcankilic5918
@melihcankilic5918 4 жыл бұрын
​@@TheCodingNotebook Thank you very much.
@andreramos3290
@andreramos3290 Жыл бұрын
top
@TheCodingNotebook
@TheCodingNotebook Жыл бұрын
thx
@13579987654321
@13579987654321 4 жыл бұрын
היי רציתי לשאול בנוגע לשימוש ב opencv ומצלמה של המכשיר בזמן אמת, נתקלתי בבעיה רצינית אשמח עם אוכל לשאול
@TheCodingNotebook
@TheCodingNotebook 4 жыл бұрын
Sure, you can also look at this example I did for real-time object detection: github.com/ValYouW/crossplatform-tflite-object-detecion
@moataz2415
@moataz2415 2 жыл бұрын
#include not found even after build the project😒
@TheCodingNotebook
@TheCodingNotebook 2 жыл бұрын
Check the gradle output when doing "gradle sync", sometimes "find_package(OpenCV REQUIRED)" will error and the error message can be easily overlooked
The Right Way To Return API Errors in .NET
10:40
Nick Chapsas
Рет қаралды 41 М.
Object detection using Tensorflow Lite C API on Android
54:16
The Coding Notebook
Рет қаралды 17 М.
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 43 МЛН
This dad wins Halloween! 🎃💀
01:00
Justin Flom
Рет қаралды 69 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 275 #shorts
00:29
«Осень». Самая большая загадка Windows XP
14:36
Девять десятых
Рет қаралды 1,1 МЛН
What's new in Android C++ development (Google I/O'19)
30:52
Android Developers
Рет қаралды 27 М.
The Vim Experience
45:19
Bog
Рет қаралды 173 М.
The Turbo Charged Laptop. Literally.
27:02
Linus Tech Tips
Рет қаралды 1,5 МЛН
Translating a Java Method to Native C++ (Android)
29:20
LaurieWired
Рет қаралды 7 М.
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 107 М.
Why Are Cooling Towers Shaped Like That?
19:48
Practical Engineering
Рет қаралды 1,8 МЛН
Cross Platform Graphical User Interfaces in C++
44:49
javidx9
Рет қаралды 871 М.
How to use native libraries on Android
21:52
Daniel Persson (Kalaspuffar)
Рет қаралды 20 М.
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 43 МЛН