colinlaney / animal-tracking

Object tracking with OpenCV in open field behavioral test (overhead view maze)
https://youtu.be/GebcshN4OdE
Creative Commons Zero v1.0 Universal
50 stars 23 forks source link

Taking the right side square of the camera environment #12

Closed Hatem-Jr closed 3 years ago

Hatem-Jr commented 3 years ago

Hi I am trying to change the behavior of the code where it does not take the right side square of the video (frame[:, w-h:w]) or the left side for that matter and I want it to take the full video without any section of pixels cut off so that I can crop the full test environment (in my case it's a Morris Water Maze test if you're wondering).

colinlaney commented 3 years ago

Well, commenting frame = frame[:, w-h : w] should work fine.

Hatem-Jr commented 3 years ago

you mean all 3 of them or just the one in line 91 ? because when running after selecting the cropping area the frame is still cut in the running state like this: Screenshot (4)

colinlaney commented 3 years ago

you mean all 3 of them?

Yes, 91, 172, 188, and 192.

And don't forget to disable all cv2.warpPerspective on 131 and 198.

Hatem-Jr commented 3 years ago

I commented 91 and 191 and left 171 uncommented and the tracing works just fine but thanks for your trouble :D