My goal for this is to simply count the number of eggshells in the image.
Using color negate only leads to this
shell = Import["https://i.stack.imgur.com/xJLJX.jpg"];
binshell = FillingTransform[ColorNegate[Binarize[shell]]]
With luck, I at least came up with something clearer using
binshell = LocalAdaptiveBinarize[shell, 25];
What is the best way to count the total number of eggshells?
ColorQuantize
with parameter 2 (or maybe 3 or 4). $\endgroup$Import["https://i.imgur.com/PZNt7JQ.jpg"] // ColorSeparate[#, "S"] & // Binarize[#, 0.25] & // ColorNegate // Dilation[#, 5] & // MorphologicalComponents // Max
(* 11 *)
$\endgroup$