2

This project is discontinued , however the project files are still alive , simply i want to use the haar.js project to detect upper body in some media file (video or image ) , the current cascades in project folder doesn't contain upper body classifier , so i will have to use their tool (haartojs.php).

I have done the following :

  1. Downloaded php for windows.
  2. copied my open cv xml file to the root.
  3. ran cmd command: php haartojs.php --xml=myfile.xml
  4. seems the tool is working but i cant find the output file anywhere.

Also i checked the php file source ( im not php expert ) , did not find any line that shows any indication to write files.

any help will be appreciated.

php source file: https://github.com/foo123/HAAR.js/blob/master/cascades/haartojs.php

Project Page: https://github.com/foo123/HAAR.js

and this is a screenshot of the output: enter image description here

ProllyGeek
  • 15,517
  • 9
  • 53
  • 72

1 Answers1

2

I found the correct answer , after a bit long search , it is not related to php , it is about saving output in a file from cmd , a typical run command is as following:

php haartojs.php --xml=myxmlfilename.xml > myjsfilename.js

this will simply output the result from php operation to a js file.

ProllyGeek
  • 15,517
  • 9
  • 53
  • 72
  • 1
    Congratulations, you've now learned something about a fundamental feature of your operating system (and a very powerful one). I doubt this qualifies as a programming question nor that it belongs onto Stackoverflow. But just saying in case you're looking for some context. The more technical term is I/O-Redirection or just Redirection. http://en.wikipedia.org/wiki/Redirection_(computing) - normally available in command-line interpreters. – hakre Oct 18 '14 at 15:12
  • @hakre i wish had that comment before hours of searching , anywa i know the fundamentals of my OS very well , it is just i havent noticed the output , thought the php would generate a new file. – ProllyGeek Oct 18 '14 at 15:28
  • Can happen. Not seeing the woods for the trees. ;) If I had seen it earlier, I would have commented earlier. – hakre Oct 18 '14 at 15:29
  • @hakre anyawy it turned out to be useless this script is a piece of crap :| – ProllyGeek Oct 18 '14 at 15:35
  • Well there probably is reason why it's discontinued? (Was on that website, it's with big letters and so...) – hakre Oct 18 '14 at 15:35
  • @hakre i know i should delete the question , but just in case someone will search for this answer in future who knows. – ProllyGeek Oct 18 '14 at 15:47
  • You should perhaps modify the title of the question to better match it then. – hakre Oct 18 '14 at 16:04
  • 1
    hi there, i am the author of the haar.js library and it is stopped as a project, since i do not maintain it anymore or add new features but the functionality works as stated. The comment is added since i just came accross the question. There are a couple of other image processing/ detection js libs out there (some are referenced in the haar.js readme) – Nikos M. Dec 30 '14 at 15:07