views:

307

answers:

5

Hi there

In the last two months I've worked as a simple application using a computer vision library(OpenCV).

I wish to run that application directly from the webcam without the need of an OS. I'm curious to know if that my application can be burned into a chip in order to not have the OS to run it.

Ofcorse the process can be expensive, but I'm just curious. Do you have any links about that?

ps: the application is written in C.

+3  A: 

I think you'll find this might grow into pretty large project.

It's obviously possible to implement a stand-alone hardware solution to do something like this. Off the top of my head, Rabbit's solutions might get you to the finish-line faster. But you might be able to find some home-grown Beagle Board or Gumstix projects as well.

Two Google links I wanted to emphasize:

Nate
+3  A: 

Yes. It is theoretically possible to port your app to PIC chips.

But...

There are C compilers for the PIC chip, however, due to the limitations of a microcontroller, you might find that the compiler, and the microcontroller itself is far too limited for computer vision work, especially if your initial implementation of the app was done on a full-blown PC:

  • You'll only have integer math available to you, in most cases, if not all (can't quote me on that, but our devs at work don't have floating point math for their PIC apps and it causes many foul words to emanate from their cubes). Either that, or you'll need to hook to an external math coprocessor.

  • You'll have to figure out how to get the PIC chip to talk USB to the camera. I know this is possible, but it will require additional hardware, and R&D time.

  • If you need strict timing control, you might even have to program the app in assembler.

  • You'd have to port portions of OpenCV to the PIC chip, if it hasn't been already. My guess is not.

  • If your'e not already familiar with microcontroller programming, you'll need some time to get up to speed on the differences between desktop PC programming and microcontroller programming, and you'll have to gain some experience in that. This may not be an issue for you.

Basically, it would probably be best to re-write the whole program from scratch given a PIC chip constraint. Good thing is though, you've done a lot of design work already. It would mainly be hardware/porting work.

OR...

You could try using a small embedded x86 single-board PC, perhaps in the PC/104 form factor, with your OS/app on a CF card. It's a real bone fide PC, you just add your software. Good thing is, you probably wouldn't have to re-write your app, unless it had ridiculous memory footprint. Embedded PC vendors are starting to ship boards based on 1 GHz Intel Atoms, and if you needed more help you could perhaps hook a daughterboard onto the PC-104 bus. You'll work around all of the limitations listed above, as your using an equivalent platform to the PC you developed your app on. And it has USB ports! If you do a thorough cost analysis and if your'e cool with a larger form factor, you might find it to be cheaper/quicker to use a system based on a SBC than rolling a solution using PIC chips/microcontrollers.

A quick search of PC-104 on Google would reveal many vendors of SBCs.

OR...

And this would be really cheap - just get a off-the-shelf cheap Netbook, overwrite the OEM OS, and run the code on there. Hackish, but cheap, and really easy - your hardware issues would be resolved within a week.

Just some ideas.

sheepsimulator
I agree. I would never use a PIC chip to do this.
Nate
Marco van de Voort
@ Marco - True. I didn't mention the dsPICs.
sheepsimulator
+4  A: 

I'd use something bigger than a PIC, for example a small 32 bit ARM processor.

starblue
embeddedarm.com offers some cheap solutions that are actually pretty awesome. they run a full version of linux, too. boards are about the size of a normal development kit for a microcontroller. and no, i am not an employee of embedded arm, i am a customer.
San Jacinto
A: 

CMUCam

I think you should have a look at the CMUcam project, which offers affordable hardware and an image processing library which runs on their hardware.

f3lix
+1  A: 

I would second Nate's recommendation to take a look at Rabbit's core modules.

Also, GHIElectronics has a product called the Embedded Master that runs .Net MicroFramework and has USB host/device capabilities built-in as well as a rich library that is a subset of the .Net framework. It runs on an Arm processor and is fairly inexpensive (> $85). Though not nearly as cheap as a single PIC chip it does come with a lot of glue logic pre-built onto the module.

gbc