How to Iterate over 2D region with 1D pixels array

the tracking, draw circle and the redraw of tracked color done within this range

for (int x = 0; x < video.width && x < 100; x ++ ) {
    for (int y = 240; y < video.height; y ++ )

not over those x and y value