<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/technology/cnxml/schema/dtd/0.5/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" xmlns:m="http://www.w3.org/1998/Math/MathML" id="new">
  <name>Pocket Change: Output Display</name>
  <metadata>
  <md:version>1.1</md:version>
  <md:created>2006/12/18 23:26:42.271 US/Central</md:created>
  <md:revised>2006/12/19 01:54:59.091 US/Central</md:revised>
  <md:authorlist>
      <md:author id="tbar">
      <md:firstname>Tyler</md:firstname>
      <md:othername>James</md:othername>
      <md:surname>Barth</md:surname>
      <md:email>tbar@rice.edu</md:email>
    </md:author>
      <md:author id="acottle">
      <md:firstname>Aaron</md:firstname>
      <md:othername>David</md:othername>
      <md:surname>Cottle</md:surname>
      <md:email>acottle@rice.edu</md:email>
    </md:author>
      <md:author id="jstallcu">
      <md:firstname>John</md:firstname>
      <md:othername>P</md:othername>
      <md:surname>Stallcup</md:surname>
      <md:email>john.stallcup@rice.edu</md:email>
    </md:author>
      <md:author id="cvaucher">
      <md:firstname>Christopher</md:firstname>
      <md:othername>J.</md:othername>
      <md:surname>Vaucher</md:surname>
      <md:email>cvaucher@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="tbar">
      <md:firstname>Tyler</md:firstname>
      <md:othername>James</md:othername>
      <md:surname>Barth</md:surname>
      <md:email>tbar@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="acottle">
      <md:firstname>Aaron</md:firstname>
      <md:othername>David</md:othername>
      <md:surname>Cottle</md:surname>
      <md:email>acottle@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="jstallcu">
      <md:firstname>John</md:firstname>
      <md:othername>P</md:othername>
      <md:surname>Stallcup</md:surname>
      <md:email>john.stallcup@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="cvaucher">
      <md:firstname>Christopher</md:firstname>
      <md:othername>J.</md:othername>
      <md:surname>Vaucher</md:surname>
      <md:email>cvaucher@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>Coin Recognition</md:keyword>
    <md:keyword>Machine Vision</md:keyword>
    <md:keyword>Pocket Change</md:keyword>
    <md:keyword>Signal Processing</md:keyword>
  </md:keywordlist>

  <md:abstract>Displaying results from processing data in Matlab to a user.</md:abstract>
</metadata>
  <content>
    <para id="element-445">Now that we have all of the coins matched up to their counterparts in the database, we need to display the results. Since we've extracted metadata from the database, we can display various types of information in addition to simply the name of the coin. For example, since each coin is classified as being either a 'heads' or a 'tails,' we can even run statistics on what percentage of the coins are face up. A simple display mechanism is to output the result strings to the command line using the DISP() command. </para><para id="delete_me">There are two easy ways to form strings. Let's say you want to output the string 'Coin 1 is a US Quarter.' and you know the index of the coin, coinIndex = 1, and the string of the type of coin from the database, name = 'US Quarter'. You can do this using concatenation in Matlab, as you would any other matrix, taking into account the conversion between numbers and ASCII: </para><code type="block">disp(['Coin ' num2str(coinIndex) ' is a ' name '.'])</code><para id="element-827">Alternatively, if you're familiar with C, you can use the SPRINTF() command:</para><code type="block">disp(sprintf('Coin %d is a %s.', coinIndex, name))</code><para id="element-177">In addition to the command line, it is useful to display the name of the coin directly on the image of the coin. We can accomplish this with the TEXT() command. Pass in the centers of the coins, the identification string from the database, and some additional optional parameters to get the string to appear better: </para><code type="block">text(circen(N, 1), circen(N, 2), label, 'HorizontalAlignment', 'center', 'FontWeight', 'bold', 'Color', 'red')</code><figure id="element-90"><name>Labeled Coins</name>
<media type="image/jpeg" src="Coins Result Small.jpg"/>
<caption>
Display the identification of the coins graphically.
</caption></figure><para id="element-226">From these example displays of results, you should be able to create your own types of output. Be creative!</para>   
  </content>
  
</document>
