Draw the center line

Overview

Draw the center line in Image Window.

Specification of this example


Behavior
When measurement ends, draw the center line in Image Window.

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 center line 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 MYUNIT&, 0, X&, Y&
    DrawLine X&/2, 0, X&/2, Y&, 0
    DrawLine 0, Y&/2, X&, Y&/2, 0
Return

The macro program is in refthis link.
Explanation
(1)Get image size by [GetImageSize] command.
(2)Draw the center by [DrawLine] command.