CAMERA CHANGE image%(),change! [,scale [,x ,y]]

The camera firmware is also able to detect motion in the camera's field of view using the command. It does this by operating the camera in YUV mode rather than RGB. This has the advantage that the intensity information and colour information are separated and just one byte is needed for a 256-level greyscale image which is ideal fer detecting movement.

image% is an array of size 160x120 bytes (DIM image%(160,120/8-1)

On calling the command it holds a packed 8-bit greyscale image. The change! variable returns the percentage the image has changed from the previous time the command was called.

Optionally if scale is set then the image delta is output to the screen i.e. the difference between the previous image and this one.

As in the CAPTURE command the delta image can be scaled and positioned as required. If the scale parameter is omitted then the LCD is not updated by this command.