Yes, one array element per unknown pixel. You'll have to experiment with different numbers of angles. Too many, and every point will cover the whole unknown region. Too few, and you'll miss reinforcing the pixels over the true line. Also you'll want to limit the length of the segments you trace from each white point, so you don't have irrelevant distant pixels influencing your analysis. You want to select values such that the pixels in the unknown region that are colinear with the white lines get the most reinforcement. After you trace from the white pixels, you need to threshold the unknown region, i.e. consider every pixel with a sum above some value to be white, and all others black. This will take some experimentation to determine the best value.