<?xml version="1.0" encoding="UTF-8"?>
<hdevelop file_version="1.1" halcon_version="13.0">
<procedure name="rectangle1_bb_overlap">
<interface>
<io>
<par name="Candidate" base_type="iconic" dimension="0"/>
</io>
<ic>
<par name="Row1" base_type="ctrl" dimension="0"/>
<par name="Column1" base_type="ctrl" dimension="0"/>
<par name="Row2" base_type="ctrl" dimension="0"/>
<par name="Column2" base_type="ctrl" dimension="0"/>
</ic>
<oc>
<par name="overlap" base_type="ctrl" dimension="0"/>
</oc>
</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>
<l>gen_rectangle1 (Rectangle, Row1, Column1, Row2, Column2)</l>
<l>intersection (Candidate, Rectangle, RegionIntersection)</l>
<l>area_center (RegionIntersection, AreaIntersection, _, _)</l>
<l>union2 (Candidate, Rectangle, RegionUnion)</l>
<l>area_center (RegionUnion, AreaUnion, _, _)</l>
<c>* </c>
<l>if (AreaUnion&gt;0)</l>
<l>    overlap := real(AreaIntersection)/AreaUnion</l>
<l>else </l>
<l>    overlap := 0.0</l>
<l>endif</l>
<l>return ()</l>
</body>
<docu id="rectangle1_bb_overlap">
<parameters>
<parameter id="Candidate"/>
<parameter id="Column1"/>
<parameter id="Column2"/>
<parameter id="Row1"/>
<parameter id="Row2"/>
<parameter id="overlap"/>
</parameters>
</docu>
</procedure>
</hdevelop>
