diff --git a/BlazorApp/Pages/OpenCvSharpSample.razor b/BlazorApp/Pages/OpenCvSharpSample.razor index c548bb7..172faea 100644 --- a/BlazorApp/Pages/OpenCvSharpSample.razor +++ b/BlazorApp/Pages/OpenCvSharpSample.razor @@ -62,24 +62,30 @@
-

Kernel Size(0 이상 홀수)

- -
-

Sigma (0.0 이상)

+

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


+

Sigma (0.0 이상) -
-

Theta (0도 ~ 180도)

+ +


+

Theta (0도 ~ 180도) -
-

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

+ +


+

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

Gamma (0.0 ~ 1.0)

+ +


+

Gamma (0.0 ~ 1.0) -
-

Psi (0도 ~ 360도)

+ +


+

Psi (0도 ~ 360도) -
+ +



@@ -180,7 +186,8 @@ await srcCanvasClient.DrawPixelsAsync(imageBytes_rgba); - var imageBytes2 = await httpClient.GetByteArrayAsync("/images/lenna256.bmp"); + //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) //{ @@ -225,8 +232,8 @@ { //if (srcMat is null) // throw new InvalidOperationException($"{nameof(srcMat)} is null"); - //if (dstCanvasClient is null) - // throw new InvalidOperationException($"{nameof(dstCanvasClient)} is null"); + if (dstCanvasClient is null) + throw new InvalidOperationException($"{nameof(dstCanvasClient)} is null"); //using var grayMat = new Mat(); //Cv2.CvtColor(srcMat, grayMat, ColorConversionCodes.BGR2GRAY); @@ -244,8 +251,8 @@ { //if (srcMat is null) // throw new InvalidOperationException($"{nameof(srcMat)} is null"); - //if (dstCanvasClient is null) - // throw new InvalidOperationException($"{nameof(dstCanvasClient)} 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(); @@ -261,9 +268,9 @@ { //if (srcMat is null) // throw new InvalidOperationException($"{nameof(srcMat)} is null"); - //if (dstCanvasClient is null) - // throw new InvalidOperationException($"{nameof(dstCanvasClient)} 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); @@ -294,9 +301,9 @@ { //if (srcMat2 is null) // throw new InvalidOperationException($"{nameof(srcMat2)} is null"); - //if (dstCanvasClient2 is null) - // throw new InvalidOperationException($"{nameof(dstCanvasClient2)} 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); // diff --git a/BlazorApp/wwwroot/images/gabor.bmp b/BlazorApp/wwwroot/images/gabor.bmp new file mode 100644 index 0000000..7639fdb Binary files /dev/null and b/BlazorApp/wwwroot/images/gabor.bmp differ diff --git a/BlazorApp/wwwroot/images/gabor.jpg b/BlazorApp/wwwroot/images/gabor.jpg new file mode 100644 index 0000000..783ab6e Binary files /dev/null and b/BlazorApp/wwwroot/images/gabor.jpg differ