Skip to content

Commit

Permalink
added missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
9hy committed Mar 8, 2019
1 parent 1b42110 commit 94e6fb6
Show file tree
Hide file tree
Showing 4 changed files with 35,719 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Blur/Blur.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="haarcascade_frontalface_default.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="License-LGPL.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
6 changes: 3 additions & 3 deletions Blur/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Form1()

private void button1_Click(object sender, EventArgs e)
{
_cascadeClassifier = new CascadeClassifier(@"W:\Documents\Web\c++\face_detect_n_track-master\haarcascade_frontalface_default.xml");
_cascadeClassifier = new CascadeClassifier(@"haarcascade_frontalface_default.xml");
using (var imageFrame = _capture.QueryFrame().ToImage<Bgr, Byte>())
{
Bitmap frame =imageFrame.ToBitmap();
Expand All @@ -54,8 +54,8 @@ private void button1_Click(object sender, EventArgs e)

//frame2.Draw(face, new Bgr(Color.BurlyWood), 2); //the detected face(s) is highlighted here using a box that is drawn around it/them

frame = blurer.FastBoxBlur(frame2.Bitmap, 20, new Rectangle() { X = face.X, Y = face.Y, Width = face.Width, Height = face.Height });
frame = (Bitmap)blurer.ClipToCircle(frame2.Bitmap, frame, new Point(face.X + face.Width / 2, face.Y + face.Height / 2), face.Width / 2, new Rectangle() { X = face.X, Y = face.Y, Width = face.Width, Height = face.Height });
frame = blurer.FastBoxBlur(frame2.Bitmap, 20, face);
frame = (Bitmap)blurer.ClipToCircle(frame2.Bitmap, frame, new Point(face.X + face.Width / 2, face.Y + face.Height / 2), face.Width / 2, face);

}
}
Expand Down
2 changes: 1 addition & 1 deletion Blur/Form2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Form2()

private void button1_Click(object sender, EventArgs e)
{
_cascadeClassifier = new CascadeClassifier(@"W:\Documents\Web\c++\face_detect_n_track-master\haarcascade_frontalface_default.xml");
_cascadeClassifier = new CascadeClassifier(@"haarcascade_frontalface_default.xml");
if (openFileDialog1.ShowDialog() == DialogResult.OK) {
string path = openFileDialog1.FileName;

Expand Down
Loading

0 comments on commit 94e6fb6

Please sign in to comment.