{"id":251,"date":"2023-12-31T19:04:55","date_gmt":"2023-12-31T19:04:55","guid":{"rendered":"https:\/\/alandix.com\/aibook\/?page_id=251"},"modified":"2023-12-31T19:04:55","modified_gmt":"2023-12-31T19:04:55","slug":"chap12","status":"publish","type":"page","link":"https:\/\/alandix.com\/aibook\/second-edition\/toc2e\/chap12\/","title":{"rendered":"Chapter 12 \u2013 Computer vision"},"content":{"rendered":"<div class=\"embedurl\" data-url=\"https:\/\/alandix.com\/books\/aibook\/content\/chaps\/chap12.html\" ><!--  Chapter 12 Computer Vision  -->\n\n<script>\nvar chapnos = 12;\nvar json_url = \"https:\\\/\\\/alandix.com\\\/books\\\/aibook\\\/content\\\/chaps\\\/chap12.json\";\n<\/script>\n\n\n\n\n\t<object style=\"width:100%; aspect-ratio: 10 \/ 7;\" type=\"application\/pdf\" data=\"https:\/\/alandix.com\/books\/aibook\/content\/slides-pdf\/AI-chap-12.pdf\"><\/object>\n\t<p> Download <a href=\"https:\/\/alandix.com\/books\/aibook\/content\/slides-pptx\/AI-chap-12.pptx\" download>chapter slides<\/a><\/p>\n\n\n<h3> Contents <\/h3>\n<div class=\"toc\">\n<dl>\n<dt>12.1&nbsp;&nbsp;Overview<\/dt>\n<dt>12.2&nbsp;&nbsp;Introduction<\/dt><dd><dl>\n<dt>12.2.1&nbsp;&nbsp;Why Computer Vision Is Difficult<\/dt>\n<dt>12.2.2&nbsp;&nbsp;Phases of Computer Vision<\/dt>\n<\/dl><\/dd>\n<dt>12.3&nbsp;&nbsp;Digitisation and Signal Processing<\/dt><dd><dl>\n<dt>12.3.1&nbsp;&nbsp;Digitising Images<\/dt>\n<dt>12.3.2&nbsp;&nbsp;Thresholding<\/dt>\n<dt>12.3.3&nbsp;&nbsp;Digital Filters<\/dt><dd><dl>\n<dt>12.3.3.1&nbsp;&nbsp;Linear Filters<\/dt>\n<dt>12.3.3.2&nbsp;&nbsp;Smoothing<\/dt>\n<dt>12.3.3.3&nbsp;&nbsp;Gaussian Filters<\/dt>\n<dt>12.3.3.4&nbsp;&nbsp;Practical Considerations<\/dt>\n<\/dl><\/dd>\n<\/dl><\/dd>\n<dt>12.4&nbsp;&nbsp;Edge Detection<\/dt><dd><dl>\n<dt>12.4.1&nbsp;&nbsp;Identifying Edge Pixels<\/dt><dd><dl>\n<dt>12.4.1.1&nbsp;&nbsp;Gradient Operators<\/dt>\n<dt>12.4.1.2&nbsp;&nbsp;Robert&#039;s Operator<\/dt>\n<dt>12.4.1.3&nbsp;&nbsp;Sobel&#039;s Operator<\/dt>\n<dt>12.4.1.4&nbsp;&nbsp;Laplacian Operator<\/dt>\n<dt>12.4.1.5&nbsp;&nbsp;Successive Refinement and Marr&#039;s Primal Sketch<\/dt>\n<\/dl><\/dd>\n<dt>12.4.2&nbsp;&nbsp;Edge Following<\/dt>\n<\/dl><\/dd>\n<dt>12.5&nbsp;&nbsp;Region Detection<\/dt><dd><dl>\n<dt>12.5.1&nbsp;&nbsp;Region Growing<\/dt>\n<dt>12.5.2&nbsp;&nbsp;The Problem of Texture<\/dt>\n<dt>12.5.3&nbsp;&nbsp;Representing Regions -- Quadtrees<\/dt>\n<dt>12.5.4&nbsp;&nbsp;Computational Problems<\/dt>\n<\/dl><\/dd>\n<dt>12.6&nbsp;&nbsp;Reconstructing Objects<\/dt><dd><dl>\n<dt>12.6.1&nbsp;&nbsp;Inferring Three-Dimensional Features<\/dt><dd><dl>\n<dt>12.6.1.1&nbsp;&nbsp;Problems with Labelling<\/dt>\n<\/dl><\/dd>\n<dt>12.6.2&nbsp;&nbsp;Using Properties of Regions<\/dt>\n<\/dl><\/dd>\n<dt>12.7&nbsp;&nbsp;Identifying Objects<\/dt><dd><dl>\n<dt>12.7.1&nbsp;&nbsp;Using Bitmaps<\/dt>\n<dt>12.7.2&nbsp;&nbsp;Using Summary Statistics<\/dt>\n<dt>12.7.3&nbsp;&nbsp;Using Outlines<\/dt>\n<dt>12.7.4&nbsp;&nbsp;Using Paths<\/dt>\n<\/dl><\/dd>\n<dt>12.8&nbsp;&nbsp;Facial and Body Recognition<\/dt>\n<dt>12.9&nbsp;&nbsp;Neural Networks for Images<\/dt><dd><dl>\n<dt>12.9.1&nbsp;&nbsp;Convolutional Neural Networks<\/dt>\n<dt>12.9.2&nbsp;&nbsp;Autoencoders<\/dt>\n<\/dl><\/dd>\n<dt>12.10&nbsp;&nbsp;Generative Adversarial Networks<\/dt><dd><dl>\n<dt>12.10.1&nbsp;&nbsp;Generated Data<\/dt>\n<dt>12.10.2&nbsp;&nbsp;Diffusion Models<\/dt>\n<dt>12.10.3&nbsp;&nbsp;Bottom-up and Top-down Processing<\/dt>\n<\/dl><\/dd>\n<dt>12.11&nbsp;&nbsp;Multiple Images<\/dt><dd><dl>\n<dt>12.11.1&nbsp;&nbsp;Stereo Vision<\/dt>\n<dt>12.11.2&nbsp;&nbsp;Moving Pictures<\/dt>\n<\/dl><\/dd>\n<dt>12.12&nbsp;&nbsp;Summary<\/dt>\n<\/dl><\/div>\n\n\n<h3> Glossary items referenced in this chapter <\/h3>\n<div class=\"toc\">\n<a href=\"https:\/\/alandix.com\/glossary\/aibook\/accuracy\">accuracy<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/active%20vision\">active vision<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/ambiguous%20image\">ambiguous image<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/aspect%20ratio\">aspect ratio<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/auto-associative%20memory\">auto-associative memory<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/autoencoder\">autoencoder<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/backpropagation\">backpropagation<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/bayes%20theorem\">Bayes Theorem<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/binary%20image\">binary image<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/bitmap%20image\">bitmap image<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/boltzmann%20machine\">Boltzmann machine<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/bottom-up%20reasoning\">bottom-up reasoning<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/camera%21pan\">camera!pan<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/camera%21zoom\">camera!zoom<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/clustering\">clustering<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/connectionist%20model\">connectionist model<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/constraint%20satisfaction\">constraint satisfaction<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/constraints\">constraints<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/contour%20following\">contour following<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/convolutional%20neural%20network\">convolutional neural network<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/convolutions\">convolutions<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/correlation\">correlation<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/crowdsourcing\">crowdsourcing<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/data%20structure\">data structure<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/database\">database<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/deep%20fakes\">deep fakes<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/deep%20neural%20network\">deep neural network<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/differential%20%28calculus%29\">differential (calculus)<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/diffusion%20models\">diffusion models<\/a><\/strong>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/digital%20filtering\">digital filtering<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/digital%20signal%20processing\">digital signal processing<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/digitisation\">digitisation<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/edge%20detection\">edge detection<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/edge%20following\">edge following<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/emotion%20recognition\">emotion recognition<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/facial%20recognition\">facial recognition<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/false%20positive\">false positive<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/frame%20of%20video\">frame of video<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/game%20playing\">game playing<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/gaussian%20filter\">Gaussian filter<\/a><\/strong>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/generative%20adversarial%20network\">generative adversarial network<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/geographic%20information%20system\">geographic information system<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/geometric%20constraints\">geometric constraints<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/gesture%20recognition\">gesture recognition<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/google\">Google<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/gradient%20descent\">gradient descent<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/gradient%20operators\">gradient operators<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/graphics%20processing%20unit\">graphics processing unit<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/grey-scale%20image\">grey-scale image<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/ground%20truth\">ground truth<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/handwriting%20recognition\">handwriting recognition<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/heuristic%20evaluation%20function\">heuristic evaluation function<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/hopfield%20networks\">Hopfield networks<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/human%20perception\">human perception<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/hybrid%20architecture\">hybrid architecture<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/image%20thresholding\">image thresholding<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/image%20understanding\">image understanding<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/labelling\">labelling<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/laplacian%20operator\">Laplacian operator<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/laplacian-of-gaussian%20filter\">Laplacian-of-Gaussian filter<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/line%20labelling\">line labelling<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/linear%20filter\">linear filter<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/machine%20learning\">machine learning<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/marr%27s%20primal%20sketch\">Marr&#039;s primal sketch<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/moving%20images\">moving images<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/multiple%20images\">multiple images<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/neural%20network\">neural network<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/neural-network%20architecture\">neural-network architecture<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/normal%20distribution\">Normal distribution<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/normalisation\">normalisation<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/object%20identification\">object identification<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/object%20identification%21bitmaps\">object identification!bitmaps<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/object%20identification%21outlines\">object identification!outlines<\/a><\/strong>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/object%20identification%21paths\">object identification!paths<\/a><\/strong>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/object%20identification%21summary%20statistics\">object identification!summary statistics<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/object%20recognition\">object recognition<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/ocr\">OCR (optical character recognition)<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/octree\">octree<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/optical%20flow\">optical flow<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/parallax\">parallax<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/parallel%20processing\">parallel processing<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/pattern%20matching\">pattern matching<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/pen-based%20systems\">pen-based systems<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/position%20independent\">position independent<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/pre-processing\">pre-processing<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/privacy\">privacy<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/quadtree\">quadtree<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/reasoning%20with%20uncertainty\">reasoning with uncertainty<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/receptive%20field\">receptive field<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/region%20detection\">region detection<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/region%20growing\">region growing<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/restricted%20boltzmann%20machine\">restricted Boltzmann machine<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/ridge\">ridge<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/robert%27s%20operator\">Robert&#039;s operator<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/robotics\">robotics<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/segmentation\">segmentation<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/sensation\">sensation<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/sensor%20fusion\">sensor fusion<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/sharpening%20filters\">sharpening filters<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/signal%20processing\">signal processing<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/similarity%20measure\">similarity measure<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/skynet%20project\">Skynet<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/smoothing\">smoothing<\/a><\/strong>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/sobel%27s%20operator\">Sobel&#039;s operator<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/standard%20deviation\">standard deviation<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/stereo%20vision\">stereo vision<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/successive%20refinement\">successive refinement<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/template%20matching\">template matching<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/texture\">texture<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/three-dimensional%20objects\">three-dimensional objects<\/a>, <strong><a href=\"https:\/\/alandix.com\/glossary\/aibook\/threshold\">threshold<\/a><\/strong>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/time%20series\">time series<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/unsupervised%20learning\">unsupervised learning<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/voxel\">voxel<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/waltz%27s%20algorithm\">Waltz&#039;s algorithm<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/wavelet%20transform\">wavelet transform<\/a>, <a href=\"https:\/\/alandix.com\/glossary\/aibook\/zero-sum%20game\">zero-sum game<\/a><\/div>\n\n\n\n<h3> Prolog examples (from 1st ed.) <\/h3>\n<!--  Chapter 12 - Computer vision  -->\n\n<table class=\"prolog-listing\">\n\n<tr valign=\"top\"><td class=\"filename\"><a href=\"https:\/\/alandix.com\/code\/ai96\/prolog\/view\/ch8\/eximages.p\">eximages.p<\/a><\/td><td>image processing utilities<br>images from examples in book<\/td>\n<\/tr>\n<\/td><\/tr><tr valign=\"top\"><td class=\"filename\"><a href=\"https:\/\/alandix.com\/code\/ai96\/prolog\/view\/ch8\/image.p\">image.p<\/a><\/td><td><p>image processing utilities<br>simple representation of a pixel image<\/td>\n<\/tr>\n<\/td><\/tr><tr valign=\"top\"><td class=\"filename\"><a href=\"https:\/\/alandix.com\/code\/ai96\/prolog\/view\/ch8\/gimage.p\">gimage.p<\/a><\/td><td><p>image processing utilities<br>the 'gimage' representation of a pixel image<\/td>\n<\/tr>\n<\/td><\/tr><tr valign=\"top\"><td class=\"filename\"><a href=\"https:\/\/alandix.com\/code\/ai96\/prolog\/view\/ch8\/filter.p\">filter.p<\/a><\/td><td>digital filters<br>gradient filters<\/td>\n<\/tr>\n\n<tr valign=\"top\"><td class=\"filename\"><a href=\"https:\/\/alandix.com\/code\/ai96\/prolog\/view\/ch8\/threshold.p\">threshold.p<\/a><\/td><td>thresholding<\/td>\n<\/tr>\n\n<\/table\n\n\n\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":221,"menu_order":12,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"class_list":["post-251","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/alandix.com\/aibook\/wp-json\/wp\/v2\/pages\/251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alandix.com\/aibook\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/alandix.com\/aibook\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/alandix.com\/aibook\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alandix.com\/aibook\/wp-json\/wp\/v2\/comments?post=251"}],"version-history":[{"count":3,"href":"https:\/\/alandix.com\/aibook\/wp-json\/wp\/v2\/pages\/251\/revisions"}],"predecessor-version":[{"id":302,"href":"https:\/\/alandix.com\/aibook\/wp-json\/wp\/v2\/pages\/251\/revisions\/302"}],"up":[{"embeddable":true,"href":"https:\/\/alandix.com\/aibook\/wp-json\/wp\/v2\/pages\/221"}],"wp:attachment":[{"href":"https:\/\/alandix.com\/aibook\/wp-json\/wp\/v2\/media?parent=251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}