Haars Cascade for Actionscript development - actionscript

I have an object that I want to be able to recognize in AS3.
There's a port of OpenCV for AS3 already, that works with Haars cascades, so now I need to create a cascade of my object.
From what I've read, I'll have to create an XML of several images (positive and negative), but I can't find a program that'll do that for Mac OS X.
Is there anything I can use that'll generate that XML on Mac OS X?
Cheers,
Andre

It's just a parsing job. Use this: http://www.moment77.se/flash-classes/code-snippets/convert-haar-cascades-from-xml-to-actionscript/

Related

How to read and write id3v1 and id3v2 tags in Elixir

I would like to scan music files and read/write metadata using Elixir (this whole project is about learning Elixir - so please don't tell me to use Python!). As I understand it, I have two choices: call a system utility or (as no libraries exist in Erlang or Elixir that I am aware of) write an Elixir library. For m4a files, I make a system call to MP4Box and it writes an xml file to disk. I then read in the file, parse it, and load the data into a database.
def parse(file_name) do
System.cmd("MP4Box", ["-diso",file_name])
Ainur.XmlParser.parse(xml_file_name(file_name))
|> get_tags
end
Very slow, especially for thousands of files. And I want it to run at start up everytime to check for changed/new files.
Now I am trying to do the same for mp3's with id3 tags. I tried libid3-tools on Ubuntu and it only found the id3v1 tags. eyeD3 only found id3v2 tags. My mp3's have both so I need to make sure there are the same (I suppose I could delete the id3v1 tags, but I have been led to believe that id3v1 tags are needed on legacy equipment).
Are there any Erlang or Elixir libraries for music metadata? If not, are system calls to ubuntu utilities my best choice (any recommendations on which ones)?
Or do I need to write a library to obtain reasonable performance? If so, is there an existing library in a functional language that I could try to port?
Or is it possible to call a library written in another language directly from Elixir (without the system call)?
You can always use erlang NIFs (http://erlang.org/doc/tutorial/nif.html) to wrap an external library
In this project we have a module written in Elixir which extracts ID3 tags from mp3:
https://github.com/anisiomarxjr/shoutcast_server/blob/master/lib/mp3_file.ex
To use:
id3 = Mp3File.extract_id3("./test/fixtures/nederland.mp3")
I've implemented ID3v2 tag reading (not writing) in Elixir. It's on GitHub and Hex.
Support is very basic; I implemented the bare minimum to support my use case. There's lots of bugs, but all the building blocks are there to fork/improve/contribute.
You could also try directly reading the binary of the file to find the tag in question.
Check the File.stream/3 docs to get started.

openCV from window to ios

I want to train openCV from a server and send the xml generated by openCV to an ios device where an app will recognize the face using the xml trainned by the server. I will use openCV in both app but the server has window (trainning) and the device has ios (recognition).
So my main question is very simple:
The xml generated in openCV window version can be used an openCV IOS version without any trouble? Somebody made something similar who can give me some tips?
In window I will use .Net.
I think they won't have trouble because they are same libraries (openCV), so I suppose they have same internal algorithms but I want to be sure before start the project.
Best Regards and thanks for your time
There is no problem, but you must train with images taken from your devices. It is normal to have multiple xml sets depending on your different cameras. Normally you release these with the binary, and not as a download but still...

Affine-SIFT(ASIFT) Feature Detector

I am working on a project where I have to detect the features of an object (in a Video Frame) and match it with other objects (inside some other frame) to recognize the same object for tracking. I have googled many Feature detector algorithms. I also did some comparisons between them (SIFT,SURF & ASIFT).
ASIFT is computationally a bit expensive but the results are more accurate when compared to SIFT & SURF.
I have googled a lot about ASIFT but did not get any success regarding my project.
Can someone please help me with using ASIFT in my project?
ASIFT reference:
http://www.ipol.im/pub/algo/my_affine_sift/
Which files should I include in my project? I'm working on OPENCV 2.1 , IDE VS 2010.
Its my first post on this platform. Hope some one will help me.
The important functions are in the files compute_asift_keypoints.{c,h} and compute_asift_matches.{c,h}. They will inform you about which functions are mandatory. From there you have the choice:
Quick-and-dirty way:
you need to include and compile everything, except the executable part (file demo_*.cpp). You can either compile the files as a library (by modifying the CMakeLists.txt) or add them to your project in your IDE. Note that you will not use the functions from io_png for example, but you need to compile them if you don't want to be annoyed by compiler errors about missing functions.
Clean (but longer) way:
you have to ignore / remove all the files that also contain the I/O part, since OpenCV can take care of them. Then you can also look for functions that are already implemented in OpenCV, such as applying an affine transform, SVD... and progressively replace them by their OpenCV counterpart.

Tools to help me learning Apple Quick time file format?

When I was learning Portable Executable (PE) file format for windows, tools like PE-Explorer and PEView helped me in learning things quickly and nicely. Now, I need to learn and understand the apple quick time file format. Are there any
Tools with which I can browse the quick time format?
Export sections of the file?
Any additional resources other than the specifications?
PS: I'm on windows and I don't have mac/macOS
Tools with which I can browse the quick time format?
On Windows you can use MP4 Explorer, and since it is open source you can also learn from it. Since MP4 uses a similar structure to QuickTime you can use it for both.
There is also the old Dumpster tool from Apple. There is an old version of this tool for Windows, but I could not find it in the Apple developer site. This forum post has a copy that you can try. This is very old though, I'm not sure if it'll work with recent QT files.
If you can obtain access to a Mac running OS X, then you can use Dumpster or Atom Explorer.
Export sections of the file?
I don't know of any public tool for this. Your best bet is to extend MP4 Explorer to do this, or write your own parser. Parsing the atoms is actually pretty simple, things start to get complicated when you need to interpret the content of the atoms and cross-reference them to, for example, locate where the frame data is.
Any additional resources other than the specifications?
The QuickTime file format specification is the best resource for Apple generated QuickTime files, but you may need to do some reverse engineering, as the spec is not very complete in some areas, like the handling of MPEG-2 and MPEG-4 video. If you have access to ISO specs, then ISO/IEC 14496-12 is a standardized version of the QuickTime format (or better said, of a subset of it). The ISO/IEC 14496-15 specification builds on top of 14496-12 and defines a specific implementation of this format for the H.264 format. This is the so called MP4 format.
With the above three documents you should be pretty good in terms of documentation.
The MPEG4 (.MP4) file format is based on the QuickTime file format. You should be able to use the MPEG4IP tools to examine .MOV files. You can find windows binaries here.
Media Box Viewer does exactly this and much more. In addition to Quicktime, it can also open mp4, 3gp, etc. It runs on all platforms, Windows, Mac, Linux, etc.
It can be downloaded from www.jdxsoftware.org.

What do you need to do to create a single package for blackberry OS5 and OS6 devices?

A newb question and one I haven't been able to see much advice on, but is it possible to create a single package that will install and run on both blackberry OS5 and OS6 devices?
I want to avoid preprocessing or creation of two different COD files.
I am not using anything special that differs between the two OS's (afaik!)
Yes, absolutely. So far, RIM has made all of it's OS revisions backwards-compatible. So anything you write against any given OS version will work on that version and all newer versions.
That's not to say that you won't run into funny quirks when moving to newer OS versions, but your code will execute without recompilation. You just can't take advantage of any of the newer OS's API changes without doing preprocessing.
Basically in this case you just should not use APIs which were added in OS6.

Resources