⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 333-336.html

📁 dshfghfhhgsfgfghfhfghgfhfghfgh fg hfg hh ghghf hgf hghg gh fg hg hfg hfh f hg hgfh gkjh kjkh g yj f
💻 HTML
字号:
<HTML>
<HEAD>
<META name=vsisbn content="1558515682"><META name=vstitle content="Java Digital Signal Processing"><META name=vsauthor content="Douglas A. Lyon"><META name=vsimprint content="M&T Books"><META name=vspublisher content="IDG Books Worldwide, Inc."><META name=vspubdate content="11/01/97"><META name=vscategory content="Web and Software Development: Programming, Scripting, and Markup Languages: Java"><TITLE>Java Digital Signal Processing:Digital Images and Image Formats</TITLE>
<!-- HEADER --><STYLE type="text/css">  <!-- A:hover  { 	color : Red; } --></STYLE><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<!--ISBN=1558515682//-->
<!--TITLE=Java Digital Signal Processing//-->
<!--AUTHOR=Douglas A. Lyon//-->
<!--PUBLISHER=IDG Books Worldwide, Inc.//-->
<!--IMPRINT=M & T Books//-->
<!--CHAPTER=8//-->
<!--PAGES=333-336//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->

<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch07/329-331.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="336-339.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 8<BR>Digital Images and Image Formats
</FONT></H2>
<P ALIGN="RIGHT">&#147;This is the Wild West of the Information Age&#148;
</P>
<P ALIGN="RIGHT">&#151;<I>Bart Kosko</I></P>
<H3><A NAME="Heading2"></A><FONT COLOR="#000077">The Databahn</FONT></H3>
<P>As increasing numbers of users crowd onto the Internet information thoroughfare, it takes longer to get data from point A to point B. As never before, we need to shrink information content before it is exchanged or transferred. An uncompressed digital bitmap image of 640&#215;480 pixels with 256 colors takes up 307Kb, or nearly one-third of a megabyte. It can be frustrating to wait for such an image file to load into your browser from a Web site. The enormous size of digital images has motivated the creation of a number of space -saving image and file formats.
</P>
<P>In this chapter, we discuss the how and why of image formats&#151;there are many of them&#151;as well as compression techniques. You will learn about the latest and greatest formats for use on the Internet, including details of the formats that are supported in DiffCAD.</P>
<H3><A NAME="Heading3"></A><FONT COLOR="#000077">A Bird&#146;s-Eye View of Image Formats</FONT></H3>
<P>There are three broad categories of image formats: bitmap formats, vector formats, and other formats.
</P>
<H4 ALIGN="LEFT"><A NAME="Heading4"></A><FONT COLOR="#000077">Bitmap Formats</FONT></H4>
<P>In describing an image, you can resort to several levels of detail. At the lowest level of abstraction, you can describe every element (pixel) of the image. Such an image is referred to as <I>bitmapped</I>, because it is a map of bits (or pixels). A bitmap image and its associated data are shown in Figure 8.1.</P>
<P><A NAME="Fig1"></A><A HREF="javascript:displayWindow('images/08-01.jpg',399,136 )"><IMG SRC="images/08-01t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/08-01.jpg',399,136)"><FONT COLOR="#000077"><B>Figure 8.1</B></FONT></A>&nbsp;&nbsp;A bitmap format image (left) and bitmap format data.</P>
<P>This is ultimately how images are represented and viewed on monitors. A computer or television monitor has an addressable array of physical pixels, or dots. Each dot has position and color information.
</P>
<P>Bitmap images are difficult to scale from their original resolution (without digital signal processing), and transporting them cumbersome because of their bulk. You can mitigate the size problem by using compression (covered soon) but only at the expense of increasing the time it takes to decode and render them.</P>
<H4 ALIGN="LEFT"><A NAME="Heading5"></A><FONT COLOR="#000077">Vector Formats</FONT></H4>
<P>Now let&#146;s consider a way to represent images at a higher level of abstraction. Suppose you store endpoints of line segments that represent an image, perhaps to render a CAD drawing. You store the coordinates of the starting point, a direction, a length, and perhaps color information. The portion of the screen that does not have line segments will be rendered as a background color. The DiffCAD program uses a <I>vec</I> file format that stores line segments in an ASCII text file.</P>
<P>Vector formats typically store not only line primitives but also some 2-D shapes&#151;such as circles, squares, and curved lines&#151;that exist at higher levels of abstraction. Such shapes could be used, for example, to create jet planes or integrated circuit layouts. Figure 8.2 shows an example of a simple vector image and its associated data.</P>
<P><A NAME="Fig2"></A><A HREF="javascript:displayWindow('images/08-02.jpg',418,131 )"><IMG SRC="images/08-02t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/08-02.jpg',418,131)"><FONT COLOR="#000077"><B>Figure 8.2</B></FONT></A>&nbsp;&nbsp;Vector format image (left) and vector format data.</P>
<P>You could continue, using higher and higher levels of abstraction, including 3-D objects as primitives and avatars (3-D computer puppets) in virtual worlds.
</P>
<P>One advantage of a vector format image is that you can scale the image easily without loss of detail. Many clipart collections are stored as vector format files for this reason. A disadvantage of vector formats is that it is hard to store highly detailed image information such as photographs, in which you may need to vary color information pixel by pixel.</P>
<H4 ALIGN="LEFT"><A NAME="Heading6"></A><FONT COLOR="#000077">Conversion between Vector and Bitmap Formats</FONT></H4>
<P>Converting an image from a vector format to a bitmap format is easy and straightforward; this conversion is common, because most display output devices are bitmapped. For a highly detailed vector format image, it is important to choose a sufficiently high resolution for the destination bitmap. Otherwise, artifacts&#151;such as jagged lines (called jaggies) instead of straight lines&#151;will appear in the image.
</P>
<P>Converting an image from a bitmap format to a vector format is difficult. In Chapter 9, you will meet this formidable challenge with DSP routines for edge and outline detection. Another issue is the possible loss of color information when you convert an image from a rich bitmap representation to a (possibly) poor vector representation.</P>
<H4 ALIGN="LEFT"><A NAME="Heading7"></A><FONT COLOR="#000077">Other types of formats</FONT></H4>
<P>[Murray et al.] describe several other types of formats for digital images.
</P>
<DL>
<DD><B>&#149;</B>&nbsp;&nbsp;A <I>scene</I> format file has the condensed representation of an image. It is sometimes hard to tell the difference between this format and a vector format.
<DD><B>&#149;</B>&nbsp;&nbsp;A <I>metafile</I> can store both vector format elements and bitmap format elements. Examples of this type of format are PICT and CGM. Because of their versatility, these formats are often used to bridge the gap between hardware or software platforms.
<DD><B>&#149;</B>&nbsp;&nbsp;<I>Animation</I> formats come in many flavors. The simplest type stores adjacent frames of an animation sequence in one file for playing. Another type stores not only images but also color maps; changing the color map gives the illusion of motion. A more sophisticated animation format stores frame difference information along with key frames. This technique, also used to store video, exploits the fact information typically changes little from frame to frame. Much of the background and features are static. If you store only the data that changes, you save a lot of space.
<DD><B>&#149;</B>&nbsp;&nbsp;<I>Multimedia</I> formats allow you to store various data types and formats together; video information, text information, and sound information can coexist peacefully.
<DD><B>&#149;</B>&nbsp;&nbsp;<I>Three-dimensional</I> formats support not only descriptions of lines, shapes, and 3-D geometries but also textures, reflections, and anything else a rendering program needs to reconstruct a 3-D image or world. Objects in a 3-D file are sometimes called <I>scene elements.</I> Many existing vector file formats have been extended to support 3-D. Such formats, such as Autodesk&#146;s DXF format, are referred to as <I>extended vector formats.</I> VRML is a little more than a 3-D format, because it includes support for HTML-style linking to other URLs on the World Wide Web.
<DD><B>&#149;</B>&nbsp;&nbsp;<I>Fonts</I> are special graphics files. They come in their own subsets of types (stroke, outline) based on bitmap or vector formats. The header or footer of a font file usually contains a database index associated with the font data.
<DD><B>&#149;</B>&nbsp;&nbsp;<I>Page Description Language</I> (PDL) formats are usually textual, programmatic descriptions of how to render graphics and text. An example is the ubiquitous PostScript format. This format is more akin to source code than to graphics data and requires a sophisticated program to create output.
</DL>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch07/329-331.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="336-339.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>

<hr width="90%" size="1" noshade><div align="center"><font face="Verdana,sans-serif" size="1">Copyright &copy; <a href="/reference/idgbooks00001.html">IDG Books Worldwide, Inc.</a></font></div>
<!-- all of the reference materials (books) have the footer and subfoot reveresed --><!-- reference_subfoot = footer --><!-- reference_footer = subfoot --></BODY></HTML><!-- END FOOTER -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -