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

GUI 90% done. Create image from nothing and innovation left to do

parent 6c0d4b85
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace S04_Projet
{
public class Filter
{
public static short[,] boxBlurFilter = new short[,]
{
{ 1, 1, 1 },
{ 1, 1, 1 },
{ 1, 1, 1 }
};
public static short[,] identityFilter = new short[,]
{
{ 0, 0, 0 },
{ 0, 1, 0 },
{ 0, 0, 0 }
};
public static short[,] edgeDetect1Filter = new short[,]
{
{ 1, 0, -1 },
{ 0, 0, 0 },
{ -1, 0, 1 }
};
public static short[,] edgeDetect2Filter = new short[,]
{
{ 0, 1, 0 },
{ 1, -4, 1 },
{ 0, 1, 0 }
};
public static short[,] edgeDetect3Filter = new short[,]
{
{ -1, -1, -1 },
{ -1, 8, -1 },
{ -1, -1, -1 }
};
public static short[,] sharpenFilter = new short[,]
{
{ 0, -1, 0 },
{ -1, 5, -1 },
{ 0, -1, 0 }
};
}
}
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Filter.cs" />
<Compile Include="MultiThreadedTask.cs" /> <Compile Include="MultiThreadedTask.cs" />
<Compile Include="MyImage.cs" /> <Compile Include="MyImage.cs" />
<Compile Include="Display.cs" /> <Compile Include="Display.cs" />
......
This diff is collapsed.
...@@ -13,65 +13,24 @@ namespace S04_Projet ...@@ -13,65 +13,24 @@ namespace S04_Projet
{ {
public static bool MULTITHREADING_LOAD = false; public static bool MULTITHREADING_LOAD = false;
public static bool MULTITHREADING = true; public static bool MULTITHREADING = true;
static void Main(string[] args) public static bool DEBUG = false;
{
#region Filters Matrix
short[,] boxBlurFilter = new short[,] {
{1,1,1 },
{1,1,1 },
{1,1,1 }
};
short[,] identityFilter = new short[,]
{
{ 0, 0, 0 },
{ 0, 1, 0 },
{ 0, 0, 0 }
};
short[,] edgeDetect1Filter = new short[,]
{
{ 1, 0, -1 },
{ 0, 0, 0 },
{ -1, 0, 1 }
};
short[,] edgeDetect2Filter = new short[,]
{
{ 0, 1, 0 },
{ 1, -4, 1 },
{ 0, 1, 0 }
};
short[,] edgeDetect3Filter = new short[,]
{
{ -1, -1, -1 },
{ -1, 8, -1 },
{ -1, -1, -1 }
};
short[,] sharpenFilter = new short[,] static void Main(string[] args)
{ {
{ 0, -1, 0 },
{ -1, 5, -1 },
{ 0, -1, 0 }
};
#endregion
Stopwatch sw = new Stopwatch(); Stopwatch sw = new Stopwatch();
MyImage img = new MyImage("img/image.bmp"); /*MyImage img = new MyImage("img/image.bmp");
MyImage imgg = new MyImage("img/flocon.bmp"); MyImage imgg = new MyImage("img/flocon.bmp");
Console.WriteLine("Loading done"); Console.WriteLine("Loading done");
sw.Start(); sw.Start();
MyImage supperposition = img.Superposition(imgg, 4000, 0); MyImage supperposition = img.Superposition(imgg, -6000, -8000);
sw.Stop(); sw.Stop();
supperposition.Save("sup.bmp"); supperposition.Save("sup.bmp");
Console.WriteLine(sw.ElapsedMilliseconds); Console.WriteLine(sw.ElapsedMilliseconds);
Console.Read(); Console.Read();*/
/*
#region Arguments /*#region Arguments
if (args.Length > 0) if (args.Length > 0)
{ {
MULTITHREADING = false; MULTITHREADING = false;
...@@ -111,10 +70,10 @@ namespace S04_Projet ...@@ -111,10 +70,10 @@ namespace S04_Projet
Console.WriteLine("--input argument required"); Console.WriteLine("--input argument required");
} }
} }
#endregion #endregion*/
#region Display #region Display
else
{ {
Console.ForegroundColor = ConsoleColor.White; Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("#############################################################"); Console.WriteLine("#############################################################");
...@@ -138,7 +97,7 @@ namespace S04_Projet ...@@ -138,7 +97,7 @@ namespace S04_Projet
Console.Read(); Console.Read();
} }
#endregion #endregion
*/
} }
} }
} }
This diff is collapsed.
This image diff could not be displayed because it is too large. You can view the blob instead.
This image diff could not be displayed because it is too large. You can view the blob instead.
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