-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac81568
commit 8070486
Showing
17 changed files
with
105 additions
and
1,299 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Binary file not shown.
1,026 changes: 0 additions & 1,026 deletions
1,026
.vs/Basestation_Software/config/applicationhost.config
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
142 changes: 71 additions & 71 deletions
142
Basestation_Software.Web/Core/Components/CameraDisplay.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,71 @@ | ||
@implements IDisposable | ||
@using OpenCvSharp | ||
|
||
<style> | ||
.scrollable { | ||
max-height: 50vh; | ||
overflow-y: auto; | ||
display: block; | ||
} | ||
</style> | ||
|
||
<div class="card full-height"> | ||
<div class="card-header"> | ||
<h4>Camera</h4> | ||
</div> | ||
<div class="card-body scrollable"> | ||
@if (!_dataLoaded) | ||
{ | ||
<div class="row"> | ||
<div class="spinner-border " role="status"></div> | ||
<div class="col"> | ||
<h3>Loading...</h3> | ||
</div> | ||
</div> | ||
} | ||
else | ||
{ | ||
<div class="col"> | ||
|
||
</div> | ||
} | ||
</div> | ||
</div> | ||
|
||
|
||
@code | ||
{ | ||
// Declare page member variables. | ||
private string _imgSrc; | ||
// Flags. | ||
private bool _dataLoaded = false; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
_dataLoaded = true; | ||
} | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
using (var capture = new VideoCapture("udp://127.0.0.1:1234")) | ||
using (var frame = new Mat()) | ||
{ | ||
while (true) | ||
{ | ||
capture.Read(frame); | ||
|
||
var base64 = Convert.ToBase64String(frame.ToBytes()); | ||
_imgSrc = $"data:image/gif;base64, {base64}"; | ||
|
||
await Task.Delay(1); | ||
|
||
StateHasChanged(); | ||
} | ||
} | ||
} | ||
|
||
void IDisposable.Dispose() | ||
{ | ||
|
||
} | ||
} | ||
@implements IDisposable | ||
@using OpenCvSharp | ||
|
||
<style> | ||
.scrollable { | ||
max-height: 50vh; | ||
overflow-y: auto; | ||
display: block; | ||
} | ||
</style> | ||
|
||
<div class="card full-height"> | ||
<div class="card-header"> | ||
<h4>Camera</h4> | ||
</div> | ||
<div class="card-body scrollable"> | ||
@if (!_dataLoaded) | ||
{ | ||
<div class="row"> | ||
<div class="spinner-border " role="status"></div> | ||
<div class="col"> | ||
<h3>Loading...</h3> | ||
</div> | ||
</div> | ||
} | ||
else | ||
{ | ||
<div class="col"> | ||
|
||
</div> | ||
} | ||
</div> | ||
</div> | ||
|
||
|
||
@code | ||
{ | ||
// Declare page member variables. | ||
private string _imgSrc; | ||
// Flags. | ||
private bool _dataLoaded = false; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
_dataLoaded = true; | ||
} | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
using (var capture = new VideoCapture("udp://127.0.0.1:1234")) | ||
using (var frame = new Mat()) | ||
{ | ||
while (true) | ||
{ | ||
capture.Read(frame); | ||
|
||
var base64 = Convert.ToBase64String(frame.ToBytes()); | ||
_imgSrc = $"data:image/gif;base64, {base64}"; | ||
|
||
await Task.Delay(1); | ||
|
||
StateHasChanged(); | ||
} | ||
} | ||
} | ||
|
||
void IDisposable.Dispose() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basestation_Software.Web", "Basestation_Software.Web\Basestation_Software.Web.csproj", "{685AF553-D781-42C7-826A-34FC743DE774}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basestation_Software.Models", "Basestation_Software.Models\Basestation_Software.Models.csproj", "{77205455-D724-4ABA-885D-56584808BD4A}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basestation_Software.Api", "Basestation_Software.Api\Basestation_Software.Api.csproj", "{1E94F4E9-944B-4373-96E8-2B15C550A4AF}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{685AF553-D781-42C7-826A-34FC743DE774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{685AF553-D781-42C7-826A-34FC743DE774}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{685AF553-D781-42C7-826A-34FC743DE774}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{685AF553-D781-42C7-826A-34FC743DE774}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{77205455-D724-4ABA-885D-56584808BD4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{77205455-D724-4ABA-885D-56584808BD4A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{77205455-D724-4ABA-885D-56584808BD4A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{77205455-D724-4ABA-885D-56584808BD4A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basestation_Software.Web", "Basestation_Software.Web\Basestation_Software.Web.csproj", "{685AF553-D781-42C7-826A-34FC743DE774}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basestation_Software.Models", "Basestation_Software.Models\Basestation_Software.Models.csproj", "{77205455-D724-4ABA-885D-56584808BD4A}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basestation_Software.Api", "Basestation_Software.Api\Basestation_Software.Api.csproj", "{1E94F4E9-944B-4373-96E8-2B15C550A4AF}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{685AF553-D781-42C7-826A-34FC743DE774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{685AF553-D781-42C7-826A-34FC743DE774}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{685AF553-D781-42C7-826A-34FC743DE774}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{685AF553-D781-42C7-826A-34FC743DE774}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{77205455-D724-4ABA-885D-56584808BD4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{77205455-D724-4ABA-885D-56584808BD4A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{77205455-D724-4ABA-885D-56584808BD4A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{77205455-D724-4ABA-885D-56584808BD4A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{1E94F4E9-944B-4373-96E8-2B15C550A4AF}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |