question

CarlosAnderson-9096 avatar image
0 Votes"
CarlosAnderson-9096 asked CarlosAnderson-9096 commented

How can I create a real-time video processing app using Xamarin.Forms?

I'd like to create a Xamarin.Forms app where I could process images from a live video, and show the user the processed images (as a video in real-time). I'd like to use OpenCV for the processing, which I've done before with individual images (using SkiaSharp to show the processed image). But I haven't done this live, and I'm having a hard time finding a straightforward solution for this online.

I suppose I could use SkiaSharp to show the processed images as a video, but I'm not sure whether this is the most efficient or performant way.

dotnet-xamarin
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

If SkiaSharp can be used to develop 2D games (like others did), I wonder why it cannot support what you planned to implement (simpler than games).

0 Votes 0 ·

I haven't tried using SkiaSharp, but perhaps I should in case it's good enough for my needs. I was just wondering if there's something known to work well.

0 Votes 0 ·

Hi, CarlosAnderson. Please test the function on your side. We're not experts in skiasharp, it's suggested to report the problem about the code to the skiasharp github repo if you're facing some issues while implementing.

0 Votes 0 ·

Hello Carlos Anderson,

did you have any progress developing an app with live video processing? I am trying something similar but I am pretty new to programming, so i am having troubles finding sources which provide me helpful information on how to proceed.
Moreover, I'm not sure if you have found this page: xamarin-forms-camera-barcode-scanner.html
It describes the xamarin forms code of a barcode scanner, which uses live video to apply a barcode detection. I was thinking, maybe it is possible to extract the steps, which extract individual frames from the camera stream to then use continuous image processing on them. But again, I am not sure if that works.


0 Votes 0 ·

Hi Jannis,

Yes, I was able to get something working on Android. I used the Android Camera 2 API (via Xamarin.Android) to get each frame from the video. I then processed each image in OpenCV and finally converted it to a SkiaSharp image to display in Xamarin.Forms. I'm not working on this project anymore, but thanks for the barcode sample anyway.

0 Votes 0 ·

Thanks for your reply, Carlos!
Would it be possible for you to share the code with me? I am still trying to find a way, how to extract the individual frames in order to further process them. Unfortunately, I can't seem to solve my problem and can't continue in my project...

0 Votes 0 ·
Show more comments

0 Answers