Display the measurement result with emphasis
Overview
Display the measurement result with emphasis.
Specification of this example
Behavior
This Sample displays a wide-lined circle around the measurement result of [Defect].
Screenshot
How to try this example
1.Click the link below, then the folder containing zip file automatically opens.
File
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 displays a wide-lined circle around the measurement result of [Defect].
How to implement
Scene data
Unit No.
|
Processing Item
|
0.
|
Camera Image Input
|
1.
|
Defect
|
2.
|
Macro
|
The Macro Program below segment is to be set in '2.Macro'.
Macro Program
*MCRINIT
'Initialize '(1)
DEFECTUNITNO& = 1
RADIUS& = 15
LINEWIDTH& = 8
Return
*MEASUREPROC
JUDGE& = UnitJudge(DEFECTUNITNO&) '(2)
GetUnitData DEFECTUNITNO&, 6, POSITIONX#
GetUnitData DEFECTUNITNO&, 7, POSITIONY#
Return
*MEASUREDISPG
SetDrawStyle PS_SOLID, LINEWIDTH&, JUDGE& '(3)
DrawCircle Int(POSITIONX#), Int(POSITIONY#), RADIUS&, 0
Return
The macro program is in
this link.
Explanation
(1)Initialize parameters(ex.parameter of circle) when initialize measurement.
(2)Get measurement result of [Defect].
(3)Draw a wide-lined circle around the measurement result of [Defect] in Image Window.