Ask Your Question
0

Android OpenCv

asked 2017-08-01 07:42:17 -0500

chrichri gravatar image

Hello!

In my Android App, I need to take (using OpenCv library) a stream from a pc in the Lan (I have the ip and UDP port of the stream). The stream must be displayed in the JavaCameraView, and the frames of this stream, must be elaborate by the "onCameraFrame(CvCameraViewFrame inputFrame)" method..

Can you help me?

Thank You very much!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-08-02 00:18:31 -0500

berak gravatar image

updated 2017-08-02 00:19:39 -0500

unfortunately, opencv cannot help you with the streaming on android, there is no backend(like ffmpeg or gstreamer on a desktop pc) here.

if you can get the requirements down to mjpeg protocol, then it would be fairly easy, to roll your own client from java (using Imgcodecs.imdecode(), and java Sockets), if not so, you'll have to rely on external libraries.

edit flag offensive delete link more

Comments

Thank you very much for your response!

The problem is that I must take (from my Android App) the live frame from a GoPro Hero4..

I have seen that I can obtain the live frame using some script or a single linux command: ffplay -an -fflags nobuffer -f:v mpegts -probesize 8192 rtp://10.5.5.9:8554

is there a way to take the frame in the Android App and pass them to onCameraFrame? (Frames can also go through a script in the computer)...

Thank you very much!

chrichri gravatar imagechrichri ( 2017-08-08 08:38:51 -0500 )edit

the problem is to get the frames from your gopro, anything after that is easy.

you might have to build (lib)ffmpeg on android, and use that somehow (idk.)

berak gravatar imageberak ( 2017-08-08 08:44:11 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-08-01 07:42:17 -0500

Seen: 155 times

Last updated: Aug 08 '17