BLOBMEASURE (Statement)


Execute feature measurement of the object label number.


BLOBMEASURE <label number>, <feature>


<label number>
Designates the label number obtained by labeling. (0 to 511)
<feature>
Designates the feature to obtain. (0 or 1)
0: Main axis angle
1: Periphery length
  • Before executing this function, you need to execute labeling with BLOB.
  • When you obtain the periphery length, you need to leave the source image when you executed labeling.
  • The following is an example of the data you can obtain 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~ max511
    0
    Area
    1
    Center of gravity a coordinate X value
    2
    Center of gravity a coordinate Y value
    3
    Main axis angle
    4
    Filet dia. Reference point coordinate X
    5
    Filet dia. Reference point coordinate Y
    6
    Filet dia. width
    7
    Filet dia. height
    8
    Periphery length
    9
    unknown

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



VISSCREEN 1,0,1
'Instantaneously draw the drawing screen 0
WINDMAKE R,1,512,480,0,2
'Set window 1 to rectangle
CAMIN 1
'Obtain a camera image from the storage memory
BLOB 1,0,0,0,128
'Execute labeling
IF VISSTATUS(0)=0.0 THEN
IF VISSTATUS(1)<>0.0 THEN
FOR I1 = 0 TO VISSTATUS(1)-1
BLOBMEASURE I1,0
'Obtain the main axis angle of label I1
VISCROSS VISGETNUM(I1,1), VISGETNUM(I1,2),10,20,VISGETNUM(I1,3)
NEXT I1
END IF
END IF


Top