Sceneform: Render WebRTC media stream in to ExternalTexture - java

I am trying to develop an AR app to help visual impaired people to make better their access conditions to a computer.
I am investigating on how AR can help HCI for visual disabilities, so, the application is using WebRTC to get computer Desktop to be magnified at AR environment using Sceneform.
I have successfully used the Sceneform example https://github.com/google-ar/sceneform-android-sdk/tree/master/samples/chromakeyvideo, but, I have no idea of how to render the WebRTC stream directly to a ExternalTexture. -> https://github.com/judicapo/MUITSS-ARBE/tree/master/SampleApps/ARCK
I already tried some Stackoverflow answers, but, have not found the clue.
Thank you all for your replies, hope some one has any idea.

Honestly I have not worked with this. but I could think of a way on how to approach this.
Instead of chromaKey rendering on a texture, why don't you try a 'ViewRenderable'? using this, you can place any android View to a node. You just need to place a VideoView and do your webRTC magic. let me know if this works
https://developers.google.com/ar/reference/java/sceneform/reference/com/google/ar/sceneform/rendering/ViewRenderable
https://developers.google.com/ar/develop/java/sceneform/create-renderables
AugmentedImage example - https://proandroiddev.com/arcore-sceneform-simple-video-playback-3fe2f909bfbc
ViewRenderable example - https://github.com/Hariofspades/ARExperiments/blob/master/AugmentedImages/app/src/main/java/com/hariofspades/augmentedimages/common/AugmentedImageNode.java

Related

How do I connect my Unity3d Model to my WPILib Code for FRCJava?

I want to simulate my FRC robot code in Unity3d. For this, I watched the video by
Bill Kinahan on Youtube and was able to make the Unity3d Model. But I am having trouble getting to run and connect my Java code to it.
Link to Youtube Video: https://www.youtube.com/watch?v=Qryc2ck-AgY&t=2514s
Please I have been trying everything. Since I have no prior experience with Websockets I don't know how to actually use it nor do I know where to include it in the code. Any kind of help will be much appreciated. Thank You

Android Camera preview with funhouse mirror effect

I created a android small app that uses the front facing camera to shoot a selfie. But what i want to accomplish is a funhouse mirror effect.
I searched the internet trying to find a solution or a way to do this but i am guessing i am searching for the wrong terms here:
Sample Image
Can someone push me in the right direction or how this is made? I searched for morphing, distortion etc.
What i have right now:
A basic camera app wich is saving a taken photo using the Camera2 API in Android SDK 23
Just only Camera2 API are not enough to develop an app which is like mentioned you. You should use computer vision libraries such as OpenCV or OpenGL.
First of all, please check it out for creating theoretical background.
Here is an example application which is using OpenCV and it is about funny effects.
This can be another reference application which is about fun house effects and it was developed by using GLSL.
Also this post can be helpful for you.
Moreover, you can check it and it out. And, you can use "image warping" term to search to find solutions for your problem on internet.

How to make H.264 file fast-forwardable in Android application?

I am an intern at company and my 'learning task' is to make Android application in Java, which takes H.264 format videos (at first they will be stored at SD card) and make like a very simple player, which would have the following features:
1.You can pause/play/fast-forward/fast-backward video
2.When you are at certain point of video and it is stopped, you can switch to the same time in a different video (same picture frame index i guess).
How could i do that? Is using Gstreamer a good way? I looked at the poor tutorial available on net and because of my lack of experience in video processing (I've never worked with video in Android applications) I have quite a hard time understanding what is pipelines, also the JNI and even setting up Gstreamer for Eclipse. Is there a better way of doing this? What should I get to know before starting to mess with this program?
Thanks, in advance!
All of your mentioned features are possible in Gstreamer, however, there is a learning curve.
To understand the GStreamer android tutorials, you must first go through the basic tutorials here: http://docs.gstreamer.com/display/GstSDK/Basic+tutorials
If you feel comfortable with the pipeline architecture, then go ahead and set up your android environment (which is no easy task by itself). Gstreamer is a very very powerful framework where you can do almost anything, if you're willing to make the effort to overcome the learning curve.
So i suggest to go ahead in gstreamer only if you have the time and patience, else go for a simpler solution. Unfortunately i'm not familiar with android, so i cannot suggest any. maybe a quick google search will help.

How to create an OpenGL live wallpaper?

I'm trying to find the right approach for creating an Android OpenGL live wallpaper i.e. a way to convert an app written to use GLSurfaceView into a live wallpaper. There appears to be nothing in the official Android documentation about this surprisingly and it's not obvious what to do.
I've found a few discussions about this elsewhere where most end up linking to the following code written an Android developer:
http://www.rbgrn.net/content/354-glsurfaceview-adapted-3d-live-wallpapers
However, the comments on the page suggest there are problems with the code (memory leaks, lock ups). Does anyone know of any alternatives? If I upload a wallpaper to the market, I'd obviously like to avoid complaints caused by buggy code.
I found an open source example that may help you.
http://code.google.com/p/android-deep-wallpaper/
also, it looks like to use open GL, the GL ES code needs to be called from a different thread.
hope this helps :D
There is a library for building OpenGL Live Wallpapers for Android called GLWallpaperService. You can find GLWallpaperService on GitHub. It includes the code you linked to on rbgrn.net but with a few bug fixes included. There are some alternate implementations available as well. Good luck.

Where to start writing a simple java app for a mobile platform?

//Backstory
i have a LG Rumor Touch phone, and it comes with a couple social media apps that are just awful to use, and restrictive as far as features.
//Question
Ive worked with people before making iphone apps who would write basically like a "wrapper" that would just invoke a browser window inside the app to load a site where the app actually ran, im looking to do something similar but using java, but am wanting some advice as to where to get started.
Take a look at PhoneGap, the Android version looks like a good fit for what you are trying to accomplish, since you mentioned Java in the tag.
I dont know enough about the LG Touch OS development... so I apologize if off track
Here is an Android Quick Start

Categories