1. An apparatus comprising: at least one processor; and at least one memory including computer program code, in which the at least one memory and the computer program code are configured, with the at least one processor, to cause the apparatus at least to: convert a digital image to a multiple level image; form multiple scale sets from connected components of the multiple level image, in which different ones of the scale sets define different size spatial bins; for each of the multiple scale sets: generate a count of connected components extracted from the respective scale set for each spatial bin; and link adjacent spatial bins which represent connected components; merge the connected components from the different scale sets; and perform text line detection on the merged connected components.