KitwareMedical / ITKPOCUS

An open source library for streaming and preprocessing point-of-care ultrasound video.
Other
19 stars 5 forks source link

BUG: Fix issue where butterfly crops image to size 0 #33

Closed tao558 closed 2 years ago

tao558 commented 2 years ago

Previously, the first frame of a video was used to decide how much to crop the image by. If the image contained mostly dark pixels in the center, we would sometimes crop the image to size 0. With this fix, we decide the crop based on the mean of all of the frames.

Also added a test that fails with the previous method and passes with the new one.