/NAO-autoSearching

基于OpenCv、Numpy、matplotlib等实现的NAO机器人识别物体算法

Primary LanguagePython

NAO-autoSearching

It's a object recognition algorithm based on NAO robot by using naoqi、OpenCv、Numpy、matplotlib etc..

Intro

It's a robotic searching and recognition algorithn by Python.And it's mainly based on OpenCV、Naoqi、Numpy、PIL module.

The process :

Open the robot's head camera --> Get image --> Binary image --> Morphology --> Get 2D locate --> Transform to 3D locate --> Go to the target --> Pick it --> Go to another target position --> Drop it

The process's detail :

The process has many part:

  • Adjusting NAO robot, preparing for getting the image. Open the robot's camera ,using naoqi to get the image, get robot's current parameter likes head angle or pitch angle.
  • Recognition ... Binary the image to a two color image by HSV color space which in the opencv library.After that , using numpy or something like matrix calculator to calculate the image's location.Finally ,transform the 2D location to a absolutely distance by the principle of ranging(it's not so accurate because the robot's move can change itself's parameter).
  • Moving After getting the distance between robot and the target,using the 3D measure algorithm to transfer it to 3D locate which needs many joint's parameter.
  • Picking and Dropping How to control the hand to the target? I use the Cartesian algorithm to handle it. (The algo is based on the dynamic 3D robotic model which provide a Array contains six angel.)

The result:

  • Original image

- After HSV binary:

- After Morphology :

- Calculate the locate:

- Another image to calculate the locate:

- Get the center :

- Using the bottom camera:

- Do it selt: