Simulated Vision using FakeCamera

Simulated Vision using FakeCamera

Don't have a camera?

You can try out some of this functionality by using:


This interface is useful for testing or developing code when you don't happen to have a real camera handy. FakeCamera is a class that gets data (by default) from pyrobot/vision/snaps and displays it as if it were coming in over a video camera. You can use your own images, too.

FakeCamera takes three optional parameters: a file template name, a starting number, and an increment value. The first example would match a file named "Testing-1.pnm" in the current directory, and then look for the file "Testing-2.pnm" when camera.update() was issued. This would continue until it stopped finding matching files, at which point it would start over with "Testing-1.pnm". The second example would look for a PNM or PPM file named "/usr/share/data.100" and then look for "/usr/share/data.105" when camera.update() was called.

/!\ Currently, these files must be in PPM/PNM file format (PortableBitmapFormat #P6) with no comments.

Next: Using Khepera with a Camera Up: PyroModuleComputerVision