<?xml version="1.0" encoding="UTF-8"?>
<hdevelop file_version="1.1" halcon_version="13.0">
<procedure name="main">
<interface/>
<body>
<c> * Copyright (c) MVTec Software GmbH.  All rights reserved.</c>
<c> *</c>
<c> * All use of this software is subject to the terms of the revised BSD</c>
<c> * license.  You should have received a copy of this license along</c>
<c> * with this source code in a file named "license.txt."</c>
<c> </c>
<c>*********************************************************</c>
<c>* Display and test different initial rectangles</c>
<c>* The user can draw an arbitrary region and the initial</c>
<c>* starting points are computed and displayed</c>
<c></c>
<l>dev_open_window (0, 0, 512, 512, 'black', WindowHandle)</l>
<l>draw_region (Region, WindowHandle)</l>
<c></c>
<c>* get initial rectangles:</c>
<l>rectangle_type := ['rectangle1','rectangle2', 'rectangularity','inner_circle','inner_rectangle1']</l>
<l>initial_rectangles (Region, Rectangles, rectangle_type, overlaps, initial_box_coordinates)</l>
<c></c>
<c>* get the single types and their overlap for display</c>
<l>select_obj (Rectangles, SmallestRectangle1, 1)</l>
<l>overlap_smallest1 := overlaps[0]</l>
<l>select_obj (Rectangles, SmallestRectangle2, 2)</l>
<l>overlap_smallest2 := overlaps[1]</l>
<l>select_obj (Rectangles, Rectangularity, 3)</l>
<l>overlap_rectangularity := overlaps[2]</l>
<l>select_obj (Rectangles, InnerCircle, 4)</l>
<l>overlap_inner_circle := overlaps[3]</l>
<l>select_obj (Rectangles, InnerRectangle1, 5)</l>
<l>overlap_inner_rectangle1 := overlaps[4]</l>
<c>* ..........</c>
<c></c>
<c></c>
<c>***********************</c>
<c>* Display Candidates</c>
<c>***********************</c>
<c></c>
<l>dev_clear_window ()</l>
<l>alpha := 70</l>
<l>disp_region_alpha (SmallestRectangle1, '#00ff00', alpha)</l>
<l>disp_message (WindowHandle, 'Rectangle1: ' + overlap_smallest1, 'window', 12, 12, 'black', 'true')</l>
<l>disp_region_alpha (SmallestRectangle2, '#0000ff', alpha)</l>
<l>disp_message (WindowHandle, 'Rectangle2: ' + overlap_smallest2, 'window', 32, 12, 'black', 'true')</l>
<l>disp_region_alpha (Rectangularity, '#ffff00', alpha)</l>
<l>disp_message (WindowHandle, 'Inner Circle: ' + overlap_inner_circle, 'window', 72, 12, 'black', 'true')</l>
<l>disp_region_alpha (InnerCircle, '#ff00ff', alpha)</l>
<l>disp_message (WindowHandle, 'Inner Rectangle1: ' + overlap_inner_rectangle1, 'window', 92, 12, 'black', 'true')</l>
<l>disp_region_alpha (InnerRectangle1, '#5500aa', alpha)</l>
<l>disp_message (WindowHandle, 'Rectangularity: ' + overlap_rectangularity, 'window', 52, 12, 'black', 'true')</l>
<l>disp_region_alpha (Region, '#ff0000', alpha)</l>
<c></c>
</body>
<docu id="main">
<parameters/>
</docu>
</procedure>
</hdevelop>
