When get_fg_mask can't find any pixel in the sample that's foreground (e.g. white page, like image attached) will cause a exception running K-means clustering(randint's call inside it to be precise)
Im not sure which behavior would be desirable in this case, check and ignore it or writing the white page on output
When get_fg_mask can't find any pixel in the sample that's foreground (e.g. white page, like image attached) will cause a exception running K-means clustering(randint's call inside it to be precise)
Im not sure which behavior would be desirable in this case, check and ignore it or writing the white page on output