Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As for the first question - 280:340, 330:390 means: get a rectangle that begins at 280th row and 330th column and ends at 340th row and 390 column. Another way to put it: it is a rectangle described by 4 vertices whose coordinates are: (280,330), (280,390), (340,330), (340,390).

In general, this 'i:j' means range from i-th to j-th element.

As for the ball: if you look closely, the author doesn't care about the exact position of the ball - it's been copied together with the grassy background. How did the author know where is the ball? Well, by looking at the image - there is no automatic detection here if this is what you are asking about. The tutorial states that the ball was selected (manually), not detected.