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

manually setting origin #189

Open
miller1875 opened this issue Jan 23, 2023 · 4 comments
Open

manually setting origin #189

miller1875 opened this issue Jan 23, 2023 · 4 comments
Projects

Comments

@miller1875
Copy link

is there a way to manually set the origin (0,0) in a video?

@mooch443
Copy link
Owner

You mean when the tracking data is being exported? You can choose the center instead of top-left by changing output_centered = true in the settings, but there is currently no option to arbitrarily choose an origin point. Also, this only affects the X and Y coordinates in the output data. Are you recommending this feature to be added, or does this suffice?

@miller1875
Copy link
Author

So we have the camera view on the screen but due to discrepancies in the set-up between videos the area of interest within that view shifts slightly. So if we wanted to know where in the area a fish is we are having to subtract the distance from the edge of the video to the start of the experimental area but this is quite time consuming. So we were wondering if there was a way to manually set up the area of interest at the start of each video so it's at (0,0). Any other suggestions to work around this would also be very useful!

@roaldarbol
Copy link

@mooch443 Sounds like maybe an alternative, kind of a mesh between crop_offsets and track_ignore feature - being able to draw the cropped region that should be included. What do you think of that? I'd assume the backend solution (namely the drawing and cropping functionality) is mostly in place for such an addition. Hope you're doing well! :-)

@mooch443
Copy link
Owner

mooch443 commented Feb 6, 2023

Using crop_offsets could be a way to set 0,0 to the same point - of course this only works if your data is otherwise quite similar. Meaning particularly that it's not rotated.

In the past we have done something like this by... clicking on the background in TRex for each video where you want your 0,0 to be, noting down that point (displayed in the GUI), and then saving this in a CSV file. Can then be used to subtract from the exported data during analysis. It seems to me at least that you say "it shifts slightly" that there wouldn't be an automatic way to tell where exactly 0,0 is, right? So in the end you'll have to click on it anyway. Might as well note it down at that point. And if I imagine doing analysis in some kind of R/Python script, subtracting a value from a CSV file corresponding to the current video does not seem too much work.

But do let me know if I misunderstand the problem :-) At least right now I am not sure how to automate this better - I will add a todo for setting a custom 0,0 in the GUI though, thanks.

@mooch443 mooch443 added this to To Do in v2.0 via automation Mar 21, 2024
mooch443 pushed a commit that referenced this issue Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Do
v2.0
To Do
Development

No branches or pull requests

3 participants