You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
114 CHAPTER 5. PROGRAM EXAMPLES<br />
Figure 5.19: Search areas for markings (left) and segmentation (right).<br />
ÅÒËÞ ¿¼<br />
×Ø×Ý×ØÑ ´³ÒØÒÛѳ¸ ³Ð׳µ<br />
ÖÑ ´ÅÓØÓÖÛݸ ³ÑÓØÓÖÛݳµ<br />
ÓÙÒØ×ÓÒ× ´ËÓÒ×½µ<br />
ÒÖÖÓÒ ´Ö¸ ÅÒËÞ¸ ÅÒËÞ¸ ³ÐÒ׳¸ ½¾¸ ½¾µ<br />
ÐÔÖÓÒ ´Ö¸ ÖÊÓ¸ ½¿¼¸ ½¼¸ ¼¸ ¼¾µ<br />
ÖÙÓÑÒ ´ÅÓØÓÖÛݸ ÖÊÓ¸ Å×µ<br />
×ÓÐÑÔ ´Å׸ ÖÒظ ³×ÙÑ׳¸ ¿µ<br />
ØÖ×ÓÐ ´ÖÒظ ÈÓÒØ׸ ¼¸ ¾µ<br />
ÐØÓÒÖØÒн ´ÈÓÒØ׸ ÊÓÒÐØÓÒ¸ ÅÒËÞ¸ ÅÒËÞµ<br />
ÖÙÓÑÒ ´ÅÓØÓÖÛݸ ÊÓÒÐØÓÒ¸ ËÒ×Öݵ<br />
ØÖ×ÓÐ ´ËÒ×Öݸ ËÒ׸ ½¼¸ ¾µ<br />
ÓÙÒØ×ÓÒ× ´ËÓÒ×¾µ<br />
ÌÑ ËÓÒ×¾¹ËÓÒ×½<br />
Ú×ÔÐÝ ´ËÒ×µ<br />
First you create a grid by using Ò Ö ÖÓÒ. It is reduced to the lower image half with<br />
ÐÔ ÖÓÒ. The operator ÖÙ ÓÑÒ creates an image containing this pattern as definition<br />
range. This image is passed to the operator ×ÓÐ ÑÔ. You obtain pixels with high<br />
gradient values using ØÖ×ÓÐ. These pixels are enlarged to the region of interest (ROI) by a<br />
dilation with a rectangular mask. Within this region another thresholding is performed. Correct<br />
road markings are equivalent to bright areas in the search window (ROI).<br />
The HALCON program needs an average of 20 ms on a standard Pentium. Notice that this is<br />
even possible under the following restrictions:<br />
1. Only standard operators have been used.<br />
2. Only encapsulated data structures have been used.<br />
3. Despite optimization the program is quite comprehensible.<br />
4. The program is very short.<br />
This example shows that you can write efficient programs even while using complex data struc-<br />
<strong>HDevelop</strong> / 2000-11-16