TRVCamSender.MinChangeAreaSize, PixelColorThreshold -R -G -B

<< Click to display table of contents >>

TRVCamSender.MinChangeAreaSize, PixelColorThreshold -R -G -B

The properties specify how the previous and the current video frames are compared, if Encoding = rvet*Change

property MinChangeAreaSize: Integer;

property PixelColorThreshold: Integer;

property PixelColorThresholdR: Integer;

property PixelColorThresholdG: Integer;

property PixelColorThresholdB: Integer;

if Encoding = rvet*Change, the component compares the previous and the current video frames to find the changed areas.

Let the first pixel is (R1 G1 B1), the second pixel is (R2 G2 B2). If PixelColorThreshold >= 0, they are treated as different if (|R1-R2| + |G1-G2| + |B1-B2|)/3>PixelColorThreshold. Otherwise, they are treated as different if (|R1-R2| > PixelColorThresholdR) or (|G1-G2| > PixelColorThresholdG) or (|B1-B2| > PixelColorThresholdB).

The component calculates rectangles covering changed pixels optimally. Rectangles containing less than MinChangeAreaSize changed pixels are ignored.

Then the sender sends only rectangles covering changed areas. Optimal settings for these properties reduce a network traffic and allow to filter out a noise.

Default values

MinChangeAreaSize: 10

PixelColorThreshold -R -G -B: 8

See also

TestMode

ChangedAreaProcessingMode

Example

For example, the sender receives an image from a camera, and then it calculates changed (above the threshold) pixels. On the picture below, unchanged pixels are painted with a black color, changed pixels are shown in a gray color. If MinChangeAreaSize=6, all areas containing less than 6 pixels are ignored.

Two areas containing 6 or more pixels are framed with a red rectangle.

received-sample

The sender sends only these two areas, and the receiver places them

sent-sample

See also

TRVMotionDetector.MinChangeAreaSize, PixelColorThreshold