Detection of objects in noisy images based on percolation theory