mooch443 / trex

TRex, a fast multi-animal tracking system with markerless identification, and 2D estimation of posture and visual fields.
https://trex.run
GNU General Public License v3.0
82 stars 8 forks source link

Excluding blobs / petri dish borders #91

Open piotrvidal opened 2 years ago

piotrvidal commented 2 years ago

Hi :)

Great software. Is there any way to prevent the sides of the petri dish from being identified as blobs? Or to click on them an "exclude" them somehow?

I've tried:

trex_screenshot

EDIT: I'm sure this is a user thing. I'm going over the documentation again and again but I'm unable to find a way out so that's why I decided to drop a message.

piotrvidal commented 2 years ago

I just realized that I could simply exclude those undesired blobs from the .csv for my data representations. It would still be a cool feature being able to select a specific blob and tell TRex to ignore it.

mooch443 commented 2 years ago

Hey! There is a function that could help you with that. While you're in tracking view (like in your screenshots) simply CTRL/CMD+lef-click any (empty) point in the image. If you chain those clicks, you'll get a (convex) polygon that you can exclude from tracking. Be aware though that convex is currently the constraint here. You will need to add multiple boxes for a round shape! An alternative that I haven't used in a while is to use -cam_circle_mask during conversion. Let me know if that still works... You'll need to use -crop_window before conversion to crop the video so that it cuts off exactly at the borders. Only works for one petri dish though. If you need the same values multiple times, then you can copy the values from the terminal to -crop_offsets for the next program start.

Good point though. I'll add this to documentation and include a part about this topic there. Thanks!