In acquisition systems where the agar intensity is very low, downsampling and median filtering the preview image produces just zeros in the agar region. The result is that the gmm fails and so the acquisition stops. Things I've noticed:
- I am getting -inf for some reason in the function that does the GMM. If those are there the GMM fails
- It probably helps to downsample less and/or not med filt.
- The autoThresh does not medfilt and downsample so can produce a different threshold.