Difference between revisions of "Asp.Net Core on Ubuntu"

From Emgu CV: OpenCV in .NET (C#, VB, C++ and more)
Jump to: navigation, search
Line 2: Line 2:
  
 
== Requirements ==
 
== Requirements ==
This tutorial is based on Ubuntu 20.04 LTS. Please follow [https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu this instruction] to install asp .net core on Ubuntu. Once that is done, run the following command to verify dotnet is installed:
+
This tutorial is based on Ubuntu 20.04 LTS. You will need to follow the instruction [[Download_And_Installation#Linux|here]] to build Emgu CV from source code.
<pre>
+
Once you have the BuildInfo.NetCore.Console project running from above, you have the dependencies setup for your project and can continue below.
ubuntu:~$ dotnet --list-runtimes
 
</pre>
 
It should show a message similar to the following
 
<pre>
 
Microsoft.AspNetCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
 
Microsoft.NETCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
 
</pre>
 
  
== To be completed soon ==
+
== Running the ASP .NetCore project ==
 +
The source code is located under the <pre>Emgu.CV.Example/DynamicImage.Asp.NetCore</pre> folder.
  
To be completed soon...
+
=== Command Line ===
 +
You can run the project by running <pre>dotnet run</pre> in the above folder.
 +
 
 +
=== Using Visual Studio Code ===
 +
You can also open the project with Visual Studio Code
 +
 
 +
== Testing with a browser ==
 +
Open a browser from Ubuntu and enter the url <pre> http://localhost:5000/api/file </pre>
 +
You should get a Jpeg file, generated by Emgu CV, that contains text describing the current time on the system.
 +
[[File: aspnet_core_ubuntu.png]]

Revision as of 16:17, 24 June 2020

This example requires Emgu CV 4.3.0 and up

Requirements

This tutorial is based on Ubuntu 20.04 LTS. You will need to follow the instruction here to build Emgu CV from source code. Once you have the BuildInfo.NetCore.Console project running from above, you have the dependencies setup for your project and can continue below.

Running the ASP .NetCore project

The source code is located under the
Emgu.CV.Example/DynamicImage.Asp.NetCore
folder.

Command Line

You can run the project by running
dotnet run
in the above folder.

Using Visual Studio Code

You can also open the project with Visual Studio Code

Testing with a browser

Open a browser from Ubuntu and enter the url
 http://localhost:5000/api/file 

You should get a Jpeg file, generated by Emgu CV, that contains text describing the current time on the system. Aspnet core ubuntu.png