How to take a photo using a camera in linux using c#

Viewed 203

I am looking for a way to capture a single image using .NetCore3.1/.NET5 in Linux to be sent to a server. A nice bonus would be if the same solution worked for windows as well but it is not necessary. I am struggling to find any library that could do something like that.

I will also be using multiple cameras, so I need a way to enumerate and distinguish which one I am taking an image from.

1 Answers

I'm assuming you're referring to webcams when you say 'camera'. The solution I would use is OpenCV as it's compatible with linux and allows you to capture images and videos from webcams (assuming your camera is supported by linux) as well as process images.

However, OpenCV was originally developed for C/C++ so you'll need to use a C# wrapper. I would recommend using EmguCV: https://www.emgu.com/

Related