Draw the dash line

Overview

Draw the dash line which have serch coordinate in the center.

Specification of this example


Behavior
Draw the dash line which divide the screen in quarters, which have serch coordinate in the center.

Screenshot


How to try this example
1.Click the link below, then the folder containing zip file automatically opens.
refFile

2.Right-click and hold on the zip file, and drop it on working window of FJ system. The images and scene data in zip file are loaded on the program automatically.

3.Re-measure the image. Then System automatically draws the dash line which have serch coordinate in the center in Image Window.

How to implement

Scene data
Unit No.
Processing Item
0.
Camera Image Input
1.
Search
2.
Macro
The Macro Program below segment is to be set in '2.Macro'.
Macro Program
*MEASUREPROC
Return

*MEASUREDISPG
    GetImageSize UnitNo, 0, X&, Y&            '(1)

    MYUNIT& = UnitNo                          '(2)
    WRKX# = UnitData(MYUNIT& - 1,"X")
    WRKY# = UnitData(MYUNIT& - 1,"Y")

    SetDrawStyle PS_DASH, 1, JUDGE_OK         '(3)
    DrawLine WRKX#, 0, WRKX#, Y&, 0           '(4)
    DrawLine 0, WRKY#, X&, WRKY#, 0
Return

The macro program is in refthis link.
Explanation
(1)Get image size by [GetImageSize] command.
(2)Get measurement results of forward unit via external reference data.
(3)Set line style by [SetDrawStyle] command.
(4)Draw the dash line which have serch coordinate in the center.