there is an array i on j, each element of the array stores the color of the pixel of the picture. The picture itself is a preview of other pictures, separated by a white stripe, and the thumbnails themselves can also contain some sequences of white pixels 
the task is to find the centers of these thumbnails, who will tell you how to solve it?