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

Custom region objects for tracker #403

Open
icklerly1 opened this issue Nov 23, 2022 · 1 comment
Open

Custom region objects for tracker #403

icklerly1 opened this issue Nov 23, 2022 · 1 comment
Assignees
Labels

Comments

@icklerly1
Copy link

icklerly1 commented Nov 23, 2022

Hi,
I have a question.
My plan is to provide the mtracker.Update method with custom regions.

I am generating my regions with the following:

new_regions = []
for el in orig_regions:
          new_obj = mt.CRegion()
          new_obj.confidence = el.confidence
          new_obj.type = el.type
          new_obj.brect = el.brect
          new_obj.brect = mt.CvRect()
          new_obj.brect.x = el.brect.x
          new_obj.brect.y = el.brect.y
          new_obj.brect.width = el.brect.width
          new_obj.brect.height = el.brect.height
          new_regions.append(new_obj)

and then:
mtracker.Update(new_regions, img, fps)

Unfortunately my tracker gets stuck after the second iteration. Do you have a tip how to solve this?
If I just use new_obj = el within the loop everything works fine.

It would be great if somebody could help me out! Or give me a direction.

@Nuzhny007 Nuzhny007 self-assigned this Nov 23, 2022
@Nuzhny007
Copy link
Collaborator

All mt types are C++ structures with Python bindings. So Tracker waits not python's list of regions but C++ array - std::vector.
I'm not so good in python's bindings but try to search some way to transform from python into C++ types.

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

No branches or pull requests

2 participants