SCARA, 6-Axis and Modules
Technical Support Notes

Article ID: T35
Date: 6/3/99
Product: Vision Guide 2.x (all versions)
OS: Windows NT 4.0
Problem: How to store images for later retrieval and analysis

For some applications, you may need store images for later retrieval and analysis.
For example, scan a part with a mobile camera, taking pictures at various positions, then allow the part to move on while analyzing the images with Vision Guide tools.
Here are the basic steps:

1. Create a blank sequence (e.g. "SnapShot") and set the camera property to the desired camera.
2. Create one or more sequences (e.g. "Search") to analyze the images.
3. To save an image, run the sequence "SnapShot" and call VSaveImage.
4. To load an image, set the ImageFile property for the sequence "Search". Then run the sequence and use the results.

Here are two examples, one using SPEL and the other using VB Guide.


Using SPEL

imgFile$(1)="c:\temp\image1.mim"
imgFile$(2)="c:\temp\image2.mim"
imgFile$(3)="c:\temp\image3.mim"

' Store the images from a blank sequence called "SnapShot"
For i=1 To 3
    Jump Pi
    ' Takes ~90 ms for the VRun and VSaveImage
    VRun SnapShot
    VSaveImage SnapShot, imgFile$(i)
Next i

' Search the images later using the sequence called "Search"
' by first loading the images from disk
For i=1 To 3
    ' Takes ~75 ms for VSet ImageFile
    VSet Search.ImageFile, imgFile$(i)
    VRun Search
    ' Get results here
    VGet .....
Next i



Using VB Guide

imgFile$(1)="c:\temp\image1.mim"
imgFile$(2)="c:\temp\image2.mim"
imgFile$(3)="c:\temp\image3.mim"
' Store the images ' from a blank sequence called "SnapShot"

With SPELCom1
    For i=1 To 3
        .Jump i
        ' Takes ~67 ms for the VRun and VSaveImage
        .VRun "SnapShot"
        .VSaveImage "SnapShot", imgFile$(i)
    Next i
End With


Search the images later using the sequence called "Search"
' by first loading the images from disk
With SPELCom1
    For i=1 to 3
        Takes ~33 ms for VSet ImageFile
        .VSet "Search", "", "ImageFile", imgFile$(i)
        .VRun "Search"
        ' Get results here
        .VGet .....
    Next I
End With



Click here to return to the EPSON Robots home page
The Power of Choice!