Accelerated hardware video object segmentation: From foreground detection to connected components labelling