VISMASK (Statement)


Execute calculations between images.


VISMASK <window number>, <coordinate X>, <coordinate Y>, <screen 1>,<screen 2>,<mode> [, <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).
<screen 1>
Specifies the storage memory number to calculate (0 to 3).
<screen 2>
Specifies the storage memory number to calculate. This is the storage destination for a processing result (0 to 3).
<mode>
Specifies the type of calculation between images (0 to 10).
0: Binary AND
1: Binary OR
2: Binary XOR
3: AND (Executes AND for each bit after the brightness value is binarized)
4: OR (Executes OR for each bit after the brightness value is binarized.)
5: XOR (Executes XOR for each bit after the brightness value is binarized.)
6: Addition (Sets 255 if the brightness value is 255 or more.)
7: Subtraction (Sets 0 if the brightness value is 0 or less.)
8: Maximum value (Selects a larger brightness value.)
9: Minimum value (Selects a smaller brightness value.)
10: Absolute value (the absolute value of the difference between brightness values.)
  • If the process screen and the storage screen have the same number, an error will result.
  • Designate the process area with a window.
  • If the designated window position is out of screen, the execution will result in an error.
  • The only possible window shape that may be designated is a rectangle with 0 degrees. If another window shape is designated, an error will result.
  • In calculation of binarization, screen 1 is also binarized.
  • For this instruction, a µVision board (option) is required.



VISSCREEN 0,0,1
'Instantaneously draw on storage memory 0
WINDMAKE R,1,512,480,0,2
'Set window 1 to rectangle
CAMIN 1
'Obtain a camera image from the storage memory
VISCOPY 0,1
'Copy storage memory 0 to 1
VISBRIGHT 255
'Set the drawing brightness to 255
VISRECT 100,100,100,100,1
'Draw a filled rectangle on the screen
VISPLNOUT 1
'Display storage memory 1 on the monitor
VISMASK 1,0,0,0,1,10
'Calculate the absolute value of the difference
'between the 2 screens
WINDDISP 1
'Draw the window


Top