Simd icon indicating copy to clipboard operation
Simd copied to clipboard

Question about shift detector

Open axllou opened this issue 2 years ago • 5 comments

Hello,

In the function SearchLocalMin(), there are three places which return false. I wonder at the last one. Isn't the final result which is the minimal of all stageCount still trustable?

Thank you, Park

axllou avatar Jun 12 '23 13:06 axllou

Hi, Park!

The last return of false is the case when no any shifts with local minimum of difference were found.

Sincerely Ihar.

ermig1979 avatar Jun 12 '23 14:06 ermig1979

input1 input0

Hi, I find the result of shift detector would be unstable if I adjusts the ROI. I also attach two test images, could you help verify my question please? My settings are: set input0 as background image, input1 as current image, pyramid level to 2, and search range to 32. I list 4 test cases as below:

  1. ROI (left, right, top, bottom) = (8, 28, 207, 297), the shift result (X, Y) will be (-14, 2), I think the answer is close to correct answer.
  2. ROI (left, right, top, bottom) = (8, 28, 207, 295), this will get error return from the last return in function SearchLocalMin(), as I stated previously.
  3. ROI (left, right, top, bottom) = (8, 28, 207, 287), the shift result (X, Y) will be (-14, 2).
  4. ROI (left, right, top, bottom) = (8, 28, 207, 285), the shift result (X, Y) will be (-1, 0).

Thank you. Park

axllou avatar Jun 20 '23 08:06 axllou

As I can see you try to use Shift Detector to track a person in left part of image? I think that is not good idea because:

  1. Person figure has variable shape.
  2. It's shape doesn'tclose to rectangle.
  3. The object is small enough.

To correct work of Shift Detector the object must be:

  1. Big enough.
  2. Has stable form (or has stable main part) and stable texture.
  3. Object shift must be not large.
  4. Object form must be close to rectangle.

There examples of such objects:

  1. Whole frame.
  2. Car in the foreground
  3. Face in the foreground These objects I tracked with using of Shift Detector.

ermig1979 avatar Jun 20 '23 08:06 ermig1979

Hi,

For variable shape, do you have suggestions of which kind of searching algorithm is suitable to detect?

Thanks, Park

axllou avatar Jun 20 '23 10:06 axllou

Hi.

If you want to detect objects of certain type then the best method is using of detectors based of neural network. There are many pretrained models to detect different objects and many frameworks to infer them. For example: OpenVINO, ONNXRuntime, Synet and so on.

If you want to detect object of arbitrary type then I would recommend to use motion detectors. For example Simd::Motion.

Ihar.

ermig1979 avatar Jun 21 '23 08:06 ermig1979