public void OrientationRegularizationAngleTest() { var image = Resources._1; var bytes = ImageHelper.LoadImage<int>(Resources._1); int height = bytes.GetLength(0); int width = bytes.GetLength(1); float[] sourceBytes = new float[height * width]; float[] orientInp = new float[height * width]; float[] orientOut = new float[height * width]; PixelwiseOrientationField field1 = new PixelwiseOrientationField(bytes, 16); for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { sourceBytes[i * width + j] = (float)bytes[i, j]; orientInp[i * width + j] = (float)field1.Orientation[i, j]; orientOut[i * width + j] = 0.0f; } } OrientationRegularization(orientOut, orientInp, height, width, 25); double[,] orient_2D = new double[height, width]; for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) orient_2D[i, j] = orientOut[i * width + j]; //field1.NewOrientation(orient_2D); field1.SaveAboveToFile(image); }
public void OrientationRegularizationTest() { var image = Resources.SampleFinger; var bytes = ImageHelper.LoadImage<int>(Resources.SampleFinger); PixelwiseOrientationField field = new PixelwiseOrientationField(bytes, 16); OrientationFieldRegularization new_field = new OrientationFieldRegularization(field.Orientation, 25); field.NewOrientation(new_field.LocalOrientation()); field.SaveAboveToFile(image); }
public void PixelwiseOrientationTest() { var image = Resources.SampleFinger; var bytes = ImageHelper.LoadImage<int>(Resources.SampleFinger); PixelwiseOrientationField field = new PixelwiseOrientationField(bytes, 16); //double orientation = field.GetOrientation(1, 1); field.SaveAboveToFile(image); }