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)nItem0Execution result 0= Normal, -1= Abnormal1unknown2Execution time
VISGETNUM (a, b)ba = 0~ max5110Area1Center of gravity a coordinate X value2Center of gravity a coordinate Y value3Main axis angle4Filet dia. Reference point coordinate X5Filet dia. Reference point coordinate Y6Filet dia. width7Filet dia. height8Periphery length9unknown
-
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
|
|