Closed trlsmax closed 3 years ago
You can configure motion detector before using:
Detector detector;
Model model;
model.size = Size(0.1, 0.1); // Sets minimal size of object to detect. ONVIF size is restricted by range [0, 2].
detector.SetModel(model);
Options options;
options.TrackingAdditionalLinking = 0; // Sets coefficient to boost trajectory linking. By default it is equal to 0.
options.ClassificationShiftMin = 0.075; // Sets minimal shift (in screen diagonals) of motion region to detect object. By default it is equal to 0.075.
options.ClassificationTimeMin = 1.0; // Sets minimal life time(in seconds) of motion region to detect object. By default it is equal to 1 second.
detector.SetOptions(options);
In your case it is reasonable to try to decrease model.size
, options.ClassificationShiftMin
, options.ClassificationTimeMin
and increase options.TrackingAdditionalLinking
.
No matter how I change the parameters, it just can't detect any object. Here is a sample video: http://sonotaco.jp/HDsamples/M20130101_055312_TK1_H2.wmv
I tried something like these:
Detector detector;
Model model;
model.size = Size(0.001, 0.001); // Sets minimal size of object to detect. ONVIF size is restricted by range [0, 2].
detector.SetModel(model);
Options options;
options.TrackingAdditionalLinking = 0.5; // Sets coefficient to boost trajectory linking. By default it is equal to 0.
options.ClassificationShiftMin = 0.0005; // Sets minimal shift (in screen diagonals) of motion region to detect object. By default it is equal to 0.075.
options.ClassificationTimeMin = 0.0005; // Sets minimal life time(in seconds) of motion region to detect object. By default it is equal to 1 second.
detector.SetOptions(options);
But thank you for the reply.
I have tried to set following options:
Model model;
model.size = FSize(0.01, 0.01); // Sets minimal size of object to detect. ONVIF size is restricted by range [0, 2].
detector.SetModel(model);
Options options;
options.DifferenceDxFeatureWeight = 0;
options.DifferenceDyFeatureWeight = 0;
options.TrackingAdditionalLinking = 5; // Sets coefficient to boost trajectory linking. By default it is equal to 0.
options.ClassificationShiftMin = 0.01; // Sets minimal shift (in screen diagonals) of motion region to detect object. By default it is equal to 0.075.
options.ClassificationTimeMin = 0.01; // Sets minimal life time(in seconds) of motion region to detect object. By default it is equal to 1 second.
detector.SetOptions(options);
And it works!
Yes, it works ! Thank you very much.
I try to use motion detector to detect shooting star in video with the example code UseMotionDetector.cpp. But nothing was detected. Is the motion detctor suit for this job or do i need to tune some parameters ? Thanks