For the complete documentation index, see llms.txt. This page is also available as Markdown.

Detection

In this part, you will detect the golf ball position. You will first build a simple detector, then fix the reference so detection remains stable while the ball moves.

1

Add Find Object

Go to the blocks bar. Under Detections/Shapes, open Detectors and drag Find Object into the scenario.

2

Add Show Image

Under Input/Output, open Outputs/Exports and drag Show Image into the scenario.

3

Connect the detector

Connect the blocks as shown below.

Click run stepRun Step. You should see the detected golf ball inside a red box in Show Image.

4

Test continuous detection

Click run Run and watch the detection for about 10 seconds.

You may notice that detection becomes unstable. This happens because Image ROI Select keeps changing its reference as the ball moves, so the reference can become grass instead of the golf ball.

5

Add Image Memory

To keep the reference stable, add Image Memory.

Go to the blocks bar. Under Image Transformers, open Analysis and drag Image Memory into the scenario.

6

Add Logic Input

Under Input/Output, open Data Inputs and drag Logic Input into the scenario.

7

Rearrange crowded blocks

Move one block by clicking and dragging it.

Move multiple blocks by dragging a selection around them, then dragging the selected group.

8

Connect Image Memory

Connect the new blocks as shown below.

Image Memory freezes the frame we need, so the reference does not change while the video runs.

9

Save the reference frame

Run the scenario for one step. Then set Logic Input to True to save the image in Image Memory.

10

Tune Find Object

Move to Find Object and set Match Threshold to 100%.

Find Object match threshold
Find Object match threshold
11

Run detection

Press Run and check that the detector follows the golf ball.

The detector is now working with a stable reference. Continue to the final page to check whether the golf ball reaches the hole.

Last updated