SHCORNER
(Statement)
Searches for a corner.
SHCORNER <Window number>, <Coordinate X>, <Coordinate Y>, <Level difference>, <Mode>
<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).
<Level difference>
Designates the detection level in the corner search (0 to 255).
<Mode>
Designates an object in the corner search (0 to 7).
-
Designate the process range with a window.
-
If the designated window is not positioned on the screen, an execution error will result.
-
Only rectangular windows with an angle of 0 degrees can be designated. If you designate any shape other than this, an error occurs.
-
The processing object is the screen designated with VISWORKPLN.
-
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.
-
The following data can be obtained with the processing results obtaining function.
-
If a timeout occurs during searching, the number of corners found before the occurrence of the timeout will be displayed.VISSTATUS (n)nItem0Execution result 0= Normal, -1= Abnormal1Number2Execution time
VISGETNUM (a, b)ba = 0~5110Number1X Coordinate Value2Y Coordinate Value3unknown4Level5unknown6unknown7unknown8unknown9unknown
-
For this instruction, a µVision board (option) is required.
VISSCREEN 1,0,1
|
'Instantaneously draws on drawing screen 0.
|
VISCLS 0
|
|
WINDMAKE R,1,512,480,0,2
|
'Sets window 1 to rectangular parallelepiped.
|
CAMIN 1
|
'Obtains a camera image from the storage memory.
|
VISWORKPLN 0
|
'Designates an object to storage memory 0.
|
SHCORNER 1,0,0,180,0
|
'Searches for a black corner in the left lower section.
|
I1 = VISSTATUS(0)
|
|
IF I1 = 0 THEN
|
|
I2 = VISSTATUS(1)
|
|
IF I2 <> 0 THEN
|
|
FOR I1 = 0 TO I2-1
|
|
VISCROSS VISGETNUM(I1,1),VISGETNUM(I1,2)
|
|
NEXT I1
|
|
END IF
|
|
END IF
|
|