数字图像处理作业_第1页
数字图像处理作业_第2页
数字图像处理作业_第3页
数字图像处理作业_第4页
数字图像处理作业_第5页
已阅读5页,还剩16页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、数字图像处理课程论文姓名:学号:一、 直方图原理分析图像增强是指按特定的需要突出一幅图像中的某些信息,同时,消弱或去除某些不需要的信息的处理方法。其主要目的是处理后的图像对某些特定的应用比原来的图像更加有效。图像增强技术主要有直方图修改处理、图像平滑化处理、图像尖锐化处理和彩色处理技术等。  直方图是多种空间城处理技术的基础。直方图操作能有效地用于图像增强。除了提供有用的图像统计资料外,直方图固有的信息在其他图像处理应用中也是非常有用的,如图像压缩与分割。直方图在软件中易于计算,也适用于商用硬件设备,因此,它们成为了实时图像处理的一个流行工具。  直方图是图像的最基本的统计

2、特征,它反映的是图像的灰度值的分布情况。直方图均衡化的目的是使图像在整个灰度值动态变化范围内的分布均匀化,改善图像的亮度分布状态,增强图像的视觉效果。灰度直方图是图像预处理中涉及最广泛的基本概念之一。 图像的直方图事实上就是图像的亮度分布的概率密度函数,是一幅图像的所有象素集合的最基本的统计规律。直方图反映了图像的明暗分布规律,可以通过图像变换进行直方图调整,获得较好的视觉效果。直方图均衡化是通过灰度变换将一幅图像转换为另一幅具有均衡直方图,即在每个灰度级上都具有相同的象素点数的过程。  处理后的图像直方图分布更均匀了,图像在每个灰度级上都有像素点。从处理前后的图像可以看出

3、,许多在原始图像中看不清楚的细节在直方图均衡化处理后所得到的图像中都变得十分清晰。(1) 直方图均衡化原理 直方图均衡化又称直方图平坦化,是将一已知灰度概率密度分布的图像经过某种变换,变成一幅具有均匀灰度概率密度分布的新图像.其结果是扩展了像元取值的动态范围,从而达到增强图像整体对比度的效果。直方图均衡化是图像处理领域中利用图像直方图对对比度进行调整的方法。这种方法通常用来增加许多图像的局部对比度,尤其是当图像的有用数据的对比度相当接近的时候。通过这种方法,亮度可以更好地在直方图上分布。这样就可以用于增强局部的对比度而不影响整体的对比度,直方图均衡化通过有效地扩展常用的亮度

4、来实现这种功能。直方图均衡化的具体实现步骤如下: (1) 1).列出原始图像的灰度级2)统计各灰度级的像素数目3).计算原始图像直方图各灰度级的频数4).计算累积分布函数5).应用以下公式计算映射后的输出图像的灰度级,P为输出图像灰度级的个数,其中INT为取整符号6).统计映射后各灰度级的像素数目7). 计算输出直方图8). 用fj和gi的映射关系修改原始图像的灰度级,从而获得直方图近似为均匀分布的输出图像(2) 直方图规定化原理直方图均衡化的优点是能自动增强整个图像的对比度,但它的具体增强效果不易控制,处理的结果总是得到全局的均衡化的直方图.

5、实际工作中,有时需要变换直方图使之成为某个特定的形状,从而有选择地增强某个灰度值范围内的对比度,这时可采用比较灵活的直方图规定化方法。所谓直方图规定化,就是通过一个灰度映像函数,将原灰度直方图改造成所希望的直方图。所以,直方图修正的关键就是灰度映像函数。直方图规定化增强处理的步骤如下:令Pr(r)和Pz(z)分别为原始图像和期望图像的灰度概率密度函数。如果对原始图像和期望图像均作直方图均衡化处理,应有由于都是进行均衡化处理,处理后的原图像概率密度函数Ps(S)及理想图像概率密度函数PV(V)是相等的。于是,我们可以用变换后的原始图像灰度级S代替(2)式中的V。即这时的灰度级Z 便是所

6、希望的图像的灰度级。 此外,利用(1)与(3)式还可得到组合变换函数对连续图像,重要的是给出逆变换解析式。对离散图像而言,有二、 基于MATLAB的直方图增强技术编程程序:clc;clear;H=imread('001.jpg'); %读入原图像 subplot(221),imshow(H); %显示原图像title('原图像') I=rgb2gray(H); %将原图像转换为灰度图像subplot(223),imshow(I); title('灰度图像')subplot(224),imhist(I);title('灰度图像直方

7、图')figure(2)J=histeq(I); %对灰度图像进行直方图均衡化处理 subplot(221),imshow(J); title('均衡化图像')subplot(222),imhist(J);title('均衡化图像直方图') subplot(223),imhist(I,64); %将原图像直方图显示为 64 级灰度 title('灰度64图像直方图') subplot(224),imhist(J,64); %将均衡化后图像的直方图显示为 64 级灰度 title('灰度64均衡化图像直方图') figure

8、(3)hgram=50:2:250;K=histeq(I,hgram); subplot(221),imshow(K) ;title('规定化图像');subplot(222),imhist(K,256); title('规定化图像直方图')运行图像:三、 结果与分析从上图中可以看出,用直方图均衡化后,图像的直方图的灰度间隔被拉大了,均衡化的图像的一些细节显示了出来,这有利于图像的分析和识别。直方图均衡化就是通过变换函数histeq将原图的直方图调整为具有“平坦”倾向的直方图,然后用均衡直方图校正图像。直方图均衡化对于背景和前景都太亮或者太暗的图像非常有用,这种

9、方法尤其是可以带来X光图像中更好的骨骼结构显示以及曝光过度或者曝光不足照片中更好的细节。这种方法的一个主要优势是它是一个相当直观的技术并且是可逆操作,如果已知均衡化函数,那么就可以恢复原始的直方图,并且计算量也不大。直方图均衡化的一个缺点是它对处理的数据不加选择,它可能会增加背景杂讯的对比度并且降低有用信号的对比度;变换后图像的灰度级减少,某些细节消失;某些图像,如直方图有高峰,经处理后对比度不自然的过分增强。直方图均衡化能够自动增强整个图像的对比度,但它的具体增强效果不容易控制,处理的结果总是得到全局均匀化的直方图,一般来说正确地选择规定化的函数可以获得比直方图均衡化更好的效果。数字图像处理

10、方法的研究1 绪论数字图像处理方法的研究源于两个主要应用领域:其一是为了便于人们分析而对图像信息进行改进;其二是为了使机器自动理解而对图像数据进行存储、传输及显示。1.1 数字图像处理的概念一幅图像可定义为一个二维函数f(x, y),这里x和y是空间坐标,而在任何一对空间坐标f(x, y)上的幅值f称为该点图像的强度或灰度。当x,y和幅值f为有限的、离散的数值时,称该点是由有限的元素组成的,没一个元素都有一个特定的位置和幅值,这些元素称为图像元素、画面元素或象素。象素是广泛用于表示数字图像元素的词汇。在第二章,将用更正式的术语研究这些定义。视觉是人类最高级的感知器官,所以,毫无疑问图像在人类感

11、知中扮演着最重要的角色。然而,人类感知只限于电磁波谱的视觉波段,成像机器则可覆盖几乎全部电磁波谱,从伽马射线到无线电波。它们可以对非人类习惯的那些图像源进行加工,这些图像源包括超声波、电子显微镜及计算机产生的图像。因此,数字图像处理涉及各种各样的应用领域。图像处理涉及的范畴或其他相关领域(例如,图像分析和计算机视觉)的界定在初创人之间并没有一致的看法。有时用处理的输人和输出内容都是图像这一特点来界定图像处理的范围。我们认为这一定义仅是人为界定和限制。例如,在这个定义下,甚至最普通的计算一幅图像灰度平均值的工作都不能算做是图像处理。另一方面,有些领域(如计算机视觉)研究的最高目标是用计算机去模拟

12、人类视觉,包括理解和推理并根据视觉输人采取行动等。这一领域本身是人工智能的分支,其目的是模仿人类智能。人工智能领域处在其发展过程中的初期阶段,它的发展比预期的要慢得多,图像分析(也称为图像理解)领域则处在图像处理和计算机视觉两个学科之间。从图像处理到计算机视觉这个连续的统一体内并没有明确的界线。然而,在这个连续的统一体中可以考虑三种典型的计算处理(即低级、中级和高级处理)来区分其中的各个学科。低级处理涉及初级操作,如降低噪声的图像预处理,对比度增强和图像尖锐化。低级处理是以输人、输出都是图像为特点的处理。中级处理涉及分割 把图像分为不同区域或目标物)以及缩减对目标物的描述,以使其更适合计算机处

13、理及对不同日标的分类(识别)。中级图像处理是以输人为图像,但输出是从这些图像中提取的特征(如边缘、轮廓及不同物体的标识等)为特点的。最后,高级处理涉及在图像分析中被识别物体的总体理解,以及执行与视觉相关的识别函数(处在连续统一体边缘)等。根据上述讨论,我们看到,图像处理和图像分析两个领域合乎逻辑的重叠区域是图像中特定区域或物体的识别这一领域。这样,在本书中,我们界定数字图像处理包括输人和输出均是图像的处理,同时也包括从图像中提取特征及识别特定物体的处理。举一个简单的文本自动分析方面的例子来具体说明这一概念。在自动分析文本时首先获取一幅包含文本的图像,对该图像进行预处理,提取(分割)字符,然后以

14、适合计算机处理的形式描述这些字符,最后识别这些字符,而所有这些操作都在本书界定的数字图像处理的范围内。理解一页的内容可能要根据理解的复杂度从图像分析或计算机视觉领域考虑问题。这样,本书定义的数字图像处理的概念将在有特殊社会和经济价值的领域内通用。在以下各章展开的概念是那些应用领域所用方法的基础。1.2数字图像处理的起源数字图像处理最早的应用之一是在报纸业,当时,图像第一次通过海底电缆从伦敦传往纽约。早在20世纪20年代曾引入Btutlane电缆图片传输系统,把横跨大西洋传送一幅图片所需的时间从一个多星期减少到3个小时。为了用电缆传输图片,首先要进行编码,然后在接收端用特殊的打印设备重构该图片。

15、图1.1就是用这种方法传送并利用电报打印机通过字符模拟中间色调还原出来的图像。这些早期数字图像视觉质量的改进工作,涉及到打印过程的选择和亮度等级的分布等问题。用于得到图1.1的打印方法到1921年底就被彻底淘汰了,转而支持一种基于光学还原的技术,该技术在电报接收端用穿孔纸带打出图片。图1.2就是用这种方法得到的图像,对比图1.1,它在色调质量和分辨率方面的改进都很明显。 图1.1 1421年由电报打印机采用特殊字 图1.2 1922年在信号两次穿越大西洋后, 符在编码纸带中产生的数字图像 从穿孔纸带得到的数字图像,可以 ( McFalsne) 看出某些差错 ( McFalsne) 早期的Bar

16、tlane系统可以用5个灰度等级对图像编码,到1929年已增加到15个等级。图1.3所示的这种典型类型的图像就是用15级色调设备得到的。在这一时期,由于引入了一种用编码图像纸带去调制光束而使底片感光的系统,明显地改善了复原过程。刚才引用的数字图像的例子并没有考虑数字图像处理的结果,这主要是因为没有涉及到计算机。因此,数字图像处理的历史与数字计算机的发展密切相关。事实上,数字图像要求非常大的存储和计算能力,因此数字图像处理领域的发展必须依靠数字计算机及数据存储、显示和传输等相关技术的发展。计算机的概念可追溯到5000多年前中国算盘的发明。近两个世纪以来的一些发展也奠定了计算机的基础。然而,现代计

17、算机的基础还要回溯到20世纪40年代由约翰·冯·诺依曼提出的两个重要概念:(l)保存程序和数据的存储器;(2)条件分支。这两个概念是中央处理单元(CPU)的基础。今天,它是计算机的心脏。从冯·诺依曼开始,引发了一系列重要技术进步,使得计算机以强大的功能用于数字图像处理领域。简单说,这些进步可归纳为如下几点:(1) 1948年贝尔实验室发明了晶体三极管;(2) 20世纪50年代到20世纪60年代高级编程语言(如COBOL和FORTRAN)的开发;(3) 1958年得州仪器公司发明了集成电路(IC);(4) 20世纪60年代早期操作系统的发展;(5) 20世纪70年代

18、Intel公司开发了微处理器(由中央处理单元、存储器和输入输出控制组成的单一芯片);(6) 1981年IBM公司推出了个人计算机;(7) 20世纪70年代出现的大规模集成电路(LI)所引发的元件微小化革命,20世纪80年代出现了YLSI(超大规模集成电路),现在已出现了ULSI。图1.3在1929年从伦敦到纽约用15级色调设备通过电缆传送的Cenerale Pershing和Foch的未经修饰的照片伴随着这些技术进步,大规模的存储和显示系统也随之发展起来。这两者均是数字图像处理的基础。第一台可以执行有意义的图像处理任务的大型计算机出现在20世纪60年代早期。数字图像处理技术的诞生可追溯至这一时

19、期这些机器的使用和空间项目的开发,这两大发展把人们的注意力集中到数字图像处理的潜能上。利用计算机技术改善空间探测器发回的图像的工作,始于1964年美国加利福尼亚的喷气推进实验室。当时由“旅行者7号”卫星传送的月球图像由一台计算机进行了处理,以校正航天器上电视摄像机中各种类型的图像畸变。图1.4显示了由“旅行者7号”于1954年7月31日上午(东部白天时间)9点09分在光线影响月球表面前约17分钟时摄取的第一张月球图像痕迹(称为网状痕迹)用于几何校正,在第5章将讨论该间题,这也是美国航天器取得的第一幅月球图像。“旅行者7号”传送的图像可作为改善的增强和复原图像(例如来自“探索者”登月一飞行、“水

20、手号”系列空间探渊器及阿波罗载人登月飞行的图像)方法的基础。进行空间应用的同时,数字图像处理技术在20世纪60年代末和20世纪70年代初开始用于医学图像、地球遥感监测和天文学等领域。早在20世纪70年代发明的计算机轴向断层术(CAT)简称计算机断层(CT)是图像处理在医学诊断领域最重要的应用之一。计算机轴向断层术是一种处理方法,在这种处理中,一个检测器环围绕着一个物体(或病人),并且一个x射线源(与检测器环同心)绕着物体旋转。X射线穿过物体并由位于对面环中的相应检测器收集起来。当X射线源旋转时,重复这一过程。断层技术由一些算法组成,该算法用感知的数据去重建通过物体的“切片”图像。当物体沿垂直于

21、检测器的方向运动时就产生一系列这样的“切片”,这些切片组成了物体内部的再现图像。断层技术是由Godfrey N. Hounsfield先生和Allan M.Cormack教授发明的,他们共同获得了1979年诺贝尔医学奖。X射线是在1895年由威廉·康拉德·伦琴发现的,由于这一发现,他获得了I901年诺贝尔物理学奖。这两项发明相差近100年。它们在今天引领着图像处理某些最活跃的应用领域。图1.4美国航天器传送的第一张月球照片,“旅行者7号”卫星1964年7月31日9点09分(东部白天时间)在光线影响月球表面前17分钟时摄取的图像The research of digital

22、image processing technique 1 IntroductionInterest in digital image processing methods stems from two principal application areas: improvement of pictorial information for human interpretation; and processing of image data for storage, transmission, and representation for autonomous machine perceptio

23、n. This chapter has several objectives: (1)to define the scope of the field that we call image processing; (2)to give a historical perspective of the origins of this field; (3)to give an idea of the state of the art in image processing by examining some of the principal area in which it is applied;

24、(4)to discuss briefly the principal approaches used in digital image processing; (5)to give an overview of the components contained in a typical, general-purpose image processing system; and (6) to provide direction to the books and other literature where image processing work normally is reporter.1

25、.1 What Is Digital Image Processing?An image may be defined as a two-dimensional function, f(x, y), where x and y are spatial (plane) coordinates, and the amplitude of f at any pair of coordinates (x, y) is called the intensity or gray level of the image at that point. When x, y, and digital image.

26、The field of digital image processing refers to processing digital images by means of a digital computer. Note that a digital image is composed of a finite number of elements, each of which has a particular location and value. These elements are referred to as picture elements, image elements, pels,

27、 and pixels. Pixel is the term most widely used to denote the elements of a digital image. We consider these definitions in more formal terms in Chapter2. Vision is the most advanced of our senses, so it is not surprising that images play the single most important role in human perception. However,

28、unlike human who are limited to the visual band of the electromagnetic (EM) spectrum, imaging machines cover almost the entire EM spectrum, ranging from gamma to radio waves. They can operate on images generated by sources that human are not accustomed to associating with image. These include ultras

29、ound, electron microscopy, and computer-generated images. Thus, digital image processing encompasses a wide and varied field of application. There is no general agreement among authors regarding where image processing stops and other related areas, such as image analysis and computer vision, start.

30、Sometimes a distinction is made by defining image processing as a discipline in which both the input and output of a process are images. We believe this to be a limiting and somewhat artificial boundary. For example, under this definition, even the trivial task of computing the average intensity of

31、an image (which yields a single number) would not be considered an image processing operation. On the other hand, there are fields such as computer vision whose ultimate goal is to use computer to emulate human vision, including learning and being able to make inferences and take actions based on vi

32、sual inputs. This area itself is a branch of artificial intelligence (AI) whose objective is to emulate human intelligence. This field of AI is in its earliest stages of infancy in terms of development, with progress having been much slower than originally anticipated. The area of image analysis (al

33、so called image understanding) is in between image processing and computer vision. There are no clear-cut boundaries in the continuum from image processing at one end to computer vision at the other. However , one useful paradigm is to consider three types of computerized processes is this continuum

34、: low-, mid-, and high-ever processes. Low-level processes involve primitive operation such as image preprocessing to reduce noise, contrast enhancement, and image sharpening. A low-level process is characterized by the fact that both its input and output are images. Mid-level processing on images i

35、nvolves tasks such as segmentation (partitioning an image into regions or objects), description of those objects to reduce them to a form suitable for computer processing, and classification (recognition) of individual object. Amid-level process is characterized by the fact that its inputs generally

36、 are images, but its output is attributes extracted from those images (e. g., edges contours, and the identity of individual object). Finally, higher-level processing involves “making sense” of an ensemble of recognized objects, as in image analysis, and, at the far end of the continuum, performing

37、the cognitive function normally associated with vision. Based on the preceding comments, we see that a logical place of overlap between image processing and image analysis is the area of recognition of individual regions or objects in an image. Thus, what we call in this book digital image processin

38、g encompasses processes whose inputs and outputs are images and, in addition, encompasses processes that extract attributes from images, up to and including the recognition of individual objects. As a simple illustration to clarify these concepts, consider the area of automated analysis of text. The

39、 processes of acquiring an image of the area containing the text. Preprocessing that images, extracting (segmenting) the individual characters, describing the characters in a form suitable for computer processing, and recognizing those individual characters are in the scope of what we call digital i

40、mage processing in this book. Making sense of the content of the page may be viewed as being in the domain of image analysis and even computer vision, depending on the level of complexity implied by the statement “making cense.” As will become evident shortly, digital image processing, as we have de

41、fined it, is used successfully in a broad rang of areas of exceptional social and economic value. The concepts developed in the following chapters are the foundation for the methods used in those application areas.1.2 The Origins of Digital Image Processing One of the first applications of digital i

42、mages was in the newspaper industry, when pictures were first sent by submarine cable between London and NewYork. Introduction of the Bartlane cable picture transmission system in the early 1920s reduced the time required to transport a picture across the Atlantic from more than a week to less than

43、three hours. Specialized printing equipment coded pictures for cable transmission and then reconstructed them at the receiving end. Figure 1.1 was transmitted in this way and reproduced on a telegraph printer fitted with typefaces simulating a halftone pattern. Some of the initial problems in improv

44、ing the visual quality of these early digital pictures were related to the selection of printing procedures and the distribution of intensity levels. The printing method used to obtain Fig. 1.1 was abandoned toward the end of 1921 in favor of a technique based on photographic reproduction made from

45、tapes perforated at the telegraph receiving terminal. Figure 1.2 shows an images obtained using this method. The improvements over Fig. 1.1 are evident, both in tonal quality and in resolution. FIGURE 1.1 A digital picture produced in FIGURE 1.2 A digital picture1921 from a coded tape by a telegraph

46、 printer made in 1922 from a tape punchedWith special type faces (McFarlane) after the signals had crossed the Atlantic twice. Some errors are Visible. (McFarlane)The early Bartlane systems were capable of coding images in five distinct level of gray. This capability was increased to 15 levels in 19

47、29. Figure 1.3 is typical of the images that could be obtained using the 15-tone equipment. During this period, introduction of a system for developing a film plate via light beams that were modulated by the coded picture tape improved the reproduction process considerably.Although the examples just

48、 cited involve digital images, they are not considered digital image processing results in the context of our definition because computer were not involved in their creation. Thus, the history of digital processing is intimately tied to the development of the digital computer. In fact digital images

49、 require so much storage and computational power that progress in the field of digital image processing has been dependent on the development of digital computers of supporting technologies that include data storage, display, and transmission.The idea of a computer goes back to the invention of the

50、abacus in Asia Minor, more than 5000 years ago. More recently, there were developments in the past two centuries that are the foundation of what we call computer today. However, the basis for what we call a modern digital computer dates back to only the 1940s with the introduction by John von Neuman

51、n of two key concepts: (1) a memory to hold a stored program and data, and (2) conditional branching. There two ideas are the foundation of a central processing unit (CPU), which is at the heart of computer today. Starting with von Neumann, there were a series of advances that led to computers power

52、ful enough to be used for digital image processing. Briefly, these advances may be summarized as follow: (1) the invention of the transistor by Bell Laboratories in 1948;(2) the development in the 1950s and 1960s of the high-level programming languages COBOL (Common Business-Oriented Language) and F

53、ORTRAN ( Formula Translator); (3) the invention of the integrated circuit (IC) at Texas Instruments in 1958;(4) the development of operating system in the early 1960s;(5) the development of the microprocessor (a single chip consisting of the central processing unit, memory, and input and output cont

54、rols) by Inter in the early 1970s;(6) introduction by IBM of the personal computer in 1981;(7) progressive miniaturization of components, starting with large scale integration (LI) in the late 1970s, then very large scale integration (VLSI) in the 1980s, to the present use of ultra large scale integ

55、ration (ULSI).Figure 1.3 In 1929 from London to Cenerale Pershingthat New York delivers with 15 level tone equipmentsthrough cable with Foch do not the photograph by decorationConcurrent with these advances were development in the areas of mass storage and display systems, both of which are fundamen

56、tal requirements for digital image processing. The first computers powerful enough to carry out meaningful image processing tasks appeared in the early 1960s. The birth of what we call digital image processing today can be traced to the availability of those machines and the onset of the apace progr

57、am during that period. It took the combination of those two developments to bring into focus the potential of digital image processing concepts. Work on using computer techniques for improving images from a space probe began at the Jet Propulsion Laboratory (Pasadena, California) in 1964 when pictur

58、es of the moon transmitted by Ranger 7 were processed by a computer to correct various types of image distortion inherent in the on-board television camera. Figure1.4shows the first image of the moon taken by Ranger 7 on July 31, 1964 at 9: 09 A. M. Eastern Daylight Time (EDT), about 17 minutes before impacting

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论