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++
- Host: GitHub
- URL: https://github.com/m3y54m/dotnet-app-opencv
- Owner: m3y54m
- License: mit
- Created: 2021-09-29T14:18:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-03T23:27:54.000Z (over 4 years ago)
- Last Synced: 2025-07-26T23:17:15.244Z (11 months ago)
- Topics: console-application, cross-platform, csharp, dotnet, embedded-systems, linux, multithreading, opencv, serial-port
- Language: C#
- Homepage:
- Size: 358 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.