设计以ATmega 16单片机为核心的自动对靶控制系统。该系统利用PC机作为上位机,控制摄像头定时摄取图像,利用2g-r-b颜色特征分割该彩色图像,当绿色颜色分量大于预设阀值时,便判定摄像头下有靶标,用PC机的串口通信系统发送指令到单片机,延迟预设的时间后,控制执行机构进行喷雾,实现自动对靶喷雾,并且可以设定延迟时间,从而实现在不同行走速度下的自动对靶喷雾。
The automatic target detection based on ATmega 16 was designed. The special MCU received the orders from PC, which controlled digital camera shoot photo by a fixed interval. Then the images were sent to the computer, and segmented by color feature of 2g-r-b. The target was under the camera, when the green color component of the image was lager than the threshold value that was set above. Then the PC transferred the order to the MCU by serial communication, controlled actuator to spray as the delay time designed, realizing the automatic target detecting spray. It was available to set delay time, which could realize spraying in automatic target detection at different speeds.