OpenCV on Embedded Platform - c++

Can some suggest a test/development embedded platform to use with OpenCV.
I would like to develop an embedded video analytics solution, but I don't know where to start.
Some suggestion/ideas/hw starter kits?
Maybe some Pc-104 solutions with Intel Atom? Has someone made some test about performances on this platform or any other embedded platform?
Thanks

A Pentium/PC built OpenCV application will run on any Atom platform with the same OS unmodified. This is because Atoms natively run Pentium executables.
If you are looking for a more embedded solution, there are OpenCV ports for the BeagleBoard. SInce OpenCV is portable code, it can be compiled to most systems that provide a C/C++ compiler. I have successfully used OpenCV on ARM, MIPS and XScale processors.
As for mobile platforms, there are ports to the iPhone, Android and various Windows CE/Mobile/Embdeed versions.

If you're looking for a very small option, I strongly recommend the Gumstix Overo series. I use them for my Computer Vision research, and they work really well. There are a couple of options for processors, I'd recommend the Overo Tide module, which has 512 MB of RAM, and an onboard DSP for offloading some CV operations. Combine this with a Tobi expansion board and a few cables, and you've got a full embedded computer vision research platform for ~$350. They also sell a small camera, which I'm still getting around to trying out. What's nice about the Gumstix is you can just build OpenCV onboard, which saves you some of the headaches with BitBake type solutions.

I'd personally recommend TI OMAP platforms - Beagleboard xM and PandaBoard.
Those boards have embedded video input, run Linux, and have more than enough performance to run OpenCV. They are also extremely portable and have good community support.

Do you mean OpenCV the computer vision library originally developed by Intel? I would be inclined to start with Moblin, Intel's embedded Linux, at moblin.org and for hw use a netbook or any PC that Moblin supports. Hook up a supported webcam from the list at www.qbik.ch/usb/devices/search_res.php?pattern=webcam .
There is a Wikipedia entry that might help. Your project sounds like fun!
cheers -- Rick

You can use the Blackfin kit from Analog Devices. Analog Devices have created a library similar to opencv for the blackfin DSP processor.

you can use Symbian Simulator for this they Nokia have there Open CV for Symbian for hardware testing you have to drop the mail to them they will provide u the hardware through the telnet for given time of time

OpenCV does not need any "special" hardware to function. You can use it fully using images from normal files (e.g. JPG)
Have you looked at some of the tutorials/code? Do they require something specific that you do not have?

Vision Components seem to support the OpenCV in their Smart Cameras (see this article).

I guess I am late to answer.
I have recently used opencv3.4.6 with PC-104 boards (PCM3365) for an INDUSTRIAL Application.
Only thing to note is that when i start webcamera using cv::Videocapture, it takes a long time to open (around 30-40secs), otherwise everything is fine.
Good Luck

Related

Develope an application for windows and Mac OS

I need to develop an application that can be run on both Windows and Mac OS X, is a application "monitor" that needs to display data in real time, connection over ethernet. I'm interested in the performance and graphics. I know very well the c++. can you help me in choosing a development tool?thank you
JUCE is not just about for Music industry. Its for all. I have used it in Music softwares, Image processing and only GUI applications too.
Its a well built library which supports all platform.
you need not to create different project files for the application. JUCE creates it for you.
And its pure C++.
I would say your two choices are Juce or Qt. Juce is geared toward audio and graphics, letting you get your hands on creating fast and powerful DSP algorithms. Although Juce's largest following is with developers making music software, it's fully capable of making general purpose applications with the same ease as Qt. Qt does have advantages resulting from it's greater adoption; you will find plenty of tutorials, books and courses on Qt but hardly much on Juce at the moment.
Hopefully that will change soon as Juce was bought out by ROLI and will likely have more resources soon.

Sound API Ubuntu Linux

I want to write some native C/C++ code that takes some uncompressed PCM audio data and plays it out through my speakers on Ubuntu Linux 12.04. Can you tell me what are the different default audio APIs/libraries that are installed? What is their low-level architecture and how do they interarct with the kernel? (which syscalls)
(I've heard different terms like ALSA, PulseAudio, OSS, and so on, but I don't really have a clear picture of which does what and how they fit together.)
On Linux, you have LOTS of Linux audio APIs to choose from. Here is a graph I made a few years ago demonstrating the relationships among the various Linux audio APIs.
However, if you are only targeting Ubuntu Linux and using C/C++, and you don't need anything too fancy (just taking raw PCM data and shoving it out to the speakers), I would recommend using PulseAudio and sticking to the "simple" API. A trivial example can be found here. It's the path of least resistance to getting a proof of concept working.
In very simple terms, ALSA provides the low level infrastructure for audio in Linux, and Pulse provides the higher (more desktop-friendly) level. As far as most mainstream Linux distributions are concerned (Ubuntu included), OSS is obsolete.
You ask about syscalls. You don't use audio in Linux via syscalls. If you choose to use ALSA directly (not a good idea for simple audio playback), you'd employ its userspace library libasound2 (even OSS would be used via /dev/ files rather than syscalls).
If you are targeting modern Linux distros only, consider using the Pulse API. If you want more flexibility as to what distro you are targeting and the potential for cross-platform support, you could try a library which abstracts away the OS-specific audio API - for example, PortAudio (http://www.portaudio.com/).
If you've never done any audio development, you may find a library such as PortAudio easier to work with than addressing PulseAudio directly.
FMOD should be great for you. It's fairly easy to integrate to any C++ project (and many more languages) and runs under Windows, Linux (32bit and 64bit), Mac, Android, PS3, Xbox, etc. Also FMOD Ex provides both a low-level API and data-driven API.
It is free to use if you are not planning on making money with your application. Otherwise you might have to pay for a license starting at about 100$.

Playing sound in C++ using native system calls?

So in Windows, you can use the PlaySound function to play an MP3 file in a C++ application. What would be some similar functions available for use in Mac OS X/Linux? I would also appreciate it if you could link to some sample Hello-World type programs demonstrating this.
You can just open("/dev/dsp") and write to it. That's as "native syscall" as you can get, I believe.
Concerning Audio: Linux != Mac, so I will answer both separately.
MacOS uses the core audio framework for low level audio. Building on that there are several higher level APIs. If you just want to play a sound file the AV Foundation Framework is most likely the way to go. Here you find an example to build a simple app for iOS, which can be ported to MacOS easily.
For Linux the whole situation is quite delicate. There exist many different frameworks and libraries and it very unclear which is low and which is high level, since some of them are emulating the others. Basically there is ALSA and OSS for low level audio. Both of them are crap. Jack is aiming to provide a framework for professional audio but it's not very portable (at least if you are interested in embedded devices). Most Linux OS currently are using PulseAudio as their audio server, which has also a simple API for just playing a single sound and a very difficult API for low level stuff. And then there is the gstreamer library, which is rather portable and has a half way descent API and is especially designed for playing audio & video files and streams, and so probably the way to go on linux.
I personally recommend to use PortAudio, which is a library that provides – as the name states – an audio framework which is portable across several operating systems and audio frameworks. PortAudio is also well designed and has a simple but flexible API.
Well, I'm not sure if current desktops have some more advanced services/libraries that play audio files, but if you really want to do some low-level OS audio output, start looking here. Maybe this is a little too low-level for your needs.

Where can I start with programmable Hardware?

I've had a desire to learn at least a tiny bit about programming hardware for quite some time now and thought I'd ask here to get some starting points. I am a reasonably accomplished programmer with Delphi and Objective-c experience but have never even listened to a device port / interupt (I dont even know the terminology) let alone programmed a piece of hardware.
To start with what I would like to be able to do is,
Buy a simple bit of kit with 2,3 or 10 buttons
Plug the device into my pc via USB
Listen to the device and write some code to do something once the button is pressed.
I reckon this is a good place to start, anyone got pointers on hardware to buy or how I could start this?
I like the Arduino, easy to use, open source and a great community!
Good to get started with, and uses a subset of C/C++.
Also, has alot of addon hardware available, like GPS, Bluetooth, Wifi etc
My experiences with Arduino have been nothing but good, from the point you get it out of it's box (and install the free compiler on either Windows / Mac / Linux), to building your first 'sketch' (a project or application for the Arduino).
Making an application is easy, you have a Setup Method, which is called on startup, and then a loop method which is looped while the Arduino is running.
Then all you have to do is hook either inputs or outputs up to the pins on the Arduino board, tell the code what they are and hopefully you'll get the desired output.
One other really good thing about the Arduino (and others I'm sure) is that you now have a use for those old broken printers, or 2x CD-Rom's that no one wants, and every other little bit of out dated technology. It's amazing what you can find in a server room!
Now, I have only worked on small projects, like plugging in an LCD, and reading the room temp and various projects like that. But based on what I have done, I am happy with the Ardunio, it gives a good base to embedded programming and if it's not enough, you can always go bigger!
My 2 cents!
There's also the hot-off-the press netduino which uses the .NET Micro Framework and Microsoft Visual C# Express. I don't know that's it's better than the Arduino but it's another option.
Why don't you start with AVR programming for microprocessors. Yeh it might be a bit too low level. but I know many people that have started with it for hardware programming. you could find a compiler here. http://winavr.sourceforge.net/ and a good tutorial here: http://www.ladyada.net/learn/avr/
The previous poster mentioned the Arduino, but you should also consider a Teensy. It's basically the same thing, but price is a little better. You also have the option of using it in "Arduino" mode, or raw AVR mode. I don't know if Arduinos give you both options.
There is a comparison page where you can see the Teensy has some better hardware. The built-in USB gives it much better performance.
I would definitely suggest trying out various microcontrollers. Arduino Controllers are nice and have a number of tutorials.
However, its not your only option. In school, I worked with Microchip PICs, which are also quite nice for the hobbyist scene. The nice thing about the PIC was that our microcontrollers textbook supported it, so we got to see the application as we were learning the theory.
If I understand your question right, you are not interested in embedded programming. You want to buy something that works from the begining and control it from Windows.
When it comes to buttons, there is not much to do in Windows. These are HID controls and Windows handles all the interfacing for you. Nothing too exciting there.
In that case you can grab any Joystick and use the DirectInput (a part of the DirectX tech.) to interact with it. With force feedback you can do some cool stuff.
A more fun project would be to buy a Wii control and write some fun applicartions.
Look at this site to get some ideas of what I mean:
http://johnnylee.net/projects/wii/
Since Windows has no support for a Wii contrller, you really get to do some work here :)
I see that you like Delphi, so you can take a look at AvrCo Multitasking Pascal for AVR. You can try it at http://www.e-lab.de. MEGA8/88 version is free. There are tons of drivers, simulator, JTAG online debugger and programmer with visualization of all standard devices (for a startup, you can make a simple LPT programmer with just a few resistors). It can also make programs for all Arduino devices out there, since AVR is in their hearth. Atmel's STK500 is a good beginner board, with leds, switches, and few other peripherals. If you prefer open source, then WinAVR with GCC could be your path.
As already mentioned, Arduino is a good choice. The community is large and helpful. The nice thing is that you can transition right to a "real" language by using the GCC port for AVR micros, if you want. On my latest project I did this - prototype most of it with Arduino, then re-write it in C.
Starting with buttons and LEDs is a great idea. Build some confidence in working with basic hardware first, before modding the Wii!
Some links:
Windows GCC cross compiler (1 step install) for AVR: WinAVR
A Arduino clone kit
Adafruit is another good source of starter hardware and tech advice
The embedded StackOverflow
Any program you already write interacts with hardware, there's the monitor, keyboard, mouse, speaker etc. Getting a simple setup where your program can deal with buttons on a USB device will not teach you that much about working with hardware. It's partly a question of how low you want to go in the software stack and how much you want to learn about what happens at the point where the software ends.
Get yourself a copy of "The Art of
Electronics". It's a relatively easy read and covers everything between Ohm's law and the microprocessor and will give you a good idea of what the complete system does.
Read it.
Check out Digikey. You can buy anything hardware related from resistors, capacitors, IC's, low cost boards easily online and for reasonable prices.
Other replies mentioned Microchip PIC and Atmel AVR which are small and simple microcontrollers. Both companies have a wealth of application notes, check out their web site, read through some app notes. You can get low cost evaluation boards for the above or something like the Arduino mentioned in other replies. Consider designing and building your own board to force yourself to learn the basics. Find a friend who is an EE or serious hobbyist who wouldn't mind helping you with some tips.
If you want to learn more about PC hardware you can take a look at some simple device drivers (e.g. printer or serial port) under Windows (download the WinDDK), Linux or even DOS. Programming under something like DOS on a PC allows for relatively easy interaction with the PC hardware, you can use a printer port to read push buttons etc.
Links (I'm a new user so I can't link directly):
www.amazon.com/Art-Electronics-Paul-Horowitz/dp/0521370957
www.digikey.com/
www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2879
www.atmel.com/products/avr/

How to get started with Drivers Programming under windows

I want to start learning drivers programming under windows .
I never programed drivers , and i am looking for information how to get started .
Any tutorials ,links ,book recommendations , and what development tool kit i should start with ? (WDF will be good one ?)
I really want to program following clock link text
Thanks for your help .
I would start by downloading the windows driver kit (WDK).
Afterwards, you decide which kind of driver you want. FileSystem driver? (probably not), RS-232 driver? usb driver? They all follow different rules and quirks.
The WDK comes with examples drivers for most kinds of drivers and should get you on track fast.
To interact with USB hardware you would be best served by looking at WinUSB or the Usermode Driver Framework. Usermode drivers are orders of magnitude easier, being able to use a C++/COM(kind of) framework and a normal debugging environment.
Writing kernelmode drivers should be reserved for stuff like video card, disk, and other latency/throughput sensitive drivers.
An even easier method would be to use libusb-win32 which is a C library that makes talking to a USB endpoint almost as easy as writing data to a file.
Must see resource for windows driver development, of course as addition to the WDK mentioned by Eric.