VISPROJ (Statement)


Measure the projected data in the window.


VISPROJ <window number>, <coordinate X>, <coordinate Y>, <processing object>, <binary lower limit>[, <binary upper limit>]


<window number>
Specifies the window number (0 to 511).
<coordinate X>
Specifies the X coordinate (0 to 511).
<coordinate Y>
Specifies the Y coordinate (0 to 479).
<processing object>
Specifies the object to measure (0 or 1).
0: Black (brightness value < binary lower limit, binary upper limit < brightness value)
1: White (binary lower limit ≤ brightness value ≤ binary upper limit)
<binary lower limit>
Specifies the lower level for binarization (0 to 254 lower limit < upper limit).
<binary upper limit>
Specifies the lower level for binarization (1 to 255 lower limit < upper limit).
If this is omitted, 255 is set as the default.
  • Specify the processing range with a window.
    : Available ×: not available
    Line (2-point designation)
    Windmake P
    Line (Length and angle)
    Windmake L
    Circle
    Windmake C
    ×
    Ellipse
    Windmake E
    ×
    Sector
    Windmake S
    Rectangle
    Windmake R

  • If the designated window position is out of screen, the execution will result in an error.
  • The following data can be obtained with the processing result obtaining function.
    VISSTATUS (n)
    n
    Item
    0
    Execution result 0= Normal, -1= Abnormal
    1
    unknown
    2
    Execution time

    VISGETNUM (a, b)
    b
    a = 0~511
    0
    Area
    1
    unknown
    2
    unknown
    3
    unknown
    4
    Brightness integration
    5
    unknown
    6
    unknown
    7
    unknown
    8
    unknown
    9
    unknown

  • When this command is executed, the process screen 3 (VISWORKPLN 3) is used as a work area and data on the process screen 3 are not guaranteed. Also, you cannot use the process screen 3 for processing.
  • For this instruction, a µVision board (option) is required.



VISSCREEN 0,0,1
'Instantaneously draw on storage memory 0
WINDMAKE R,1,100,20,0,1
'Set window 1 to rectangle
CAMIN 1
'Obtain a camera image from the storage memory
VISWORKPLN 0
'Designate an object from storage memory 0
VISPROJ 1,100,100,1,128
'Measure the project data
IF VISSTATUS(0) = 0.0 THEN
FOR I1 = 0 TO 19
VISPRINT VISGETNUM(I1,0)
NEXT I1
END IF


Top