Skip to main content

FAQ: VCA script - Use detection fields as VCA mask (e.g. to avoid sun reflection)

Question

Can I mask areas that should not trigger an alarm (e.g. false detection due to sun reflection)?

Answer

There are two options,

  • One is to set VCA masks to that area.
  • The other option is that you draw "detection fields" and than modify the script to NOT trigger alarm there.
    so you basically invert the original intention
  1. Go to Tasks -> Create a Task -> Object in Field.
  2. Add a Field task for every area you do not want to trigger.
  3. Then go to the script editor remove the DebounceTime() entry of the fields, remove all the tasks, create one like below.

Then it should trigger everywhere except where the fields are placed.

WARNING: the fields get red, if someone is outside the fields.

Resolution := { Min(-1, -1) Max(1, 1) };

Field #1 := { Point(-0.908, -0.311) Point(0.202, -0.311) Point(0.233, 0.660) Point(-0.386, 0.412) Point(-1.165, 1.437) ObjectSet(FootPoint) PTZ(178.01, 359.08, 0.57) };

Field #2 := { Point(-0.575, -0.822) Point(-0.303, -0.939) Point(-0.116, 0.617) Point(-0.359, 0.728) ObjectSet(FootPoint) PTZ(93.32, 16.49, 0.57) };

Field #3 := { Point(0.250, -0.856) Point(0.569, -0.772) Point(0.569, 0.200) Point(0.362, 0.139)  ObjectSet(FootPoint) PTZ(37.97, 16.49, 0.57) };

Field #4 := { Point(-0.425, -0.539) Point(0.209, -0.550) Point(0.181, -0.083) Point(-0.500, -0.178)  ObjectSet(FootPoint) PTZ(338.38, 16.49, 0.57) };

Field #5 := { Point(-0.591, -0.528) Point(0.359, -0.556) Point(0.222, 0.333) Point(-0.528, 0.167)  ObjectSet(FootPoint) PTZ(262.39, 16.49, 0.57) };

//@Task T:0 V:0 I:1 "Object outside fields" {

external ObjectState #1 := !(InsideField #1 or InsideField #2 or InsideField #3 or InsideField #4 or  InsideField #5);

external Event #1 := OnSet ObjectState #1;

//@}



VCA Task Editor in Configuration Manager:






JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.