Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about shift detector #250

Open
axllou opened this issue Jun 12, 2023 · 5 comments
Open

Question about shift detector #250

axllou opened this issue Jun 12, 2023 · 5 comments

Comments

@axllou
Copy link

axllou commented Jun 12, 2023

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

@ermig1979
Copy link
Owner

Hi, Park!

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

Sincerely Ihar.

@axllou
Copy link
Author

axllou commented Jun 20, 2023

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

@ermig1979
Copy link
Owner

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.

@axllou
Copy link
Author

axllou commented Jun 20, 2023

Hi,

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

Thanks,
Park

@ermig1979
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants