diff --git a/BlazorApp/App.razor b/BlazorApp/App.razor deleted file mode 100644 index 6fd3ed1..0000000 --- a/BlazorApp/App.razor +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - Not found - -

Sorry, there's nothing at this address.

-
-
-
diff --git a/BlazorApp/BlazorApp.csproj b/BlazorApp/BlazorApp.csproj deleted file mode 100644 index 2614717..0000000 --- a/BlazorApp/BlazorApp.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - net6.0 - enable - enable - true - true - - - - True - - - - True - - - - - - - - - - diff --git a/BlazorApp/CanvasClient.cs b/BlazorApp/CanvasClient.cs deleted file mode 100644 index f60fcaa..0000000 --- a/BlazorApp/CanvasClient.cs +++ /dev/null @@ -1,53 +0,0 @@ -using Microsoft.AspNetCore.Components; -using Microsoft.JSInterop; -using OpenCvSharp; -using System.Runtime.InteropServices; - -namespace BlazorApp -{ - public class CanvasClient - { - private readonly IJSRuntime jsRuntime; - private readonly ElementReference canvasElement; - - public CanvasClient( - IJSRuntime jsRuntime, - ElementReference canvasElement) - { - this.jsRuntime = jsRuntime; - this.canvasElement = canvasElement; - } - - public async Task DrawPixelsAsync(byte[] pixels) - { - await jsRuntime.InvokeVoidAsync("drawPixels", canvasElement, pixels); - } - - public async Task DrawMatAsync(Mat mat) - { - Mat? rgba = null; - try - { - var type = mat.Type(); - if (type == MatType.CV_8UC1) - rgba = mat.CvtColor(ColorConversionCodes.GRAY2RGBA); - else if (type == MatType.CV_8UC3) - rgba = mat.CvtColor(ColorConversionCodes.BGR2RGBA); - else - throw new ArgumentException($"Invalid mat type ({mat.Type()})"); - - if (!rgba.IsContinuous()) - throw new InvalidOperationException("RGBA Mat should be continuous."); - var length = (int)(rgba.DataEnd.ToInt64() - rgba.DataStart.ToInt64()); - var pixelBytes = new byte[length]; - Marshal.Copy(rgba.DataStart, pixelBytes, 0, length); - - await DrawPixelsAsync(pixelBytes); - } - finally - { - rgba?.Dispose(); - } - } - } -} diff --git a/BlazorApp/Pages/Canvas.razor b/BlazorApp/Pages/Canvas.razor deleted file mode 100644 index 850ee31..0000000 --- a/BlazorApp/Pages/Canvas.razor +++ /dev/null @@ -1,47 +0,0 @@ -@page "/canvas" -@inject IJSRuntime jsRuntime; - -Canvas Sample - -

Canvas Sample

- - - - -@code { - private ElementReference canvasElement; - private CanvasClient? canvasClient; - - protected override async Task OnAfterRenderAsync(bool firstRender) - { - await base.OnAfterRenderAsync(firstRender); - - var imageBytes = new byte[128 * 128 * 4]; - unsafe - { - fixed (byte* pImageBytes = imageBytes) - { - var p = pImageBytes; - for (int y = 0; y < 128; y++) - { - for (int x = 0; x < 128; x++) - { - // Percentage in the x direction, times 255 - var xp = (byte)(x / 128.0 * 255); - // Percentage in the y direction, times 255 - var yp = (byte)(y / 128.0 * 255); - - *(p++) = xp; // R - *(p++) = yp; // G - *(p++) = (byte)(255 - xp); // B - *(p++) = 255; // A - } - } - } - } - - canvasClient ??= new CanvasClient(jsRuntime, canvasElement); - - await canvasClient.DrawPixelsAsync(imageBytes); - } -} \ No newline at end of file diff --git a/BlazorApp/Pages/OpenCvSharpSample.razor b/BlazorApp/Pages/OpenCvSharpSample.razor deleted file mode 100644 index 172faea..0000000 --- a/BlazorApp/Pages/OpenCvSharpSample.razor +++ /dev/null @@ -1,482 +0,0 @@ -@page "/opencvsharp_sample" -@using OpenCvSharp -@inject IJSRuntime jsRuntime; -@inject HttpClient httpClient; -@implements IDisposable - -Gabor Filter Test - -
-

Gabor Filter란?


-

Gabor Filter는 영상처리에서 Bio-inspired라는 키워드가 있으면 빠지지않고 등장한다.

-

외곽선을 검출하는 기능을 하는 필터로, 사람의 시각체계가 반응하는 것과 비슷하다는 이유로 널리 사용되고 있다.

-

Gabor Fiter는 간단히 말해서 사인 함수로 모듈레이션 된 Gaussian Filter라고 생각할 수 있다.

-

파라미터를 조절함에 따라 Edge의 크기나 방향성을 바꿀 수 있으므로 Bio-inspired 영상처리 알고리즘에서 특징점 추출 알고리즘으로 핵심적인 역할을 하고 있다.

-

2D Gabor Filter의 수식은 아래와 같다.

-

- gaborfilter
- gaborfilter
- gaborfilter
-



-

함수 원형

-
-    
-  cv::Mat cv::getGaborKernel(cv::Size ksize, double sigma, double theta, double lambd, double gamma, double psi = CV_PI*0.5, int ktype = CV_64F)  
-        
-    

-

cv::getGaborKernel 함수는 OpenCV에서 가버필터(Gabor filter)를 생성하는 데 사용된다.

-

가버필터는 이미지 처리와 컴퓨터 비전에서 특정 방향성과 주파수의 특징을 강조하는 데 사용되는 선형 필터이다.



-

Parameters


- -
-
-
-

Gabor Filter 실행 (속도 느림 주의)

- - Your browser does not support the HTML5 canvas tag. - - - Your browser does not support the HTML5 canvas tag. - -
-
-

Kernel Size(0 이상 홀수) - - -


-

Sigma (0.0 이상) - - -


-

Theta (0도 ~ 180도) - - -


-

Lambda (0.0 이상 이미지 사이즈 미만(256.0)) - - -


-

Gamma (0.0 ~ 1.0) - - -


-

Psi (0도 ~ 360도) - - -


- -
-
-
- - Your browser does not support the HTML5 canvas tag. - - - Your browser does not support the HTML5 canvas tag. - -
-
-

Threshold (0 ~ 255)

- -
- - - -
- - -@code { - //private Mat? srcMat; - //private Mat? srcMat2; - private byte[] imageBytes_rgba = new byte[256 * 256 * 4]; - private byte[] imageBytes_rgba2 = new byte[256 * 256 * 4]; - private ElementReference srcCanvas; - private ElementReference dstCanvas; - private ElementReference srcCanvas2; - private ElementReference dstCanvas2; - private CanvasClient? srcCanvasClient; - private CanvasClient? dstCanvasClient; - private CanvasClient? srcCanvasClient2; - private CanvasClient? dstCanvasClient2; - private int valKernelSize = 3; - private double valSigma = 0.0; - private double valTheta = 0.0; - private double valLambd = 0.0; - private double valGamma = 0.0; - private double valPsi = 0.0; - private int valthreshold = 127; - - public void Dispose() - { - //srcMat?.Dispose(); - //srcMat2?.Dispose(); - } - - protected override async Task OnInitializedAsync() - { - await base.OnInitializedAsync(); - } - - protected override async Task OnAfterRenderAsync(bool firstRender) - { - if (!firstRender) - return; - await base.OnAfterRenderAsync(firstRender); - int width = 256; - int height = 256; - - var imageBytes = await httpClient.GetByteArrayAsync("/images/mandrill.bmp"); - //srcMat ??= Mat.FromImageData(imageBytes); - //if(srcMat.Width < 256 || srcMat.Height < 256) - //{ - // Cv2.PyrUp(srcMat, srcMat, new Size(256, 256)); - //} - srcCanvasClient ??= new CanvasClient(jsRuntime, srcCanvas); - dstCanvasClient ??= new CanvasClient(jsRuntime, dstCanvas); - - //await srcCanvasClient.DrawMatAsync(srcMat); - - unsafe - { - fixed (byte* pImageByte = imageBytes, pImageBytes_rgba = imageBytes_rgba) - { - var pRgb = pImageByte; - var pRgba = pImageBytes_rgba; - - for (int y = 0; y < height; y++) - { - for (int x = 0; x < width; x++) - { - // RGB 채널 복사 - *(pRgba++) = *(pRgb++); // R - *(pRgba++) = *(pRgb++); // G - *(pRgba++) = *(pRgb++); // B - - // 알파 채널 추가 - *(pRgba++) = 255; // A - } - } - } - } - imageBytes_rgba = FlipVertical(imageBytes_rgba, width, height); - ConvertBgrToRgba(imageBytes_rgba); - - await srcCanvasClient.DrawPixelsAsync(imageBytes_rgba); - - - //var imageBytes2 = await httpClient.GetByteArrayAsync("/images/lenna256.bmp"); - var imageBytes2 = await httpClient.GetByteArrayAsync("/images/gabor.bmp"); - //srcMat2 ??= Mat.FromImageData(imageBytes2); - //if(srcMat2.Width > 256 || srcMat2.Height > 256) - //{ - // Cv2.PyrDown(srcMat2, srcMat2, new Size(256, 256)); - //} - - srcCanvasClient2 ??= new CanvasClient(jsRuntime, srcCanvas2); - dstCanvasClient2 ??= new CanvasClient(jsRuntime, dstCanvas2); - - //await srcCanvasClient2.DrawMatAsync(srcMat2); - - unsafe - { - fixed (byte* pImageByte = imageBytes2, pImageBytes_rgba = imageBytes_rgba2) - { - var pRgb = pImageByte; - var pRgba = pImageBytes_rgba; - - for (int y = 0; y < height; y++) - { - for (int x = 0; x < width; x++) - { - // RGB 채널 복사 - *(pRgba++) = *(pRgb++); // R - *(pRgba++) = *(pRgb++); // G - *(pRgba++) = *(pRgb++); // B - - // 알파 채널 추가 - *(pRgba++) = 255; // A - } - } - } - } - imageBytes_rgba2 = FlipVertical(imageBytes_rgba2, width, height); - ConvertBgrToRgba(imageBytes_rgba2); - - //await srcCanvasClient2.DrawPixelsAsync(imageBytes2); - await srcCanvasClient2.DrawPixelsAsync(imageBytes_rgba2); - } - - private async Task Grayscale() - { - //if (srcMat is null) - // throw new InvalidOperationException($"{nameof(srcMat)} is null"); - if (dstCanvasClient is null) - throw new InvalidOperationException($"{nameof(dstCanvasClient)} is null"); - - //using var grayMat = new Mat(); - //Cv2.CvtColor(srcMat, grayMat, ColorConversionCodes.BGR2GRAY); - - byte[] gray = new byte[imageBytes_rgba.Length]; - imageBytes_rgba.CopyTo(gray, 0); - - ConvertRgbaToGray(gray); - - //await dstCanvasClient.DrawMatAsync(grayMat); - await dstCanvasClient.DrawPixelsAsync(gray); - } - - private async Task PseudoColor() - { - //if (srcMat is null) - // throw new InvalidOperationException($"{nameof(srcMat)} is null"); - if (dstCanvasClient is null) - throw new InvalidOperationException($"{nameof(dstCanvasClient)} is null"); - - Mat srcMat = new Mat(256, 256, MatType.CV_8UC4, imageBytes_rgba); - using var grayMat = new Mat(); - using var dstMat = new Mat(); - Cv2.CvtColor(srcMat, grayMat, ColorConversionCodes.BGR2GRAY); - //Cv2.CvtColor(srcMat, grayMat, ColorConversionCodes.BGR2GRAY); - Cv2.ApplyColorMap(grayMat, dstMat, ColormapTypes.Jet); - - await dstCanvasClient.DrawMatAsync(dstMat); - } - - private async Task Threshold() - { - //if (srcMat is null) - // throw new InvalidOperationException($"{nameof(srcMat)} is null"); - if (dstCanvasClient is null) - throw new InvalidOperationException($"{nameof(dstCanvasClient)} is null"); - - //using var grayMat = new Mat(); - //using var dstMat = new Mat(srcMat.Size(), MatType.CV_8UC1); - //Cv2.CvtColor(srcMat, grayMat, ColorConversionCodes.BGR2GRAY); - ////Cv2.Threshold(grayMat, dstMat, 127, 255, ThresholdTypes.Binary); - // - //for (int i = 0; i < grayMat.Rows; i++) - //{ - // for (int j = 0; j < grayMat.Cols; j++) - // { - // byte pixelValue = grayMat.At(i, j); - // byte newValue = (Convert.ToInt32(pixelValue) > valthreshold) ? (byte)255 : (byte)0; - // dstMat.Set(i, j, newValue); - // } - //} - // - //await dstCanvasClient.DrawMatAsync(dstMat); - - byte[] th = new byte[imageBytes_rgba.Length]; - imageBytes_rgba.CopyTo(th, 0); - - ConvertRgbaToGray(th); - Threshold(th, valthreshold); - - await dstCanvasClient.DrawPixelsAsync(th); - } - - private async Task GaborFilter() - { - //if (srcMat2 is null) - // throw new InvalidOperationException($"{nameof(srcMat2)} is null"); - if (dstCanvasClient2 is null) - throw new InvalidOperationException($"{nameof(dstCanvasClient2)} is null"); - - //using var grayMat = new Mat(srcMat2.Size(), MatType.CV_32F); - //Cv2.CvtColor(srcMat2, grayMat, ColorConversionCodes.BGR2GRAY); - // - int kernel_size = valKernelSize; - double sigma = valSigma; - double theta = valTheta * Cv2.PI / 180.0; - double lambd = valLambd; - double gamma = valGamma; - double psi = valPsi * Cv2.PI / 180.0; - // - // - //Mat rst = new Mat(); - //try - //{ - // //Mat gabor_filter = Cv2.GetGaborKernel(new Size(kernel_size, kernel_size), sigma, theta, lambd, gamma, psi, ktype); - // //Mat kenel = new Mat(5, 5, MatType.CV_8UC1); - // //Cv2.Filter2D(grayMat, rst, grayMat.Type(), kenel); - // - // Mat gabor_filter = Gabor2DFilter.CreateGaborKernel(kernel_size, sigma, theta, lambd, gamma, psi); - // rst = Gabor2DFilter.Filter2D(grayMat, gabor_filter); - //} - //catch (Exception e) - //{ - // String log = e.Message; - //} - //await dstCanvasClient2.DrawMatAsync(rst); - - Mat srcMat = new Mat(256, 256, MatType.CV_8UC4, imageBytes_rgba2); - Cv2.CvtColor(srcMat, srcMat, ColorConversionCodes.BGRA2GRAY); - Mat gaborfilter = Gabor2DFilter.CreateGaborKernel(kernel_size, sigma, theta, lambd, gamma, psi); - Mat rstMat = Gabor2DFilter.Filter2D(srcMat, gaborfilter); - await dstCanvasClient2.DrawMatAsync(rstMat); - } - - public class Gabor2DFilter - { - public static Mat CreateGaborKernel(int ksize, double sigma, double theta, double lambd, double gamma, double psi) - { - int center = ksize / 2; - Mat kernel = new Mat(ksize, ksize, MatType.CV_32FC1); - double sigmaX = sigma; - double sigmaY = sigma / gamma; - - unsafe - { - for (int y = -center; y <= center; y++) - { - for (int x = -center; x <= center; x++) - { - double xPrime = x * Math.Cos(theta) + y * Math.Sin(theta); - double yPrime = -x * Math.Sin(theta) + y * Math.Cos(theta); - double value = Math.Exp(-0.5 * (xPrime * xPrime / (sigmaX * sigmaX) + yPrime * yPrime / (sigmaY * sigmaY))); - value *= Math.Cos(2 * Math.PI * xPrime / lambd + psi); - - float* kernelPtr = (float*)(kernel.DataPointer + (center + y) * kernel.Step() + (center + x) * sizeof(float)); - *kernelPtr = Convert.ToSingle(value); - } - } - } - return kernel; - } - - public static Mat Filter2D(Mat src, Mat kernel) - { - int kernelRows = kernel.Rows; - int kernelCols = kernel.Cols; - int kernelCenterX = kernelCols / 2; - int kernelCenterY = kernelRows / 2; - MatType type = src.Type(); - Mat dst = new Mat(src.Size(), type); - - try - { - unsafe - { - double* kernelData = (double*)kernel.DataPointer; - - for (int y = 0; y < src.Rows; y++) - { - for (int x = 0; x < src.Cols; x++) - { - double sum = 0.0; - - for (int kRow = 0; kRow < kernelRows; kRow++) - { - int yy = y + kRow - kernelCenterY; - for (int kCol = 0; kCol < kernelCols; kCol++) - { - int xx = x + kCol - kernelCenterX; - - if (xx >= 0 && xx < src.Cols && yy >= 0 && yy < src.Rows) - { - byte* pixelValue = src.DataPointer + yy * src.Step() + xx * src.ElemSize(); - double kernelValue = *(kernelData + kRow * kernelCols + kCol); - sum += Convert.ToDouble(*pixelValue) * kernelValue; - } - } - } - - byte* resultValue = dst.DataPointer + y * dst.Step() + x * dst.ElemSize(); - *resultValue = (byte)Math.Clamp(sum, 0, 255); - } - } - } - - } - catch (Exception ex) - { - String log = ex.Message; - } - - return dst; - } - - } - - public byte[] FlipVertical(byte[] pixels, int width, int height) - { - byte[] flippedPixels = new byte[pixels.Length]; - int rowBytes = width * 4; // 각 행의 바이트 수 (RGBA 채널) - - for (int y = 0; y < height; y++) - { - for (int x = 0; x < rowBytes; x++) - { - flippedPixels[(height - 1 - y) * rowBytes + x] = pixels[y * rowBytes + x]; - } - } - - return flippedPixels; - } - - public void ConvertBgrToRgba(byte[] pixels) - { - for (int i = 0; i < pixels.Length; i += 4) - { - byte temp = pixels[i]; // B 채널 - pixels[i] = pixels[i + 2]; // R 채널 - pixels[i + 2] = temp; - } - } - - public void ConvertRgbaToGray(byte[] pixels) - { - for (int i = 0; i < pixels.Length; i += 4) - { - byte r = pixels[i]; - byte g = pixels[i + 1]; - byte b = pixels[i + 2]; - // byte a = pixels[i + 3]; // 알파 채널은 사용하지 않음 - - // 그레이스케일 값 계산 - byte grayValue = (byte)((r * 0.299) + (g * 0.587) + (b * 0.114)); - pixels[i] = grayValue; - pixels[i + 1] = grayValue; - pixels[i + 2] = grayValue; - } - } - - public void Threshold(byte[] pixels, int threshold) - { - for (int i = 0; i < pixels.Length; i += 4) - { - byte r = pixels[i]; - byte g = pixels[i + 1]; - byte b = pixels[i + 2]; - - if(r != g || r!= b) - { - return; - } - - pixels[i] = pixels[i + 1] = pixels[i + 2] = Convert.ToInt32(r) > threshold ? Convert.ToByte(255) : Convert.ToByte(0); - } - } -} \ No newline at end of file diff --git a/BlazorApp/Program.cs b/BlazorApp/Program.cs deleted file mode 100644 index e6ef32a..0000000 --- a/BlazorApp/Program.cs +++ /dev/null @@ -1,11 +0,0 @@ -using BlazorApp; -using Microsoft.AspNetCore.Components.Web; -using Microsoft.AspNetCore.Components.WebAssembly.Hosting; - -var builder = WebAssemblyHostBuilder.CreateDefault(args); -builder.RootComponents.Add("#app"); -builder.RootComponents.Add("head::after"); - -builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); - -await builder.Build().RunAsync(); diff --git a/BlazorApp/Properties/launchSettings.json b/BlazorApp/Properties/launchSettings.json deleted file mode 100644 index 81757f8..0000000 --- a/BlazorApp/Properties/launchSettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:20186", - "sslPort": 0 - } - }, - "profiles": { - "BlazorApp": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "http://localhost:5089", - "dotnetRunMessages": true, - "nativeDebugging": true - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" - } - } -} \ No newline at end of file diff --git a/BlazorApp/wwwroot/css/open-iconic/FONT-LICENSE b/BlazorApp/wwwroot/css/open-iconic/FONT-LICENSE deleted file mode 100644 index a1dc03f..0000000 --- a/BlazorApp/wwwroot/css/open-iconic/FONT-LICENSE +++ /dev/null @@ -1,86 +0,0 @@ -SIL OPEN FONT LICENSE Version 1.1 - -Copyright (c) 2014 Waybury - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/BlazorApp/wwwroot/css/open-iconic/ICON-LICENSE b/BlazorApp/wwwroot/css/open-iconic/ICON-LICENSE deleted file mode 100644 index 2199f4a..0000000 --- a/BlazorApp/wwwroot/css/open-iconic/ICON-LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Waybury - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/BlazorApp/wwwroot/css/open-iconic/README.md b/BlazorApp/wwwroot/css/open-iconic/README.md deleted file mode 100644 index 6b810e4..0000000 --- a/BlazorApp/wwwroot/css/open-iconic/README.md +++ /dev/null @@ -1,114 +0,0 @@ -[Open Iconic v1.1.1](http://useiconic.com/open) -=========== - -### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) - - - -## What's in Open Iconic? - -* 223 icons designed to be legible down to 8 pixels -* Super-light SVG files - 61.8 for the entire set -* SVG sprite—the modern replacement for icon fonts -* Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats -* Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats -* PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. - - -## Getting Started - -#### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. - -### General Usage - -#### Using Open Iconic's SVGs - -We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). - -``` -icon name -``` - -#### Using Open Iconic's SVG Sprite - -Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. - -Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* - -``` - - - -``` - -Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. - -``` -.icon { - width: 16px; - height: 16px; -} -``` - -Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. - -``` -.icon-account-login { - fill: #f00; -} -``` - -To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). - -#### Using Open Iconic's Icon Font... - - -##### …with Bootstrap - -You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` - - -``` - -``` - - -``` - -``` - -##### …with Foundation - -You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` - -``` - -``` - - -``` - -``` - -##### …on its own - -You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` - -``` - -``` - -``` - -``` - - -## License - -### Icons - -All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). - -### Fonts - -All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). diff --git a/BlazorApp/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css b/BlazorApp/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css deleted file mode 100644 index 4664f2e..0000000 --- a/BlazorApp/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} \ No newline at end of file diff --git a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.eot b/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.eot deleted file mode 100644 index f98177d..0000000 Binary files a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.eot and /dev/null differ diff --git a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.otf b/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.otf deleted file mode 100644 index f6bd684..0000000 Binary files a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.otf and /dev/null differ diff --git a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.svg b/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.svg deleted file mode 100644 index 32b2c4e..0000000 --- a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.svg +++ /dev/null @@ -1,543 +0,0 @@ - - - - - -Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 - By P.J. Onori -Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf b/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf deleted file mode 100644 index fab6048..0000000 Binary files a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf and /dev/null differ diff --git a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.woff b/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.woff deleted file mode 100644 index f930998..0000000 Binary files a/BlazorApp/wwwroot/css/open-iconic/font/fonts/open-iconic.woff and /dev/null differ diff --git a/BlazorApp/wwwroot/favicon.ico b/BlazorApp/wwwroot/favicon.ico deleted file mode 100644 index 63e859b..0000000 Binary files a/BlazorApp/wwwroot/favicon.ico and /dev/null differ diff --git a/BlazorApp/wwwroot/icon-192.png b/BlazorApp/wwwroot/icon-192.png deleted file mode 100644 index 166f56d..0000000 Binary files a/BlazorApp/wwwroot/icon-192.png and /dev/null differ diff --git a/BlazorApp/wwwroot/index.html b/BlazorApp/wwwroot/index.html deleted file mode 100644 index 5cb9d4b..0000000 --- a/BlazorApp/wwwroot/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - BlazorApp2 - - - - - - - -
Loading...
- -
- An unhandled error has occurred. - Reload - 🗙 -
- - - - - - diff --git a/BlazorApp/wwwroot/js/canvas.js b/BlazorApp/wwwroot/js/canvas.js deleted file mode 100644 index d7c88cc..0000000 --- a/BlazorApp/wwwroot/js/canvas.js +++ /dev/null @@ -1,6 +0,0 @@ -var drawPixels = function (canvasElement, imageBytes) { - const canvasContext = canvasElement.getContext("2d"); - const canvasImageData = canvasContext.createImageData(canvasElement.width, canvasElement.height); - canvasImageData.data.set(imageBytes); - canvasContext.putImageData(canvasImageData, 0, 0); -} \ No newline at end of file diff --git a/GaborFilterWeb/.config/dotnet-tools.json b/GaborFilterWeb/.config/dotnet-tools.json new file mode 100644 index 0000000..93ec8eb --- /dev/null +++ b/GaborFilterWeb/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "8.0.5", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/GaborFilterWeb/Components/App.razor b/GaborFilterWeb/Components/App.razor new file mode 100644 index 0000000..f034974 --- /dev/null +++ b/GaborFilterWeb/Components/App.razor @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/BlazorApp/Shared/MainLayout.razor b/GaborFilterWeb/Components/Layout/MainLayout.razor similarity index 100% rename from BlazorApp/Shared/MainLayout.razor rename to GaborFilterWeb/Components/Layout/MainLayout.razor diff --git a/BlazorApp/Shared/MainLayout.razor.css b/GaborFilterWeb/Components/Layout/MainLayout.razor.css similarity index 100% rename from BlazorApp/Shared/MainLayout.razor.css rename to GaborFilterWeb/Components/Layout/MainLayout.razor.css diff --git a/BlazorApp/Shared/NavMenu.razor b/GaborFilterWeb/Components/Layout/NavMenu.razor similarity index 59% rename from BlazorApp/Shared/NavMenu.razor rename to GaborFilterWeb/Components/Layout/NavMenu.razor index 71cc6d7..18fa2ec 100644 --- a/BlazorApp/Shared/NavMenu.razor +++ b/GaborFilterWeb/Components/Layout/NavMenu.razor @@ -9,25 +9,11 @@
diff --git a/BlazorApp/Shared/NavMenu.razor.css b/GaborFilterWeb/Components/Layout/NavMenu.razor.css similarity index 100% rename from BlazorApp/Shared/NavMenu.razor.css rename to GaborFilterWeb/Components/Layout/NavMenu.razor.css diff --git a/BlazorApp/Shared/SurveyPrompt.razor b/GaborFilterWeb/Components/Layout/SurveyPrompt.razor similarity index 100% rename from BlazorApp/Shared/SurveyPrompt.razor rename to GaborFilterWeb/Components/Layout/SurveyPrompt.razor diff --git a/GaborFilterWeb/Components/Pages/Error.razor b/GaborFilterWeb/Components/Pages/Error.razor new file mode 100644 index 0000000..576cc2d --- /dev/null +++ b/GaborFilterWeb/Components/Pages/Error.razor @@ -0,0 +1,36 @@ +@page "/Error" +@using System.Diagnostics + +Error + +

Error.

+

An error occurred while processing your request.

+ +@if (ShowRequestId) +{ +

+ Request ID: @RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

+ +@code{ + [CascadingParameter] + private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; +} diff --git a/GaborFilterWeb/Components/Pages/GaborFilter.razor b/GaborFilterWeb/Components/Pages/GaborFilter.razor new file mode 100644 index 0000000..f69f45a --- /dev/null +++ b/GaborFilterWeb/Components/Pages/GaborFilter.razor @@ -0,0 +1,232 @@ +@page "/gabor" +@rendermode InteractiveServer +@inject IJSRuntime JSRuntime +@using OpenCvSharp + + +Gabor Filter Test + +
+

Gabor Filter란?


+

Gabor Filter는 영상처리에서 Bio-inspired라는 키워드가 있으면 빠지지않고 등장한다.

+

외곽선을 검출하는 기능을 하는 필터로, 사람의 시각체계가 반응하는 것과 비슷하다는 이유로 널리 사용되고 있다.

+

Gabor Fiter는 간단히 말해서 사인 함수로 모듈레이션 된 Gaussian Filter라고 생각할 수 있다.

+

파라미터를 조절함에 따라 Edge의 크기나 방향성을 바꿀 수 있으므로 Bio-inspired 영상처리 알고리즘에서 특징점 추출 알고리즘으로 핵심적인 역할을 하고 있다.

+

2D Gabor Filter의 수식은 아래와 같다.

+

+ gaborfilter
+ gaborfilter
+ gaborfilter
+



+

함수 원형

+
+    
+  cv::Mat cv::getGaborKernel(cv::Size ksize, double sigma, double theta, double lambd, double gamma, double psi = CV_PI*0.5, int ktype = CV_64F)  
+        
+    

+

cv::getGaborKernel 함수는 OpenCV에서 가버필터(Gabor filter)를 생성하는 데 사용된다.

+

가버필터는 이미지 처리와 컴퓨터 비전에서 특정 방향성과 주파수의 특징을 강조하는 데 사용되는 선형 필터이다.



+

Parameters


+
    +
  • +

    ksize: 커널의 크기로, cv::Size 타입. 커널의 너비와 높이를 지정.

    +
  • +
  • +

    sigma: 가우시안 함수의 표준 편차. 값이 커질수록 커널의 크기가 커지고, 필터의 감도가 낮아진다.

    +
  • +
  • +

    theta: 필터의 방향을 라디안 단위로 지정한다. 0은 수평 방향, CV_PI/2는 수직 방향을 의미한다.

    +
  • +
  • +

    lambd: 가버필터의 파장. 이미지의 특정 패턴과 얼마나 잘 매치할지를 결정한다.

    +
  • +
  • +

    gamma: 공간종횡비(Spatial aspect ratio)로, 타원형 가버 함수의 타원성을 결정한다. (gamma=1은 원형, gamma<1은 타원형)

    +
  • +
  • +

    psi: 위상변위(Phase offset)로, 가버 필터의 위상을 조절한다. (일반적으로 CV_PI*0.5가 기본값으로 사용)

    +
  • +
  • +

    ktype: 커널 타입. (보통 CV_64F (64-비트 부동소수점)를 사용)


    +
  • +
+
+
+
+

Gabor Filter 실행 (속도 느림 주의)

+ @if (srcGabor != null) + { + + } + @if (rstGabor != null) + { + + } +
+
+

+ Kernel Size(0 이상 홀수) + + +


+

+ Sigma (0.0 이상) + + +


+

+ Theta (0도 ~ 180도) + + +


+

+ Lambda (0.0 이상 이미지 사이즈 미만(256.0)) + + +


+

+ Gamma (0.0 ~ 1.0) + + +


+

+ Psi (0도 ~ 360도) + + +


+ +
+
+
+ @if (srcBinary != null) + { + + } + @if (rstBinary != null) + { + + } +
+
+
+ @foreach (var option in options) + { + + } +
+

Threshold (0 ~ 255)

+ +
+ + + +
+ + +@code { + private ElementReference canvas; + + private Mat? srcGabor, rstGabor; + private Mat? srcBinary, rstBinary; + int width = 256; + int height = 256; + private int valKernelSize = 3; + private double valSigma = 0.0; + private double valTheta = 0.0; + private double valLambd = 0.0; + private double valGamma = 0.0; + private double valPsi = 0.0; + public class Option + { + public string Value { get; set; } + public string Text { get; set; } + } + private List