Download
slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Robot Vision PowerPoint Presentation
Download Presentation
Robot Vision

Robot Vision

185 Vues Download Presentation
Télécharger la présentation

Robot Vision

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Robot Vision

  2. Robot Vision Exercise

  3. The task Robot co-ordinate system • To locate the picking point of the object = Centre of Gravity of the object • To measure the rotation of the object = the angle between Y axes and the line going from centre point of mid hole and to centre point outer hole • To send the picking point co-ordinates (x,y) and rotation (angle) in the robot co-ordinate system to the Robot system using RS232 Origo X Y Picking point Angle Robot Vision

  4. Configuring of Scorpion Robot vision system • Create a new Scorpion Profile • Configure the image source - camera/file • Calibration of images • Locate the object and find the pick-up x,y coordinates • Calibration in Robot co-ordinates • Establish reference system to measure rotation • Configure the User Interface • Configure communication to external systems Robot Vision

  5. Restore Robot Vision Start profile 1. Open Scorpion and click on restore(if the menu is not visible right click on the mouse, click on “Show Buttons” for permanent display) 2. Browse to the catalogue “unsupportedprofiles”on the Scorpion CD 3. Select RobotVision_Start.zipan open the file Robot Vision

  6. Create MyRobotVision profile • Step 1 – Create a new Profile • Select ”New” • Give it the name”MyRobotVision” Robot Vision

  7. Copy the content of RobotVision_Start to the new profile • You can copy the content of an existing profile (including images) to automatically add functionality to the new profile • Mark the profile called ”RobotVision_start” and select copy • Select copy to the new profile”MyRobotVision” • Start MyRobotVision profile Robot Vision

  8. Starting point • Operation mode: (No password) • For operators • Can start and stop the inspection • Read history list, curves and statistics • No access to any configuration • Settings mode: (Password: 1234) • For operators certified to adjust certain parameters, alarm limits and logic states • Service mode: (Password: 911) • Full access to all functions • Enter Service mode by pressing the service button and enter the password Robot Vision

  9. Configure the image source 1 • Select Service Tab • We will use stored images therefore activate Simulation ON • Click on Snapshot • If no image the image directory must be checked • Click on the image setting source • Browse to find the selected image directory • Assure that the directory for images are set to\Scorpion_200\MyRobotVision\Images 3 4 2 5 6 Robot Vision

  10. Vision Strategy Robot co-ordinate system • Calibration – for correcting lens distortion to get high precision • 4 point robot calibration to synchronize image and robot co-ordinate system • Use blob to find centre of gravity of the object • Use the big outer hole centre and mid hole centre to establish a local reference system handling rotation Origo X Y Picking point Angle Robot Vision

  11. Lens calibration • In robot vision application the camera often have a large Field Of View (FOW) and a relative short distance to the object • This require a wide angle lens and consequently large lens distortion • Without correcting the distortion, the inaccuracy in the outer part of the FOW might cause the robot to fail picking the object correctly Robot Vision

  12. 4 point robot calibration • By using 4 point calibration you can establish a co-ordinate system equal to the one used by the robot • By moving the robot to the centre of each point the robot co-ordinates are found • In Scorpion the centre of each is found in the Scorpion reference system • This enable you to communicate pick up points and rotation in the robot co-ordinate system Robot Vision

  13. Correction of lens distortion is independent of distance to the object The lens correction is done in one planeand valid for allrobot planes Robot calibration is only valid for a specific distance to the object (Robot plane) For each different robot picking plane a individual robot calibration must be done Scorpion can handle multiple robot planes Understanding lens correction and robot calibration Robot plane 3 Robot plane 2 Robot plane 1 Robot Vision

  14. Pixel co-ordinate system Origo X=0, Y=0 X=0, Y=1024 Y • Default co-ordinate system with Origo in upper left corner • X and Y pixels according to camera resolution • VGA 760 x 480 • XGA 1024 x 768(used in the exercise) X X=768, Y=1024 X=768, Y=0 Robot Vision

  15. Show Info on the image • With the cursor on the image right click the mouse and select ”Show info” from the menu • X and Y number are pixel position, origo (X=0 and Y=0) is in the upper left corner • Pixel value is the greyscale value (0 = Black, 256 = White) Robot Vision

  16. Zoom the image • Press the left button on the mouse and mark the zoom area • Release the button and the image is zoomed in • Click on the image to zoom out Robot Vision

  17. Operating the Tool Box • Go to the Toolbox and click on New • Give the Tool a NameFor easy understanding of the task for this specific tool – use names • Select a Tool category and then a Tool • Use help to get information about the tool 1 2 4 3 Robot Vision

  18. Using a Tool – step 1 • GENERALShow the name and type of tool. Comments can be entered in the description field • SETUPFor entering parameters controlling the tool Robot Vision

  19. Using a Tool – step 2 • VISUALISATIONFor adding graphics on the image, visualising the operation of the toolAll or this tool only visualisation, can be selected • RESULTDisplaying all the results from the operation of the tool Robot Vision

  20. Create a tool - Calibration • Click on the button “New” • Name the tool - Calibration • Select the tool category Advanced • Select “Calibrator”Use help if you want information about the tool • Click OK 1 5 2 4 3 Robot Vision

  21. Selecting the image for calibration 1 • Open the tool named Calibration (double click on it) and click on the Set-up tab • Browse to find the calibration image in the “MyRobotVision/References” directory • Select calib1.bmp image and open 2 3 Robot Vision

  22. Configure the Calibration tool • Set number of rows and column – count from image • Set row and column spacing to 8 mm, and the unit to mm (millimetre) • Click on compute 1 2 3 Robot Vision

  23. Results from Calibration • Scaling • Under the Result tab you will find the scaling factor • The scaling factor is only valid in the grid plane • Lens correction • On the image the actual correction is visualised as yellow arrows • Lens correction is valid in any plan (not only in the grid plane) Robot Vision

  24. Multi co-ordinate system Y • Pixel co-ordinate system (red) • the default coordinate system • Scaling is in pixels • Calibration co-ordinate system (blue) • Generated by the Calibration tool • Scaling is in mm Y X X Robot Vision

  25. Cursor information on the image • With the cursor you can now display the x and y values in both co-ordinate system • Position the mouse over the image and right click • Highlight “Referencesystem” • Select the co-ordinate system 1 2 3 Centre hole co-ordinates: Pixel co-ordinates Calibrationco-ordinates Robot Vision

  26. Manual measurements on the image • Position the mouse on the image and right click to get the menu (be sure that “Show info is activated first” • Select “Measure” • With the cursor you now can measure the distance from the default pixel co-ordinate origo and the angle of the line 1 2 Robot Vision

  27. To measure from an arbitrary point • To set a new origo position the mouse where you want the new origo (i.e. centre of mid hole) and right click on the mouse • Select “Set Origo” and the cursor display distance from the new origo 2 1 Robot Vision

  28. Saving configuration Pressing Profile button Every time you press the Start button Every time you close the application Archiving The archive file is a zip file containing all configuration and images Used for storing your profile Ideal for sending to a Scorpion support centre for remote support Saving and storing the configuration Robot Vision

  29. Archiving a profile • Enter to Service mode • Press the Maintenance tab • Check that the Archive directory is selected • Press the Backup button • Scorpion suggest a default name • You can add comments before the zip file is generated 1 2 3 3 4 Robot Vision

  30. Trigger the camera • Hardwire trigger • Direct on camera from sensor • Soft trigger • External from PLC • RS232, TCP/IP, I/O • Internal - used in this exercise • Using Scheduler (pressing Start button) • Manual user input (pressing Snapshot button) Robot Vision

  31. For setting up tasks running at scheduled intervals The task ”Trigger” is configured to grab an image every 1000 ms When ”Start” button is pressed a new image according to the Trigger period By pressing edit you can adjust the time interval Scheduler 1 3 2 4 Robot Vision

  32. Automatic inspection Pressing ”Start” button set Scorpion in Running mode For every new image an inspection is automatically executed The image can either be triggered from an external system or from an internal scheduler Pressing the ”Stop” button stop the process Manual inspection Pressing ”Snapshot” button grab a new picture Pressing ”Inspection” button execute the inspection Pressing ”Snapshot” button again will grab another new picture. Start and Stop of Inspections Robot Vision

  33. Using a Blob to locate the object • Add a new tool in the toolbox: • Name= FindObject • Tool = BlobTool 1 2 3 4 Robot Vision

  34. Tool references • All tools can have a Reference • To relate Search area to a specific point (i.e. Centre of Gravity of an area) • To relate Search area to a specific co-ordinate system, Calibration in this exercise Robot Vision

  35. Each tool can must be configure to search in a specific area on the image (Range of Interest – ROI) Move the mouse to the centre of the image and read the X and Y coordinates. Enter the co-ordinates and specify the delta X and delta Y values The ROI visualisation is shown on the picture ROI – Region of Interest Robot Vision

  36. Understanding the Blob tool • A blob search for areas in the specified ROI with greyscale values within a given range • Place the mouse on the object and read the greyscale value • If the maximum Threshold is set to higher value and the minimum to a lower, the Blob tool will find the object Robot Vision

  37. Apply your configuration • To apply a new parameter set by you, the button apply must be pushed • You can also set minimum and/or maximum requirements to the blob area to be located Robot Vision

  38. Blob visualisation • Through the visualisation you can see how the tool works on the image • Activate only CenterofGravity, MaxContour and ROI • Remember to push ”Apply” to see the result! Robot Vision

  39. Blob result • In the result tab you find the different results of the blob tool • Number of blobs (1) • total blob area (2) • centre of gravity of the largest blob, blob[0] (3) • Number of ”Holes” in blob[0](4) • If there is more than 1 blob you will find values for blob[1-n] also 1 2 4 3 Robot Vision

  40. Holes in a Blob • A Hole is an area inside a blob with greyscale values outside the max and min values set in the blob tool Robot Vision

  41. Picking location • In this application the pick-up position is the centre of the object • This is equal to the centre of gravity co-ordinates found for the blob Robot Vision

  42. Strategies to find a picking location • Geometrical characteristic of the object is used to find the correct picking localisation. In this example the centre of gravity was the correct picking location. However other localisations might very well be used as well. Below are some examples • Mid point short edge • One corner of the long edge • Centre point of the small hole on the short edge Robot Vision

  43. Co-ordinate systems • The picking point is the centre of gravity of the blob. However the x,y co-ordinates we found in the blob is according to the “Calibration” co-ordinate system (Blue) used as the reference in the blob tool • We now need to recalibrate according to the Robot Calibration system Robot Vision

  44. 4 point calibration steps • By moving the robot to the centre of each point the robot co-ordinates are found • In Scorpion the centre of each point is found in the Scorpion reference system • By using the “ExternalReference” tool Scorpion can calibrate the image in robot co-ordinates Robot Vision

  45. 4 point Robot calibration • First we need to find the four points and their centre of gravity in the robot calibration grid • Add a new tool in the toolbox: • Name= FindRefPoints • Tool = BlobTool Robot Vision

  46. Find Ref Point image 1 • The image of the 4 point calibration grid is located in the directoryMyRobotVision/References • Follow the steps (1 – 5) and push the Snapshot button (6) until you get the right image 6 3 2 4 5 Robot Vision

  47. 1 2 3 4 Configure FindRefPoints tool • Follow the steps to set reference to “Calibration” (1), the correct search area (2) and threshold levels (3). To eliminate disturbing blobs from the text “5cm” activate Smallest area = 10 Robot Vision

  48. RefPoints co-ordinates • In the Result tab you find the centre of gravity x,y co-ordinates • Check by using the cursor in the image, that you note down the correct x and y values for point 1 – 4 Point 1 Point 2 Point 3 Point 4 Robot Vision

  49. Robot co-ordinate system • By moving the robot to the four points you get the equivalent robot co-ordinates Origo Point 1 Point 2 Point 3 Point 4 Robot Vision

  50. External Reference tool • Next we need to co-ordinate the image and robot co-ordinate systems • Add a new tool in the toolbox: • Name= ExternalRefSystem • Tool = ExternalReference Robot Vision