diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index ea1c09609..1de5ef504 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -26,6 +26,7 @@ //= require blacklight_gallery //= require blacklight_heatmaps //= require blacklight_oembed +//= require full_text_collapse //= require index_status_typeahead //= require nested_related_items //= require openseadragon @@ -37,4 +38,3 @@ // For blacklight_range_limit built-in JS, if you don't want it you don't need // this: //= require 'blacklight_range_limit' - diff --git a/app/assets/javascripts/full_text_collapse.js b/app/assets/javascripts/full_text_collapse.js new file mode 100644 index 000000000..cf554e164 --- /dev/null +++ b/app/assets/javascripts/full_text_collapse.js @@ -0,0 +1,21 @@ +Blacklight.onLoad(function(){ + var uniqueId = (function() { + var uuid = 0; + + return function(el) { + el.id = 'ui-id-' + ( ++uuid ); + }; + } )(); + + $('dd.blacklight-full_text_tesimv').addClass('collapse').each(function() { + $(this).attr('id', uniqueId(this)); + }); + + $('dt.blacklight-full_text_tesimv').each(function() { + $(this).text($(this).text().replace(/:$/, '')); + $(this).attr('data-toggle', 'collapse'); + $(this).attr('data-target', '#' + $(this).next('dd').attr('id')); + }); + + $('dd.blacklight-full_text_tesimv').collapse({ toggle: false }); +}); diff --git a/app/assets/stylesheets/base.scss b/app/assets/stylesheets/base.scss index 38ed92266..77a9d7966 100644 --- a/app/assets/stylesheets/base.scss +++ b/app/assets/stylesheets/base.scss @@ -12,3 +12,4 @@ @import "viewers"; @import "modules/view_metadata"; @import "modules/related_item"; +@import "modules/full_text_highlight"; diff --git a/app/assets/stylesheets/modules/full_text_highlight.scss b/app/assets/stylesheets/modules/full_text_highlight.scss new file mode 100644 index 000000000..ba5cdf5c5 --- /dev/null +++ b/app/assets/stylesheets/modules/full_text_highlight.scss @@ -0,0 +1,32 @@ +dt.blacklight-full_text_tesimv { + @extend .h4; + cursor: pointer; + display: inline-block; + float: none; + text-align: initial; + width: auto; + // collapse carets shamelessly stolen from blacklight facets + &[data-toggle="collapse"]::after { + // symbol for "opening" panels + content: "\e114"; + float: right; + font-family: "Glyphicons Halflings"; + font-size: 0.8em; + line-height: normal; + padding-left: 2ch; + } + + &.collapsed:after { + // symbol for "collapsed" panels + content: "\e080"; + } +} + +dd.blacklight-full_text_tesimv { + float: none; + margin-left: 0; + + em { + font-weight: bold; + } +} diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 963116e8f..c6f839af7 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -24,7 +24,13 @@ class CatalogController < ApplicationController ## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params config.default_solr_params = { qt: 'search', - fl: '*' + fl: '*', + hl: true, + 'hl.fl' => 'full_text_tesimv', + 'hl.snippets' => 5, + 'hl.fragsize' => 240, + 'hl.mergeContiguous' => true, + 'hl.useFastVectorHighlighter' => true } config.default_autocomplete_solr_params = { @@ -208,6 +214,15 @@ class CatalogController < ApplicationController config.add_index_field 'manuscript_number_tesim', label: 'Manuscript number' config.add_index_field 'range_labels_tesim', label: 'Section' config.add_index_field 'related_document_id_ssim', label: 'Manuscript', helper_method: :manuscript_link + config.add_index_field( + 'full_text_tesimv', + if: lambda do |context, field_config, document| + full_text_highlight_exists_in_response?(context, field_config, document) + end, + label: 'Preview matches in document text', + highlight: true, + helper_method: :render_fulltext_highlight + ) # "fielded" search configuration. Used by pulldown among other places. # For supported keys in hash, see rdoc for Blacklight::SearchFields # @@ -352,4 +367,13 @@ def metadata def start_new_search_session? super && params[:format] != 'json' end + + class << self + def full_text_highlight_exists_in_response?(context, config, document) + response = context.instance_variable_get(:@response) + document_highlight = response['highlighting'][document['id']] + return true if document_highlight.present? && document_highlight[config.key].present? + false + end + end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2dfef51f2..62631aef6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -25,6 +25,15 @@ def iiif_drag_n_drop(manifest, width: '40px') end end + def render_fulltext_highlight(args) + return if args[:value].blank? + safe_join(args[:value].map do |val| + content_tag('p') do + val + end + end, '') + end + ## # Renders a viewer for an object with understanding of the context. In the # context of spotlight/catalog render the configured viewer. In other contexts diff --git a/spec/features/full_text_highlight_spec.rb b/spec/features/full_text_highlight_spec.rb new file mode 100644 index 000000000..f0341326d --- /dev/null +++ b/spec/features/full_text_highlight_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.feature 'Full text highlighting' do + let(:exhibit) { create(:exhibit) } + let(:dor_harvester) { DorHarvester.new(druid_list: druid, exhibit: exhibit) } + + before do + allow(Spotlight::Engine.config).to receive(:filter_resources_by_exhibit).and_return(false) + visit spotlight.search_exhibit_catalog_path(exhibit, q: 'structure') + end + + it 'shows the full-text hightlight field and provides a toggle', js: true do + expect(page).to have_css('dt', text: 'Preview matches in document text') + + expect(page).not_to have_css('dd p', text: 'about need for data structures capable of storing', visible: true) + page.find('dt', text: 'Preview matches in document text').click + expect(page).to have_css('dd p', text: 'about need for data structures capable of storing', visible: true) + end +end diff --git a/spec/fixtures/sample_solr_docs.json b/spec/fixtures/sample_solr_docs.json index 94fc7ab5b..287ba591c 100644 --- a/spec/fixtures/sample_solr_docs.json +++ b/spec/fixtures/sample_solr_docs.json @@ -2741,5 +2741,61 @@ "\"Engraved by J. Bartholomew Edin.r.\"", "In lower right corner: 36." ] + }, + { + "id": "zy575vf8599", + "exhibit_default-exhibit_public_bsi": true, + "spotlight_exhibit_slug_default-exhibit_bsi": true, + "spotlight_resource_id_ssim": null, + "spotlight_resource_type_ssim": "dor_harvesters", + "collection": ["ms016pb9280"], + "collection_with_title": ["Edward A. Feigenbaum papers, 1950-2007 (inclusive)-|-ms016pb9280"], + "author_person_facet": ["A. Rosenfeld"], + "author_person_display": ["A. Rosenfeld"], + "author_person_full_display": ["A. Rosenfeld"], + "topic_display": ["Proposal", "Artificial intelligence", "Expert systems (Computer science)", "Computer science"], + "topic_facet": ["Artificial intelligence", "Expert systems (Computer science)", "Computer science"], + "format_main_ssim": ["Book"], + "language": ["English"], + "physical": ["1 document ; 25 pages"], + "url_suppl": ["https://purl.stanford.edu/ms016pb9280"], + "date_ssim": ["1975-7", ""], + "author_no_collector_ssim": ["A. Rosenfeld"], + "genre_ssim": ["Proposal"], + "identifier_ssim": ["SC0340_1986-052_zy575vf8599"], + "content_metadata_type_ssim": ["book"], + "content_metadata_type_ssm": ["book"], + "content_metadata_first_image_file_name_ssm": ["zy575vf8599_00001"], + "content_metadata_first_image_width_ssm": ["2635"], + "content_metadata_first_image_height_ssm": ["3423"], + "content_metadata_image_iiif_info_ssm": ["https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00001/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00002/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00003/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00004/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00005/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00006/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00007/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00008/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00009/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00010/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00011/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00012/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00013/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00014/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00015/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00016/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00017/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00018/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00019/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00020/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00021/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00022/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00023/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00024/info.json", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00025/info.json"], + "thumbnail_square_url_ssm": ["https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00001/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00002/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00003/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00004/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00005/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00006/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00007/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00008/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00009/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00010/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00011/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00012/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00013/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00014/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00015/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00016/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00017/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00018/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00019/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00020/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00021/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00022/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00023/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00024/square/100,100/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00025/square/100,100/0/default.jpg"], + "thumbnail_url_ssm": ["https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00001/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00002/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00003/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00004/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00005/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00006/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00007/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00008/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00009/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00010/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00011/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00012/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00013/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00014/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00015/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00016/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00017/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00018/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00019/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00020/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00021/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00022/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00023/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00024/full/!400,400/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00025/full/!400,400/0/default.jpg"], + "large_image_url_ssm": ["https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00001/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00002/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00003/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00004/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00005/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00006/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00007/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00008/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00009/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00010/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00011/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00012/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00013/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00014/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00015/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00016/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00017/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00018/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00019/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00020/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00021/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00022/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00023/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00024/full/!1000,1000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00025/full/!1000,1000/0/default.jpg"], + "full_image_url_ssm": ["https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00001/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00002/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00003/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00004/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00005/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00006/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00007/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00008/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00009/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00010/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00011/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00012/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00013/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00014/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00015/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00016/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00017/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00018/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00019/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00020/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00021/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00022/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00023/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00024/full/!3000,3000/0/default.jpg", "https://stacks.stanford.edu/image/iiif/zy575vf8599%2Fzy575vf8599_00025/full/!3000,3000/0/default.jpg"], + "donor_tags_ssim": ["AI", "ARPA", "CS 225"], + "general_notes_ssim": ["Proposal (1975/7); p. 25"], + "identifier_displayLabel_ssim": ["Source ID-|-SC0340_1986-052_zy575vf8599"], + "repository_ssim": ["Stanford University. Libraries. Department of Special Collections and University Archives"], + "modsxml": "\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cmods xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.loc.gov/mods/v3\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-5.xsd\" version=\"3.5\"\u003e\n \u003ctypeOfResource\u003etext\u003c/typeOfResource\u003e\n \u003cgenre\u003eProposal\u003c/genre\u003e\n \u003ctitleInfo\u003e\n \u003ctitle\u003eProposal to ARPA and \"Computer Vision\" by A. Rosenfeld, July 28, 1975\u003c/title\u003e\n \u003c/titleInfo\u003e\n \u003cname type=\"personal\" usage=\"primary\"\u003e\n \u003cnamePart\u003eA. Rosenfeld\u003c/namePart\u003e\n \u003crole\u003e\n \u003croleTerm type=\"text\" authority=\"marcrelator\" authorityURI=\"http://id.loc.gov/vocabulary/relators\" valueURI=\"http://id.loc.gov/vocabulary/relators/cre\"\u003eCreator\u003c/roleTerm\u003e\n \u003c/role\u003e\n \u003c/name\u003e\n \u003coriginInfo\u003e\n \u003cdateCreated encoding=\"w3cdtf\" keyDate=\"yes\"\u003e1975-7\u003c/dateCreated\u003e\n \u003cissuance\u003emonographic\u003c/issuance\u003e\n \u003c/originInfo\u003e\n \u003cphysicalDescription\u003e\n \u003cextent\u003e1 document ; 25 pages\u003c/extent\u003e\n \u003cdigitalOrigin\u003ereformatted digital\u003c/digitalOrigin\u003e\n \u003cinternetMediaType\u003eapplication/pdf\u003c/internetMediaType\u003e\n \u003c/physicalDescription\u003e\n \u003cnote type=\"preferred citation\"\u003eCall Number: SC0340, Accession: 1986-052, Box: 39, Folder: 1, Title: AI Handbook 1975\u003c/note\u003e\n \u003cnote displayLabel=\"Donor tags\"\u003eAI\u003c/note\u003e\n \u003cnote displayLabel=\"Donor tags\"\u003eARPA\u003c/note\u003e\n \u003cnote displayLabel=\"Donor tags\"\u003eCS 225\u003c/note\u003e\n \u003cnote\u003eProposal (1975/7); p. 25\u003c/note\u003e\n \u003csubject authority=\"lcsh\" valueURI=\"http://id.loc.gov/authorities/subjects/sh85008180\"\u003e\n \u003ctopic\u003eArtificial intelligence\u003c/topic\u003e\n \u003c/subject\u003e\n \u003csubject authority=\"lcsh\" valueURI=\"http://id.loc.gov/authorities/subjects/sh85046450\"\u003e\n \u003ctopic\u003eExpert systems (Computer science)\u003c/topic\u003e\n \u003c/subject\u003e\n \u003csubject authority=\"lcsh\" valueURI=\"http://id.loc.gov/authorities/subjects/sh89003285\"\u003e\n \u003ctopic\u003eComputer science\u003c/topic\u003e\n \u003c/subject\u003e\n \u003clocation\u003e\n \u003cphysicalLocation type=\"repository\" displayLabel=\"Repository\" authorityURI=\"http://id.loc.gov/authorities/names\" valueURI=\"http://id.loc.gov/authorities/names/no2014019980\"\u003eStanford University. Libraries. Department of Special Collections and University Archives\u003c/physicalLocation\u003e\n \u003cphysicalLocation\u003eCall Number: SC0340, Accession: 1986-052, Box: 39, Folder: 1\u003c/physicalLocation\u003e\n \u003c/location\u003e\n \u003cidentifier type=\"local\" displayLabel=\"Source ID\"\u003eSC0340_1986-052_zy575vf8599\u003c/identifier\u003e\n \u003clanguage\u003e\n \u003clanguageTerm type=\"code\" authority=\"iso639-2b\"\u003eeng\u003c/languageTerm\u003e\n \u003c/language\u003e\n \u003crecordInfo\u003e\n \u003clanguageOfCataloging\u003e\n \u003clanguageTerm authority=\"iso639-2b\"\u003eeng\u003c/languageTerm\u003e\n \u003c/languageOfCataloging\u003e\n \u003crecordContentSource authority=\"marcorg\"\u003eCSt\u003c/recordContentSource\u003e\n \u003crecordOrigin\u003eDescription mapped to MODS from SaltWorks, original scanned file name: SC340_1986-052_b39_f01_i0007.\u003c/recordOrigin\u003e\n \u003c/recordInfo\u003e\n \u003crelatedItem type=\"host\"\u003e\n \u003ctitleInfo\u003e\n \u003ctitle\u003eEdward A. Feigenbaum papers, 1950-2007 (inclusive)\u003c/title\u003e\n \u003c/titleInfo\u003e\n \u003clocation\u003e\n \u003curl\u003ehttps://purl.stanford.edu/ms016pb9280\u003c/url\u003e\n \u003c/location\u003e\n \u003ctypeOfResource collection=\"yes\"/\u003e\n \u003c/relatedItem\u003e\n \u003caccessCondition type=\"useAndReproduction\"\u003eThe materials are open for research use and may be used freely for non-commercial purposes with an attribution. For commercial permission requests, please contact the Stanford University Archives (universityarchives@stanford.edu).\u003c/accessCondition\u003e\n\u003c/mods\u003e\n", + "druid": "zy575vf8599", + "url_fulltext": ["https://purl.stanford.edu/zy575vf8599"], + "display_type": ["book"], + "author_1xx_search": "A. Rosenfeld", + "author_1xx_unstem_search": "A. Rosenfeld", + "title_245a_display": "Proposal to ARPA and \"Computer Vision\" by A. Rosenfeld, July 28, 1975", + "title_display": "Proposal to ARPA and \"Computer Vision\" by A. Rosenfeld, July 28, 1975", + "title_full_display": "Proposal to ARPA and \"Computer Vision\" by A. Rosenfeld, July 28, 1975.", + "imprint_display": ["1975-7"], + "pub_year_isi": 1975, + "pub_year_no_approx_isi": 1975, + "pub_year_w_approx_isi": 1975, + "folder_ssi": "1", + "box_ssi": "39", + "location_ssi": "Call Number: SC0340, Accession: 1986-052, Box: 39, Folder: 1", + "series_ssi": "1986-052", + "folder_name_ssi": "AI Handbook 1975", + "iiif_manifest_url_ssi": "https://purl.stanford.edu/zy575vf8599/iiif/manifest", + "full_text_tesimv": ["f \" CS\u003eZ7$: /. i n - 4x THE PROPOSAL This proposal specifies both our long term direction and our specific as planned for the next two years. We relate these goals to goals past progress, immediate practical needs, and long term scientific objectives. Since many of the scientific objectives cited are deep and demanding, readers should understand that considerably more than two years will be required for full solution. THE FOUNDATIONS From the beginning our purpose has been to make machines more intelligent, \" partly to make them intelligence. more useful and partly to learn about the nature of Certainly the need to make machines smarter is clear. It is also clear that the ideas of Artificial Intelligence are the principal scientific path toward making machines smarter. How soon will it happen and how much will it cost? What makes prediction difficult, of course, is the non-linear relationship between the level of technical development and the payoff. For any combination of Artificial Intelligence paired with a need, there is some threshold on costs and capabilities such that on and on the other, revolution. The pocket calculator phenomenon is one example of this that is known to everyone. the corner. one side, little happens, The pocket computer is around We believe that there are many areas in which Artificial Intelligence will produce its own revolutions resembling that of the pocket calculator in their swiftness. i \" Two particularly promising areas are these: ! * DRAFT: JULY 1, 1975 D PROPOSAL TO ARPA 2 \" The combination of large data base handling, intelligent interfacing of software tools and people, and natural language interface engineering. This revolution will be based on a qualitative advance in which programs understand, to a significant degree, the information they are handling; the current technology merely applies manipulative rituals that do not use much of the knowldege embedded in the data bases being manipulated. ??? The application of the ideas of artificial intelligence to computer vision and manipulation for productivity technology, vehicle guidance, and image understanding. Again, the breakthrough will depend on the use of representations of the meanings, uses, and special features of the objects to be sensed and \" manipulated. These are only what we view as immediate areas of maximum opportunity. Many others are suggested by the following sample: \" DRAFT: JULY 1, 1975 \" 3 PROPOSAL TO ARPA SOME AREAS OF APPLICATION Manufacturing Assembling Electronic Systems Assembling Small Mechanical Devices Mining Coal Mining In Dangerous Mines Undersea Recovery Of Manganese Nodules Farming Selective Harvesting With Mixed Crops Pest Control Pruning Repair And Maintenance Vehicle Debugging Floor Care Purposeful Monitoring \" Intelligent Autopilots Shipboard Functions Automatic Programming Management Reports Inventory Control Production Scheduling Quality Control Management Assistance Very Large Data Bases Intelligent PERT Networks Scheduling People and Groups Question Referral News Summarizing Document Draft Polishing \" DRAFT: JULY 1, 1975 Logistics 4 PROPOSAL TO ARPA \" Routing Intelligent Substitution Equipment Sharing Medicine Diagnosis Intensive Care Monitoring Treatment Management Radiation Therapy Setup Education Intelligent CAI Systems Information Retrieval Fire Fighting Fearless Firemen Apparatus Allocation Theft Prevention Trackers How can such objectives be reached? Certainly for smart machines to make an impact in areas like those mentioned, the smart machines must exhibit variety of talents associated with intelligence. a Computer vision, English \" understanding, learning and debugging, and expert problem solving all must be understood. It is natural then that considerable effort has gone into understanding these things. Happily we get back to them both by way of our desire to lay the foundation for applications and by way of our hope to understand intelligence for its own sake. \" DRAFT: JULY 1, 1975 \" GENERAL OBJECTIVE: TO MAKE MACHINES SMARTER TO MAKE MACHINES MORE USEFUL \" PROPOSAL TO ARPA 5 TO UNDERSTAND INTELLIGENCE Areas Of Application Systems To Be Understood Intelligent Terminals Image And Scene Analysis Very Large Data Bases Speech And Text Understanding Remote Guidance Learning and Debugging Photo Interpretation Expert Problem Solving Logistics Common Sense Reasoning Purposeful Monitoring Goal Understanding Repair And Maintenance Cleaning Manufacturing and Mining Medicine Education As the diagram suggests, it has been sensible during the gestation years to \" be organized around themes like computer vision, English undestanding, learning and debugging, and expert problem solving. It is through these particular thrusts that we have learned a great deal about what regarded as central theoretical issues: are now DRAFT: JULY 1, 1975 PROPOSAL TO ARPA 6 \" SOME CENTRAL THEORETICAL ISSUES Knowledge Representation Constraint Exploitation Search And Control Classification And Deduction Programming Methodology Goal Directed Versus Bottom Up Grouping Serial Versus Parallel THE FUTURE The Structure OJ The Laboratory Is Evolving With The Science The Artificial Intelligence Laboratory is widely recognized as one of the world's principal sources of ideas, experimental prototypes, and feasibility demonstrations on the frontier of computer science. It would not be \" appropriate for the laboratory to concentrate on producing operational systems in areas like that of very large data bases, but it does seem appropriate to begin thinking in terms of what AI can lead to in the near term and to begin producing the basic research results lying just in front of prototype production. To this end, we now see ourselves organized into a new structure that draws not only from the desire to understand various dimensions of intelligence but also from a more direct interest in applications challenges on one side and an interest in the emerging central issues on the other. Manifestly the boundaries are to be soft, not hard, and as has been common in the past, much flow among the particular subgroups is expected. \" DRAFT: JULY 1, 1975 \" 7 PROPOSAL TO ARPA Applications Oriented Basic Studies Because natural language research has made much progress along with parallel advances in our theories of knowledge, a considerable portion of our resources should be assigned to a unified program on very large data bases, intelligent terminals, and natural language interface engineering. Part of our efforts for the remainder of 1975 will be directed at bringing this area up to speed. Applications Oriented Vision And Manipulation We have spent considerable time and effort in developing facility that is at \" a laboratory once powerful, easy to copy, and relatively inexpensive. It has been developed using electronic circuit board assembly as the test problem. It is now time to redirect the use of this facility to other pressing problems by selecting the best of many alternatives for of this important allocation resource. Fully automatic assembly of small mechanical devices seems appropriate. Part of the image understanding problem also seems to be promising. Issues Oriented Basic Studies The study of basic issues with domains selected to facilitate understanding remains crucial to our program. Within this collection of topics we see continued work on the representation of knowledge, perhaps problem our most pressing area, as well as on expert problem solving, common sense physical reasoning, problem solving by analogy, learning, and constraint driven \" problem solving of the sort exposed by studies in computer vision. This last mentioned work on computer vision is believed to be critical for long PROPOSAL TO ARPA 8 DRAFT: JULY 1, 1975 range progress on visual interpretation problems that require nearly all of a large array of image points to be processed. \" Systems And Systems Concepts _ Progress in Artificial Intelligence is facilitated by adequate equipment. Indeed, many of its great accomplishments have involved programs that too large and to complex to be produced concepts wa have developed. are without the frontier time sharing Now time sharing is well established, but newer, even more revolutionary opportunities have emerged. It therefore seems wise to continue our systems concepts leadership, both because of our own needs in Artificial Intelligence and because of the profound impact we believe these computer ideas will soon have on the computer consuming community. RECENT PROGRESS \" This introduction closes with a summary of recent progress organized around the topics which correspond to our past foci. These are: Representing Knowledge and Expert Problem Solving Understanding Natural Language Understanding Vision Productivity Technology Learning and Debugging Systems and Architecture and New Programs \" DRAFT: JULY 1, 1975 \" 9 PROPOSAL TO ARPA Representing Knowledge And Expert Problem Solving Sussman and his students have made progress in the direction of understanding debugging and the expert problem solving process in the particular domain of electronic circuitry. Sussman and Stallman, for example, completed a program and a paper in March of 1975, \"Heuristic Techniques in Computer Aided Circuit Analysis.\" The program understands circuits well enough to determine proper operating voltages and currents by common-sense reasoning, rather than by solving network equations. now handle the rather complicated circuits found in IC chips. It can Specifically, the circuitry of a UA74I op amp has been successfully analyzed. Experts in the electronics field have shown considerable interest in this new, \" knowledge-based, common sense approach. Sussman believes that the principles will transfer smoothly to other domains and become a general theory of debugging applicable to all engineered systems. Fahlman and Grossman have done extensive work on a new representational scheme which we believe may have considerable consequences with respect to future machine architectures. Fahlman and Grossman argue for a network of nodes and relationships from which knowledge is retrieved by parallel searches along A-KIND-OF and other links. germinating Their thoughts have been over the past year, but the work was too preliminary to allow commitment to writing until recently. Now both Fahlman and Grossman have completed papers which outline theories, propose experiments, and define, in the case of Grossman, specific application possibilities in the very large data base area. New hardware progress in the integrated circuit industry provides some hope that machines oriented toward such searches may become \" practical, given that simulation on serial machines proves the ideas sound. Sandewall has concentrated on the data base problem as well, but with with a view toward dealing with some immediate problems of data base DRAFT: JULY 1, 1975 PROPOSAL TO ARPA 10 He has worked out a block structured organization and self description. scheme capable of handling both procedures and data, designed to -^ooth the interface between programs on one side and a collection of data bases on the other. \" It is expected that his evolving theory will particularly influence our proposed work on very large data bases. prototype system of programs Sandewall has finished a that illustrate his ideas. Understanding Natural Language Pratt and his students have concentrated on the problem of dealing with efficiency issues in parsing natural language text. This effort takes us in the comfortable direction of preparing for the time when real application of natural language systems will make a theoretical understanding of the efficiency issue of great practical importance. Pratt's paper of January, 1975, presents an optimality proof demonstrating that LINGOL's parsing algorithm is optimal among those of its class in the sense that all the \" phrases that it builds up can be used. Meanwhile Marcus has completed the programming of a new parsing based on the wait-and-see philosophy for handling ambiguity. system Instead of picking one option at all decision points with the risk of being stuck with costly retreat, Marcus' system carries all options forward, decision only when the decision can be made with certainty. making a The design of this parser was finished by the end of 1974; implementation took place during 1975 and is just now complete. The next task is to augment the small grammer Marcus has used in debugging his parser with a much more complete grammar, one large enough to be a good interface to various intelligent terminal or large data base modules. Progress has also been made problem of generating language. on the relatively neglected linguistic This involves, among other things, a need \" DRAFT: JULY 1, 1975 11 PROPOSAL TO ARPA jfflj||. to know what the listener already knows. Thesis studying the problem. puts forth, There is McDonald has completed an M.S. no program embodiment of the ideas it but creating and experimenting with such a program seems sensible and is planned. Understanding Vision Gene Freuder has developed a system for visual recognition, implications for the general problem of control. with The system is intended to provide the flexibility required to deal with realistic visual scenes; he is looking at hammers, not stylized models, but everyday, toolbox hammers, under natural occlusion). \" conditions (e.g. lighting, background, orientation, He is studying directly the interaction of knowledge and control required in an integrated pass at the entire task, rather than looking at the attendant problems of image processing in detail. Particular results, as they are acquired, combine with general visual knowledge to \"suggest\" and \"advise\" further processing. This process, called \"active knowledge,\" extends and implements the principles of \"heterarchy\" and \"domain directed processing\" pioneered in this laboratory. Since description has long been regarded as the key to success with any difficult problem in artificial intelligence, Hollerbach's work on describing curved objects is another important step forward. developed an approach towards shape description based He has on prototype modification and generalized cylinders, a notion invented by Binford at Stanford. His programs describe and identify pottery from vase outlines well enough to be remarkably consistent with the descriptions and identifications given by archeologists. \" The resulting descriptions seem very natural and suitable for dealing with many sorts of objects besides pottery. The emphasis throughout has been to develop useful, qualitative PROPOSAL TO ARPA 12 DRAFT: JULY 1, 1975 descriptions which bring out the significant features and subordinate lesser ones. Marr and his students continue to look at vision from another point of \" view, that of concentration on thoroughly understanding the problem of translating image arrays into symbolic descriptions without the intervention of high level knowledge. Their thesis is that real image understanding cannot be done without very solid programs working at this level. This seems directly on the critical path leading toward real image basic work understanding, be it of ordinary scenes or ERTS type data. As of January, 1975, the work had concentrated on discovering what features of one- dimensional intensity profiles could reliably provide information about edge types and such modifiers as sharpness of edge focus. Since then, the edge and edge modifier work has been extended to two dimensions with satisfactory results. The most important work, however, has been on the problem of grouping the very lowest level symbolic descriptions of edges together into larger symbolic aggregates and the subsequent realization that a new theory of texture will result from this work. \" Marr has invented about four new grouping algorithms and prototype programs have been written for them. Some experiments with these prototype programs have been encouraging, but for the experimentation needed, the programs will have to be rewritten for the sake of efficiency. Working with image arrays is time consuming and requires more than the usual attention to program efficiency. Typical of other work directed by Marr is a theory of visual light source detection developed by Ullmann. which were: Several factors were examined, among absolute intensity values, intensity compared with the average illumination in the scene, both local and global contrast, and lightness contrast. A surprising experimental result was that these factors were shown to be insufficient for explaining our ability to detect light in the visual field, even under very simple conditions. sources While high enough \" DRAFT: JULY 1, 1975 \" PROPOSAL TO ARPA 13 contrast, for example, is a sufficient condition for creating the perception of radiance, it was shown that a light source can sometimes be detected in cases where the contrast is very low. A method for detecting light sources was then proposed and implemented, based on the comparison of two ratios: for a given pair of adjacent areas, both intensities-ratio and gradientsratio are computed. should be equal. The method can If neither of the areas is a light source the ratios If they are not equal, one of the areas is a light source. thereby detect the source and compute its intensity. A collection of our previous papers on vision, learning, representation has just been published by McGraw-Hill, under the !___. \" title. and The I. A. Rosenfeld July 28, 1975 \" Computer Vision (\"Vertical Slice\" of the AI chapter of the COSERS book) 1. Nature of the area (including brief history and elementary survey) Perception and cognition, as functions of intelligent beings, are very difficult to separate. A view widely held by psychologists is that perception is an active process, in which environment, and hypotheses are formed about the nature of the sensory information is sought that will confirm or refute these hypotheses. This view of. perception as a form of problem-solving S is held by most researchers in AI. For this reason, research on computer perception is treated here as a part of AI \" . [Only com-. puter vision will be treated here; computer audition, particularly speech understanding, will be covered by R. Reddy.] computer The mid-1950 s marks the onset of serious work on the analysis of images.. Applications that began to be investigated characters, of at that time included the recognition of printed cells in photomicrographs, of \"events\" in photographs of nuclear bubble chambers, and of military targets in aerial photographs. The approaches used belonged to the area now called pattern recognition, rather than AI ; but in those early days, little dis- tinction was made between these areas. Since the early 19605, there has been a marked divergence \" between the pattern recognition and AI approaches to computer analysis of images. The former approach has continued to stress the use of ad hoc image features in combination with statistical I i classification techniques. \" More recently, it has also made use of \"syntactic\" methods in which images are recognized, by a \"parsing\" process, as being built up hierarchically out of primitive con- stituents. The AI approach, by contrast, has employed problem- solving methodologies based on extensive use of knowledge about the class of images (or scenes) to be analyzed. A large number of references on image analysis can be found in (Rosenfeld, 1969, 1972 / 1973, 1974, 1975.) Our review of computer image analysis will cover only work based on the AI approach, to which the term \"computer vision\" is usually restricted. Much of the work on computer vision has dealt with images of scenes containing solid objects viewed from close by. These are the sort of images with which a robot vision system must usually cope in using vision to guide its motor activities, manipulation and locomotion. including The analysis of such images is usually called \"scene analysis\", to distinguish it from the analysis of images that are essentially two-dimensional, such as photomicrographs (which show cross-sections) show projections) , , radiographs (which ...ir '\" satellite imagery (in which terrain relief is negligible), documents, diagrams, maps, etc. However, the methods of computer vision are equally applicable to these latter classes of images; the term need not be restricted to \"three-dimensional\" scene analysis. \" \" 2. T-PRRarch highlights [Note- should be expanded to basic AI principles each program; but I without seeing the draft of the body of the chapter.] This material emphasize the introduced by can't do that computer analysis of scenes conThe pioneering effort in (1965). His objects is due to Roberts taining three-dimensional objects each of which can be scenes contain sets of polyhedral objects, such as recby combining a few primitive constructed prisms. tangular parallepipeds and triangular A photograph of the visible edges of such a scene is digitized, and are detected. \" Straight lines the_ objects are fitted to the detected edge into a line drawing. points, thus converting the photograph are next extracted, and it is Polygons formed by the lines equivalent to polygonal determined whether they are topological^ objects. If so, a projec of any of the \"model\" primitive faces sought that relates the observed tive coordinate transformation is are found In this way, (partial) matches polygon to the model. between the model and the drawing. The program attempts to way, as composed of comaccount for the entire drawing, in this binations of the models. Roberts' program worked well on \"clean\" input in which the was good contrast between lighting was controlled so that there It would have had more trouble faces of the polyhedra. adjacent \" arbitrary lighting conditions, in with noisy data obtained under have been successfully which not all the inter-face edges would would have failed. detected, so that the model matching process I \" The program knew that it was dealing with polyhedra of a certain the de- class, but it was unable to use this knowledge to direct tection of edges in the original picture. It performed only \"bottom-up\" analysis, with little or no provision for backup when trouble is encountered at the higher levels. By contrast, a more recent program, due to Shirai (1973, about, the class 1975) makes much better use of prior knowledge of scenes being analyzed. This program begins by attempting to are expected to detect the most obvious edges in the scene, which be edges between the polyhedra and the background. When this has been done, the program can hypothesize other edges-(particularly, \" those that separate two polyhedra) ledge that only polyhedra are present, , based on its know- and it can then direct these a more sensitive edge detection operator to look for edges at the appropriate locations. Internal edges (dihedral angles) of the individual polyhedra can then be found in turn. At each stage, previous results, in conjunction with models of missing lines. polyhedra, are used to propose the most plausible Unlike the hierarchical program of Roberts, there is no. rigid separation of the processing into \"levels\"; edge detection, line fitting, and model fitting all operate in a cooperative fashion. , This program illustrates the notion of heterarchical as opposed to hierarchical, organization. analysis Since the mid 1960 5, many other significant scene \" programs have been written. Many of these have dealt only with scenes containing polyhedra; and some have even assumed that perfect line drawings of such scenes, rather than images, were \" An important given. contribution on the line drawing level was developed rules for linking regions in made by Guzman (1968), who object; he was thus drawing that (probably) belong to the same . a objects without the use of able to segment the drawing into that bemodels. Falk (1972) used similar rules to link lines long to the same object, and thus overcome some of the problems that arise when lines are missing detected) . Theoretical (i.e., when edges fail to be bases for Guzman's approach established independently by Huffman (1971) were and Clowes (1971). drawings of polyMore recently, rules for interpreting line /Migle, hedra in which a line may represent not only a dihedral developed by Waltz but also a shadow or crack, were demonstrated \" (1975), who of that in a typical scene, only a small fraction (convex or the possible combinations of line interpretations etc.) can be mutually concave dihedral, occluding edge, shadow, consistent. consider scenes A few investigators have also begun to containing curved objects. face shape from shading (1975). Other work has Techniques for reconstructing sur- information are discussed by Horn made use of range data to determine shape, cylinders and or has allowed only developable surfaces (e.g., analysis of cones) Mention should also be made of work on the. . images of human faces (e.g., Kelly (1971)); in this last case, with a known once the face outline is located, one is dealing \" positions. set of facial features in approximately known Over vision the last few years, efforts have begun to apply computer methods to the analysis of natural indoor and outdoor- scenes with some success. , \" indicates, As the above brief review extensive work in scene world\" scenes containing only analysis has been done for \"blocks scenes, or even with polyhedra, but efforts dealing with natural scenes, have only been exmore general classes of artificial to be done in extending compuploratory thus far. Much remains class of situations. In ter vision techniques to a broader dialog with addition, if machines are to engage in effective humans about the machines input allowed) scenes (e.g., Turing's test with image must be able to understand human visual limitations. vision research must Thus computer ing of human Many \" eventually include the model- visual perception processes. X .\" of the challenges facing computer vision research during the coming years are common to other areas of AI as well. effectively structuring Notable among these is the problem of to be representing knowledge about the class of scenes and analyzed. requires In particular, computer vision generally knowledge at a variety of levels; at the \"low\" purpose\") end of the scale, knowledge texture, etc. (or \"general- about illumination, surface is needed, while at the \"high\" (or specialized) of (say) common end, one needs to know about the functions a wide range of knowhousehold objects. Integration of such ledge sources presents a challenging problem. [Analogous remarks understanding area; here the low end can be made in the speech etc., and the high end, involves speech production mechanisms, On the relationship between general-purpose word meanings.] \" computer vision see (Zucker, and special-purpose knowledge in Rosenfeld and Davis, 1975). / \" to Much of the knowledge used in computer vision relates but the \"objects\" that appear in the scene being analyzed; precisely despatial locations of these objects are often not word [Analogously, in speech understanding, phoneme and fined. boundaries are not precisely localizable. ] This suggests the about need for data structures capable of storing information may be mutually in \"fuzzily\" defined entities, many of which compatible. situation contrasted with, may be say, language understanding, where discrete data structures natural should The by be adequate; or with the discrete data structures used Winston (1975) . _*\" r - special Coping with unfamiliar or unexpected -input poses \" challenges to any AI system. Somehow, the system must choose appropriate frames (Minsky, 1975) within which to analyze the preinput; but this choice must itself be based on some sort of liminary analysis of the input. Little is known about the form take; but it presumably that such a preliminary analysis might analysis, should be largely data-driven. In the case of scene the use of local a possible approach to this problem involves input feature detection operations, applied to the scene in a sort of conhighly parallel fashion, perhaps followed by some straint checking procedure, which might take the form of a Hummel, and parallel \"relaxation\" process (e.g., Rosenfeld, Zucker, \" 1975; Tenenbaum, 1975). \" 3. Interfaces being applied to Computer vision techniques are increasingly real-world problems, particularly in Examples of mation. the field of industrial auto- applications include device assembly, circuit board layout, and inspection. Much of this work is still in have progress, but a number of convincing demonstration programs 1980's, computer been written, and it is expected that by the vision will begin to have a significant impact on industrial At the same time, the computer vision approach will practice. be increasingly applied in areas of computer image analysis that reup to now have been the domain of pattern recognition for example, analysis of handwriting, photomicrosearchers ??? \" graphs and radiographs, satellite imagery, and so on. demandComputer vision research has served as an especially realing testing area for AI methodology, since it deals with solve the world, noisy, multidimensional input. The efforts to computer vision problem have thus stimulated the development of solving languages, AI techniques, e.g., in such areas as problem control structures, and computer networks. turn, have spearheaded general advances in the languages and sys- tems area of computer science. \" These techniques, in \" 4. Other topics one to students, and The AI area has long been an attractive Many of the leading computer vision is no exception to this rule. universities in the offer courses on the subject, in addition to courses pattern related non-AI areas of image processing and recognition. large amounts Computer vision research requires exceptionally generally quite voluminous of computer time, since the input is black-and-white TV image occupies over 250,000 bytes standard (one of digital storage), and elaborate processing is usually^, for image In addition, special peripheral devices necessary. \" for such deinput/output are necessary; but the growing market a few tens of vices has made them available for as little as thousands of dollars. field in Funding for basic research in the computer vision year. is currently at a level of $1 to $2 million per the U.S.A. image (The dividing, lines between computer vision, processing, The draw sharply.), and pattern recognition are difficult to NSF, and NASA. major sources of this funding are ARPA, Activities (Carnegieare concentrated at some of the major AI laboratories a few other univerMellon, MIT, SRI, Stanford), as well as at sities (Maryland, Pennsylvania, and NASA's JPL. Outside the Texas, among others) U.S.A., there are centers in several countries, notably Great Britain, Japan, and the U.S.S.R. \" and at The including students number of researchers involved is perhaps 200, The formal publication rate is not and supporting personnel. high (as compared to the rates in image processing or pattern recognition) ; the papers appear primarily in AI meeting proceedings (IJCAI, MI) and in the journal Artificial Intelligence. \" in meeting Unpublished reports and short papers cited.] proceedings have generally not been [Note: References by computer, Computing Rosenfeld (1969), Picture processing A. 147-176. 1, Surveys (1973), Progress in picture processing: 1969 71, 81-108. ibid. 5, 1972, Computer Graphics (1972), Picture processing: Prncp??sina 394-416. 1, and Image Processing 1. (1974), Picture processing: 1973, ibid^_3, (1975), Picture processing: 1974, ibid. 4, 178-194. 133-155. T L ' G Roberts (1965) , Machine perception of dids in J. T. Tippett et al., eds Optical Information three-dimensional C^t^^^Elec^o159-197. , Processing, MIT Press, * line finder for Y. Shirai (1973), A context-sensitive 4, 95-119. of polyhedra, Artificial Intelligence \" recognition^ using knowledge (1975), Analyzing intensity arrays aEout-Bcenes, in P. H. Winston, cd., The^SJ^hp^ogy_ol_Comr^ Vision, McGraw-Hill, 93-113. Decomposition of a visual scene into three _Conf. , 291-304. dimensional bodies, Proc. Fall Joint Computer of imperfect line data as a threeG. Falk (1972), Interpretation 101-144. dimensional scene, Artificial Intelligence 3. A n Guzman (1968), sentences, Huffman (1971), Impossible objects as nonsense eds., Machine Intelligence^, and D. B Edinburgh Univ. Press, 295-323. Intelligence 2, (1971), On seeing things, Artificial Sichie, Meltzer A ii M. B. Clowes 79-116. n Understanding line drawings of scenes with of Computer shadows, in P. H. Winston, cd., The Psychology Vision, McGraw-Hill, 19-91. Waltz (1975) , from shading information, ibid., B. Horn (1975), Obtaining shape 115-155. \" M using (1971), Edge detection in pictures by computer IntelliD. Michie, eds., Machine planning, in B. Meltzer and Press, 297-409. gence 6, Edinburgh Univ. D S. W. Kelly Zucker, A. Rosenfeld, and L. S. Davis (1975), General- purpose models: expectations about the unexpected, Proc. . r \" 4 IJCAI, in press. , Learning structural descriptions from examples, in P. H. Winston, cd., The Psychology of Computer Vision, McGraw-Hill, 157-209. P. H. Winston (1975) M. Minsky (1975), A framework for representing knowledge, ibid. 211-277. , A. Rosenfeld, R. A. Hummel, and S. W. Zucker (1975), Scene labelling by relazation operations, lEEE Trans. SMC, submitted. J. M. Tenenbaum (1975) , personal communication. X X \" "] } ]