Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imageProcessing
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ecole
imageProcessing
Commits
98996813
Commit
98996813
authored
Feb 20, 2018
by
BORNON Théophile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simple arguement handling
parent
4ff17f98
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
21 deletions
+67
-21
.gitignore
.gitignore
+3
-0
Program.cs
ImageProcessing_Benchmark/Program.cs
+6
-4
ImageProcessing_Benchmark.exe
...cessing_Benchmark/bin/Debug/ImageProcessing_Benchmark.exe
+0
-0
S04_Projet.exe
ImageProcessing_Benchmark/bin/Debug/S04_Projet.exe
+0
-0
ImageProcessing_Test.dll
ImageProcessing_Test/bin/Debug/ImageProcessing_Test.dll
+0
-0
S04_Projet.exe
ImageProcessing_Test/bin/Debug/S04_Projet.exe
+0
-0
ImageProcessing.csproj
S04_Projet/ImageProcessing.csproj
+5
-0
Program.cs
S04_Projet/Program.cs
+53
-17
S04_Projet.exe
S04_Projet/bin/Debug/S04_Projet.exe
+0
-0
No files found.
.gitignore
View file @
98996813
...
...
@@ -264,3 +264,6 @@ __pycache__/
/S04_Projet/bin/Debug/edge1.bmp
/S04_Projet/bin/Debug/blur.bmp
/ImageProcessing_Benchmark/bin/Debug/ImageProcessing_Benchmark.exe.config
*.csv
*.xlsx
/ImageProcessing_Benchmark/bin/Debug/flocon.bmp
ImageProcessing_Benchmark/Program.cs
View file @
98996813
...
...
@@ -11,18 +11,20 @@ namespace ImageProcessing_Benchmark
Stopwatch
sw
=
new
Stopwatch
();
System
.
Console
.
WriteLine
(
"Benchmarking"
);
for
(
int
i
=
0
;
i
<
10
0
;
i
++)
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
sw
.
Restart
();
Process
.
Start
(
"S04_Projet.exe"
);
while
(
Process
.
GetProcessesByName
(
"S04_Projet"
).
Length
!=
0
);
ProcessStartInfo
processStartInfo
=
new
ProcessStartInfo
();
processStartInfo
.
Arguments
=
"--input flocon.bmp --multithreading"
;
processStartInfo
.
FileName
=
"S04_Projet.exe"
;
Process
.
Start
(
processStartInfo
);
while
(
Process
.
GetProcessesByName
(
"S04_Projet"
).
Length
!=
0
)
System
.
Threading
.
Thread
.
Sleep
(
20
);
sw
.
Stop
();
results
+=
sw
.
ElapsedMilliseconds
+
"\n"
;
}
File
.
WriteAllText
(
"bench.csv"
,
results
);
System
.
Console
.
WriteLine
(
"Done"
);
System
.
Console
.
Read
();
}
}
}
ImageProcessing_Benchmark/bin/Debug/ImageProcessing_Benchmark.exe
View file @
98996813
No preview for this file type
ImageProcessing_Benchmark/bin/Debug/S04_Projet.exe
0 → 100644
View file @
98996813
File added
ImageProcessing_Test/bin/Debug/ImageProcessing_Test.dll
View file @
98996813
No preview for this file type
ImageProcessing_Test/bin/Debug/S04_Projet.exe
View file @
98996813
No preview for this file type
S04_Projet/ImageProcessing.csproj
View file @
98996813
...
...
@@ -21,6 +21,8 @@
<DefineConstants>
DEBUG;TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<DocumentationFile>
</DocumentationFile>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<PlatformTarget>
x64
</PlatformTarget>
...
...
@@ -54,4 +56,7 @@
<None
Include=
"App.config"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<PropertyGroup>
<PostBuildEvent>
copy $(TargetPath) $(SolutionDir)ImageProcessing_Benchmark\bin\Debug
</PostBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
S04_Projet/Program.cs
View file @
98996813
...
...
@@ -56,7 +56,42 @@ namespace S04_Projet
{
0
,
-
1
,
0
}
};
#
endregion
if
(
args
.
Length
>
0
)
{
MULTITHREADING
=
false
;
string
inputPath
=
""
;
string
outputPath
=
""
;
for
(
int
i
=
0
;
i
<
args
.
Length
;
i
++)
{
if
(
args
[
i
].
Equals
(
"--input"
))
{
inputPath
=
args
[
i
+
1
];
i
++;
}
else
if
(
args
[
i
].
Equals
(
"--output"
))
{
outputPath
=
args
[
i
+
1
];
i
++;
}
else
if
(
args
[
i
].
Equals
(
"--multithreading"
))
MULTITHREADING
=
true
;
}
if
(
inputPath
!=
""
)
{
MyImage
img
=
new
MyImage
(
inputPath
);
if
(
outputPath
!=
""
)
{
img
.
Save
(
outputPath
);
}
else
{
Console
.
WriteLine
(
"No output specified, program will only load image in memory and stop"
);
}
}
else
{
Console
.
WriteLine
(
"--input argument required"
);
}
}
else
{
Console
.
ForegroundColor
=
ConsoleColor
.
White
;
Console
.
WriteLine
(
"#############################################################"
);
Console
.
WriteLine
(
"### Bienvenue ###"
);
...
...
@@ -79,4 +114,5 @@ namespace S04_Projet
Console
.
Read
();
}
}
}
}
S04_Projet/bin/Debug/S04_Projet.exe
View file @
98996813
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment