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

Tracker is not good at tracking a rotating line such as a gauge needle #47

Open
BrunoB81HK opened this issue Apr 17, 2023 · 5 comments
Open

Comments

@BrunoB81HK
Copy link

I'm currently trying to track the rotation of a gauge needle. The problem is that I can't put a marker on the needle to have a round marker to track and that makes the tracking of the needle by the autotracker almost impossible. I wonder if a feature that track a rotating line could be implemented in some ways.

@dobrown
Copy link
Member

dobrown commented Apr 17, 2023 via email

@BrunoB81HK
Copy link
Author

Hi @dobrown,

Do you have any news on this issue? Although I'm not familiar with this codebase, I could try and help you implement it.

@dobrown
Copy link
Member

dobrown commented May 5, 2023

Hi Bruno, thanks for offering to help, I can't get to it any time soon. I suggest you start by looking at the org.opensourcephysics.cabrillo.tracker.AutoTracker.findMatchTarget(Rectangle) method at line 1030. The AutoTracker calls the org.opensourcephysics.media.core.TemplateMatcher.getMatchLocation() method at line 1053/55 to find the actual match after first setting the template matcher's template image at line 1042. My thought is that findMatchTarget() would be modified by repeatedly rotating the template image by a small angle and repeating the calls to getMatchLocation(). The fits at different angles would be compared and the best one kept. The trick I think is going to be trying to keep the template pattern clean and undistorted when rotating the template image. Might require that the image be square/circular? Do you have experience with image operations? Doug

@BobHanson
Copy link
Collaborator

BobHanson commented May 6, 2023 via email

@dobrown
Copy link
Member

dobrown commented May 6, 2023 via email

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

3 participants