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

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()