{"action":"created","issue":{"url":"https://api.github.com/repos/accord-net/framework/issues/118","labels_url":"https://api.github.com/repos/accord-net/framework/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/accord-net/framework/issues/118/comments","events_url":"https://api.github.com/repos/accord-net/framework/issues/118/events","html_url":"https://github.com/accord-net/framework/issues/118","id":96403827,"number":118,"title":"OpenCV HaarCascade XML Compabaility Issue","user":{"login":"nickpateman","id":4998105,"avatar_url":"https://avatars.githubusercontent.com/u/4998105?v=3","gravatar_id":"","url":"https://api.github.com/users/nickpateman","html_url":"https://github.com/nickpateman","followers_url":"https://api.github.com/users/nickpateman/followers","following_url":"https://api.github.com/users/nickpateman/following{/other_user}","gists_url":"https://api.github.com/users/nickpateman/gists{/gist_id}","starred_url":"https://api.github.com/users/nickpateman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickpateman/subscriptions","organizations_url":"https://api.github.com/users/nickpateman/orgs","repos_url":"https://api.github.com/users/nickpateman/repos","events_url":"https://api.github.com/users/nickpateman/events{/privacy}","received_events_url":"https://api.github.com/users/nickpateman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-21T19:57:01Z","updated_at":"2015-07-22T06:49:54Z","closed_at":null,"body":"Hi there,\r\n\r\nI'm trying to load a cascade from here,\r\n\r\nhttps://github.com/Itseez/opencv/tree/master/data/haarcascades,\r\n\r\ntried\r\nhaarcascade_frontalface_default.xml\r\nand\r\nhaarcascade_frontalface_alt2.xml\r\n\r\nso far but they do not seem compatible.  The Accord.net library is looking for a size element when there isn't one, there is width and height in separate elements, so I added a size element, and then it crashes on this,\r\n\r\n        /// <summary>\r\n        ///   Checks if the classifier contains tilted (rotated) features\r\n        /// </summary>\r\n        /// \r\n        private static bool checkTiltedFeatures(HaarCascadeStage[] stages)\r\n        {\r\n            foreach (var stage in stages)\r\n                foreach (var tree in stage.Trees)\r\n                    foreach (var node in tree)\r\n                        if (node.Feature.Tilted == true)\r\n                            return true;\r\n            return false;\r\n        }\r\n\r\nI'd Like to use some cascades for detecting facial features, any idea what the issue is here?  Are there some cascade files somewhere that work with accord.net?  My code to load is as follows,\r\n\r\n        String path = @\"D:\\cascades\\haarcascade_frontalface_alt2.xml\";\r\n        HaarCascade cascade = HaarCascade.FromXml(path);\r\n"},"comment":{"url":"https://api.github.com/repos/accord-net/framework/issues/comments/123580570","html_url":"https://github.com/accord-net/framework/issues/118#issuecomment-123580570","issue_url":"https://api.github.com/repos/accord-net/framework/issues/118","id":123580570,"user":{"login":"anders9ustafsson","id":6515030,"avatar_url":"https://avatars.githubusercontent.com/u/6515030?v=3","gravatar_id":"","url":"https://api.github.com/users/anders9ustafsson","html_url":"https://github.com/anders9ustafsson","followers_url":"https://api.github.com/users/anders9ustafsson/followers","following_url":"https://api.github.com/users/anders9ustafsson/following{/other_user}","gists_url":"https://api.github.com/users/anders9ustafsson/gists{/gist_id}","starred_url":"https://api.github.com/users/anders9ustafsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anders9ustafsson/subscriptions","organizations_url":"https://api.github.com/users/anders9ustafsson/orgs","repos_url":"https://api.github.com/users/anders9ustafsson/repos","events_url":"https://api.github.com/users/anders9ustafsson/events{/privacy}","received_events_url":"https://api.github.com/users/anders9ustafsson/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T06:49:54Z","updated_at":"2015-07-22T06:49:54Z","body":"@nickpateman Accord.NET parses according to the older Haar Cascade *Open CV* format. *Open CV* changed the format about two years ago. A quick search through the *Open CV* repository indicates that [this](https://github.com/Itseez/opencv/tree/fdf1996e2ebf25cbc185250404aa9e96d5566302) commit is the last where the older format is used.\r\n\r\nThere is already an open issue #83 for updating the Haar Cascade parsing to *Open CV*'s current format."}}