Video Processing

I have recently been looking at the CMUcam to the following: Look at an object and (1)get the objects ruff width and length parameters (2)Look at the object for color patterns (or even just look for a color or 2 on the object)

Does anyone have experience with doing either of those 2 with the bs2/handyboard/pic/etc?

Or just any experience with video inputs like from the CMUcam (well.. cmucam doesn't really give you a video input per say, but you know what i mean ;)

any info would be awesome! thanks-Lee

Reply to
trend
Loading thread data ...

The extraction of data from images by computers is called Image Processing. You might want to look that up with Google and see what it brings you. I seem to remember that there are various operations (convolutions?) which you can do to an image to enhance the edges. Edge Detection would be able to let you estimate object dimensions, assuming you knew things like how far the camera is away from the object, or if there were something next to the object of a standard size that you could compare with.

Reply to
Gary Kato

Yeah, I am actually going to have a 3inch cubed box, with a camera looking down on the object that will be inserted. The objects are going mainly black (well with a white sticker with color on it on the top of it), what color should my box be? white? or does it really matter as long as it is not black? And I can also control the light level.

What do you'll think as far as going with an all in one solution like the CMUcam? or should I go with a plain CMOS camera and do some tricks?

thanks-Lee

Reply to
trend

First things first, forget the distance and measuring problems, get the fundamentals right:-

1/ lighting is one direction, ring, multiple sources and/or angles? Are you just controlling brightness of light source? 2/ How good are the lens(es) on your camera of choice, so how far away do you have to be to view the 3" cube fully on screen, and what effect does this have on resolution and exposure time for the camera. 3/ How much RAM do you have? To save the image, intermediate results, computations, results control variables and other information. 4/ How fast a response are you looking for? 1 hour, 10 minutes, 1 minute, 1 second or sub-second? 5/ What is your choice of target system? If PIC you will need fancy handling of data as MOST do not have the memory map capable of dealing with data set sizes as a FRAME. You may well have to do line by line processing losing the original data. 6/ How accurate a measurement are you looking for ? Either as pixels or actual real world units? This then determines how many pixels you need for your edges to be accurate, which also depends on lighting and object types and angle of camera to object.

Work out what your data set (image sizes) are going to be and algorithms with their associated data sets, to determine memory requirements. From response time and how long the exposure time for EACH type of camera+lens+lighting to determine minimum capture time and processing time.

Do some experiments first with some form of camera you can put on a larger system to work out the parameters of the optics/target/image capture, THEN look at then system requirements. Once you know these you can work out ways of reducing the processing overhead by lighting positions/types/levels, background colours, distances, lens types, camera types. These then can make the processing of the images easier or even simpler.

Even after 20 years in Image Processing in one way and another it is amazing how often the questions get asked the wrong way round, and very little idea of the size of data involved.

There are lots of resources on Image processing, a good primer if still available for showing frame capture, convultions, filtering, hardware and operations is

Digital Image Processing - A Practical Primer by Gregory A Baxes

Publisher Prentice-Hall NJ

ISBN 0-13-214064-0 0-13-214056-X (Paperback)

--
Paul Carpenter		| paul@pcserv.demon.co.uk
        Main Site
 Click to see the full signature
Reply to
Paul Carpenter

******I am controlling the light, 100 percent.
******Whtaever will work best is fine
*******well,, I guess I can always add more and more eeprom on the i2c chain (off my BS2 or pic) or I could always just use my computer
*******10 seconds max

original

********the PIC/BS2 or computer.. whatever is fine

Is 1/10 of an inch to demanding?

And I will look at that book. Does anyone have any webased resources?

thanks-Lee

Reply to
trend

You are going to be in a dark room!

Consider a simple camera having a resolution of 320 x 240 is more than one i2c eeprom is likely to hold and will take an age to store, read back, do calculations, store back, do more calculations.....

Stick with your PC and just get used to programming to grab images, you are a long way from achieving your goal.

Learn to walk before you attempt to run.

Use a FAST PC.

I don't think you have the faintest idea of the data sizes and flows let alone calculations required, for a very specific of known targets to measure in set positions, lighting and distances.

To achieve in 10 secs with I2C eeprom and frame grab, I think you will be in the land of wishful thinking.

There are expensive systems about to do this, that require very good cameras lighting, lenses and fast PCs, what makes you think a pic/bs2 and some I2C eeprom is going to achieve your goals.

To give an idea one of my designs currently uses a 16bit processor with 32 bit registersand an external CPLD to grab a single field to external SRAM, do a variety of calculations with 16 and 32 bit integer table lookups to reduce floating point time and save a 128KB result in external flash, and that takes 12 seconds. You will have a similar number of calculations which won't be easily reduced to 32bit lookup or other tricks to speed up calculations.

Do web search on Image Processing, Image Measurement

--
Paul Carpenter		| paul@pcserv.demon.co.uk
        Main Site
 Click to see the full signature
Reply to
Paul Carpenter

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.