Skip to content

Bug detect small animals more reliably

David Tadres requested to merge Bug_DetectSmallAnimalsMoreReliably into master
  1. Introduced a variable sigma for filtering the initial (first) image where the ROI is identified. Ideally it seems one should choose a sigma (for the gaussian filtering of an image) which is half the cross section of the animal. As we don't have the cross section readily available I used the following formula to guess it:

    (major_over_minor_axis_min/filled_area_min)*pixel_per_mm

    The cross section can be minimally one pixel, the minimum possible sigma is therefore 0.5. I also fixed the maximum sigma at 2.5 as this is the value I've empirically tested so far.

  2. In Mode 3 the algorithm starts by using a 3*STD from the mean to start off. Previously it was only 2.

  3. in the find_roi_mode_one_and_three function the image is now filtered using a sigma of 2. Previously it was 2.5 using the variable that is now dependent on the size of the animal

  4. Introduced an error message in define_animal_mode_three. This makes the bug tracking much easier, I hope. Error message reports if something that looks like the animal could be defined using the thresholded image. This is more explicit than getting the error later on (as was previously the case)

Merge request reports