BLOB (Statement)


Execute labeling.


BLOB <window number>, <coordinate X>, <coordinate Y>, <processing object>, <binary lower limit>[, <binary upper limit>[, <link>[, <area lower limit> [, <sort>]]]]


<window number>
Designates the window number (0 to 511).
<coordinate X>
Designates the X coordinate (0 to 511).
<coordinate Y>
Designates the Y coordinate (0 to 479).
<processing object>
Designates the object to obtain with labeling (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>
Designates the lower limit for binarization (0 to 254 lower limit < upper limit).
<binary upper limit>
Designates the upper limit for binarization (1 to 255 lower limit < upper limit).
If ignored, 255 is set.
<link>
Designates the condition of the link (0 or 1).
0: Neighbor 4 link (Neighbor pixels at right and left, and top and bottom are checked.)
1: Neighbor 8 link (Neighbor pixels at slant, as well as right and left, and top and bottom are checked.)
<area lower limit>
Designates a lower limit of an area value to be ignored in labeling. (0 to 245760)
<sort>
Designates sorting of numbers obtained with labeling (0 to 2).
0: Obtained order
1: Area value descending
2: Area value ascending
Example of labeling
  • Designate the process range with a window.
  • If the designated window position is out of screen, the execution will result in an error.
  • The only window shape you are able to designate is a rectangle with 0 degrees. If another window shape is designated, an error will result.
  • The processing object is a screen designated with VISWORKPLN.
  • The following data can be obtained with the process result obtaining function.
  • If labeling does not finish within the specified time, a timeout error occurs.
    VISSTATUS (n)
    n
    Item
    0
    Execution result 0= Normal, -1= Abnormal
    1
    Number of labels
    2
    Execution time

    VISGETNUM (a, b)
    b
    a = 0~ max511
    0
    Area
    1
    Center of gravity a coordinate X value
    2
    Center of gravity a coordinate Y value
    3
    unknown
    4
    Filet dia. reference point coordinate Y
    5
    Filet dia. reference point coordinate X
    6
    Filet dia. width
    7
    Filet dia. height
    8
    unknown
    9
    unknown

  • For this instruction, a µVision board (option) is required.



VISSCREEN 1,0,1
'Instantaneously draw on drawing screen 0
VISCLS 0
WINDMAKE R,1,512,480,0,2
'Set window 1 to rectangle
CAMIN 1
'Obtain a camera image to storage memory 0
VISPLNOUT 0
VISWORKPLN 0
'Designate the object to storage memory 0
BLOB 1,0,0,0,128
'Execute labeling
I1 = VISSTATUS(0)
IF I1 = 0 THEN
I2 = VISSTATUS(1)
VISDEFCHAR 1,1,2
VISLOC 10,10
VISPRINT I1,I2
IF I2 <> 0 THEN
FOR I1 = 0 TO I2 -1
VISLOC 10,11
VISPRINT VISGETNUM(I1,1), VISGETNUM(I1,2)
VISCROSS VISGETNUM(I1,1), VISGETNUM(I1,2)
NEXT I1
END IF
END IF
VISCAMOUT 1


Top