|
|
|
@ -62,24 +62,30 @@
|
|
|
|
|
</canvas>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<p>Kernel Size(0 이상 홀수)</p>
|
|
|
|
|
<input type="range" min="3" max="127" step="2" @bind="@valKernelSize" @bind:event="oninput" />
|
|
|
|
|
<input type="text" @bind="@valKernelSize" /><br />
|
|
|
|
|
<p>Sigma (0.0 이상)</p>
|
|
|
|
|
<p>Kernel Size(0 이상 홀수)
|
|
|
|
|
<input type="range" min="3" max="127" step="2" @bind="@valKernelSize" @bind:event="oninput" />
|
|
|
|
|
<input type="text" @bind="@valKernelSize" />
|
|
|
|
|
</p><br />
|
|
|
|
|
<p>Sigma (0.0 이상)
|
|
|
|
|
<input type="range" min="0" max="1000" step="0.01" @bind="@valSigma" @bind:event="oninput" />
|
|
|
|
|
<input type="text" @bind="@valSigma" /><br />
|
|
|
|
|
<p>Theta (0도 ~ 180도)</p>
|
|
|
|
|
<input type="text" @bind="@valSigma" />
|
|
|
|
|
</p><br />
|
|
|
|
|
<p>Theta (0도 ~ 180도)
|
|
|
|
|
<input type="range" min="0" max="180" step="0.01" @bind="@valTheta" @bind:event="oninput" />
|
|
|
|
|
<input type="text" @bind="@valTheta" /><br />
|
|
|
|
|
<p>Lambda (0.0 이상 이미지 사이즈 미만(256.0))</p>
|
|
|
|
|
<input type="text" @bind="@valTheta" />
|
|
|
|
|
</p><br />
|
|
|
|
|
<p>Lambda (0.0 이상 이미지 사이즈 미만(256.0))
|
|
|
|
|
<input type="range" min="0" max="255" step="0.01" @bind="@valLambd" @bind:event="oninput" />
|
|
|
|
|
<input type="text" @bind="@valLambd" /><br />
|
|
|
|
|
<p>Gamma (0.0 ~ 1.0)</p>
|
|
|
|
|
<input type="text" @bind="@valLambd" />
|
|
|
|
|
</p><br />
|
|
|
|
|
<p>Gamma (0.0 ~ 1.0)
|
|
|
|
|
<input type="range" min="0.0" max="1.0" step="0.01" @bind="@valGamma" @bind:event="oninput" />
|
|
|
|
|
<input type="text" @bind="@valGamma" /><br />
|
|
|
|
|
<p>Psi (0도 ~ 360도)</p>
|
|
|
|
|
<input type="text" @bind="@valGamma" />
|
|
|
|
|
</p><br />
|
|
|
|
|
<p>Psi (0도 ~ 360도)
|
|
|
|
|
<input type="range" min="0.0" max="360" step="0.01" @bind="@valPsi" @bind:event="oninput" />
|
|
|
|
|
<input type="text" @bind="@valPsi" /><br />
|
|
|
|
|
<input type="text" @bind="@valPsi" />
|
|
|
|
|
</p><br />
|
|
|
|
|
<button @onclick="@(async () => await GaborFilter())">GaborFilter</button>
|
|
|
|
|
</div>
|
|
|
|
|
<br />
|
|
|
|
@ -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);
|
|
|
|
|
//
|
|
|
|
|