Esempio n. 1
0
        public MainWindow()
            : base(Gtk.WindowType.Toplevel)
        {
            userInfoManager = new UserInfoManager ();
            if (userInfoManager.havePermissions () && userInfoManager.connect ()) {
                BuildInterface ();
                RenderUserList ();

            } else {
                Console.WriteLine ("No required permissions!");
                Application.Quit ();
            }
        }
Esempio n. 2
0
        public CommandService()
        {
            userInfoManager = new UserInfoManager();
            userInfoManager.connect();

            foreach(var user in userInfoManager.ListUsers())
            {
                foreach (var photo in userInfoManager.ListUserPhotoData(user))
                {
                    labels.Add(user.Name);
                    images.Add(photo.Image);

                    Console.WriteLine("Added image");
                }
            }

            MCvTermCriteria crit = new MCvTermCriteria(1.0);

            this.recognizer = new EigenObjectRecognizer(images.ToArray(),
                                                        labels.ToArray(),
                                                        2000,
                                                        ref crit);
        }