static void Main(string[] argv) { faceSearch = new FaceSearchWrapper.FaceSearch(); motionDetector = new MotionDetectWrapper.MotionDetector(); ImageSampleCount = System.IO.Directory.GetFiles(Properties.Settings.Default.FaceSampleLib, "*.jpg").Length; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #if !DEBUG if (!Util.VerifyKey()) { RegisterForm form = new RegisterForm(); DialogResult res = form.ShowDialog(); if (res == DialogResult.OK) { Application.Restart(); } return; } #endif if (argv.Length > 0) { directory = argv[0]; } Application.Run(new MainForm()); }
public ConfigHostProvider( //MotionDetectWrapper.MotionDetector detector, FaceSearchWrapper.FaceSearch searcher ) { //this.motionDetector = detector; this.faceSearcher = searcher; }
static void Main() { searcher = new FaceSearchWrapper.FaceSearch(); searcher.SetFaceParas(50, 6); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new ImportPersonEnter()); }
public ServiceProvider( //MotionDetectWrapper.MotionDetector motionDetector, FaceSearchWrapper.FaceSearch faceSearcher, Damany.Component.ICamera camera) { // if (motionDetector == null) // throw new ArgumentNullException("motionDetector", "motionDetector is null."); if (faceSearcher == null) throw new ArgumentNullException("faceSearcher", "faceSearcher is null."); if (camera == null) throw new ArgumentNullException("camera", "camera is null."); //this.motionDetector = motionDetector; this.faceSearcher = faceSearcher; this.camera = camera; }
static void Main(string[] argv) { faceSearch = new FaceSearchWrapper.FaceSearch(); motionDetector = new MotionDetectWrapper.MotionDetector(); ImageSampleCount = System.IO.Directory.GetFiles(Properties.Settings.Default.FaceSampleLib, "*.jpg").Length; SVMWrapper.InitSvmData(0, ImageLen, EigenNum); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #if !DEBUG if (!Util.VerifyKey()) { RegisterForm form = new RegisterForm(); DialogResult res = form.ShowDialog(); if (res == DialogResult.OK) { Application.Restart(); } return; } #endif if (argv.Length > 0) { directory = argv[0]; } string baseAddress = string.Format("net.tcp://{0}:8000", System.Net.IPAddress.Any); Uri netTcpBaseAddress = new Uri(baseAddress); ServiceHost host = new ServiceHost(typeof(Service.Service), netTcpBaseAddress); NetTcpBinding tcpBinding = BindingFactory.CreateNetTcpBinding(); host.AddServiceEndpoint(typeof(RemoteControlService.IServiceFacade), tcpBinding, "TcpService"); host.Open(); Application.Run(new MainForm()); }
public void Test() { var faceSearcher = new FaceSearchWrapper.FaceSearch(); int count = 0; var timer = new System.Diagnostics.Stopwatch(); timer.Start(); foreach (var file in System.IO.Directory.EnumerateFiles(@"G:\pic", "*.jpg")) { var img = IplImage.FromFile(file); var rect = new CvRect(0, 0, img.Width, img.Height); var faces = faceSearcher.SearchFace(img, rect); System.Diagnostics.Debug.WriteLine(faces.Length); count++; } var msPerPic = timer.ElapsedMilliseconds/count; System.Diagnostics.Debug.WriteLine("millisecond per picture: " + msPerPic); }
public ServiceProvider( //MotionDetectWrapper.MotionDetector motionDetector, FaceSearchWrapper.FaceSearch faceSearcher, Damany.Component.ICamera camera) { // if (motionDetector == null) // throw new ArgumentNullException("motionDetector", "motionDetector is null."); if (faceSearcher == null) { throw new ArgumentNullException("faceSearcher", "faceSearcher is null."); } if (camera == null) { throw new ArgumentNullException("camera", "camera is null."); } //this.motionDetector = motionDetector; this.faceSearcher = faceSearcher; this.camera = camera; }
public void Test() { var faceSearcher = new FaceSearchWrapper.FaceSearch(); int count = 0; var timer = new System.Diagnostics.Stopwatch(); timer.Start(); foreach (var file in System.IO.Directory.EnumerateFiles(@"G:\pic", "*.jpg")) { var img = IplImage.FromFile(file); var rect = new CvRect(0, 0, img.Width, img.Height); var faces = faceSearcher.SearchFace(img, rect); System.Diagnostics.Debug.WriteLine(faces.Length); count++; } var msPerPic = timer.ElapsedMilliseconds / count; System.Diagnostics.Debug.WriteLine("millisecond per picture: " + msPerPic); }
private SuspectsRepositoryManager(string rootDirectorPathAbsolute) { this.RootDirectoryPathAbsolute = rootDirectorPathAbsolute; this.storage = new Dictionary<Guid, PersonOfInterest>(); this.faceSearcher = new FaceSearchWrapper.FaceSearch(); }
public PortraitFinder() { this.searcher = new FaceSearchWrapper.FaceSearch(); PostFilters = new List<IFacePostFilter>(0); }
private SuspectsRepositoryManager(string rootDirectorPathAbsolute) { this.RootDirectoryPathAbsolute = rootDirectorPathAbsolute; this.storage = new Dictionary <Guid, PersonOfInterest>(); this.faceSearcher = new FaceSearchWrapper.FaceSearch(); }
public PortraitFinder() { this.listeners = new List<IPortraitHandler>(); this.searcher = new FaceSearchWrapper.FaceSearch(); }