robotic vision report

Upload: robomilo

Post on 06-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Robotic Vision Report

    1/15

    Vision

    Introduction

    The aim of this report is to use a piece of machine vision software 'NeuroCheck'

    (version 6.0.38.0) to analysis a pattern of six sweets which are three different colours.

    The software was needed to be set up so it showed up each of the three differentcolours.

    Machine vision is the analysis of a digital image, which has been produced from the

    light reflect from a physical object. Machine vision has been developed to get as

    close to replicating human vision as possible.

    A few examples of its advantage over using a human is:

    y A lot faster at basic visual task's in a certain confined area

    y Can be used 24 hours a day, 7 days a week.

    y Can be used in an environment which is dangerous

    Equipment

    The equipment used is:

    y NeuroCheck 6.0 - This is the software used, it is a powerful application

    software for machine vision.

    y Camera - This uses CCD (charge coupled devices), which the light energy to

    charge the CCD and produce a signal.

    y Computer with the following minimum specification: S

    y

    y Operating System:y Windows 7 (32-bit/64-bit), Vista (32-bit), or XP SP2 or higher (32-bit)

    y Processor: 1.5 GHz (2.0 GHz multi-core recommended)

    y System memory: 1 GB RAM (4 GB recommended)y Free space on hard drive: 2 GB on system partition

    y Screen resolution: 1,024768

    y Optical drive: CD-ROM or DVD

    y Interface: USB or Parallel Port

    Method

    To be able to use the software properly a suitable image is needed. Using different

    apparatus, focus, aperture and lighting the best image was extracted. The softwareconverts the colour image into a black and white one, the different colours in each

    pixel are then placed onto the grey scale. The software recognises the greyscale as

    black = 0 and white = 255.

    The following images are screenshot of the images received:

    Type Acceptable?Yes/No

    Reason Picture

  • 8/3/2019 Robotic Vision Report

    2/15

    Ring lightonly

    No Picture too dark,Lens cannot focus,Red and black cannot easily bedistinguished.

    SpotLightsOnly

    No To much shadowin all directions,although colourscan clearly bedistinguished

    LampsOnly

    No Dark shadows

    Ring lightsandLamps

    No Dark shadows andshine from bottomleft sweet

  • 8/3/2019 Robotic Vision Report

    3/15

    Ring lightanddiffuser

    No Close to therequired picture,but the two darksweets are tooclosely matched.

    Ring light,spot lightanddiffuser

    Yes Picture is clear,colours are easilydistinguishableand there are noshadows present.Any small defects

    e.g. shining, canbe removed by thesoftware.

    Reasons for not choosing images

    y Shadows - Corrupts image as: shadows are all the same colour, computer

    can recognises it as part of sweet.

    y Colours too similar - Computer may not be able to diguish between the

    different sweets.

    Settings and apparatus affecting image

    y Diffuser - a paper tube which went over the sweets. It is used to

    diffuse/spread out the light (soften the light). Regarding the sweets it had

    eliminated the shadows.

    y Aperture - A device which is located inside the camera behind the lens but infront of the CMOS image sensor. It is used to control the amount of light

    entering the camera. It is controlled from outside the camera's body and has

    a scale in increasing f-numbers where f3 lets in the most light and f16 lets in

    the least amount of light. Basically It allows the picture to be lighter or darker.

    y Focus - Adjusting the lens via an external rod to produce maximum clarity of

    the image.

  • 8/3/2019 Robotic Vision Report

    4/15

    The selected image chosen for processing was when the sweets which had the use

    of the ring light, spot light and diffuser. This produced the best image, with no

    shadows, good clarity and excellent the three shades of grey were easily

    distinguishable. The only points which would need reprocessing were because the

    sweets were embossed on the top this produced some shining and dark areas.

  • 8/3/2019 Robotic Vision Report

    5/15

    After an image was taken it is then inserted into the vision software, it can then be

    further processed to enhance it. The form of reprocessing we had chosen was to add

    a filter to the image.

    Image Filter

    First the image is filtered, this simplifies the image by increasing/decreasing the lightand dark anomaly parts of the image.

    This is a screenshot of the original (above) and after filter image (below). There are

    several options for filtering but the one which gave the best results was 'erosion 3x3',

    erosion works on the lighter end of the scale and causes the lighter areas of the

    image to become darker. Which in this case made the light area's from the shiny

    parts merge with the rest of the sweets grey level. The filtered image has been

    simplified which the light shining of the embossed sweets has been dulled and

    slightly more merged into the rest of the sweet.

  • 8/3/2019 Robotic Vision Report

    6/15

    ROI

    The last procedure which needs to be performed before each of the colours of

    sweets can be processed is the selection of the ROI (regions of interest). This is

    easily done (a simple drag and drop), but is very important to do so the software

    knows where on the image to focus the processing.

    Colour Processing

    Now the setup of the image has been performed, the three different pair's of

    coloured sweets can be processed. At the end of each of the processing the

    computer will count the amount of each of the coloured sweets which is a quantity of

    two, this will confirm that everything has been done correct.

  • 8/3/2019 Robotic Vision Report

    7/15

    Black

    To determine the black sweets, first the threshold is determined below is the

    screenshot of this process. The top of the screenshot is a histogram and the lower

    image is the real-time results of the threshold.

    Determine threshold

    Create ROIs by Thresholding

    This is the next step and shows the software picking up the two black sweets, which

    are highlighted in blue.

  • 8/3/2019 Robotic Vision Report

    8/15

  • 8/3/2019 Robotic Vision Report

    9/15

    Yellow

    This procedure is the same as above.

    Determine threshold

  • 8/3/2019 Robotic Vision Report

    10/15

    Create ROI by Theshold

    Compute Features

    When the yellow sweets image has had the features computed, it shows there are

    several parts with the same colour. The table in the screen shot shows the areas

  • 8/3/2019 Robotic Vision Report

    11/15

    with the grey level. Because there are several areas highlighted the image needs to

    be screened.

    Screen ROI

    This is an extra step to which allows a range of areas to be selected, in this case the

    range was 7500 to 9500 pixles. This screenshot shows the updated processed

    image.

  • 8/3/2019 Robotic Vision Report

    12/15

    Count ROI

    The the ROI now counted it confirms the quanity of yellow sweets as two.

  • 8/3/2019 Robotic Vision Report

    13/15

    Red

    This procedure is exactly the same for the yellow sweets

    Determine threshold

    Create ROI by Theshold

  • 8/3/2019 Robotic Vision Report

    14/15

    Compute Featuers

    Screen ROI

  • 8/3/2019 Robotic Vision Report

    15/15

    Count ROI

    This confirms that the quantity of red sweets is two.