Skip to content

Commit

Permalink
Pre-Final Update
Browse files Browse the repository at this point in the history
  • Loading branch information
9hy committed Mar 10, 2019
1 parent 84a700c commit db6a415
Show file tree
Hide file tree
Showing 5 changed files with 527 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Blur/Form2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void button1_Click(object sender, EventArgs e)
// frame = (Bitmap)blurer.ClipToCircle(frame2.Bitmap, frame, new Point(face.X + face.Width / 2, face.Y + face.Height / 2), face.Width / 2, face);

//}
Analyzer analyzer = new Analyzer(true, ssdFile : Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + @"\Assets\res10_300x300_ssd_iter_140000.caffemodel", ssdProtoFile : Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + @"\Assets\deploy.prototxt", facemarkFileName : Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + @"\Assets\lbfmodel.yaml");
Analyzer analyzer = new Analyzer(true, Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + @"\Assets\res10_300x300_ssd_iter_140000.caffemodel", Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + @"\Assets\deploy.prototxt", Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + @"\Assets\lbfmodel.yaml");
//frame = analyzer.BlurFaceOval(imageFrame.Mat).ToImage<Bgr, Byte>().Bitmap;
pictureBox1.Image = frame;
}
Expand Down
10 changes: 10 additions & 0 deletions XBF/Analyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,16 @@ public Bitmap BlurFaceWithLandmark(Bitmap img, int BlurSize, List<Rectangle> fac

}

/// <summary>
/// Get Blur Opacity mask
/// </summary>
/// <param name="img">Base Image</param>
/// <param name="faces">Faces Matrix</param>
/// <param name="landmarks_"></param>
/// <param name="ssdFile_"></param>
/// <param name="ssdProtoFile_"></param>
/// <param name="facemarkFileName_"></param>
/// <returns></returns>

public Bitmap getOpMask(Bitmap img, List<Rectangle> faces = null, PointF[][][] landmarks_ = null, String ssdFile_ = null, String ssdProtoFile_ = null, String facemarkFileName_ = null)
{
Expand Down
Loading

0 comments on commit db6a415

Please sign in to comment.