Need windows app. for follow up to centipede article

Electronics Computer Programming Q&A
Post Reply
blueeyedpop
Posts: 7
Joined: Tue Oct 14, 2003 1:01 am
Location: westlake village, CA
Contact:

Need windows app. for follow up to centipede article

Post by blueeyedpop »

Hi all,<p>In a follow up to my robotic centipede article, I am covering simple machine vision. I need someone to write a windows utility to take in a predetermined number of bytes from the serial port, and display them on screen as a greyscale image.
Additional features like magnification, adjustable image resolution, etc. would be helpful.<p>Thanks<p>Mike Keesling
-----------------------------------
There are 10 types of people in the world. Those that understand binary, and those that do not.
greg123
Posts: 361
Joined: Sat Sep 07, 2002 1:01 am
Location: St. John's NFLD Canada
Contact:

Re: Need windows app. for follow up to centipede article

Post by greg123 »

Any language of choice? VB?<p>What are the serial bits signifying? What bit represent x and y pos, etc.<p>You might be able to use the picture utility.<p>greg
blueeyedpop
Posts: 7
Joined: Tue Oct 14, 2003 1:01 am
Location: westlake village, CA
Contact:

Re: Need windows app. for follow up to centipede article

Post by blueeyedpop »

No language of choice. I built a utility in LabView, but the runtime install is 14 megs....<p>byte order is simple raster format. stream bytes in until a row is filled. Stream in bytes until you have a picture.<p>This is dirt simple, and of course vulnerable to errors, but it is just meant to be a simple utility. I am open to suggestions absolutely however. <p>I am not familiar with the utility you cited, do you have a link?<p>Thanks
-----------------------------------
There are 10 types of people in the world. Those that understand binary, and those that do not.
mwakers
Posts: 3
Joined: Mon Oct 27, 2003 1:01 am
Location: San Jose, CA
Contact:

Re: Need windows app. for follow up to centipede article

Post by mwakers »

Hi Mike,
What is the display format of the camera you are using for the bot? Does it output RS232 and if so what is its format. VisualBasic can handle this quite easily. Also if format known can use a uC to display to LCD. :o )
Michael Akers
blueeyedpop
Posts: 7
Joined: Tue Oct 14, 2003 1:01 am
Location: westlake village, CA
Contact:

Re: Need windows app. for follow up to centipede article

Post by blueeyedpop »

The format isn't set in stone. My needs are for a 6 bit color depth, but a general purpose tool would be cool. <p>I am open to suggestions.<p>Since it is serial, it should be somewhat robust, but something as simple as sending a 0 as a synch byte, and never allowing 0 in the data would be sufficient.<p>Mike
-----------------------------------
There are 10 types of people in the world. Those that understand binary, and those that do not.
mwakers
Posts: 3
Joined: Mon Oct 27, 2003 1:01 am
Location: San Jose, CA
Contact:

Re: Need windows app. for follow up to centipede article

Post by mwakers »

Hi Mike,
I understand your thoughts on this but I think you are ( or might be ) making this too difficult a task. I do suppose that one could take a CCD imager and format the data in the way you describe, essentialy a NTSC RS232 Serial stream video signal. Although this is doable, it will not be easy (i.e. final use of data for machine imaging). Why not use a CCD imager outputing a standard frame format? Like WEB Cams, they output a 320X240 picture when queried. Or use a optical mouse chip (reconfiguring the lense of course), this will give you a 8X8 or 64 bit image in near realtime that a uC can make decisions with as well as send to a computer for displaying. I.e. it will give the image and it will give indications of direction and relative speed in that direction.
:)
Michael Akers
mwakers
Posts: 3
Joined: Mon Oct 27, 2003 1:01 am
Location: San Jose, CA
Contact:

Re: Need windows app. for follow up to centipede article

Post by mwakers »

Hi Mike,
The stream type you are thinking about can be handled by VisualBAsic quite easily. But you MUST define the format. Think about the task of writing a flexable (ha!) program for interpeting a flow of data for visual information of some unknown type. Does the term SETI mean anything. :)
As long as the data frame type is fixed, a program can be generated quite simply. i.e. A data frame set will consist of A header tag, Line tag, Line data where each pixal on the line has a 6 bit value, Line tag, line data ... etc., etc., until you finish the data set with a data set end tag. :) Interesting to see what you come up with. Will be happy to help with writing the VB program.
Michael Akers
dyarker
Posts: 1917
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: Need windows app. for follow up to centipede article

Post by dyarker »

Have you picked a sensor yet? 'cause that will strongly influence the format. Smaller is better for serial comm. Bit rate equals X pixels times Y pixels times frame rate tines (bits of depth plus 2 for start and stop bits).<p>So with 320 x 240, 10 frames/sec, and comm port set to 6N1, the serial bit rate would be 6,144,000bps! Needs to be 115200bps or less.<p>80 x 60, 3fps, 6N1(8bits/character) is 115200 (not allowing for sync characters); by averaging 4 pixels on 4 lines to send one pixel on serial line. Using every fourth pixel on every fourth line would make a rougher picture, but needs less processing.<p>A smaller sensor (X x Y) makes sense, but 8 x 8 would be kind'a small for people to look at on a PC screen.<p>I might take a crack at the Windows display program if not in a big rush. Who ever does it will need to know what format you choose.<p>Cheers
Dale Y
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests