cirocosta / gulp-converter-tjs

Converts old/new type of OpenCV HaarCascade xml data to trackingJs' internal format.
MIT License
37 stars 6 forks source link

Merge convertOld and convert methods #5

Closed cirocosta closed 10 years ago

cirocosta commented 10 years ago

The way the xml's are structured and the way xml-stream works we are able to receive a xml that might be old or new and parse it anyway with only one function. This would allow us to receive any kind of haar cascade and then generate the internal structure for tracking.js on the go, without having to separate new and old in different folders.

cirocosta commented 10 years ago

There's actually an overlap ('endElement: stages > _') is equal for both. This causes a double registration of listeners to that event. It wound be just a 'copy and paste' as i thought.