Initial commit

This commit is contained in:
David Allen 2022-12-04 11:26:52 -06:00
commit 8bde43bd49
152 changed files with 5294 additions and 0 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

6
.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
# Godot 4+ specific ignores
.godot/
client/bin/*
client/obj/*
server/bin/*
server/obj/*

52
client/Program.cs Normal file
View file

@ -0,0 +1,52 @@
// https://github.com/kekyo/FlashCap
using System.IO;
using System.Diagnostics;
using System.Net.Http.Headers;
namespace QrScanner{
class Program{
static async Task<int> run_scan(){
Process p = new Process();
p.StartInfo = new ProcessStartInfo("/usr/bin/bpython", "client/qr_scan2.py")
{
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true
};
p.Start();
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
Console.WriteLine($"{output}");
if(!string.IsNullOrEmpty(output))
await make_request(output);
return 0;
}
static async Task make_request(string code){
// Bypass SSL certificate validation (not secure)
HttpClientHandler client_handler = new HttpClientHandler();
client_handler.ServerCertificateCustomValidationCallback = (sender, client_handler, chain, ssl_policy_errors) => { return true; };
HttpClient client = new(client_handler);
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/json")
);
client.DefaultRequestHeaders.Add("User-Agent", "QR Scanner");
var json = await client.GetStringAsync("https://localhost:7001/scan?code="+code);
if(!string.IsNullOrEmpty(json))
Console.WriteLine(json);
}
public static async Task<int> Main(string[] args){
// QrReaderEmgu reader = new QrReaderEmgu();
// reader.print_capture_devices();
// reader.capture_frame();
return await run_scan();
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
client/bin/Debug/net7.0/client Executable file

Binary file not shown.

View file

@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v7.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v7.0": {
"client/1.0.0": {
"runtime": {
"client.dll": {}
}
}
}
},
"libraries": {
"client/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
}
}
}

BIN
client/bin/Debug/net7.0/qrreader Executable file

Binary file not shown.

View file

@ -0,0 +1,781 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v7.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v7.0": {
"qrreader/1.0.0": {
"dependencies": {
"AForge": "2.2.5",
"AForge.Imaging": "2.2.5",
"AForge.Math": "2.2.5",
"AForge.Video": "2.2.5",
"AForge.Video.DirectShow": "2.2.5",
"Emgu.CV": "4.6.0.5131",
"Emgu.CV.Bitmap": "4.6.0.5131",
"Emgu.CV.runtime.windows": "4.6.0.5131",
"FlashCap": "1.4.0",
"SixLabors.ImageSharp": "2.1.3",
"System.Reactive": "5.0.0",
"ZXing.Net": "0.16.8",
"ZXing.Net.Bindings.Windows.Compatibility": "0.16.10"
},
"runtime": {
"qrreader.dll": {}
}
},
"AForge/2.2.5": {
"runtime": {
"lib/AForge.dll": {
"assemblyVersion": "2.2.5.0",
"fileVersion": "2.2.5.0"
}
}
},
"AForge.Imaging/2.2.5": {
"dependencies": {
"AForge": "2.2.5",
"AForge.Math": "2.2.5"
},
"runtime": {
"lib/AForge.Imaging.dll": {
"assemblyVersion": "2.2.5.0",
"fileVersion": "2.2.5.0"
}
}
},
"AForge.Math/2.2.5": {
"dependencies": {
"AForge": "2.2.5"
},
"runtime": {
"lib/AForge.Math.dll": {
"assemblyVersion": "2.2.5.0",
"fileVersion": "2.2.5.0"
}
}
},
"AForge.Video/2.2.5": {
"dependencies": {
"AForge": "2.2.5"
},
"runtime": {
"lib/AForge.Video.dll": {
"assemblyVersion": "2.2.5.0",
"fileVersion": "2.2.5.0"
}
}
},
"AForge.Video.DirectShow/2.2.5": {
"dependencies": {
"AForge.Video": "2.2.5"
},
"runtime": {
"lib/AForge.Video.DirectShow.dll": {
"assemblyVersion": "2.2.5.0",
"fileVersion": "2.2.5.0"
}
}
},
"Emgu.CV/4.6.0.5131": {
"dependencies": {
"System.Drawing.Primitives": "4.3.0",
"System.Runtime": "4.3.1",
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0"
},
"runtime": {
"lib/netstandard2.0/Emgu.CV.dll": {
"assemblyVersion": "4.6.0.5131",
"fileVersion": "4.6.0.5131"
}
}
},
"Emgu.CV.Bitmap/4.6.0.5131": {
"dependencies": {
"Emgu.CV": "4.6.0.5131",
"System.Drawing.Common": "6.0.0"
},
"runtime": {
"lib/netstandard2.0/Emgu.CV.Bitmap.dll": {
"assemblyVersion": "4.6.0.5131",
"fileVersion": "4.6.0.5131"
}
}
},
"Emgu.CV.runtime.windows/4.6.0.5131": {
"dependencies": {
"Emgu.CV": "4.6.0.5131",
"Emgu.runtime.windows.msvc.rt.arm64": "19.33.31630",
"Emgu.runtime.windows.msvc.rt.x64": "19.33.31630",
"Emgu.runtime.windows.msvc.rt.x86": "19.33.31630"
},
"runtimeTargets": {
"runtimes/win-arm64/native/cvextern.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/cvextern.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/opencv_videoio_ffmpeg460_64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/cvextern.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/opencv_videoio_ffmpeg460.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"Emgu.runtime.windows.msvc.rt.arm64/19.33.31630": {
"runtimeTargets": {
"runtimes/win-arm64/native/concrt140.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm64/native/msvcp140.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm64/native/msvcp140_1.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm64/native/msvcp140_2.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm64/native/msvcp140_atomic_wait.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm64/native/msvcp140_codecvt_ids.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm64/native/vcruntime140.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm64/native/vcruntime140_1.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"Emgu.runtime.windows.msvc.rt.x64/19.33.31630": {
"runtimeTargets": {
"runtimes/win-x64/native/concrt140.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/msvcp140.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/msvcp140_1.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/msvcp140_2.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/msvcp140_atomic_wait.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/msvcp140_codecvt_ids.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/vcruntime140.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/vcruntime140_1.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"Emgu.runtime.windows.msvc.rt.x86/19.33.31630": {
"runtimeTargets": {
"runtimes/win-x86/native/concrt140.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/msvcp140.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/msvcp140_1.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/msvcp140_2.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/msvcp140_atomic_wait.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/msvcp140_codecvt_ids.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/vcruntime140.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"FlashCap/1.4.0": {
"dependencies": {
"FlashCap.Core": "1.4.0"
},
"runtime": {
"lib/net7.0/FlashCap.dll": {
"assemblyVersion": "1.4.0.0",
"fileVersion": "2022.11.23.38413"
}
}
},
"FlashCap.Core/1.4.0": {
"runtime": {
"lib/net7.0/FlashCap.Core.dll": {
"assemblyVersion": "1.4.0.0",
"fileVersion": "2022.11.23.38413"
}
}
},
"Microsoft.NETCore.Platforms/5.0.0": {},
"Microsoft.NETCore.Targets/1.1.3": {},
"Microsoft.Win32.SystemEvents/6.0.0": {
"runtime": {
"lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"runtime.native.System/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3"
}
},
"SixLabors.ImageSharp/2.1.3": {
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "5.0.0",
"System.Text.Encoding.CodePages": "5.0.0"
},
"runtime": {
"lib/netcoreapp3.1/SixLabors.ImageSharp.dll": {
"assemblyVersion": "2.0.0.0",
"fileVersion": "2.1.3.0"
}
}
},
"System.Drawing.Common/6.0.0": {
"dependencies": {
"Microsoft.Win32.SystemEvents": "6.0.0"
},
"runtime": {
"lib/net6.0/System.Drawing.Common.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/unix/lib/net6.0/System.Drawing.Common.dll": {
"rid": "unix",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
},
"runtimes/win/lib/net6.0/System.Drawing.Common.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"System.Drawing.Primitives/4.3.0": {
"dependencies": {
"System.Runtime": "4.3.1",
"System.Runtime.Extensions": "4.3.0"
}
},
"System.Globalization/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Runtime": "4.3.1"
}
},
"System.IO/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Runtime": "4.3.1",
"System.Text.Encoding": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.Reactive/5.0.0": {
"runtime": {
"lib/net5.0/System.Reactive.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.0.1"
}
}
},
"System.Reflection/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.IO": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.1"
}
},
"System.Reflection.Extensions/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.1"
}
},
"System.Reflection.Primitives/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Runtime": "4.3.1"
}
},
"System.Resources.ResourceManager/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Globalization": "4.3.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.1"
}
},
"System.Runtime/4.3.1": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3"
}
},
"System.Runtime.CompilerServices.Unsafe/5.0.0": {},
"System.Runtime.Extensions/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Runtime": "4.3.1"
}
},
"System.Runtime.Handles/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Runtime": "4.3.1"
}
},
"System.Runtime.InteropServices/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Reflection": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.1",
"System.Runtime.Handles": "4.3.0"
}
},
"System.Runtime.InteropServices.RuntimeInformation/4.3.0": {
"dependencies": {
"System.Reflection": "4.3.0",
"System.Reflection.Extensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.1",
"System.Runtime.InteropServices": "4.3.0",
"System.Threading": "4.3.0",
"runtime.native.System": "4.3.0"
}
},
"System.Text.Encoding/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Runtime": "4.3.1"
}
},
"System.Text.Encoding.CodePages/5.0.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0"
}
},
"System.Threading/4.3.0": {
"dependencies": {
"System.Runtime": "4.3.1",
"System.Threading.Tasks": "4.3.0"
}
},
"System.Threading.Tasks/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.3",
"System.Runtime": "4.3.1"
}
},
"ZXing.Net/0.16.8": {
"runtime": {
"lib/net6.0/zxing.dll": {
"assemblyVersion": "0.16.8.0",
"fileVersion": "0.16.8.0"
}
}
},
"ZXing.Net.Bindings.Windows.Compatibility/0.16.10": {
"dependencies": {
"System.Drawing.Common": "6.0.0",
"ZXing.Net": "0.16.8"
},
"runtime": {
"lib/net6.0/ZXing.Windows.Compatibility.dll": {
"assemblyVersion": "0.16.10.0",
"fileVersion": "0.16.10.0"
}
}
}
}
},
"libraries": {
"qrreader/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"AForge/2.2.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-clkumhM9DggqIzEXAHgVLeWO4arG5YfoPr7J4jfjJx35AoeEIJSSm49J25bwp/9mXQYLwi7y1Wunc8qgYJsGxg==",
"path": "aforge/2.2.5",
"hashPath": "aforge.2.2.5.nupkg.sha512"
},
"AForge.Imaging/2.2.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-n8l7Zdsm89EFW9Uz4uCO3D428Gu4Q56YxixSMJPruen1c30R8R9Mm8AreTdoOi2XjN5id04JwFFlXYTk8pIIfw==",
"path": "aforge.imaging/2.2.5",
"hashPath": "aforge.imaging.2.2.5.nupkg.sha512"
},
"AForge.Math/2.2.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pmT1WobVv13vMxwXhCu8sRunxjiUHyURWS0+dsW/aBPi06xiyYIdCLHI6jph9Axb4QoLIlb85eBI6zd2EAbGIg==",
"path": "aforge.math/2.2.5",
"hashPath": "aforge.math.2.2.5.nupkg.sha512"
},
"AForge.Video/2.2.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-XqzcOXtBUagEPRqg/00oayxlCPmxP4284SdM62mVotsNoD03fs19BrzdMBfhUOOYPyd0B/IXH7tEWnSDmc2gxA==",
"path": "aforge.video/2.2.5",
"hashPath": "aforge.video.2.2.5.nupkg.sha512"
},
"AForge.Video.DirectShow/2.2.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pEch6felU/RGAbl0A7yjaQjsGxwiRFU9R+qBqR92wQo++XhzPLeQaZHnAPIBYaG7MfoqtjgCDkK4z3Tra4VQ3w==",
"path": "aforge.video.directshow/2.2.5",
"hashPath": "aforge.video.directshow.2.2.5.nupkg.sha512"
},
"Emgu.CV/4.6.0.5131": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pRtYFTe+IZBoxm79cfkAS2QHnmLiz6upyKJNUnxUyVrOlw+QoLL7lx1siXCruvOVU5wkxCqOCBYDHnDNBSURsQ==",
"path": "emgu.cv/4.6.0.5131",
"hashPath": "emgu.cv.4.6.0.5131.nupkg.sha512"
},
"Emgu.CV.Bitmap/4.6.0.5131": {
"type": "package",
"serviceable": true,
"sha512": "sha512-T+Gm73BlAd+88BpMf8qpWtG5oX/a8/J3GIsYYKJsrcYtj6IWC15vBu8BXeasseZpdDNFfSmOrKJVWDEG1G9ICQ==",
"path": "emgu.cv.bitmap/4.6.0.5131",
"hashPath": "emgu.cv.bitmap.4.6.0.5131.nupkg.sha512"
},
"Emgu.CV.runtime.windows/4.6.0.5131": {
"type": "package",
"serviceable": true,
"sha512": "sha512-YAybhlr28ETP2Uv7j1Wg4cxF5CJfgbOT3FQ9602ZY0kZgJKV3qDaUn6ZdUMalO5HocU9czCxHEwHhQH+645XZQ==",
"path": "emgu.cv.runtime.windows/4.6.0.5131",
"hashPath": "emgu.cv.runtime.windows.4.6.0.5131.nupkg.sha512"
},
"Emgu.runtime.windows.msvc.rt.arm64/19.33.31630": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Pbu8A7ghkM9HeKSS012SYvrejpj3Hpo5JKF3NaQ+0klv3cu47gbt2W+RaEhcXZZWelPmvgweXBjSVTef0HfTrw==",
"path": "emgu.runtime.windows.msvc.rt.arm64/19.33.31630",
"hashPath": "emgu.runtime.windows.msvc.rt.arm64.19.33.31630.nupkg.sha512"
},
"Emgu.runtime.windows.msvc.rt.x64/19.33.31630": {
"type": "package",
"serviceable": true,
"sha512": "sha512-sBIDz7mLJgYKgmut7WNwuCG5/+VTwsf+Oubd430QfdF4bgJPJoUCQ7P9OKvTvqQo1t95DpgdyjxNloDVCGUIFQ==",
"path": "emgu.runtime.windows.msvc.rt.x64/19.33.31630",
"hashPath": "emgu.runtime.windows.msvc.rt.x64.19.33.31630.nupkg.sha512"
},
"Emgu.runtime.windows.msvc.rt.x86/19.33.31630": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Jwqm4yrJRDWs4rUmcpwUVvDuISRgp6WJvCX/n1rTy52GjnWKvzTYOPvhKiAH2alB/bBGbNhyP5UvmhUeN3dOXw==",
"path": "emgu.runtime.windows.msvc.rt.x86/19.33.31630",
"hashPath": "emgu.runtime.windows.msvc.rt.x86.19.33.31630.nupkg.sha512"
},
"FlashCap/1.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ixxoab11r00EMfGjeC/KCGfr8H38Q2FC4LTuR+IZPNTuuMDdkKxUcd0hd3i7UI82xqwNiTbsb0c4c4v0bSce3Q==",
"path": "flashcap/1.4.0",
"hashPath": "flashcap.1.4.0.nupkg.sha512"
},
"FlashCap.Core/1.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-smsAvwFIYUo7zUwfFUHLtjy1RmFUIZgjpUs5ANnH1WQ2BtXfmWl8QexsE1aK5okQHhyF7JhJuW3CBatXixT02w==",
"path": "flashcap.core/1.4.0",
"hashPath": "flashcap.core.1.4.0.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
"path": "microsoft.netcore.platforms/5.0.0",
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
},
"Microsoft.NETCore.Targets/1.1.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3Wrmi0kJDzClwAC+iBdUBpEKmEle8FQNsCs77fkiOIw/9oYA07bL1EZNX0kQ2OMN3xpwvl0vAtOCYY3ndDNlhQ==",
"path": "microsoft.netcore.targets/1.1.3",
"hashPath": "microsoft.netcore.targets.1.1.3.nupkg.sha512"
},
"Microsoft.Win32.SystemEvents/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A==",
"path": "microsoft.win32.systemevents/6.0.0",
"hashPath": "microsoft.win32.systemevents.6.0.0.nupkg.sha512"
},
"runtime.native.System/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==",
"path": "runtime.native.system/4.3.0",
"hashPath": "runtime.native.system.4.3.0.nupkg.sha512"
},
"SixLabors.ImageSharp/2.1.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-8yonNRWX3vUE9k29ta0Hbfa0AEc0hbDjSH/nZ3vOTJEXmY6hLnGsjDKoz96Z+AgOsrdkAu6PdL/Ebaf70aitzw==",
"path": "sixlabors.imagesharp/2.1.3",
"hashPath": "sixlabors.imagesharp.2.1.3.nupkg.sha512"
},
"System.Drawing.Common/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
"path": "system.drawing.common/6.0.0",
"hashPath": "system.drawing.common.6.0.0.nupkg.sha512"
},
"System.Drawing.Primitives/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-1QU/c35gwdhvj77fkScXQQbjiVAqIL3fEYn/19NE0CV/ic5TN5PyWAft8HsrbRd4SBLEoErNCkWSzMDc0MmbRw==",
"path": "system.drawing.primitives/4.3.0",
"hashPath": "system.drawing.primitives.4.3.0.nupkg.sha512"
},
"System.Globalization/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
"path": "system.globalization/4.3.0",
"hashPath": "system.globalization.4.3.0.nupkg.sha512"
},
"System.IO/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
"path": "system.io/4.3.0",
"hashPath": "system.io.4.3.0.nupkg.sha512"
},
"System.Reactive/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"path": "system.reactive/5.0.0",
"hashPath": "system.reactive.5.0.0.nupkg.sha512"
},
"System.Reflection/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
"path": "system.reflection/4.3.0",
"hashPath": "system.reflection.4.3.0.nupkg.sha512"
},
"System.Reflection.Extensions/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==",
"path": "system.reflection.extensions/4.3.0",
"hashPath": "system.reflection.extensions.4.3.0.nupkg.sha512"
},
"System.Reflection.Primitives/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
"path": "system.reflection.primitives/4.3.0",
"hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
},
"System.Resources.ResourceManager/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
"path": "system.resources.resourcemanager/4.3.0",
"hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
},
"System.Runtime/4.3.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-abhfv1dTK6NXOmu4bgHIONxHyEqFjW8HwXPmpY9gmll+ix9UNo4XDcmzJn6oLooftxNssVHdJC1pGT9jkSynQg==",
"path": "system.runtime/4.3.1",
"hashPath": "system.runtime.4.3.1.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==",
"path": "system.runtime.compilerservices.unsafe/5.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512"
},
"System.Runtime.Extensions/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==",
"path": "system.runtime.extensions/4.3.0",
"hashPath": "system.runtime.extensions.4.3.0.nupkg.sha512"
},
"System.Runtime.Handles/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==",
"path": "system.runtime.handles/4.3.0",
"hashPath": "system.runtime.handles.4.3.0.nupkg.sha512"
},
"System.Runtime.InteropServices/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==",
"path": "system.runtime.interopservices/4.3.0",
"hashPath": "system.runtime.interopservices.4.3.0.nupkg.sha512"
},
"System.Runtime.InteropServices.RuntimeInformation/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==",
"path": "system.runtime.interopservices.runtimeinformation/4.3.0",
"hashPath": "system.runtime.interopservices.runtimeinformation.4.3.0.nupkg.sha512"
},
"System.Text.Encoding/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
"path": "system.text.encoding/4.3.0",
"hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
},
"System.Text.Encoding.CodePages/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NyscU59xX6Uo91qvhOs2Ccho3AR2TnZPomo1Z0K6YpyztBPM/A5VbkzOO19sy3A3i1TtEnTxA7bCe3Us+r5MWg==",
"path": "system.text.encoding.codepages/5.0.0",
"hashPath": "system.text.encoding.codepages.5.0.0.nupkg.sha512"
},
"System.Threading/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==",
"path": "system.threading/4.3.0",
"hashPath": "system.threading.4.3.0.nupkg.sha512"
},
"System.Threading.Tasks/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"path": "system.threading.tasks/4.3.0",
"hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
},
"ZXing.Net/0.16.8": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Cbbe+x7I7E+VJ0VxU1fPc7AktIw/9xea/ZY/fh38sXqTQ75LJp9ooGUjpzFqfpPfIKozAoXgJ4yvY4GzKpPBzQ==",
"path": "zxing.net/0.16.8",
"hashPath": "zxing.net.0.16.8.nupkg.sha512"
},
"ZXing.Net.Bindings.Windows.Compatibility/0.16.10": {
"type": "package",
"serviceable": true,
"sha512": "sha512-euWnxHf1jJ+jYyOjX/TAv9uVx4LKJPaUbuUG3O1F3Vkyp0LaXmutgKaJqHITvomyFp+cGt4N3CdC1Ftd5fQkmw==",
"path": "zxing.net.bindings.windows.compatibility/0.16.10",
"hashPath": "zxing.net.bindings.windows.compatibility.0.16.10.nupkg.sha512"
}
}
}

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
client/bin/Debug/net7.0/zxing.dll Executable file

Binary file not shown.

10
client/client.csproj Normal file
View file

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

BIN
client/libcvextern.so Normal file

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")]

BIN
client/obj/Debug/net7.0/apphost Executable file

Binary file not shown.

View file

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("client")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("client")]
[assembly: System.Reflection.AssemblyTitleAttribute("client")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View file

@ -0,0 +1 @@
bf7784d7de989d2ff82b72894d57569fb689b395

View file

@ -0,0 +1,11 @@
is_global = true
build_property.TargetFramework = net7.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = client
build_property.ProjectDir = /home/david/Projects/qrreader/client/

View file

@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

Binary file not shown.

View file

@ -0,0 +1 @@
ad622ae64482c3f098f7132776d5a7cdaae55ec7

View file

@ -0,0 +1,15 @@
/home/david/Projects/qrreader/client/obj/Debug/net7.0/client.csproj.AssemblyReference.cache
/home/david/Projects/qrreader/client/obj/Debug/net7.0/client.GeneratedMSBuildEditorConfig.editorconfig
/home/david/Projects/qrreader/client/obj/Debug/net7.0/client.AssemblyInfoInputs.cache
/home/david/Projects/qrreader/client/obj/Debug/net7.0/client.AssemblyInfo.cs
/home/david/Projects/qrreader/client/obj/Debug/net7.0/client.csproj.CoreCompileInputs.cache
/home/david/Projects/qrreader/client/bin/Debug/net7.0/client
/home/david/Projects/qrreader/client/bin/Debug/net7.0/client.deps.json
/home/david/Projects/qrreader/client/bin/Debug/net7.0/client.runtimeconfig.json
/home/david/Projects/qrreader/client/bin/Debug/net7.0/client.dll
/home/david/Projects/qrreader/client/bin/Debug/net7.0/client.pdb
/home/david/Projects/qrreader/client/obj/Debug/net7.0/client.dll
/home/david/Projects/qrreader/client/obj/Debug/net7.0/refint/client.dll
/home/david/Projects/qrreader/client/obj/Debug/net7.0/client.pdb
/home/david/Projects/qrreader/client/obj/Debug/net7.0/client.genruntimeconfig.cache
/home/david/Projects/qrreader/client/obj/Debug/net7.0/ref/client.dll

Binary file not shown.

View file

@ -0,0 +1 @@
12bdd522ff8e15fe7e21b186917799d7af7974db

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,71 @@
{
"format": 1,
"restore": {
"/home/david/Projects/qrreader/client/client.csproj": {}
},
"projects": {
"/home/david/Projects/qrreader/client/client.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/david/Projects/qrreader/client/client.csproj",
"projectName": "client",
"projectPath": "/home/david/Projects/qrreader/client/client.csproj",
"packagesPath": "/home/david/.nuget/packages/",
"outputPath": "/home/david/Projects/qrreader/client/obj/",
"projectStyle": "PackageReference",
"fallbackFolders": [
"/home/david/.local/share/godot/mono/GodotNuGetFallbackFolder"
],
"configFilePaths": [
"/home/david/.nuget/NuGet/NuGet.Config",
"/home/david/.nuget/NuGet/config/Godot.Offline.Config"
],
"originalTargetFrameworks": [
"net7.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[7.0.0, 7.0.0]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/7.0.100/RuntimeIdentifierGraph.json"
}
}
}
}
}

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/david/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/david/.nuget/packages/;/home/david/.local/share/godot/mono/GodotNuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.4.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/david/.nuget/packages/" />
<SourceRoot Include="/home/david/.local/share/godot/mono/GodotNuGetFallbackFolder/" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View file

@ -0,0 +1,77 @@
{
"version": 3,
"targets": {
"net7.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net7.0": []
},
"packageFolders": {
"/home/david/.nuget/packages/": {},
"/home/david/.local/share/godot/mono/GodotNuGetFallbackFolder": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/david/Projects/qrreader/client/client.csproj",
"projectName": "client",
"projectPath": "/home/david/Projects/qrreader/client/client.csproj",
"packagesPath": "/home/david/.nuget/packages/",
"outputPath": "/home/david/Projects/qrreader/client/obj/",
"projectStyle": "PackageReference",
"fallbackFolders": [
"/home/david/.local/share/godot/mono/GodotNuGetFallbackFolder"
],
"configFilePaths": [
"/home/david/.nuget/NuGet/NuGet.Config",
"/home/david/.nuget/NuGet/config/Godot.Offline.Config"
],
"originalTargetFrameworks": [
"net7.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[7.0.0, 7.0.0]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/7.0.100/RuntimeIdentifierGraph.json"
}
}
}
}

View file

@ -0,0 +1,10 @@
{
"version": 2,
"dgSpecHash": "CE9PmFr63Yk9HwFs5xHXDmmLCNiMFEd2K+YzeuSWcpHW27YimPEAvEJAuPm7pRMNdzQuRLNA2Ca8LeEYUAQa3Q==",
"success": true,
"projectFilePath": "/home/david/Projects/qrreader/client/client.csproj",
"expectedPackageFiles": [
"/home/david/.nuget/packages/microsoft.aspnetcore.app.ref/7.0.0/microsoft.aspnetcore.app.ref.7.0.0.nupkg.sha512"
],
"logs": []
}

33
client/qr_scan.py Normal file
View file

@ -0,0 +1,33 @@
import cv2
import numpy as np
from pyzbar.pyzbar import decode
def decoder(image):
gray_img = cv2.cvtColor(image,0)
barcode = decode(gray_img)
for obj in barcode:
points = obj.polygon
(x,y,w,h) = obj.rect
pts = np.array(points, np.int32)
pts = pts.reshape((-1, 1, 2))
cv2.polylines(image, [pts], True, (0, 255, 0), 3)
barcodeData = obj.data.decode("utf-8")
barcodeType = obj.type
string = "Data " + str(barcodeData) + " | Type " + str(barcodeType)
cv2.putText(frame, string, (x,y), cv2.FONT_HERSHEY_SIMPLEX,0.8,(255,0,0), 2)
print("Barcode: "+barcodeData +" | Type: "+barcodeType)
if __name__ == "__main__":
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
decoder(frame)
cv2.imshow('Image', frame)
code = cv2.waitKey(10)
if code == ord('q'):
break

44
client/qr_scan2.py Normal file
View file

@ -0,0 +1,44 @@
import cv2
from pyzbar import pyzbar
def read_barcodes(frame):
barcodes = pyzbar.decode(frame)
found = False
for barcode in barcodes:
x, y , w, h = barcode.rect
barcode_info = barcode.data.decode('utf-8')
cv2.rectangle(frame, (x, y),(x+w, y+h), (0, 255, 0), 2)
font = cv2.FONT_HERSHEY_DUPLEX
cv2.putText(frame, barcode_info, (x + 6, y - 6), font, 0.5, (255, 255, 255), 1)
print(barcode_info, end="")
found = len(barcode_info) != 0
return frame, found
def main() -> None:
# Set video capture
camera = cv2.VideoCapture(0)
ret, frame = camera.read()
# Run decoding until 'Esc' pressed
while ret:
ret, frame = camera.read()
frame, found = read_barcodes(frame)
cv2.imshow("", frame)
if found:
break
if cv2.waitKey(1) & 0xFF == 27:
break
# Release camera and close app
camera.release()
cv2.destroyAllWindows()
if __name__ == "__main__":
main()

1
icon.svg Normal file
View file

@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><g transform="translate(32 32)"><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99z" fill="#363d52"/><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99zm0 4h96c6.64 0 12 5.35 12 11.99v95.98c0 6.64-5.35 11.99-12 11.99h-96c-6.64 0-12-5.35-12-11.99v-95.98c0-6.64 5.36-11.99 12-11.99z" fill-opacity=".4"/></g><g stroke-width="9.92746" transform="matrix(.10073078 0 0 .10073078 12.425923 2.256365)"><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 919.24059 771.67186)"/><path d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164715 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426579-6.973692 9.2079702-13.9828876 13.621-19.449z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 104.69892 525.90697)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 784.07144 817.24284)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 389.21484 625.67104)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 367.36686 631.05679)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 511.99336 724.73954)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 634.78706 625.67104)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 656.64056 631.05679)"/></g></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

37
icon.svg.import Normal file
View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://djr7ke1r23aew"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")]

BIN
obj/Debug/net7.0/apphost Executable file

Binary file not shown.

View file

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("qrreader")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("qrreader")]
[assembly: System.Reflection.AssemblyTitleAttribute("qrreader")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View file

@ -0,0 +1 @@
bfc9ef1f924000ca5d80901a7edea874224a7ee3

View file

@ -0,0 +1,11 @@
is_global = true
build_property.TargetFramework = net7.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = qrreader
build_property.ProjectDir = /home/david/Projects/qrreader/

View file

@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

Binary file not shown.

View file

@ -0,0 +1 @@
2be77d7175342c771cf474f13a7b0147d668b9c3

View file

@ -0,0 +1,5 @@
/home/david/Projects/qrreader/obj/Debug/net7.0/qrreader.csproj.AssemblyReference.cache
/home/david/Projects/qrreader/obj/Debug/net7.0/qrreader.GeneratedMSBuildEditorConfig.editorconfig
/home/david/Projects/qrreader/obj/Debug/net7.0/qrreader.AssemblyInfoInputs.cache
/home/david/Projects/qrreader/obj/Debug/net7.0/qrreader.AssemblyInfo.cs
/home/david/Projects/qrreader/obj/Debug/net7.0/qrreader.csproj.CoreCompileInputs.cache

2459
obj/project.assets.json Normal file

File diff suppressed because it is too large Load diff

100
obj/project.nuget.cache Normal file
View file

@ -0,0 +1,100 @@
{
"version": 2,
"dgSpecHash": "nFSLV0NHH8CPR1cNOhQWG75UORYL/Pn1kzUBNPsUYxhqaUrMbmXlwfDHoOysrTE8Hs/HxJpfw/q0iwNWv92O/A==",
"success": true,
"projectFilePath": "/home/david/Projects/qrreader/qrreader.csproj",
"expectedPackageFiles": [
"/home/david/.nuget/packages/aforge/2.2.5/aforge.2.2.5.nupkg.sha512",
"/home/david/.nuget/packages/aforge.imaging/2.2.5/aforge.imaging.2.2.5.nupkg.sha512",
"/home/david/.nuget/packages/aforge.math/2.2.5/aforge.math.2.2.5.nupkg.sha512",
"/home/david/.nuget/packages/aforge.video/2.2.5/aforge.video.2.2.5.nupkg.sha512",
"/home/david/.nuget/packages/aforge.video.directshow/2.2.5/aforge.video.directshow.2.2.5.nupkg.sha512",
"/home/david/.nuget/packages/emgu.cv/4.6.0.5131/emgu.cv.4.6.0.5131.nupkg.sha512",
"/home/david/.nuget/packages/emgu.cv.bitmap/4.6.0.5131/emgu.cv.bitmap.4.6.0.5131.nupkg.sha512",
"/home/david/.nuget/packages/emgu.cv.runtime.windows/4.6.0.5131/emgu.cv.runtime.windows.4.6.0.5131.nupkg.sha512",
"/home/david/.nuget/packages/emgu.runtime.windows.msvc.rt.arm64/19.33.31630/emgu.runtime.windows.msvc.rt.arm64.19.33.31630.nupkg.sha512",
"/home/david/.nuget/packages/emgu.runtime.windows.msvc.rt.x64/19.33.31630/emgu.runtime.windows.msvc.rt.x64.19.33.31630.nupkg.sha512",
"/home/david/.nuget/packages/emgu.runtime.windows.msvc.rt.x86/19.33.31630/emgu.runtime.windows.msvc.rt.x86.19.33.31630.nupkg.sha512",
"/home/david/.nuget/packages/flashcap/1.4.0/flashcap.1.4.0.nupkg.sha512",
"/home/david/.nuget/packages/flashcap.core/1.4.0/flashcap.core.1.4.0.nupkg.sha512",
"/home/david/.nuget/packages/microsoft.netcore.platforms/5.0.0/microsoft.netcore.platforms.5.0.0.nupkg.sha512",
"/home/david/.nuget/packages/microsoft.netcore.targets/1.1.3/microsoft.netcore.targets.1.1.3.nupkg.sha512",
"/home/david/.nuget/packages/microsoft.win32.systemevents/6.0.0/microsoft.win32.systemevents.6.0.0.nupkg.sha512",
"/home/david/.nuget/packages/runtime.native.system/4.3.0/runtime.native.system.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/sixlabors.imagesharp/2.1.3/sixlabors.imagesharp.2.1.3.nupkg.sha512",
"/home/david/.nuget/packages/system.drawing.common/6.0.0/system.drawing.common.6.0.0.nupkg.sha512",
"/home/david/.nuget/packages/system.drawing.primitives/4.3.0/system.drawing.primitives.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.globalization/4.3.0/system.globalization.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.io/4.3.0/system.io.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.reactive/5.0.0/system.reactive.5.0.0.nupkg.sha512",
"/home/david/.nuget/packages/system.reflection/4.3.0/system.reflection.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.reflection.extensions/4.3.0/system.reflection.extensions.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.reflection.primitives/4.3.0/system.reflection.primitives.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.resources.resourcemanager/4.3.0/system.resources.resourcemanager.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.runtime/4.3.1/system.runtime.4.3.1.nupkg.sha512",
"/home/david/.nuget/packages/system.runtime.compilerservices.unsafe/5.0.0/system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512",
"/home/david/.nuget/packages/system.runtime.extensions/4.3.0/system.runtime.extensions.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.runtime.handles/4.3.0/system.runtime.handles.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.runtime.interopservices/4.3.0/system.runtime.interopservices.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.runtime.interopservices.runtimeinformation/4.3.0/system.runtime.interopservices.runtimeinformation.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.text.encoding/4.3.0/system.text.encoding.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.text.encoding.codepages/5.0.0/system.text.encoding.codepages.5.0.0.nupkg.sha512",
"/home/david/.nuget/packages/system.threading/4.3.0/system.threading.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/system.threading.tasks/4.3.0/system.threading.tasks.4.3.0.nupkg.sha512",
"/home/david/.nuget/packages/zxing.net/0.16.8/zxing.net.0.16.8.nupkg.sha512",
"/home/david/.nuget/packages/zxing.net.bindings.windows.compatibility/0.16.10/zxing.net.bindings.windows.compatibility.0.16.10.nupkg.sha512",
"/home/david/.nuget/packages/microsoft.aspnetcore.app.ref/7.0.0/microsoft.aspnetcore.app.ref.7.0.0.nupkg.sha512"
],
"logs": [
{
"code": "NU1701",
"level": "Warning",
"warningLevel": 1,
"message": "Package 'AForge 2.2.5' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.",
"libraryId": "AForge",
"targetGraphs": [
"net7.0"
]
},
{
"code": "NU1701",
"level": "Warning",
"warningLevel": 1,
"message": "Package 'AForge.Imaging 2.2.5' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.",
"libraryId": "AForge.Imaging",
"targetGraphs": [
"net7.0"
]
},
{
"code": "NU1701",
"level": "Warning",
"warningLevel": 1,
"message": "Package 'AForge.Math 2.2.5' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.",
"libraryId": "AForge.Math",
"targetGraphs": [
"net7.0"
]
},
{
"code": "NU1701",
"level": "Warning",
"warningLevel": 1,
"message": "Package 'AForge.Video 2.2.5' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.",
"libraryId": "AForge.Video",
"targetGraphs": [
"net7.0"
]
},
{
"code": "NU1701",
"level": "Warning",
"warningLevel": 1,
"message": "Package 'AForge.Video.DirectShow 2.2.5' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net7.0'. This package may not be fully compatible with your project.",
"libraryId": "AForge.Video.DirectShow",
"targetGraphs": [
"net7.0"
]
}
]
}

View file

@ -0,0 +1,125 @@
{
"format": 1,
"restore": {
"/home/david/Projects/qrreader/qrreader.csproj": {}
},
"projects": {
"/home/david/Projects/qrreader/qrreader.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/david/Projects/qrreader/qrreader.csproj",
"projectName": "qrreader",
"projectPath": "/home/david/Projects/qrreader/qrreader.csproj",
"packagesPath": "/home/david/.nuget/packages/",
"outputPath": "/home/david/Projects/qrreader/obj/",
"projectStyle": "PackageReference",
"fallbackFolders": [
"/home/david/.local/share/godot/mono/GodotNuGetFallbackFolder"
],
"configFilePaths": [
"/home/david/.nuget/NuGet/NuGet.Config",
"/home/david/.nuget/NuGet/config/Godot.Offline.Config"
],
"originalTargetFrameworks": [
"net7.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"dependencies": {
"AForge": {
"target": "Package",
"version": "[2.2.5, )"
},
"AForge.Imaging": {
"target": "Package",
"version": "[2.2.5, )"
},
"AForge.Math": {
"target": "Package",
"version": "[2.2.5, )"
},
"AForge.Video": {
"target": "Package",
"version": "[2.2.5, )"
},
"AForge.Video.DirectShow": {
"target": "Package",
"version": "[2.2.5, )"
},
"Emgu.CV": {
"target": "Package",
"version": "[4.6.0.5131, )"
},
"Emgu.CV.Bitmap": {
"target": "Package",
"version": "[4.6.0.5131, )"
},
"Emgu.CV.runtime.windows": {
"target": "Package",
"version": "[4.6.0.5131, )"
},
"FlashCap": {
"target": "Package",
"version": "[1.4.0, )"
},
"SixLabors.ImageSharp": {
"target": "Package",
"version": "[2.1.3, )"
},
"System.Reactive": {
"target": "Package",
"version": "[5.0.0, )"
},
"ZXing.Net": {
"target": "Package",
"version": "[0.16.8, )"
},
"ZXing.Net.Bindings.Windows.Compatibility": {
"target": "Package",
"version": "[0.16.10, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[7.0.0, 7.0.0]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/7.0.100/RuntimeIdentifierGraph.json"
}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show more