An open API service indexing awesome lists of open source software.

https://github.com/m3y54m/dotnet-app-opencv

An embedded-developer-friendly project for .NET 5.0 with C# in Linux + SerialPort + Multi-threading + OpenCV C++
https://github.com/m3y54m/dotnet-app-opencv

console-application cross-platform csharp dotnet embedded-systems linux multithreading opencv serial-port

Last synced: 3 months ago
JSON representation

An embedded-developer-friendly project for .NET 5.0 with C# in Linux + SerialPort + Multi-threading + OpenCV C++

Awesome Lists containing this project

README

          

# C# App for Embedded Developers :)

An embedded developer friendly project for .NET 5.0 with C# in Linux ,capable of:

- Calling an OpenCV-based C++ function in a C# program
- Communication with a serial port in C#
- Multi-threading for processing serial port incoming bytes

## Useful Commands

### Create the app

https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code

```console
dotnet new console --framework net5.0
```

### Create `libsobel.so` C shared library

```console
cmake -S sobel_opencv_cpp/src -B sobel_opencv_cpp/build
cmake --build sobel_opencv_cpp/build
```
### Install .NET dependencies

- Add support for Bitmap images

```console
dotnet add package System.Drawing.Common --version 5.0.2
sudo apt install libgdiplus
```

- Add support for SerialPort communication

```console
dotnet add package System.IO.Ports --version 5.0.1
```

- Add support for Threads

```console
dotnet add package System.Threading --version 4.3.0
```
### Run the app

```console
dotnet run
```

### Testing serial port

In order to test the functionality of serial port data processing of this C# program you can use upload the Arduino program available in `arduino_serial_port` directory to an Arduino board.