Computer Vision News - May 2022
9 MediaPipe 2/2 If you have a GPUwith EGL driver support, you can also install mesa GPU libraries, to compile your MediaPipe solutions using GPU: sudo apt-get install mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev bazel run --copt -DMESA _ EGL _ NO _ X11 _ HEADERS --copt -DEGL _ NO _ X11 mediapipe/examples/desktop/hello _ world:hello _ world This last step should print Hello World! multiple times in your terminal window. If this happens, your setup is complete. Building MediaPipe solutions on Android Studio You will need Android Studio for this step. Download it from here , and run the following to open it on Ubuntu. tar -xf android-studio-2021.1.1.23-linux.tar.gz sudo mv android-studio /usr/local/ cd /usr/local/android-studio/bin . /studio.sh Import mediapipe/examples/android/solutions directory from your previously defined $workspace _ dir into Android Studio, by clicking on the Open button on the initial window. Here, first sync the project by clicking on File -> Sync Project with Gradle Files (Fig.1). If you are not very familiar with Android Studio, remember you need to setup an emulator or connect your own device before being able to run a script and see any result. You can do that through the drop-down menu (Fig.1) on the top right. In my window, you can see I setup a Pixel 2 XL emulator. I suggest you use the same, or, if you go for another one, you might need to define the api-level for the NDK in the workspace folder. Figure 1: Screenshot of Android Studio while building the Hands solution. On the left, the Project folder shows the files found in the directory. On the right, you have the Emulator view. When the program is run, this is where you can test your application. Yellow, Green and Red boxes highlight buttons of interest for steps to follow.
Made with FlippingBook
RkJQdWJsaXNoZXIy NTc3NzU=