H A N D B O OK OF Computer Vision Algorithms in Image Algebra second edition CuuDuongThanCong.com H A N D B O OK OF Computer Vision Algorithms in Image Algebra second edition Gerhard X Ritter Joseph N Wilson CRC Press Boca Raton London New York Washington, D.C CuuDuongThanCong.com disclaimer Page Monday, August 21, 2000 2:37 PM Library of Congress Cataloging-in-Publication Data Ritter, G X Handbook of computer vision algorithms in image algebra / Gerhard X Ritter, Joseph N Wilson. 2nd ed p cm Includes bibliographical references and index ISBN 0-8493-0075-4 (alk paper) Computer vision Mathematics Image processing Mathematics Computer algorithms I Wilson, Joseph N II Title TA1634 R58 2000 006.4′2 dc21 00-062122 This book contains information obtained from authentic and highly regarded sources Reprinted material is quoted with permission, and sources are indicated A wide variety of references are listed Reasonable efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, microfilming, and recording, or by any information storage or retrieval system, without prior permission in writing from the publisher The consent of CRC Press LLC does not extend to copying for general distribution, for promotion, for creating new works, or for resale Specific permission must be obtained in writing from CRC Press LLC for such copying Direct all inquiries to CRC Press LLC, 2000 N.W Corporate Blvd., Boca Raton, Florida 33431 Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation, without intent to infringe © 2001 by CRC Press LLC No claim to original U.S Government works International Standard Book Number 0-8493-0075-4 Library of Congress Card Number 00-062122 Printed in the United States of America Printed on acid-free paper CuuDuongThanCong.com Preface The present edition differs from the first in several significant aspects Typographical errors as well as several mathematical errors have been removed In a number of places the text has been revised to enhance clarity Several additional algorithms have been included as well as an entire new chapter on geometric image transformations By popular demand, and in order to provide a better understanding of image algebra, numerous exercises have been added at the end of each chapter Starred exercises at the end of a chapter depend on knowledge of material from subsequent chapters As with the first edition, the principal aim of this book is to acquaint engineers, scientists, and students with the basic concepts of image algebra and its use in the concise representation of computer vision algorithms In order to achieve this goal we provide a brief survey of commonly used computer vision algorithms that we believe represents a core of knowledge that all computer vision practitioners should have This survey is not meant to be an encyclopedic summary of computer vision techniques as it is impossible to justice to the scope and depth of the rapidly expanding field of computer vision The arrangement of the book is such that it can serve as a reference for computer vision algorithm developers in general as well as for algorithm developers using the image algebra C++ object library, iac++.1 The techniques and algorithms presented in a given chapter follow a progression of increasing abstractness Each technique is introduced by way of a brief discussion of its purpose and methodology Since the intent of this text is to train the practitioner in formulating his algorithms and ideas in the succinct mathematical language provided by image algebra, an effort has been made to provide the precise mathematical formulation of each methodology Thus, we suspect that practicing engineers and scientists will find this presentation somewhat more practical and perhaps a bit less esoteric than those found in research publications or various textbooks paraphrasing these publications Chapter provides a short introduction to the field of image algebra Chapters 2–12 are devoted to particular techniques commonly used in computer vision algorithm development, ranging from early processing techniques to such higher level topics as image descriptors and artificial neural networks Although the chapters on techniques are most naturally studied in succession, they are not tightly interdependent and can be studied according to the reader’s particular interest In the Appendix we present iac++ computer programs of some of the techniques surveyed in this book These programs reflect the image algebra pseudocode presented in the chapters and serve as examples of how image algebra pseudocode can be converted into efficient computer programs The iac++ library supports the use of image algebra in the C++ programming language and is available via anonymous ftp from ftp://ftp.cise.ufl.edu/pub/src/ia/ © 2001 by CRC Press LLC CuuDuongThanCong.com Acknowledgments We wish to take this opportunity to express our thanks to our current and former students who have, in various ways, assisted in the preparation of this text In particular, we wish to extend our appreciation to Dr Paul Gader, Dr Jennifer Davidson, Dr Hongchi Shi, Ms Brigitte Pracht, Dr Mark Schmalz, Mr Venugopal Subramaniam, Mr Mike Rowlee, Dr Dong Li, Dr Huixia Zhu, Ms Chuanxue Wang, Dr Jaime Zapata, and Mr Liang-Ming Chen We are most deeply indebted to Dr David Patching who assisted in the preparation of the text and contributed to the material by developing examples that enhanced the algorithmic exposition Special thanks are due to Mr Ralph Jackson, who skillfully implemented many of the algorithms herein, and to Mr Robert Forsman, the primary implementor of the iac++ library We also wish to thank Mr Jeffrey Palm for preparing the fractal and iterated function system images We wish to express our gratitude to those at Wright Laboratory for their encouragement and continuous support of image algebra research and development This book would not have been written without the vision and support provided by numerous scientists at the Wright Laboratory at Eglin Air Force Base in Florida These supporters include Dr Lawrence Ankeney who started it all, Dr Sam Lambert who championed the image algebra project since its inception, Mr Neil Urquhart our first program manager, Ms Karen Norris, and most especially Dr Patrick Coffield who persuaded us to turn a technical report on computer vision algorithms in image algebra into this book Last but not least we would like to thank Dr Robert Lyjack of ERIM and Dr Jasper Lupo of DARPA for their friendship and enthusiastic support during the formative stages of Image Algebra © 2001 by CRC Press LLC CuuDuongThanCong.com Notation The tables presented here provide a brief explantation of the notation used throughout this document The reader is referred to Ritter [1] for a comprehensive treatise covering the mathematics of image algebra Sets Theoretic Notation and Operations Symbol ✂✁☎✄✆✁✞✝ ✟ ✁✡✠☛✁✌☞ ✍✂✁✡✎✏✁✒✑ ✓ ✁✕✔✆✁☎✖ ✗ ✪ ✁ ✪✬✫ ✁ ✪✮✭ ✪✰✯ ✪✬✯✫ ✪✮✷ ✯ ❃ ✁ ❃❄✫ ✁ ❃❅✭ ✁ ❃❇❆❉❈ ❊ Explanation Uppercase characters represent arbitrary sets Lowercase characters represent elements of an arbitrary set Bold, uppercase characters are used to represent point sets Bold, lowercase characters are used to represent points, i.e., elements of point sets ✗✙✘✙✚✜✛ ✁✌✢✣✁✞✤☛✁✕✥☛✁✌✦✧✦★✦ ✩ The set The set of integers, positive integers, and negative integers, respectively ✪✯ ✱ ✘ ✚✲✛ ✁✧✢✣✁✧✦★✦✕✦★✁✕✳✵✴✶✢✧✩ ✪✬✯✫ ✱ ✘ ✚ ✢✣✁✞✤☛✁✧✦★✦✕✦★✁✞✳✰✩ The set ✪✬✷ ✯ ✸ ✘ ✚ ✴✹✳✻✺✼✢✽✁★✦✧✦✧✦✡✁✒✴✾✢✽✁ ✛ ✁★✢✽✁★✦✕✦★✦✒✁✿✳❀✴❁✢❂✩ The set The set The set of real numbers, positive real numbers, negative real numbers, and positive real numbers including 0, respectively ❋ The set of complex numbers ❋✭● ❋❄✷ ● The set ✤❂❏ ❑ ❑▲ ▼ The empty set (the set that has no elements) ❋❄● ■ © 2001 by CRC Press LLC CuuDuongThanCong.com An arbitrary set of values ❋ ✚✜❍ ✩ ❋ ✚✴ ❍ ✩ The set unioned with ❋ ✚✴ ❍ ✁❍ ✩ The set unioned with unioned with The power set of (the set of all subsets of "is an element of." "is not an element of." "is a subset of." ) Symbol ◆❖❘◗ ❖ ◆ ❵✽❛✲❜ ❵ ❖q ◆ r rts✮✉ ❖③ ◆ r rts✮✉ ◆⑩❘◗ ⑩ ◆ ❵✽❛✲❜ ❵ ⑩q ◆ r rts✮✉ ⑩③ ◆ r rts✮✉ ◆❾❽❬◗ ➆q ◆ r rts✮✉ ➆③ ◆ r rts✮✉ ➌q ◆➐➏❅◗ ◆④➓ ➔✌→➊➣✲↔ ↕➀ ◆④➄ ➔✌➙➜➛ ⑦ ➔★➝ ➀↕◆④➄ Explanation ◆❚❙❯◗❱✸❲✜❳✻❨✣❳✻❩❬◆❪❭✣❫✆❳✻❩❬◗✵❴ ❲✌◆ ❴ Let set ❝ ❖ ❵ ◆ ❵ ❵✽❛✲❱✸❜ ❲✜be❞❬❨✽a ❞❬family ❩❬◆ ❵❢of❡ ❭✣❫❄sets ❣✲❤❥✐❧❦✧indexed ❣✲♠✡❤❇❭✣♥☛❦✹by♦♣❩ an❝ indexing ❴ ❵✽❛✲❜ q❖ ◆ r ❱✇◆ ✉ ❙❯◆✵①❄❙✂②★②✧②✌❙✵◆ q r✈s✮✉ ❖③ ◆ r ❱✸❲★❞④❨✣❞❯❩❬◆ r✰❡ ❭✣❫⑤♠✕❭✣⑥✵❦✹⑦⑤❩④⑧✬⑨❅❴ r✈s✮✉ Intersection ◆❚❶❯◗❱✸❲✜❳✻❨✣❳✻❩❬◆❷❣✲♥❹❸✵❳❺❩④◗✵❴ ❲✌◆ ❴ Let ❝ ⑩ ❵ ◆ ❵ ❵✽❛✲❱✸❜ ❲✜be❞❬❨✽a ❞❬family ❩❬◆ ❵ of❡ ❭✣❫✆sets ❣❂✐❧✐☛indexed ♦♣❩ ❝ ❴ by an indexing set ❵✽❛✲❜ q⑩ ◆ ❱✇◆ ❶❯◆ ① ❶✂②★②✧②✌❶✵◆ q r✈s✮✉ r ✉ ⑩③ ◆ r ❱✸❲★❞④❨✣❞❯❩❬◆ r ❡ ❭✣❫❄❣❂✐❧✐☛⑦❻❩❼⑧✬⑨❄❴ r✈s✮✉ Cartesian product ◆❿❽❬◗❱✙❲✽➀➁❞✮➂✿➃✽➄➅❨✣❞❯❩④◆④➂✞➃✻❩❬◗✵❴ ➆ q ◆ r ❱✸❲✲➀➇❞ ✉ ➂✞❞❹①❂➂★②✧②★②✕➂✿❞ q ➄➅❨✣❞ r ❩➈◆ r ❴ r✈s✮✉ ➆ ③ ◆ r ❱✸❲✲➀➇❞ ✉ ➂✞❞❹①❂➂✿❞➊➉✒➋✜②✧②✧② ➄❅❨✣❞ r ❩④◆ r ❴ r✈s✮✉ ➌ ➌ q➎❱ ➆ q ➌ The Cartesian product of ➍ copies of , i.e., rts✮✉ Set difference ◆ ◗ Let ◆❚➏❅◗and ❱✸❲✜❞❯❩❬be◆❾subsets ❨✣❞✏❩❬➒ ◗✵of❴ some universal set ➑ , Union ◆➈➓✬❱ ➑ ➏❅◆ Complement , where ➑ is the universal set that contains ◆ The cardinality of the set A function that randomly selects an element from the set Point and Point Set Operations Symbol ➞➠➟❘➡ ➞❬➥✂➡ © 2001 by CRC Press LLC CuuDuongThanCong.com ◆ Explanation ❱ ➀☎❞ ✉ ➟ ➃ ✉ ➂✮②★②✧②➜➂☛❞ q ➟ ➃ q ➄ ➞ ➂ ➡ ♣❩ ➢❻q , then ➞✵➟➤➡ ✱ ➂ ♣❩ ➢❻q , then ➞❯➥✏➡ ✱ ❱ ➀☎❞ ✉ ➥ ➃ ✉ ➂✮②★②✧②➜➂☛❞ q ➥ ➃ q ➄ If ➞ ➡ If ◆ Symbol ➦④➧✞➨ ➦➚➾❂➨ ➦➠➪❯➨ ➦➠➶❯➨ ➦✬➹☛➨ ➱ ➹❥➦ ➦➚❐✕➨ ➦✏➴❯➨ ➦✌Đ ➨ Ð➅➦ Õ ➦☛Ư × ➦☛Ø Ù ➦➜Ú Û❥Ü í ị ò ỏ ỏ ỏ ỏ ỏ ỏỗ ốộíờ ỡ ỡ éớ ì ❒✏ø © 2001 by CRC Press LLC CuuDuongThanCong.com Explanation ➦❄➩✕➨✂➫♣➭❻➯ , then ➦❬➧✌➨④➲✸➳➁➵✰➸➻➺✽➸✲➩✬➼✧➼★➼➜➩❹➵ ➯ ➺ ➯❹➽ If ➦❄➩✕➨✂➫♣➭❻➯ , then ➦➚➾❂➨④➲✱➳☎➵✬➸✌➾✣➺✽➸★➩✮➼★➼✧➼➜➩☛➵ ➯ ➾✽➺ ➯☛➽ If ➦❄➩✕➨✂➫♣➭❻➯ , then ➦✵➪❯➨❼➲✙➳✡➵✰➸✰➪❬➺✽➸✲➩✬➼★➼✧➼✬➩☛➵ ➯ ➪❯➺ ➯❹➽ If ➦❄➩✕➨✂➫♣➭❻➯ , then ➦✵➶❯➨❼➲✙➳✡➵ ➸ ➶❬➺ ➸ ➩✬➼★➼✧➼✬➩☛➵ ➯ ➶❯➺ ➯ ➽ In general, if ➦❄➩✕➨✂➫❼➭⑤➯ , and ➹④➘✣➭➤➴④➭❼➷➬➭ , then ➦✬➹☛➨➮➲✸➳➁➵ ➸ ➹❹➺ ➸ ➩✬➼✧➼✧➼❹➩➜➵ ➯ ➹❹➺ ➯ ➽ ➱ ➫❼➭ ➦✂➫④➭⑤➯ ➹④➘✽➭✃➴❬➭✏➷➬➭ , then If ➱ ➹☛➦❼➲✸➳ ,➱ ➹➜➵ ➸ ➩✬➼★➼✧,➼➜and ➩ ➱ ➹❹➵ ➯ ➽ If ➦❄➩✕➨✂➫♣➭❻➯ , then ➦➚❐✕➨④➲✙➵✬➸✌➺✽➸❮❒✃➵➜❰✧➺✲❰❄❒❷➧✧➧★➧✬❒✃➵ ➯ ➺ ➯ If ➦❄➩✕➨✂➫♣➭❻➯ , then ➦✏➴➠➨❼➲✸➳➁➵ ❰ ➺✧Ï➅Ð✃➵❥Ï★➺ ❰ ➩☛➵❥Ï✲➺ ➸ Ð➮➵ ➸ ➺✧Ï➊➩☛➵ ➸ ➺ ❰ Ð✏➵ ❰ ➺ ➸ ➽ If ➦✂➫④➭⑤➯ and ➨✂➫♣➭❻Ị , then ➦✿Đ ➨❼➲✱➳☎➵✬➸✧➩➚➼✧➼★➼➜➩☛➵ ➯ ➩☛➺✽➸✜➩✬➼✧➼★➼✬➩☛➺ ỊĨ➽ If ➦✂➫④➭⑤➯ , then Ð➅➦♣➲Ô➳✿Ð✹➵ ➸ ➩➚➼✧➼✧➼❹➩➜Ð✹➵ ➯ ➽ Õ Õ Õ If ➦✂➫④➭⑤➯ , then ➦☛ƯĨ➲✸➳ ➵✬➸↕Ư❥➩➚➼✧➼★➼➜➩ ➵ ➯ Ư ➽ × × × If ➦✂➫④➭⑤➯ , then ➦☛ØÓ➲✸➳ ➵ ➸ Ø❥➩➚➼✧➼★➼➜➩ ➵ ➯ Ø ➽ Ù Ù Ù If ➦✂➫④➭⑤➯ , then ➦➜Ú❉➲✸➳ ➵ ➸ Ú✡➩✬➼★➼✧➼➜➩ ➵ ➯ Ú ➽ If ➦④➲✙➳✡➵ ➸ ➩✞➵ ❰ ➩✧➼✧➼★➼✕➩✿➵ ➯ ➽ ➫♣➭❻➯ , then Û❥Ü ➳Ý➦ ➽ ➲✶➵ Ü Þ If ➦✂➫④➭⑤➯ , then ➦➈➲✙➵✬➸⑤❒✃➵➜❰❄❒❷➧✧➧★➧✬❒✃➵ ➯ ß If ➦✂➫④➭⑤➯ , then ➦❬➲✼➵✰➸➻➵➜❰✻➧★➧✧➧➊➵ ➯ If ➦✂➫④➭⑤➯ , then ➪⑤➦➈➲✙➵✰➸✰➪❬➵➜❰❄➪à➧★➧✧➧❹➪✙➵ ➯ If ➦✂➫④➭⑤➯ , then ➶⑤➦➈➲✙➵ ➸ ➶❬➵ ❰ ➶à➧★➧✧➧❹➶✙➵ ➯ ❰ ❰ á If ➦✂➫④➭⑤➯ , then ➦ ❰ ➲àâ ➵ ➸ ❒ã➧★➧✧➧❹❒ä➵ ➯ á If ➦✂➫④➭⑤➯ , then ➦ ➸ ➲æå ➵✬➸✜å✒❒✼å ➵➜❰✣å✌❒❷➧✧➧✧➧❉❒ãå ➵ ➯ å ỏỗ ổồ ồồ ồổồ If , then ➦ è➊é↕ê ➳↕➦ ➽ ➲✙ë If ➦✂➫④➭⑤➯ , then ì ì ì➐ư ë è ➨✏➫➈í✂÷ If ớùợ , then ớủũúụừ ỡ ỡ ỡử ố ớữ If ➩✡íïỵð➭⑤➯ , then Ð④íđ➲✸ị★➦❯Ð✏➨ó➘ơ➦õ➫ ì ỵ✶➭⑤➯ and Û ➫④➭⑤➯ , then ì ❒✏ø❼➲✸ị★➦✵❒➤ø➐➘ơ➦④➫ ì ÷ If If Symbol Explanation ựỷỳỹ ự ự ự ựýỵ and ỵ , then ùæ☎✄ú✏✝ ❬úü ✡✠❼✆✟✞ ☛ü ✞ ✁ ù✌☞ ựùý ỵ , then ự ự If ựùý ỵ , then ự ự If ựùý ỵ If ự, then ự ự ựùý ỵ , then ự ự If ựýỵ , then ỳự ỳ If ự ỵ ự ựýỵ , then ự If ựýỵ íự supremum of ù If If ù✧✄✘✆✟✞❊❉✩✒❋✞✾, ●✹then ✒✚❍✟❍✟❍■✒❋✞ ÿ ☞✹✒ then the ❇✩❈ ✸Ý✲ù ✽✻✄❏✞❊❉▲❑✖✞✾●✻❑✓❍✩❍✟❍▼❑✱✞ ÿ ù For a ◆ point set order ❖ , ✞▲❁✄ ù✡◗❘✞ ❖ with total ự ựýỵ ự ự If ù✧✄✘✆✟✞ ❉ ✒❋✞ , ● then ✒✟❍✩❍✟❍✔✒❋✞ ÿ ☞ , thenthe❲❨✫✮❳❩☎ùinfimum ✲✸ ✽✻✄❏✞ of❉▲❬ ✞ ●❭If❬ ❍✩❍✟❍ ❬ ✞ ÿ ù For a ❪ point set total order ❖ , ✞ ✄ ù✡◗❘✞✮❫ ❖✛with ❴ ✒❯❚❱✞ ✁ ự ựýỵ , then If ❵✚❜ ✸☎✲ù ✽ ✁ ù❝✸❞✢✣✪✬✫✮✭✿✜✣❡✖❢❤❣ ❵✚❛ ✜ ❇✟❜ ✫ ❜ ựýỵ , then ✪✬✢✣↕ù✭❥✲✸ ✽❊✄❦✐ ❛❱❜✤❵ ✪✬✢✣✭✬❲❨✫✮✪✬❢❤❲❧❯ù✐■❣♠✜✣❳ In If ù✡✄✘✆✟✞ ❉ ✒✚♥✟♥✟♥✚✒✔✞ ÿ ☞ , then ❵ ✪✬✢✣↕ù✭❥✦✸ ✽❊✄♦✫ particular, if If ù✷✶✱✏ ú➅ù ù❄ ❇✣❈ ✸Ý✲ù ✽ ◆ ù ❲✺✫✮❳✮☎ù✦✸ ✽ ❪ ù ❵✚❛ ✣✜ ❲ ✩❵ ❜ ✸↕✦ù ✽ ❵ ✪✬✢✣↕ù✭❥✦✸ ✽ Morphology In the following table, Symbol ♣✖t ♣②① ♣②③ ♣ ✶✲q ♣✖❶ q ♣ ✒✔q✱✒▼r✓✒ and s Explanation CuuDuongThanCong.com ỵ ỵ ỵ The complement of ♣ ; i.e., ✑ ♣②③ ✄✝✆✩④⑥⑤⑧⑦⑨✠✣④ ✌ ✁ ♣ ☞ Minkowski addition is defined as ♣ ✶✌q✘✄★✆✩④♠⑤⑩⑦⑨✠✣④ ✁✌♣ ✒❋⑦ ✁ q②☞ (Section 7.2) q❷✄✝✸ ♣②① ✶✌q t ✽ ① Minkowski subtraction is defined as ♣✱❶ The reflection of (Section 7.2) © 2001 by CRC Press LLC denote subsets of ♣ across the origin Symbol Explanation ❸❷❹❁❺ ❸ ❺ is denoted ❸✘❹❁❺ and is defined by ❸✘❹❁❺❷❻✘❼❞❸✱❽✹❺❿❾➁➀✲by❺ (Section 7.3) ❸ ❺ is denoted ❸✕➂❁❺ and is defined by The closing ❸✘➂❁❺❷ ❻✘❼❞❸➃of➀✂❺❿❾✔by❽❙❺ (Section 7.3) ➆ ➅ ★ ❻ ✇ ❼ ✓ ➇ ✔ ➈ ☛ ➉ ❾ Let be an ordered pair of structuring elements ❸ is given by The hit-and-miss ❸✘➄❏➅➆❻★➊✚➋✴➌✹➇✑➍✦transform ➎➏❸➑➐✣➒❱➓✑of➉➔the ➍✱➎✛set❸✑→✺➣ (Section 7.5) The opening of ❸❷➂❁❺ ❸❷➄✴➅ Functions and Scalar Operations Symbol ↔ ✣➌ ↕✗➙➜➛ ➞✬➟✣➠✱➡✬➢❞➤ ❼ ↔ ❾ ➥ ➡✬➤➧➦✿➨ ❼ ↔ ❾ ❆↔ ➯❆➲ ➛❿➳ ↔✻➸ ➺ ↔❊➸ ➼ ➦ ❹↔ ↔❿➱ ➦ ↔✖✃ ➦ ❐ ✃✩↔ ➸ ↔❊➸ © 2001 by CRC Press LLC CuuDuongThanCong.com ↔ is a function from ↕ Explanation into ➛❁➝ ↔ ✣➌ ↕✗➙➜➛ is the set ↕✌➝ ↔ ➌✣↕✗➙➜➛ is the set The of the function ↔➊ ❼❯➩➧range ❾➁➌✿➩✖➫✦↕➭➣ ↔ The inverse of the function ↔ ➫✲➛❿➳ , then ↕ ➛ The ↔ ➌➵↕✳set➙➜of➛➁all➝ functions from into , i.e., if ↔ ➌❙↕✳➙➜➛ and a subset ➻ ➎➏↕ , the Given a function ↔ ↔▲➸ ➺ ➌ ➙➜➛ , is defined by to ➻ ➡ , restriction ↔▲➸ ➺ ❼ ➡ ❾❊❻ ↔ of❼ ➡ ❾ for ➫ ➻ ➻ ↔ ➌ ➻ ➙➜➛ and ➦ ➌✹➽✘➙➜➛ , the extension of ↔ to ➦ is Given ❾➪➚➹➶❭➩✖➫ ➻ ↔❊➸ ➼ ❼✔➩➧❾❊❻❂➾ ➦↔ ❼✇❼✔➩➧➩❱❾➘ ➚➹➶❭➩✖➫☎➽✴➴ ➻ ➝ defined by ↔ ➌✣↕➷➙➜➛ and ➦ ➌✹➛✘➙❘➬ , the Given two functions ➦ ↔ ❹ ✣ ➌ ✗ ↕ ➙❘➬ is defined by composition ❼ ➦ ❹ ↔ ❾➮❼✇➩➧❾❊❻ ➦ ❼ ↔ ❼✔➩❱❾❋❾ , for every ➩✖➫✌↕ ↔ ➦ Let ➦ and be real or➦ complex-valued functions, then ❼ ↔❿➱ ❾▼❼✔➩➧❾▲❻ ↔ ❼❯➩➧❾ ➱ ❼✔➩❱❾ ↔ ➦ be real or complex-valued functions, then Let ❼ ↔✖✃ ➦ ❾▼and ❼❞➩❱❾❊❻ ↔ ❼✔➩➧❾ ✃ ➦ ❼❞➩❱❾ ↔ Let be a real or complex-valued ↔ ➫✂❮Ï❰ , function, ❼ ❐ ✃✟↔ ❾Ð❼❞➩❱❾❊and ❻ ❐ ❒ ✃ be❼ ↔ ❼✔a➩➧❾✔real ❾ or complex number, then ➸ ↔❊➸ ❼✇➩➧❾✻❻ ➸ ↔ ❼✇➩➧❾ ➸ , where ↔ is a real (or complex)-valued ➸ ↔ ❼✇➩➧❾ ➸ denotes the absolute value (or function, and ↔ ❼✔➩❱❾ magnitude) of The domain of the function 398 APPENDIX THE IMAGE ALGEBRA C++ LIBRARY #include "hough.h" #include "math.h" #include static const double HoughPi = atan(1.0)*4.0; static double *HoughCos; static double *HoughSin; static static static static static static int RhoCells; int ThetaCells; IA_Point IterationMin; IA_Point IterationMax; IA_Point ImageSize; IA_Point Delta; // // hough_initialize: // // Initializes parameters for HoughFunction to allow a neighborhood // to be created for given image and accumulator image point sets // void hough_initialize (IA_Set image_domain, IA_Set accumulator_domain) { // // Check to make sure the image domain and accumulator domain // are both dimensional rectangular point sets // if (!image_domain.boxy() || !accumulator_domain.boxy() || image_domain.dim() != || accumulator_domain.dim() != 2) { cerr