|
Page 1 of 1
|
[ 10 posts ] |
|
| Author |
Message |
|
sparramc
Rookie
Joined: Tue Aug 11, 2009 11:49 pm Posts: 36 Location: Tasmania, the Land Down Under, the Land Downunder!
|
 PobEye
Hi all in Sensor-Land, Has anyone had luck using PobEye, from POB Technologies? It has both colour & shape recognition capabilities. http://pob-technology.com/web/index.php?page=shop.product_details&category_id=15&flypage=shop.flypage&product_id=28&option=com_virtuemart&Itemid=41I downloaded the NXT-G POD-Bridge (NXT to Camera Interface) Drivers & Demos. In the pob-eye director is the following "C" file;-  |  |  |  | Code: /* * Copyright 2007 POB-Technology. All rights reserved. * POB-Technology PROPRIETARY/CONFIDENTIAL. * * POB NXT PROJECT : Source code for POB-EYE * */ #include <pob-eye.h>
#include "pattern.h"
//address of tiny pob-proto on the pob-bus //#define ADDRESS_BOARD 0x03 //pob-bridge prototype
#define ADDRESS_BOARD 0x05 //pob-bridge final
//POB-EYE command #define REFRESH_IMG 0xA1 //refresh camera frame and send X #define REFRESH_IMG_Y 0xA2 //send Y
#define POBEYE_WRITE_BRICK 0xA6 //send a value to POB-EYE #define POBEYE_READ_BRICK 0xA7 //get a value from POB-EYE
#define REFRESH_IMG_W 0xAA //Get Width image #define REFRESH_IMG_H 0xAB //Get Height image
#define SELECT_PATTERN 0xB1 //select POB-EYE pattern
static GraphicBuffer LCD_Fast_Buffer_Video; static UInt8 LCD_Fast_Buffer [64*64*BYTES];
void DrawVision (RGBFrame *FrameFromCam) { //draw the red buffer (88*120 pixels) on the Buffer for for the left screen (64*64 pixels) DrawComponentInABufferVideo(FrameFromCam->red,&LCD_Fast_Buffer_Video); DrawLeftLCD(&LCD_Fast_Buffer_Video); //refresh the left screen }
int main (void) { UInt8 i=0,Nb_Identify=0; UInt8 byte_read=0; //byte from NXT UInt8 x_form=0; //x form UInt8 y_form=0; //y form UInt8 w_form=0; UInt8 h_form=0; UInt8 found_form=0; //form found == 1 UInt8 id_form=IDP_CROSS; //form id
UInt8 protocolId=0; UInt8 protocolData=0;
Form ListOfForm[MAX_OF_FORM]; RGBFrame FrameFromCam; //system initialization InitPOBEYE(); InitLCD(); InitGraphicBuffer(&LCD_Fast_Buffer_Video,64,64,EIGHT_BITS,LCD_Fast_Buffer);
//get the pointer of the red,green and blue video buffer GetPointerOnRGBFrame(&FrameFromCam);
while(1) { //get byte from POB-Bridge byte_read = ReadByte(ADDRESS_BOARD);
// PrintTextOnPobTerminal("readbyte =%d",byte_read);
switch(byte_read) { //Refresh camera frame and send X result to POB-Bridge case REFRESH_IMG: //grab the RGB components GrabRGBFrame(); //binary the three RGB Buffer BinaryRGBFrame(&FrameFromCam);
DrawVision(&FrameFromCam); Nb_Identify=IdentifyForm(&FrameFromCam,ListOfForm,pattern); for(i=0;i<Nb_Identify;i++) { if(id_form==ListOfForm[i].id) { x_form = ListOfForm[i].x; y_form = 120 - ListOfForm[i].y; w_form = ListOfForm[i].width; h_form = ListOfForm[i].height;
// PrintTextOnPobTerminal("ListOfForm[i].y %d y %d", ListOfForm[i].y, y_form);
// PrintTextOnPobTerminal("x %d y %d w %d h %d",x_form,y_form,w_form,h_form);
found_form = 1; } }
if( found_form != 0) { WriteByte(ADDRESS_BOARD,x_form); found_form=0; } else { WriteByte(ADDRESS_BOARD,0); x_form=0; }
break; //Send the Y coordinate of the Form case REFRESH_IMG_Y:
WriteByte(ADDRESS_BOARD,y_form); y_form=0;
break; case REFRESH_IMG_W: WriteByte(ADDRESS_BOARD,w_form); w_form=0;
break; case REFRESH_IMG_H:
WriteByte(ADDRESS_BOARD,h_form); h_form=0;
break; //Select pattern case SELECT_PATTERN: // PrintTextOnPobTerminal("before"); WriteByte(ADDRESS_BOARD,0);
// PrintTextOnPobTerminal("after");
id_form=ReadByte(ADDRESS_BOARD); if( id_form < 1 ) id_form=IDP_CROSS; if( id_form > 7 ) id_form=IDP_CROSS; //TODO select pattern in flash memory
break; //Receive data from the POB-Bridge (and from "PobEye Write" brick) case POBEYE_WRITE_BRICK:
//receive identifier protocolId=ReadByte(ADDRESS_BOARD);
//receive data protocolData=ReadByte(ADDRESS_BOARD);
switch(protocolId) { // your code here !
default: //by default, print to POB-Terminal the Identifier and Data
PrintTextOnPobTerminal("id %d data %d", protocolId, protocolData);
break; }
break; //Receive identifier and send data to POB-Bridge (and to "PobEye Read" brick) case POBEYE_READ_BRICK: //receive identifier protocolId=ReadByte(ADDRESS_BOARD);
//PrintTextOnPobTerminal("id %d", protocolId );
switch(protocolId) { // your code here !
default: //by default, send simple data
protocolData = 0xAA;
break; }
//send the data WriteByte(ADDRESS_BOARD,protocolData);
break; default:
WriteByte(ADDRESS_BOARD,0);
break; }
} return 0; }
|  |  |  |  |
To all you Driver Programmers out there. How difficult would it be to convert it to a POB-Eye Sensor RobotC Driver? Here's wishing Sparra Mc
_________________ regards
Sparra Mc
|
| Sat Aug 15, 2009 11:39 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: PobEye
Sparra, It would be simple if someone would give me one  Regards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sat Aug 15, 2009 6:10 pm |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
 Re: PobEye
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Sun Aug 16, 2009 5:07 am |
|
 |
|
sparramc
Rookie
Joined: Tue Aug 11, 2009 11:49 pm Posts: 36 Location: Tasmania, the Land Down Under, the Land Downunder!
|
 Re: PobEye
I've just noticed that when I looked in the Motor & Sensor Set-up window in RobotC v1.46, that the "PobDual" is listed in the Sensor List. The PobDual is the interface board between the PobEye and the NXT. So it appears that someone is looking into the Driver building stakes for it accepting I don't see the PobDual driver in the RobotC Includes or Drive directories.
I would be very interested in a comparison between the PobEye Sensor and the Mindsensor Camera Sensor if anyone has come across such a review?
_________________ regards
Sparra Mc
|
| Sun Aug 16, 2009 9:26 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: PobEye
Sure, sounds like a good deal to me! Regards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sun Aug 16, 2009 4:23 pm |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
 Re: PobEye
which of all this stuff will you need for pattern and/or shape / edge recognition? will you write a driver for NXC, too?
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Sun Aug 16, 2009 5:35 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: PobEye
Ford, I can't write code for edge detection and all that stuff. I can write drivers that will fetch the raw data from the device but other than that, the processing and what you do with it is totally up to you. And no, I won't write NXC drivers for it. I use ROBOTC. As for knowing which products I need, I'll have to read up on their specs. I will do that this week, so don't buy anything just yet  Regards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sun Aug 16, 2009 5:43 pm |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
 Re: PobEye
but pattern recognition is one and even the most important feature of this cam.... there should be available easy commands to poll the localizations of typical patterns like
X H O I L V * -
maybe even distinguishing the colors or sizes of those patterns.
is this possible, and how is that supposed to work?
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Mon Aug 17, 2009 5:55 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: PobEye
I am not sure how it works, I haven't had a look at the documentation yet and I probably won't get to that today. I bought this earlier this weekend am putting it together just now:  So I am a little busy  Regards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Mon Aug 17, 2009 6:04 am |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
 Re: PobEye
[OT] I got something likely, fix a pneumatic grabber instead of the hook...! And take your time, before being able to use the PobEye I'll need motor and sensor muxers for my robot [/OT]
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Mon Aug 17, 2009 6:59 am |
|
|
|
Page 1 of 1
|
[ 10 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|