· 用户注册 · 设为首页 · 加入收藏 · 联系站长 · ·
 | 网站首页 | 新闻中心 | 产品中心 | 焦点资源 | 焦点问答 | 焦点图片 | 竞赛中心 | 雁过留声 | 焦点教学 | 焦点视频 | 
机器人焦点祝您万事如意

您现在的位置: 机器人焦点 >> 产品中心 >> 其他机器人 >> 产品中心正文 今天是:
Cam v1.0
作者:挥着翅膀…    产品中心来源:本站原创    点击数:    更新时间:2007-6-14    
          ★★★ 【字体:

Cam v1.0简明手册

一、             设备简介:

Cam V1.0可同时 跟踪8种用户设定的不同颜色的物体,并达到每秒30帧的速率。标准串口通信,可以在30/秒,88x144分辨率状态下跟踪运动物体,低功耗设计。

 

 

当使用RS232接口的时候JP2需要插上短路子,使用UART接口时把短路子拔掉。

二、             安装测试:

CAM V1.0 可采用DC 5V供电(使用+5V接口),也可采用DC6~12V供电(使用POWER接口),这两种接口的线序不同不能通用。首先给CAM V1.0供电,PWR灯亮,RUN灯闪3次然后常亮。(注: 当使用+5V直接供电时开关不起作用建议拨到OFF位置。)

关掉电源,将串口线插到RS232接口上,注意插头的方向(能看到簧片的一侧朝向PCB)。

打开电源,可使用windows自带的超级终端进行测试,超级终端设置:每秒位数115200,数据位 8,奇偶校验 无,停止位 1,流控 无。

在超级终端上输入“PG 回车,正常应该显示”ACK ”

查看CAM软件版本”BB”回车,正常情况下显示”cam v1.0 www.diy-robot.cn”

使用专用PC软件进行测试,打开CAM VIEW 1.0,点击connect,在右侧的信息栏中会出现相应的信息.点击CAPTURE 捕获当前图象,根据效果调节镜头,再次捕捉图象,使图象最清晰.

色彩识别和物体跟踪,在捕获的图象上,在你要跟踪的物体位置单击右键设置相应的跟踪颜色,然后sendCAM.点击Enable tracking 进行物体跟踪.

 

三、             协议及命令:

操作码:

PG”测试CAM硬件与电脑通信是否正常。

如果命令到达正常,返回ACK,如果命令执行有问题则返回NCK

BB”读取CAM软件版本信息

 

 

提取一帧图像

操作码

DF

Supplemental

Response Packet

Raw color frame-dump packets:

Byte 0: 0x0B – indicating the start of raw color data line

Byte 1: line number in hex, indicating which line number is being sent

Byte 2-178: 176 hex pixel stacks, where a pixel stack is structured as follows:

Each pixel stack consists of a one-byte value, where the high nibble represents one color value (green), and the low nibble represents another color value (either red or blue). The pixels on the camera are arranged in Bayer format.

High nibble: Green pixel value of the even rows

Low nibble: Red or Blue pixel value of the odd rows

Byte 179: 0x0F – indicating an end of line

Note: The cam will send a total of 77 frame-dump packets to the host system (where each packet contains information about two consecutive rows of image data) each time the DF command is received.

Example: The user wants a single frame of image data sent to them (actual RGB values).

cam: 0x0B 0x01 0x83 0xD3 0x4A <173 more pixels> 0x0F

| | | | | | | |--blue value |--end of line

| | | | | | |--green value

| | | | | |--red value

| | | | |--green value (Note: No spaces exist between data)

| | | |--blue value

| | |--green value

| |--Line Number

|--Indicates start of frame-dump packet

cam: 0x0B 0x02 0x83 0xD4 0x3A <173 more pixels>0x0F

cam: 0x0B 0x48 0x83 0xD4 0x3A <173 more pixels>0x0F

(Note: The hex values 0x0B through 0x0F are reserved and will not be used in the data stream other than to indicate the starting and ending marks of a line of pixel data. In addition, the frame-dump packets can be sent out of order, which is why the line number is included in the packet. The user should be able to reassemble the lines in their proper order for displaying the complete image.)

 

 

 

使能图像跟踪

操作码

ET

Supplemental

Response Packets

<The camera begins to generate color-tracking packets in hex to indicate what color-blobs are found in each frame. There are NO spaces between bytes in a color-tracking packet. The current color map will be used to map the sampled pixel values into actual colors.>

Byte 0: 0x0A – Indicating the start of a tracking packet

Byte 1: Number of tracked objects (0x00 – 0x08 are valid)

Byte 2: Color of object tracked in bounding box 1

Byte 3: X upper left corner of bounding box 1

Byte 4: Y upper left corner of bouding box 1

Byte 5: X lower right corner of boudning box 1

Byte 6: Y lower right corner of boudning box 1

Byte 7: Color object tracked in bound box 2

….

Byte x: 0xFF (indicates the end of line, and will be sent after all tracking info

for the current frame has been sent)

 

cam: 0x0A 0x05 0x04 0x12 0x09 0x36 0x38 0x01 0x250xFF

                                          |--End of line

|--X upper left corner

|--color2

|--Y lower right corner of box1

                             |-X lower right corner of bounding box1

|--Y upper left corner of bounding box1

 |--X upper left corner of bounding box1

|--color1

|--number of tracked blobs

|--Indicates start of color-tracking packet

cam: 0x0A 0x05 0x06 0x32 0x39 0x76 0x980x0F

(Note: The cam is capable of tracking up to eight color blobs (values 1 through 8 as defined by the current color map) per frame. This number is variable, and may also be zero. All currently tracked blobs will be returned inside of each color-tracking packet.

 

 

Mnemonic

Disable color-blob tracking

OpCode

DT

Payload

<none>

Response

ACK – if command successfully received

NCK – if command not successfully received

Supplemental

Response Packet

<none> (Color blob tracking will end).

 

 

 

 

Set the Color Map

OpCode

SM

Payload

<red0 red1 red2 … red15 green0 green1… green15 blue0 blue1… blue15>\r

Response

ACK – if command successfully received

NCK – if command not successfully received

Supplemental

Response Packet

<none> (The cam will update its color map. Tracking should be DISABLED before setting the color map, and re-enabled afterwards to begin a new tracking session.)

Example: The user wishes to update the color map used to turn RGB/YCrCb values into actual colors.

User: SM 98 183 32 124 234 64 94 167 129201 22974\r

                                              |--blue15

|--blue14

|--blue13

|--red8

|--red7

|--red6

 |--red5

|--red4

|--red3

|--red2

|--red1

|--red0

 

四、             应用实例:

 

  

    和我联系!http://www.diy-robot.cn

 

PC端软件下载 camview

产品中心录入:挥着翅膀的鳖    责任编辑:挥着翅膀的鳖 
  • 上一个产品中心:

  • 下一个产品中心:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    机器人焦点