Commit 21409355 authored by BORNON Théophile's avatar BORNON Théophile

1 filter added

parent 944de5dd
......@@ -10,44 +10,57 @@ namespace S04_Projet
{
public static short[,] boxBlurFilter = new short[,]
{
{ 1, 1, 1 },
{ 1, 1, 1 },
{ 1, 1, 1 }
{ 1, 1, 1 },
{ 1, 1, 1 },
{ 1, 1, 1 }
};
public static short[,] identityFilter = new short[,]
{
{ 0, 0, 0 },
{ 0, 1, 0 },
{ 0, 0, 0 }
{ 0, 0, 0 },
{ 0, 1, 0 },
{ 0, 0, 0 }
};
public static short[,] edgeDetect1Filter = new short[,]
{
{ 1, 0, -1 },
{ 0, 0, 0 },
{ -1, 0, 1 }
{ 1, 0, -1 },
{ 0, 0, 0 },
{ -1, 0, 1 }
};
public static short[,] edgeDetect2Filter = new short[,]
{
{ 0, 1, 0 },
{ 1, -4, 1 },
{ 0, 1, 0 }
{ 0, 1, 0 },
{ 1, -4, 1 },
{ 0, 1, 0 }
};
public static short[,] edgeDetect3Filter = new short[,]
{
{ -1, -1, -1 },
{ -1, 8, -1 },
{ -1, -1, -1 }
{ -1, -1, -1 },
{ -1, 8, -1 },
{ -1, -1, -1 }
};
public static short[,] sharpenFilter = new short[,]
{
{ 0, -1, 0 },
{ -1, 5, -1 },
{ 0, -1, 0 }
{ 0, -1, 0 },
{ -1, 5, -1 },
{ 0, -1, 0 }
};
public static short[,] motionBlueFilter = new short[,]
{
{ 1, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 1, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 1, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 1, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 1, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 1, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 1 },
};
}
}
......@@ -18,14 +18,13 @@ namespace S04_Projet
static void Main(string[] args)
{
Stopwatch sw = new Stopwatch();
/*MyImage img = new MyImage("img/image.bmp");
MyImage imgg = new MyImage("img/flocon.bmp");
/*MyImage img = new MyImage("img/coco.bmp");
Console.WriteLine("Loading done");
sw.Start();
MyImage supperposition = img.Superposition(imgg, -6000, -8000);
img = img.Filter(Filter.motionBlueFilter, 1.0 / 9.0);
sw.Stop();
supperposition.Save("sup.bmp");
img.Save("filter.bmp");
Console.WriteLine(sw.ElapsedMilliseconds);
Console.Read();*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment