2014《数字图像处理》期末大作业(1)
- 格式:doc
- 大小:813.50 KB
- 文档页数:19
1、下图是一用于干涉原理进行测试的干涉场图像,要求判读条纹的间距,请给出图像处理的方案并说明每一步的作用及其对其它处理步骤可能产生的影响。
解:步骤与思路:○1.进行模糊处理,消除噪声○2.边缘检测,进行图像增强处理○3.二值化图像,再进行边缘检测,能够得到很清晰的边界。
○4.采用横向标号法,根据值为1像素在标号中的相邻位置可以确定间距I=imread('xz mjt.bmp');I1=medfilt2(I); %对图像中值滤波imshow(I1);[m,n]=size(I1);for i=1:mfor j=1:nif(I1(i,j)<100) %阈值为100I1(i,j)=255;elseI1(i,j)=0; %进行二值化endendendfigure;imshow(I1);Y1=zeros(1,25);y2=y1;c=y2;i=100;for j=1:1200if (I1(i,j)==255&&I1(i,j+1)==0)Y1=j+1;endif (I1(i,j)==0&&I1(i,j+1)==255)Y2=j;endendfor i=1:25c=Y2(i)-Y1(i)endc %找出每两个条纹之间的距离2. 现有8个待编码的符号m0,……,m7,它们的概率分别为0.11,0.02,0.08,0.04,0.39,0.05,0.06,0.25,利用哈夫曼编码求出这一组符号的编码并画出哈夫曼树。
3. 请以图像分割方法为主题,结合具体处理实例,采用期刊论文格式,撰写一篇小论文。
各种算子对图像进行边缘检测效果的研究图像分割是根据需要将图像划分为有意义的若干区域或部分的图像处理技术。
通过边缘检测在Matlab中实现方法,及用四叉数分解函数进行区域分割的方法,掌握了Matlab区域操作函数的使用和图像分析和理解的基本方法,并学到了'roberts','sobel','prewitt','canny','log'算子对图像进行边缘检测的不同效果。
《数字图像处理》期末大作业大作业题目及要求:一、题目:本门课程的考核以作品形式进行。
作品必须用Matlab完成。
并提交相关文档。
二、作品要求:1、用Matlab设计实现图形化界面,调用后台函数完成设计,函数可以调用Matlab工具箱中的函数,也可以自己编写函数。
设计完成后,点击GUI图形界面上的菜单或者按钮,进行必要的交互式操作后,最终能显示运行结果。
2、要求实现以下功能:每个功能的演示窗口标题必须体现完成该功能的小组成员的学号和姓名。
1)对于打开的图像可以显示其灰度直方图,实现直方图均衡化。
2)实现灰度图像的对比度增强,要求实现线性变换和非线性变换(包括对数变换和指数变换)。
3)实现图像的缩放变换、旋转变换等。
4)图像加噪(用输入参数控制不同噪声),然后使用空域和频域进行滤波处理。
5)采用robert算子,prewitt算子,sobel算子,拉普拉斯算子对图像进行边缘提取。
6)读入两幅图像,一幅为背景图像,一幅为含有目标的图像,应用所学的知识提取出目标。
3、认真完成期末大作业报告的撰写,对各个算法的原理和实验结果务必进行仔细分析讨论。
报告采用A4纸打印并装订成册。
附录:报告模板《数字图像处理》期末大作业班级:计算机小组编号:第9组组长:王迪小组成员:吴佳达浙江万里学院计算机与信息学院2014年12月目录(自动生成)1 绘制灰度直方图,实现直方图均衡化 (5)1.1 算法原理 (5)1.2 算法设计 (5)1.3 实验结果及对比分析 (5)2 灰度图像的对比度增强 (5)2.1 算法原理 (5)2.2 算法设计 (5)2.3 实验结果及分析 (5)3 图像的几何变换 (5)3.1 算法原理 (5)3.2 算法设计 (5)3.3 实验结果及分析 (5)4 图像加噪(用输入参数控制不同噪声),然后使用空域和频域进行滤波处理 (5)4.1 算法原理 (5)4.2 算法设计 (6)4.3 实验结果及分析 (6)5 采用robert,prewitt,sobel,拉普拉斯算子对图像进行边缘提取 (6)5.1 算法原理 (6)5.2 算法设计 (6)5.3 实验结果及分析 (6)6 读入两幅图像,一幅为背景图像,一幅为含有目标的图像,应用所学的知识提取出目标 (6)6.1 算法原理 (6)6.2 算法设计 (6)6.3 实验结果及分析 (6)7 小结(感受和体会) (6)1 绘制灰度直方图,实现直方图均衡化1.1 算法原理图像增强是指按特定的需要突出一幅图像中的某些信息,同时,消弱或去除某些不需要的信息的处理方法。
1、下图是一用于干涉原理进行测试的干涉场图像,要求判读条纹的间距,请给出图像处理的方案并说明每一步的作用及其对其它处理步骤可能产生的影响。
解:步骤与思路:○1.进行模糊处理,消除噪声○2.边缘检测,进行图像增强处理○3.二值化图像,再进行边缘检测,能够得到很清晰的边界。
○4.采用横向标号法,根据值为1像素在标号中的相邻位置可以确定间距I=imread('xz mjt.bmp');I1=medfilt2(I); %对图像中值滤波imshow(I1);[m,n]=size(I1);for i=1:mfor j=1:nif(I1(i,j)<100) %阈值为100I1(i,j)=255;elseI1(i,j)=0; %进行二值化endendendfigure;imshow(I1);Y1=zeros(1,25);y2=y1;c=y2;i=100;for j=1:1200if (I1(i,j)==255&&I1(i,j+1)==0)Y1=j+1;endif (I1(i,j)==0&&I1(i,j+1)==255)Y2=j;endendfor i=1:25c=Y2(i)-Y1(i)endc %找出每两个条纹之间的距离2. 现有8个待编码的符号m0,……,m7,它们的概率分别为0.11,0.02,0.08,0.04,0.39,0.05,0.06,0.25,利用哈夫曼编码求出这一组符号的编码并画出哈夫曼树。
3. 请以图像分割方法为主题,结合具体处理实例,采用期刊论文格式,撰写一篇小论文。
各种算子对图像进行边缘检测效果的研究图像分割是根据需要将图像划分为有意义的若干区域或部分的图像处理技术。
通过边缘检测在Matlab 中实现方法,及用四叉数分解函数进行区域分割的方法,掌握了Matlab 区域操作函数的使用和图像分析和理解的基本方法,并学到了'roberts','sobel','prewitt','canny','log'算子对图像进行边缘检测的不同效果。
1.用matlab进行图像变换,公式:s=L-1-r答:clear;clc;f=imread('source.jpg');%该图像是一幅灰度图像subplot(211);imshow(f);title('原始灰度图像');s=f;f=double(f);s=256-1-f;subplot(212);imshow(uint8(s),[]);title('变换后的图像')2.图1显示了512×512像素尺寸的黑色背景叠加一个20×20像素尺寸的白色矩形。
此图像在傅里叶变换的计算之前乘以(-1)x+y,从而可以使频率关于中心谱对称,用matlab对图1进行变换答:编程f=zeros(512,512);f(246:266,246:266)=1;F=fft2(f,512,512) ;F2=fftshift(F);imshow(log(abs(F2)),[-1 5]);colormap(jet);colorbar;-0.500.511.522.533.544.53.试给出把灰度范围[0,10]伸长为[0,15],把范围[10,20]伸长为[15,25],并把范围[20,30]压缩为[25,30]的变换方程。
答:由()[]c a y x f ab cd y x g +---=,)(),(得 (1)、3(,)(,)2g x y f x y ⎡⎤=*⎢⎥⎣⎦(2)、5),(),(+=y x f y x g (3)、15),(5.0),(+=y x f y x g4、设一幅图像具有表1所示的概率分布,对其分别进行直方图均衡化和规定化,要求规定化的图像具有表2所示的灰度级分布。
表1表2(1)、直方图均衡化处理结果如下。
Digital Image Processing Examination1. Fourier Transform problem.1) F or an image given by the function f(x,y)=(x+y)3 where x,y are continuous varibales; evaluatef(x,y)δ(x-1,y-2) and f(x,y)* δ(x-1,y-2),where δ is the Dorac Delta function.2) F or the optical imaging system shoen below,consisting of an image scaling and two forwardFourier transforms show that the output image is a scale and inverted replica of the original3) three binary images (with value 1 on black areas and value 0 elsewhere) are shown below. Sketch the continuous 2D FT of these images(don’t do this mathematically, try to use instead the convolution theorem and knowledge of FTs of common functions)2. The rate distortion function of a zero memory Gaussian source of arbitary mean and variance σ2 with respect to the mean-square error criterion is⎪⎩⎪⎨⎧≥≤≤=2220log 21)(σσσD D for D D Ra) Plot this functionb) What is D max c) If a distortion of no mor than 75% of the source’s variance is allowed, what is the maximumcompression that can be achieved?3. The PDF of an image is given by Pr(r) as shown below. Find the transform toconvert the image's PDF to Pr(z). Assume continuity, and find the transform in terms of r and z. Explain the transformation.4. A certain inspection application gathers black & white images of parts as they travel along a con-veyor belt. It is necessary to sort the parts into two categories: parts with holes and parts with-out holes. An example of an image that might be taken by the inspection camera is shown at the right. Propose a method to identify and locate the objects of each category in the image so that they can be picked up by a robotic system and placed in different bins. Assume that the imaging system knows where each image pixel is located on the conveyor belt at every point in time.Provide an annotated flow chart of the algorithm you propose.5.In a given application, an averaging mask is applied to input images to reduce noise and then aLaplacian mask is applied to enhance small details. Would mathematics predict that the result should be the same if the order of the operations were reversed? What practical issues would be encountered in computer implementation?Digital Image Processing Examination1. A preprocessing step in an application of microscopy is concerned with the issue ofisolating individual round particles from similar particles that overlap in groups of two or more.Assuming that all particles are of the same size, propose a morphological algorithm that will produce an image that contains only the isolated (non-overlapping) particles that are not in contact with the boundary of the image.2. An image represented by a continuous function f(x, y) is w = 2 cm wide and h = 3 cm high. The imageis to be converted to an array of pixels by a scanner whose response is zero above 80 lines/centimeter in both the horizontal and vertical directions. The discrete image is represented by an array ˆf(n, m) where n and m take on integer values, 0 ~ n ~ N - 1, 0~ m ~ M-1.(a)Determine suitable values for N and M.(b)Assume that ˆf(n, m) = f(na, mb). Determine the values of a and b.(c)Determine constants A, B, C, D, E such that the DFT of fˆ can be expressed as)(00) ,() , (EvmDuniBnCmemnfAvu F+-==∑∑=(d)Find numbers (P1, P2) such that F(u + jP1, v + kP2) = F(u, v) for any integers j, k, u, v.3. The arithmetic decoding process is the reverse of the encoding procedure. Decode the message 0.23355 given the coding model.4. The gradient of a function f (x) is defined as⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎣⎡∂∂∂∂=⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡=∇y f x f G G f y xComputationally, the first derivative is implemented by calculating the difference between adjacent pixels.(a) Is the following a linear operator?2122⎥⎥⎦⎤⎢⎢⎣⎡⎪⎪⎭⎫ ⎝⎛∂∂+⎪⎭⎫ ⎝⎛∂∂=∇y f x f f (b) State how would you implement the above operator using differences between pixels.(c) A Sobel operator uses two masks, Hx and Hy to process an image. Explain why are two masksneeded and what do they measure?(d)Write down the masks Hx and Hy, and identify them in the followingfigures:5. The three images shown were blurred using square averaging masks of sizes n=23, 25 , and 45, respectively. The vertical bars on the left lower part of (a) and (c) are blurred, but a clear separation exists between them. However, the bars have merged in image (b), in spite of the fact that the mask that produced this image is significantly smaller than the mask that produced image (c). explain this.Digital Image Processing Examination1. An image array f(m, n) of size M1 × N1 is to be convolved with a filter array h(m, n) of size M2 × N2 to produce a new image array g(m, n).1)Write a pseudo code program that describes a method to compute g(m, n) throughthe use of Fourier transforms. The result should be the same size as would beachieved with direct convolution.2)Modify the algorithm so that it does the correlation f ~ h rather than theconvolution.2. You have the job of designing an algorithm that will count the number of objects with holes and the number of objects without holes in images of the kind shown here. Assume that the images are binary with 0 corresponding to black and 1 correspondingto white. The imaging system is of low quality and produces images that are corrupted with salt and pepper noise.The objects do not overlap or touch, but may be close to each other in any direction.They may be of any shape or size. The algorithm should not be confused by the salt and pepper noise, and should not count noise pixels as objects.Write a pseudo-code description of your algorithm. You may also include a block diagram and other information to make it understandable to a programmer. State any assumptions you make, such as: “Objects must contain at least 50 pixels.”least 50 pixels.”3. Suppose that an image has the gray-level probability density functions shown. Here, p 1(z) corresponds to objects and p 2(z) corresponds to the background. Assume that p 1=p 2 and find the optimal threshold between object and back ground pixels.4. The Sobel operator computes the following quantity at each location (x, y) in an image array, A:Gx[j,k]=(A[j+1,k+1]+2A[j+1,k]+A[j+1,k-1])-(A[j-1,k+1]+2A[j-1,k]+A[j-1,k-1]) Gy[j,k]=(A[j-1,k-1]+2A[j,k-1]+A[j+1,k-1])-(A[j-1,k+1]+2A[j,k+1]+A[j+1,k+1]) G[j,k] = |Gx[j,k]| + |Gy[j,k]|The position of A[j, k] is column j and row k of the array.The operation is implemented as the convolution of the image array A with two masks, Mx and My followed by the magnitude operation.1) Write a 3 × 3 array for each mask, Mx and My.2) What mathematical operation on an image array is approximated by the Sobeloperator? Show how the Sobel operator is related to the mathematical operation.5. Answer the following questions about morphological image processing.(a) Shown below are two tables with expressions that relate to binary morphological image processing. Associate each expression in the left table with one from the right table.(b) A well-known morphological algorithm uses the following iteration with a structuring element B.(1) Initialize X[p] = 1 for some pixel A p ∈(2) A B X Y )(⊕=(3) If X Y ≠ then set X = Y and repeat (2)An original set A is shown in (A) and an initial pixel p 2 A is shown in (B). The result after one iteration of the algorithm with structuring element⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡=010111010Bis shown in (C). Fill in the result of the next two iterations by marking theappropriate pixels for the set Y in (D) and (E). In frame (F) show the result for Y that would be reached after a large number of iterations.Digital Image Processing Examination1. Consider the edge model depicted below. Sketch the gradient and Laplacian of the signal. It is not needed to compute exact numerical values in your answer. Plot of approximate shapes of the responses will be sufficient.2. The white bars in the test pattern shown are 7pixels wide and 210 pixels high. The separation between bars is 17 pixels. What would this image look like after application of .1) A 3*3 arithmetic mean filter?2) A 7*7 median filter.3) A 9*9 contraharmonic mean filter with Q=13. The video coding system introduced in the class utilizes several major components –inter-frame motion estimation, motion compensated prediction, DCT, Huffman coding,and quantization.(a)When an encoded signal can be used to reconstruct the exact value of theoriginal signal, we say the encoding method is lossless; otherwise, it’s calledlossy. A lossy coding technique introduces distortion to the signal.Which component in the above video coding system is lossy?(b)The motion compensation process in the encoder generates a motion vectorand prediction errors for each image block in the video signal. Suppose duringthe transmission of the encoded video stream, one motion vector is lost (e.g.,due to the network erasure error). What will be the visual effects of suchtransmission errors on the decoded image sequence?4.Consider a black-and-white image consisting of round and rectangular objects, as shown in the image below. Assume the sizes of the objects are fixed and known. We also know that the width and length of the rectangles are larger than the diameter of the circles. None of the rectangles are tilted. In general, the objects may overlap with each other.Design a morphological operation based system to automatically detect all the instances of the rounds objects that overlap with rectangular objects.5. An image A, represented by an N × M array of bytes, has a uniform brightnesshistogram. It is desired transform A into an image B in a way that produces a triangular brightness histogram2550,36240][≤≤=k k MNk h bDescribe a process that will accomplish the transformation. If possible, derive an equation for the transformation function. At a minimum, sketch the transformation function and indicate how you would use it in a program to compute the array B.模拟试卷一1.对将一个像素宽度的8通路转换到4通路提出一种算法。
《数字图像处理》复习⼤作业及答案2014年上学期《数字图像处理》复习⼤作业及参考答案=====================================================⼀、选择题(共20题)1、采⽤幂次变换进⾏灰度变换时,当幂次取⼤于1时,该变换是针对如下哪⼀类图像进⾏增强。
(B)A 图像整体偏暗B 图像整体偏亮C图像细节淹没在暗背景中D图像同时存在过亮和过暗背景2、图像灰度⽅差说明了图像哪⼀个属性。
(B )A 平均灰度B 图像对⽐度C 图像整体亮度D图像细节3、计算机显⽰器主要采⽤哪⼀种彩⾊模型( A )A、RGBB、CMY或CMYKC、HSID、HSV4、采⽤模板[-1 1]T主要检测( A )⽅向的边缘。
A.⽔平B.45?C.垂直D.135?5、下列算法中属于图象锐化处理的是:( C )A.低通滤波B.加权平均法C.⾼通滤波D. 中值滤波6、维纳滤波器通常⽤于( C )A、去噪B、减⼩图像动态范围C、复原图像D、平滑图像7、彩⾊图像增强时, C 处理可以采⽤RGB彩⾊模型。
A. 直⽅图均衡化B. 同态滤波C. 加权均值滤波D. 中值滤波8、__B__滤波器在对图像复原过程中需要计算噪声功率谱和图像功率谱。
A. 逆滤波B. 维纳滤波C. 约束最⼩⼆乘滤波D. 同态滤波9、⾼通滤波后的图像通常较暗,为改善这种情况,将⾼通滤波器的转移函数加上⼀常数量以便引⼊⼀些低频分量。
这样的滤波器叫B。
A. 巴特沃斯⾼通滤波器B. ⾼频提升滤波器C. ⾼频加强滤波器D. 理想⾼通滤波器10、图象与灰度直⽅图间的对应关系是 B __A.⼀⼀对应B.多对⼀C.⼀对多D.都不11、下列算法中属于图象锐化处理的是:CA.低通滤波B.加权平均法C.⾼通滤D. 中值滤波12、⼀幅256*256的图像,若灰度级数为16,则存储它所需的⽐特数是:( A )A、256KB、512KC、1M C、2M13、噪声有以下某⼀种特性( D )A、只含有⾼频分量B、其频率总覆盖整个频谱C、等宽的频率间隔内有相同的能量D、总有⼀定的随机性14. 利⽤直⽅图取单阈值⽅法进⾏图像分割时:(B)a.图像中应仅有⼀个⽬标b.图像直⽅图应有两个峰c.图像中⽬标和背景应⼀样⼤d. 图像中⽬标灰度应⽐背景⼤15. 在单变量变换增强中,最容易让⼈感到图像内容发⽣变化的是( C )A亮度增强觉B饱和度增强C⾊调增强D不⼀定哪种增强16、利⽤平滑滤波器可对图像进⾏低通滤波,消除噪声,但同时模糊了细节。
2013级数字图像处理期末考试试题一、单项选择题(每小题1分,共10分)( d )1.一幅灰度级均匀分布的图象,其灰度范围在[0,255],则该图象的信息量为:a. 0b.255c.6d.8( b )2.图象与灰度直方图间的对应关系是:a.一一对应b.多对一c.一对多d.都不对( d )3.下列算法中属于局部处理的是:a.灰度线性变换b.二值化c.傅立叶变换d.中值滤波( b )4.下列算法中属于点处理的是:a.梯度锐化b.二值化c.傅立叶变换d.中值滤波( d ) 5.一曲线的方向链码为12345,则曲线的长度为a.5b.4c.5.83d.6.24( c )6. 下列算法中属于图象平滑处理的是:a.梯度锐化b.直方图均衡c. 中值滤波placian增强( b )7.下列图象边缘检测算子中抗噪性能最好的是:a.梯度算子b.Prewitt算子c.Roberts算子d. Laplacian算子( c )8.采用模板[-1 1]主要检测____方向的边缘。
a.水平b.45°c.垂直d.135°( d )9.二值图象中分支点的连接数为:a.0b.1c.2d.3( a )10.对一幅100´100像元的图象,若每像元用8bit表示其灰度值,经霍夫曼编码后压缩图象的数据量为40000bit,则图象的压缩比为:a.2:1b.3:1c.4:1d.1:2二、填空题(每空1分,共15分)1.图像锐化除了在空间域进行外,也可在频率域进行。
2.图像处理中常用的两种邻域是4-邻域和8-邻域。
3.直方图修正法包括直方图均衡和直方图规定化两种方法。
4.常用的灰度内插法有最近邻元法、双线性内插法和(双)三次内插法。
5.多年来建立了许多纹理分析法,这些方法大体可分为统计分析法和结构分析法两大类。
6.低通滤波法是使高频成分受到抑制而让低频成分顺利通过,从而实现图像平滑。
7.检测边缘的Sobel算子对应的模板形式为和。
2014年上学期《数字图像处理》复习大作业及参考答案=====================================================一、选择题(共20题)1、采用幂次变换进行灰度变换时,当幂次取大于1时,该变换是针对如下哪一类图像进行增强。
(B)A 图像整体偏暗B 图像整体偏亮C图像细节淹没在暗背景中D图像同时存在过亮和过暗背景2、图像灰度方差说明了图像哪一个属性。
(B )A 平均灰度B 图像对比度C 图像整体亮度D图像细节3、计算机显示器主要采用哪一种彩色模型( A )A、RGBB、CMY或CMYKC、HSID、HSV4、采用模板[-1 1]T主要检测( A )方向的边缘。
A.水平B.45︒C.垂直D.135︒5、下列算法中属于图象锐化处理的是:( C )A.低通滤波B.加权平均法C.高通滤波D. 中值滤波6、维纳滤波器通常用于( C )A、去噪B、减小图像动态范围C、复原图像D、平滑图像7、彩色图像增强时, C 处理可以采用RGB彩色模型。
A. 直方图均衡化B. 同态滤波C. 加权均值滤波D. 中值滤波8、__B__滤波器在对图像复原过程中需要计算噪声功率谱和图像功率谱。
A. 逆滤波B. 维纳滤波C. 约束最小二乘滤波D. 同态滤波9、高通滤波后的图像通常较暗,为改善这种情况,将高通滤波器的转移函数加上一常数量以便引入一些低频分量。
这样的滤波器叫B。
A. 巴特沃斯高通滤波器B. 高频提升滤波器C. 高频加强滤波器D. 理想高通滤波器10、图象与灰度直方图间的对应关系是 B __A.一一对应B.多对一C.一对多D.都不11、下列算法中属于图象锐化处理的是:CA.低通滤波B.加权平均法C.高通滤D. 中值滤波12、一幅256*256的图像,若灰度级数为16,则存储它所需的比特数是:( A )A、256KB、512KC、1M C、2M13、噪声有以下某一种特性( D )A、只含有高频分量B、其频率总覆盖整个频谱C、等宽的频率间隔内有相同的能量D、总有一定的随机性14. 利用直方图取单阈值方法进行图像分割时:(B)a.图像中应仅有一个目标b.图像直方图应有两个峰c.图像中目标和背景应一样大d. 图像中目标灰度应比背景大15. 在单变量变换增强中,最容易让人感到图像内容发生变化的是( C )A亮度增强觉B饱和度增强C色调增强D不一定哪种增强16、利用平滑滤波器可对图像进行低通滤波,消除噪声,但同时模糊了细节。
1. 图像处理与计算机图形学的区别与联系是什么?答:数字图像处理,是指有计算机及其它有关的数字技术,对图像施加某种运算和处理,从而达到某种预期的目的,而计算机图形学是研究采用计算机生成,处理和显示图形的一门科学。
两者区别:(1)研究对象不同,计算机图形学研究的研究对象是能在人的视觉系统中产生视觉印象的事物,包括自然景物,拍摄的图片,用数学方法描述的图形等,而数字图像处理研究对象是图像;(2)研究内容不同,计算机图像学研究内容为图像生成,透视,消阴等,而数字图像处理研究内容为图像处理,图像分割,图像透析等;(3)研究过程不同,计算机图像学是由数学公式生成仿真图形或图像,而数字图像处理是由原始图像处理出分析结果,计算机图形与图像处理是逆过程。
两者的联系:图像处理需图形学的交互手段,图形学需要图像处理合成图像,两者有重叠。
2. 图像数字化过程中的失真有那些原因?就在减少图像失真和减少图像的数据量两者之间如何取得平衡,谈谈个人的看法。
答:图像数字化过程中失真的原因主要来自三个方面:一.采样频率太低,即未满足采样定理而造成的失真;二.外部和内部噪声的影响,例如外部的电磁波、机械运动等;三.用有限个灰度值表示自然界无限连续的灰度值必然造成失真,为了减小失真必然增加采样点,即增加图像数据量。
在减少图像失真和减少图像的数据量两者之间取得平衡,要根据图像需求保留有用信息,如军事图像只需保留反应地形地貌及目标的信息,普通照片只需满足视觉要求即可。
3. 一幅模拟彩色图像经平板扫描仪扫描后获得一幅彩色数字图像,其分辨率为1024×768像素。
若采用RGB彩色空间,红、绿、蓝三基色的灰度等级为8比特,在无压缩的情况下,在计算机中存储该图像将占用多少比特的存储空间?当用Photoshop图像处理软件去掉图像的彩色信息,只留下灰度信息,灰度等级为4比特,在无压缩的情况下,存储该图像将占用多少字节的存储空间?答:(1)采用RGB彩色空间,红、绿、蓝三基色的灰度等级为8比特,在无压缩的情况下,占存储空间大小为:1024×768×8×3=18874268bit=2.25MB(2)去掉彩色信息,只留下灰度信息,灰度等级为4比特,在无压缩的情况下,所占的存储空间大小为:1024×768×4 =3145728bit=0.375MB4. 试设计一个程序实现nn 的中值滤波器,当模板中心移过图像中每个位置时,设计一种简便的中值更新方法。
《数字图像处理》大作业——车牌识别(车牌定位和字符分割部分)学院:电子与控制工程学院专业:交通信息工程及控制学号:****************任课教师:***车牌识别系统1 车牌识别系统1.1车牌识别系统的概述目前随着科技和经济的日益发展,智能交通系统在世界范围内引起重视,我国已经将其列入科技计划重点实施。
智能交通系统是交通发展的必然趋势,而车牌识别系统是智能交通系统中的重要组成部分。
该系统可以记录十字路口违章车辆,实现高速公路,收费路口,停车场等地的收费。
既减少了人力,又节约了时间,还提高了效率。
车牌识别系统的主要任务是分析和处理摄取到的复杂背景下的车辆图像,定位分割牌照,最后自动识别汽车牌照上的字符,LPR是利用车辆牌照的唯一性来识别和统计车辆,它是以数字图像处理、模式识别、计算机视觉等技术为基础的智能识别系统。
在现代化交通发展中车牌识别系统是制约交通系统智能化、现代化的重要因素,LPR系统应该能够从一幅图像中自动提取车辆图像,自动分割牌照图像,对字符进行正确识别,从而降低交通管理工作的复杂度。
车牌字符识别的实质是对车牌上的汉字、字母和数字进行快速准确的识别并以字符串的形式输出识别结果,字符识别技术是整个车牌识别系统的关键。
车牌识别系统与其它图像识别系统相比较而言要复杂的多,在字符识别中,汉字识别是最难也是最关键的部分,很多国外较为成熟的车牌识别系统无法进入中国市场的原因就在于无法有效的识别汉字。
1.2车牌识别系统的结构和工作原理车牌识别技术的任务是处理、分析摄取的车辆图像,实现车牌号码的自动识别。
典型的车辆牌照识别系统是由图像采集系统、中央处理器、识别系统组成,一般还要连接相应的数据库以完成特定的功能。
当系统发现(通过埋地线圈或者光束检测)有车通过时,则发出信号给图像采集系统,然后采集系统将得到的图像输入识别系统进行识别,其识别结果应该是文本格式的车牌号码。
图1.1 车牌识别系统原理图车牌整体识别过程大体可分为四个步骤:图像预处理、车牌定位和分割、车牌字符分割和车牌字符识别。
Digital Image Processing Examination1. Fourier Transform problem.1)F or an image given by the function f(x,y)=(x+y)3where x,y are continuous varibales;evaluate f(x,y)δ(x-1,y-2) and f(x,y)* δ(x-1,y-2),whereδ is the Dorac Delta function.2)F or the optical imaging system shoen below,consisting of an image scaling and two forward Fourier transforms show that the output image is a scale and invertedf(x,y) Scaling f(ax,by) F F g(x,y)_3) three binary images (with value 1 on black areas and value 0 elsewhere) are shown below. Sketch the continuous 2D FT of these images(don’t do this mathematically, try to use instead the convolution theorem and knowledge of FTs of common functions)2. The rate distortion function of a zero memory Gaussian source of arbitary mean and variance σ2 with respect to the mean-square error criterion is⎪⎩⎪⎨⎧≥≤≤=222log21)(σσσDDforDDRa)Plot this functionb)What is Dmaxc)If a distortion of no mor than 75% of the source’s variance is allowed, what isthe maximum compression that can be achieved?3. The PDF of an image is given by Pr(r) as shown below. Find the transform to convert the image's PDF to Pr(z). Assume continuity, and find the transform in termsof r and z. Explain the transformation.4. A certain inspection application gathers black & white images of parts as they travel along a conveyor belt. It is necessary to sort the parts into two categories: parts with holes and parts with-out holes. An example of an image that might be taken by the inspection camera is shown at the right.Propose a method to identify and locate the objects of each category in the image so that they can be picked up by a robotic system and placed in different bins. Assume that the imaging system knows where each image pixel is located on the conveyor belt at every point in time.Provide an annotated flow chart of the algorithm you propose.5. In a given application, an averaging mask is applied to input images to reducenoise and then a Laplacian mask is applied to enhance small details. Would mathematics predict that the result should be the same if the order of the operations were reversed? What practical issues would be encountered in computer implementation?Digital Image Processing Examination1. A preprocessing step in an application of microscopy is concerned with theissue of isolating individual round particles from similar particles that overlap in groups of two or more.Assuming that all particles are of the same size, propose a morphological algorithm that will produce an image that contains only the isolated (non-overlapping) particles that are not in contact with the boundary of the image.2. An image represented by a continuous function f(x, y) is w = 2 cm wide and h = 3 cmhigh. The image is to be converted to an array of pixels by a scanner whose response is zero above 80 lines/centimeter in both the horizontal and vertical directions. The discrete image is represented by an array ˆf(n, m) where n and m take on integer values,0 ~ n ~ N - 1, 0~ m ~ M-1.(a)Determine suitable values for N and M.(b)Assume that ˆf(n, m) = f(na, mb). Determine the values of a and b.(c)Determine constants A, B, C, D, E such that the DFT of fˆ can be expressed as)(00) ,() , (EvmDuniBnCmemnfAvu F+-==∑∑=)(d)Find numbers (P1, P2) such that F(u + jP1, v + kP2) = F(u, v) for any integersj, k, u, v.3.The arithmetic decoding process is the reverse of the encoding procedure. Decode the message 0.23355 given the coding model.4. The gradient of a function f (x) is defined as ⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎣⎡∂∂∂∂=⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡=∇y f x f G G f y xComputationally, the first derivative is implemented by calculating the difference between adjacent pixels.(a) Is the following a linear operator?2122⎥⎥⎦⎤⎢⎢⎣⎡⎪⎪⎭⎫ ⎝⎛∂∂+⎪⎭⎫ ⎝⎛∂∂=∇y f x f f (b) State how would you implement the above operator using differences between pixels. (c) A Sobel operator uses two masks, Hx and Hy to process an image. Explain why aretwo masks needed and what do they measure?(d) Write down the masks Hx and Hy, and identify them in the followingfigures:5. The three images shown were blurred using square averaging masks of sizes n=23, 25 , and 45, respectively. The vertical bars on the left lower part of (a) and (c) are blurred, but a clear separation exists between them. However, the bars have merged in image (b), in spite of the fact that the mask that produced this image is significantly smaller than the mask that produced image (c). explain this.Digital Image Processing Examination1. An image array f(m, n) of size M1 × N1 is to be convolved with a filter array h(m, n) of size M2 × N2 to produce a new image array g(m, n). 1)Write a pseudo code program that describes a method to compute g(m,n) through the use of Fourier transforms. The result should be the same size as would be achieved with direct convolution.2)Modify the algorithm so that it does the correlation f ~ h rather thanthe convolution.2. You have the job of designing an algorithm that will count the number of objects with holes and the number of objects without holes in images of the kind shown here. Assume that the images are binary with 0 corresponding to black and 1 corresponding to white. The imaging system is of low quality and produces images that are corrupted with salt and pepper noise.The objects do not overlap or touch, but may be close to each other in any direction. They may be of any shape or size. The algorithm should not be confused by the salt and pepper noise, and should not count noise pixels as objects.Write a pseudo-code description of your algorithm. You may also includea block diagram and other information to make it understandable to aprogrammer. State any assumptions you make, such as: “Objects must contain at least 50 pixels.”least 50 pixels.”3. Suppose that an image has the gray-level probability density functions shown. Here, p 1(z) corresponds to objects and p 2(z) corresponds to thebackground. Assume that p 1=p 2 and find the optimal threshold between object and back ground pixels.4. The Sobel operator computes the following quantity at each location (x, y) in an image array, A:Gx[j,k]=(A[j+1,k+1]+2A[j+1,k]+A[j+1,k-1])-(A[j-1,k+1]+2A[j-1,k]+A[j-1,k-1])Gy[j,k]=(A[j-1,k-1]+2A[j,k-1]+A[j+1,k-1])-(A[j-1,k+1]+2A[j,k+1]+A[j+1,k+1])G[j,k] = |Gx[j,k]| + |Gy[j,k]|The position of A[j, k] is column j and row k of the array.The operation is implemented as the convolution of the image array A with two masks, Mx and My followed by the magnitude operation.1) Write a 3 × 3 array for each mask, Mx and My.2) What mathematical operation on an image array is approximated by theSobel operator? Show how the Sobel operator is related to themathematical operation.5. Answer the following questions about morphological image processing.(a) Shown below are two tables with expressions that relate to binarymorphological image processing. Associate each expression in the left table with one from the right table.(b) A well-known morphological algorithm uses the following iteration with a structuring element B.(1) Initialize X[p] = 1 for some pixel A p(2) A B X Y I )(⊕=(3) If X Y ≠ then set X = Y and repeat (2)An original set A is shown in (A) and an initial pixel p 2 A is shown in (B). The result after one iteration of the algorithm with structuring element⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡=010111010Bis shown in (C). Fill in the result of the next two iterations by marking the appropriate pixels for the set Y in (D) and (E). In frame (F) show the result for Y that would be reached after a large number of iterations.Digital Image Processing Examination1. Consider the edge model depicted below. Sketch the gradient and Laplacian of the signal. It is not needed to compute exact numerical values in your answer. Plot of approximate shapes of the responses will be sufficient.2. The white bars in the test pattern shown are 7pixels wide and 210pixels high. The separation between bars is 17 pixels. What would thisimage look like after application of .1) A 3*3 arithmetic mean filter?2) A 7*7 median filter.3) A 9*9 contraharmonic mean filter with Q=13.The video coding system introduced in the class utilizes several majorcomponents – inter-frame motion estimation, motion compensated prediction, DCT, Huffman coding, and quantization.(a)W hen an encoded signal can be used to reconstruct the exact valueof the original signal, we say the encoding method is lossless;otherwise, it’s called lossy. A lossy coding technique introduces distortion to the signal.Which component in the above video coding system is lossy?(b)T he motion compensation process in the encoder generates a motionvector and prediction errors for each image block in the videosignal. Suppose during the transmission of the encoded video stream,one motion vector is lost (e.g., due to the network erasure error). What will be the visual effects of such transmission errors on the decoded image sequence?4.Consider a black-and-white image consisting of round and rectangular objects, as shown in the image below. Assume the sizes of the objects are fixed and known. We also know that the width and length of the rectangles are larger than the diameter of the circles. None of the rectangles are tilted. In general, the objects may overlap with each other.Design a morphological operation based system to automatically detect all the instances of the rounds objects that overlap with rectangular objects.5. An image A, represented by an N × M array of bytes, has a uniform brightness histogram. It is desired transform A into an image B in a way that produces a triangular brightness histogram2550,36240][≤≤=k k MN k h bDescribe a process that will accomplish the transformation. If possible, derive an equation for the transformation function. At a minimum, sketch the transformation function and indicate how you would use it in a program to compute the array B.模拟试卷一1.对将一个像素宽度的8通路转换到4通路提出一种算法。
1 大作业题目1.问答题1.1连续图像f(x.y)和数字图像I(r,c)中各分量的含义是什么?他们有什么联系和区别?取值范围在什么范围?答:f(x,y)表示二维图像在空间XY中一个坐标点的位置(实际图像的尺寸是有限的,所以x和y的取值也是有限的),即f(x,y)中的x,y分别代表一个点连续图像中的x轴和y轴的坐标,而f则代表图像在点(x,y)的某种性质F的数值(实际图像中各个位置上所具有的性质F的取值也是有限的,所以F得取值也是有限的)。
F,x,y的值可以是任意实数。
图像在点(x,y)也可以有多重性质,此时可用矢量f来表示。
数字图像I(r,c)表示位于图像矩阵上第r行,第c列的元素幅值。
其中I,c,r的值都是整数。
I(r,c)是通过对f(x,y)抽样和量化得来的,f(x,y)各量是连续的,I(r,c)各量是离散的,这里的I代表离散化后的f,(r,c)代表离散化后的(x,y),r,c分别有连续图像中的x,y分别采样得到的;x,y可以取所有的非负数,r,c可以取所有的非负整数。
1.2 发光强度及亮度、照度各有什么不同?答:1)发光强度,单位坎德拉,即cd。
定义:光源在给定方向的单位立体角中发射的光通量定义为光源在该方向的发光强度。
解释:发光强度是针对点光源而言的,或者发光体的大小与照射距离相比比较小的场合。
这个量是表明发光体在空间发射的会聚能力的。
可以说,发光强度就是描述了光源到底有多“亮”,因为它是光功率与会聚能力的一个共同的描述。
发光强度越大,光源看起来就越亮,同时在相同条件下被该光源照射后的物体也就越亮,因此,早些时候描述手电都用这个参数。
常见光源发光强度:太阳,2.8E27cd,高亮手电,10000cd,5mm超高亮LED,15cd。
2)亮度,单位尼特,即nt。
定义:单位光源面积在法线方向上,单位立体角内所发出的光流。
解释:这个是最容易被误解的概念了。
亮度是针对光源而言,而且不是对点光源,是对面光源而言的。
姓名: 学号:专业: 通信工程 科目:数字图像处理日期:2014年6月5日数字图像处理课程设计低通滤波器滤去灰度图片的椒盐噪声一、数字图像处理的简介数字图像处理(Digital Image Processing)是通过计算机对图像进行去除噪声、增强、复原、分割、提取特征等处理的方法和技术。
数字图像处理的产生和迅速发展主要受三个因素的影响:一是计算机的发展;二是数学的发展(特别是离散数学理论的创立和完善);三是广泛的农牧业、林业、环境、军事、工业和医学等方面的应用需求的增长。
二、数字图像处理的发展概况1920年代的Bartlane 电缆图片传输系统(无计算机时代)1960年代的空间探测器发回的图像畸变校正系统(计算机技术引入到空间项目的开发当中)1970年代的计算机断层扫描图像重建技术三、题目要求设计一个低通滤波器,给一幅有椒盐噪声的灰度图像滤波。
按照题目的要求,简要介绍算法,并对算法进行分析。
用MATLAB 完成算法代码(不能利用MATLAB 自身的图像处理函数完成具体算法,读写和显示可以利用MATLAB 函数),注释要清晰。
给出代码运行的结果,并对结论进行总结。
四、关于图像强化和数字滤波器的基础知识1、频率域图像增强技术简介频率域图像增强时增强技术的重要组成部分,通过傅里叶变换,可以把空间域混叠的成分在频率域中分离出来,从而提取或滤去相应的图像成分。
这一过程中的核心基础即为傅里叶变换。
二维离散傅里叶变换定义为:N vy ux j N x N y e x f N v u F /)(2101)(1),(+--=-=∑∑=π,式中,1,,2,1,0;1,,2,1,0-=-=N v N u 。
二维离散傅里叶反变换:Nvy ux j N u N v ev u F Ny x f /)(2101),(1),(+-=-=∑∑=π,式中,1,,1,0,1,,1,0-=-=N y N x 。
2、频率域平滑滤波器图像空间域的线性领域卷积实际上是图像经过滤波器对信号频率成分的滤波,这种功能也可以再变换域实现,即把原始图像进行正变换,设计一个滤波器用点数操作的方法加工频谱数据,然后再进行反变换,即完成处理工作。
数字图像处理一、填空题1、数字图像的格式有很多种,除GIF格式外,还有 jpg 格式、 tif 格式。
2、图像数据中存在的有时间冗余、空间冗余、结构冗余、信息熵冗余、知识冗余、视觉冗余。
3、在时域上采样相当于在频域上进行___延拓。
4、二维傅里叶变换的性质___分离性、线性、周期性与共轨对称性、__位移性、尺度变换、旋转性、平均值、卷积。
(不考)5、图像中每个基本单元叫做图像元素;在早期用picture表示图像时就称为像素。
6、在图象处理中认为线性平滑空间滤波器的模板越大,则对噪声的压制越好;但使图像边缘和细节信息损失越多; 反之, 则对噪声的压制不好 ,但对图像的细节等信息保持好.模板越平,则对噪声的压制越好,但对图像细节的保持越差;反之,则对噪声的压制不好,但对图像细节和边缘保持较好。
7、哈达玛变换矩阵包括___+1 和___—1 两种矩阵元素.(不要)8、对数变换的数学表达式是 t = Clog ( 1 + | s | ) 。
9、傅里叶快速算法利用了核函数的___周期性和__对称性 .(不要)10、直方图均衡化的优点是能自动地增强整个图像的对比度。
(不要)二、选择题( d )1。
一幅灰度级均匀分布的图象,其灰度范围在[0,255],则该图象的信息量为:a。
0 b。
255 c.6 d。
8( c )2。
采用模板[—1 1]主要检测____方向的边缘。
a。
水平 b。
45° c.垂直 d。
135( c )3. 下列算法中属于图象平滑处理的是:a.梯度锐化b.直方图均衡c. 中值滤波placian增强( b )4.图象与灰度直方图间的对应关系是:a。
一一对应 b.多对一 c。
一对多 d.都不对( a )5.对一幅图像采样后,512*512的数字图像与256*256的数字图像相比较具有的细节。
a。
较多 b。
较少 c.相同 d.都不对( b )6.下列算法中属于点处理的是:a。
梯度锐化 b。
Digital Image Processing Examination1. Fourier Transform problem.1) F or an image given by the function f(x,y)=(x+y)3 where x,y are continuous varibales; evaluatef(x,y)δ(x-1,y-2) and f(x,y)* δ(x-1,y-2),where δ is the Dorac Delta function.2) F or the optical imaging system shoen below,consisting of an image scaling and two forwardFourier transforms show that the output image is a scale and inverted replica of the original image f(x,y). f(x,y) Scaling f(ax,by) F F g(x,y)_3) three binary images (with value 1 on black areas and value 0 elsewhere) are shown below. Sketch the continuous 2D FT of these images(don’t do this mathematically, try to use instead the convolution theorem and knowledge of FTs of common functions)2. The rate distortion function of a zero memory Gaussian source of arbitary mean and variance σ2 with respect to the mean-square error criterion is⎪⎩⎪⎨⎧≥≤≤=22200log 21)(σσσD D for D D Ra) Plot this functionb) What is D maxc) If a distortion of no mor than 75% of the source’s variance is allowed, what is the maximumcompression that can be achieved?3. The PDF of an image is given by Pr(r) as shown below. Find the transform toconvert the image's PDF to Pr(z). Assume continuity, and find the transform in terms of r and z. Explain the transformation.4. A certain inspection application gathers black & white images of parts as they travel along a con-veyor belt. It is necessary to sort the parts into two categories: parts with holes and parts with-out holes. An example of an image that might be taken by the inspection camera is shown at the right. Propose a method to identify and locate the objects of each category in the image so that they can be picked up by a robotic system and placed in different bins. Assume that the imaging system knows where each image pixel is located on the conveyor belt at every point in time.Provide an annotated flow chart of the algorithm you propose.5.In a given application, an averaging mask is applied to input images to reduce noise and then aLaplacian mask is applied to enhance small details. Would mathematics predict that the result should be the same if the order of the operations were reversed? What practical issues would be encountered in computer implementation?Digital Image Processing Examination1. A preprocessing step in an application of microscopy is concerned with the issue ofisolating individual round particles from similar particles that overlap in groups of two or more.Assuming that all particles are of the same size, propose a morphological algorithm that will produce an image that contains only the isolated (non-overlapping) particles that are not in contact with the boundary of the image.2. An image represented by a continuous function f(x, y) is w = 2 cm wide and h = 3 cm high. The imageis to be converted to an array of pixels by a scanner whose response is zero above 80 lines/centimeter in both the horizontal and vertical directions. The discrete image is represented by an array ˆf(n, m) where n and m take on integer values, 0 ~ n ~ N - 1, 0~ m ~ M-1.(a)Determine suitable values for N and M.(b)Assume that ˆf(n, m) = f(na, mb). Determine the values of a and b.(c)Determine constants A, B, C, D, E such that the DFT of fˆ can be expressed as)(00) ,() , (EvmDuniBnCmemnfAvu F+-==∑∑=(d)Find numbers (P1, P2) such that F(u + jP1, v + kP2) = F(u, v) for any integers j, k, u, v.3. The arithmetic decoding process is the reverse of the encoding procedure. Decode the message 0.23355 given the coding model.4. The gradient of a function f (x) is defined as ⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎣⎡∂∂∂∂=⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡=∇y f x f G G f y xComputationally, the first derivative is implemented by calculating the difference between adjacent pixels.(a) Is the following a linear operator?2122⎥⎥⎦⎤⎢⎢⎣⎡⎪⎪⎭⎫ ⎝⎛∂∂+⎪⎭⎫ ⎝⎛∂∂=∇y f x f f (b) State how would you implement the above operator using differences between pixels.(c) A Sobel operator uses two masks, Hx and Hy to process an image. Explain why are two masksneeded and what do they measure?(d) Write down the masks Hx and Hy, and identify them in the followingfigures:5. The three images shown were blurred using square averaging masks of sizes n=23, 25 , and 45, respectively. The vertical bars on the left lower part of (a) and (c) are blurred, but a clear separation exists between them. However, the bars have merged in image (b), in spite of the fact that the mask that produced this image is significantly smaller than the mask that produced image (c). explain this.Digital Image Processing Examination1. An image array f(m, n) of size M1 × N1 is to be convolved with a filter array h(m, n) of size M2 × N2 to produce a new image array g(m, n).1)Write a pseudo code program that describes a method to compute g(m, n) throughthe use of Fourier transforms. The result should be the same size as would beachieved with direct convolution.2)Modify the algorithm so that it does the correlation f ~ h rather than theconvolution.2. You have the job of designing an algorithm that will count the number of objects with holes and the number of objects without holes in images of the kind shown here. Assume that the images are binary with 0 corresponding to black and 1 correspondingto white. The imaging system is of low quality and produces images that are corrupted with salt and pepper noise.The objects do not overlap or touch, but may be close to each other in any direction.They may be of any shape or size. The algorithm should not be confused by the salt and pepper noise, and should not count noise pixels as objects.Write a pseudo-code description of your algorithm. You may also include a block diagram and other information to make it understandable to a programmer. State any assumptions you make, such as: “Objects must contain at least 50 pixels.”least 50 pixels.”3. Suppose that an image has the gray-level probability density functions shown. Here, p 1(z) corresponds to objects and p 2(z) corresponds to the background. Assume that p 1=p 2 and find the optimal threshold between object and back ground pixels.4. The Sobel operator computes the following quantity at each location (x, y) in an image array, A:Gx[j,k]=(A[j+1,k+1]+2A[j+1,k]+A[j+1,k-1])-(A[j-1,k+1]+2A[j-1,k]+A[j-1,k-1]) Gy[j,k]=(A[j-1,k-1]+2A[j,k-1]+A[j+1,k-1])-(A[j-1,k+1]+2A[j,k+1]+A[j+1,k+1]) G[j,k] = |Gx[j,k]| + |Gy[j,k]|The position of A[j, k] is column j and row k of the array.The operation is implemented as the convolution of the image array A with two masks, Mx and My followed by the magnitude operation.1) Write a 3 × 3 array for each mask, Mx and My.2) What mathematical operation on an image array is approximated by the Sobeloperator? Show how the Sobel operator is related to the mathematical operation.5. Answer the following questions about morphological image processing.(a) Shown below are two tables with expressions that relate to binary morphological image processing. Associate each expression in the left table with one from the right table.(b) A well-known morphological algorithm uses the following iteration with a structuring element B.(1) Initialize X[p] = 1 for some pixel A p ∈(2) A B X Y )(⊕=(3) If X Y ≠ then set X = Y and repeat (2)An original set A is shown in (A) and an initial pixel p 2 A is shown in (B). The result after one iteration of the algorithm with structuring element⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡=010111010Bis shown in (C). Fill in the result of the next two iterations by marking theappropriate pixels for the set Y in (D) and (E). In frame (F) show the result for Y that would be reached after a large number of iterations.Digital Image Processing Examination1. Consider the edge model depicted below. Sketch the gradient and Laplacian of the signal. It is not needed to compute exact numerical values in your answer. Plot of approximate shapes of the responses will be sufficient.2. The white bars in the test pattern shown are 7pixels wide and 210 pixels high. The separation between bars is 17 pixels. What would this image look like after application of .1) A 3*3 arithmetic mean filter?2) A 7*7 median filter.3) A 9*9 contraharmonic mean filter with Q=13. The video coding system introduced in the class utilizes several major components –inter-frame motion estimation, motion compensated prediction, DCT, Huffman coding,and quantization.(a)When an encoded signal can be used to reconstruct the exact value of theoriginal signal, we say the encoding method is lossless; otherwise, it’s calledlossy. A lossy coding technique introduces distortion to the signal.Which component in the above video coding system is lossy?(b)The motion compensation process in the encoder generates a motion vectorand prediction errors for each image block in the video signal. Suppose duringthe transmission of the encoded video stream, one motion vector is lost (e.g.,due to the network erasure error). What will be the visual effects of suchtransmission errors on the decoded image sequence?4.Consider a black-and-white image consisting of round and rectangular objects, as shown in the image below. Assume the sizes of the objects are fixed and known. We also know that the width and length of the rectangles are larger than the diameter of the circles. None of the rectangles are tilted. In general, the objects may overlap with each other.Design a morphological operation based system to automatically detect all the instances of the rounds objects that overlap with rectangular objects.5. An image A, represented by an N × M array of bytes, has a uniform brightnesshistogram. It is desired transform A into an image B in a way that produces a triangular brightness histogram2550,36240][≤≤=k k MNk h bDescribe a process that will accomplish the transformation. If possible, derive an equation for the transformation function. At a minimum, sketch the transformation function and indicate how you would use it in a program to compute the array B.模拟试卷一1.对将一个像素宽度的8通路转换到4通路提出一种算法。
2014年上学期《数字图像处理》复习大作业及参考答案=====================================================一、选择题(共20题)1、采用幂次变换进行灰度变换时,当幂次取大于1时,该变换是针对如下哪一类图像进行增强。
( B)A 图像整体偏暗B 图像整体偏亮C图像细节淹没在暗背景中 D图像同时存在过亮和过暗背景2、图像灰度方差说明了图像哪一个属性。
( B )A 平均灰度B 图像对比度C 图像整体亮度 D图像细节3、计算机显示器主要采用哪一种彩色模型( A )A、RGBB、CMY或CMYKC、HSID、HSV4、采用模板[-1 1]T主要检测( A )方向的边缘。
A.水平B.45︒C.垂直D.135︒5、下列算法中属于图象锐化处理的是:( C )A.低通滤波B.加权平均法C.高通滤波D. 中值滤波6、维纳滤波器通常用于( C )A、去噪B、减小图像动态范围C、复原图像D、平滑图像7、彩色图像增强时, C 处理可以采用RGB彩色模型。
A. 直方图均衡化B. 同态滤波C. 加权均值滤波D. 中值滤波8、__B__滤波器在对图像复原过程中需要计算噪声功率谱和图像功率谱。
A. 逆滤波B. 维纳滤波C. 约束最小二乘滤波D. 同态滤波9、高通滤波后的图像通常较暗,为改善这种情况,将高通滤波器的转移函数加上一常数量以便引入一些低频分量。
这样的滤波器叫 B。
A. 巴特沃斯高通滤波器B. 高频提升滤波器C. 高频加强滤波器D. 理想高通滤波器10、图象与灰度直方图间的对应关系是 B __A.一一对应B.多对一C.一对多D.都不11、下列算法中属于图象锐化处理的是: CA.低通滤波B.加权平均法C.高通滤D. 中值滤波12、一幅256*256的图像,若灰度级数为16,则存储它所需的比特数是:( A )A、256KB、512KC、1M C、2M13、噪声有以下某一种特性( D )A、只含有高频分量B、其频率总覆盖整个频谱C、等宽的频率间隔内有相同的能量D、总有一定的随机性14. 利用直方图取单阈值方法进行图像分割时:(B)a.图像中应仅有一个目标b.图像直方图应有两个峰c.图像中目标和背景应一样大d. 图像中目标灰度应比背景大15. 在单变量变换增强中,最容易让人感到图像内容发生变化的是( C )A亮度增强觉 B饱和度增强C色调增强 D不一定哪种增强16、利用平滑滤波器可对图像进行低通滤波,消除噪声,但同时模糊了细节。
《数字图像办理》期末大作业大作业题目及要求:一、题目:本门课程的查核以作品形式进行。
作品一定用 Matlab 达成。
并提交有关文档。
二、作品要求:1、用 Matlab 设计实现图形化界面,调用后台函数达成设计,函数能够调用 Matlab 工具箱中的函数,也能够自己编写函数。
设计达成后,点击 GUI 图形界面上的菜单或许按钮,进行必需的交互式操作后,最后能显示运转结果。
2、要务实现以下功能:每个功能的演示窗口标题一定表现达成该功能的小构成员的学号和姓名。
1)关于翻开的图像能够显示其灰度直方图,实现直方图平衡化。
2)实现灰度图像的对照度加强,要务实现线性变换和非线性变换(包括对数变换和指数变换)。
3)实现图像的缩放变换、旋转变换等。
4)图像加噪(用输入参数控制不一样噪声),而后使用空域和频域进行滤波办理。
5)采纳 robert算子,prewitt算子,sobel算子,拉普拉斯算子对图像进行边沿提取。
6)读入两幅图像,一幅为背景图像,一幅为含有目标的图像,应用所学的知识提拿出目标。
3、认真达成期末大作业报告的撰写,对各个算法的原理和实验结果务必进行认真剖析议论。
报告采纳A4 纸打印并装订成册。
附录:报告模板《数字图像办理》期末大作业班级:计算机小组编号:第9 组组长:王迪小构成员:吴佳达浙江万里学院计算机与信息学院2014年 12月目录(自动生成)1 绘制灰度直方图,实现直方图平衡化 (5)算法原理 (5)算法设计 (5)实验结果及对照剖析 (7)2 灰度图像的对照度加强 (7)算法原理 (7)算法设计 (8)实验结果及剖析 (10)3 图像的几何变换 (10)算法原理 (10)算法设计 (10)实验结果及剖析 (11)4 图像加噪(用输入参数控制不一样噪声),而后使用空域和频域进行滤波办理 (11)算法原理 (11)算法设计 (11)实验结果及剖析 (17)5 采纳 robert , prewitt , sobel,拉普拉斯算子对图像进行边沿提取 (17)算法原理 (17)算法设计 (17)实验结果及剖析 (18)6 读入两幅图像,一幅为背景图像,一幅为含有目标的图像,应用所学的知识提拿出目标错误!未定义书签。
算法原理 ........................................................................................................ 错误!不决义书签。
算法设计 ........................................................................................................ 错误!不决义书签。
实验结果及剖析 ............................................................................................ 错误!不决义书签。
7 小结(感觉和领会) (18)1绘制灰度直方图,实现直方图平衡化1.1 算法原理图像加强是指按特定的需要突出一幅图像中的某些信息,同时,消弱或去除某些不需要的信息的办理方法。
其主要目的是办理后的图像对某些特定的应用比本来的图像更为有效。
图像加强技术主要有直方图改正办理、图像光滑化办理、图像尖利化办理和彩色办理技术等。
本实验以直方图平衡化加强图像对照度的方法为主要内容,其余方法同学们能够在课后自行联系。
直方图是多种空间城办理技术的基础。
直方图操作能有效地用于图像加强。
除了供给实用的图像统计资料外,直方图固有的信息在其余图像办理应用中也是特别实用的,如图像压缩与切割。
直方图在软件中易于计算,也合用于商用硬件设施,所以,它们成为了及时图像办理的一个流行工具。
直方图是图像的最基本的统计特点,它反应的是图像的灰度值的散布状况。
直方图平衡化的目的是使图像在整个灰度值动向变化范围内的散布均匀化,改良图像的亮度散布状态,加强图像的视觉成效。
灰度直方图是图像预办理中波及最宽泛的基本观点之一。
图像的直方图事实上就是图像的亮度散布的概率密度函数,是一幅图像的所有象素会合的最基本的统计规律。
直方图反应了图像的明暗散布规律,能够经过图像变换进行直方图调整,获取较好的视觉成效。
直方图平衡化是经过灰度变换将一幅图像变换为另一幅拥有平衡直方图,即在每个灰度级上都拥有同样的象素点数的过程。
1.2 算法设计f=imread('medicine_pic.jpg');g=imhist(f,256);%显示其直方图g1=imadjust(f,[0 1],[1 0]);%灰度变换,实现明暗变换(负片图像 )figure,imshow(g1)%将 0.5 到 0.75 的灰度级扩展到范围 [0 1]g2=imadjust(f,[0.5 0.75],[0 1]);figure,imshow(g2)g=imread('point.jpg');h=log(1+double(g));%对输入图像对数映照变换h=mat2gray(h);%将矩阵 h 变换为灰度图片h=im2uint8(h);%将灰度图变换为8 位图figure,imshow(h) I=imread(' camera.jpg');% 读入原图像J=histeq(I);%对原图像进行直方图平衡化办理imshow(I);%显示原图像title(' 原图像 ');%给原图像加标题名%对原图像进行屏幕控制;显示直方图平衡化后的图像figure;imshow(J);%给直方图平衡化后的图像加标题名title(' 直方图平衡化后的图像') ;%对直方图平衡化后图像进行屏幕控制;作一幅子图,并排两幅图的第 1 幅figure; subplot(1,2,1) ;imhist(I,64); %将原图像直方图显示为64 级灰度title(' 原图像直方图') ; %给原图像直方图加标题subplot(1,2,2); %作第2 幅子图imhist(J,64) ; %将平衡化后图像的直方图显示为64 级灰度title(' 平衡变换后的直方图') ; %给平衡化后图像直方图加标题名1.3 实验结果及对照剖析图1图2剖析:直方图平衡化能够增添很多图像的全局对照度,特别是当图像的实用数据的对照度相当靠近的时候,经过这类方法,亮度能够更好地在直方图上散布。
这样就能够用于加强局部的对照度而不影响整体的对照度,直方图平衡化经过有效地扩展常用的亮度来实现这类功能。
2灰度图像的对照度加强2.1 算法原理术语‘空间域’指的是图像平面自己,在空间与内办理图像的方法是直接对图像的像素进行办理。
空间域办理方法分为两种:灰度级变换、空间滤波。
空间域技术直接对像素进行操作其表达式为g(x,y)=T[f(x,y)]此中 f(x,y) 为输入图像, g(x,y)为输出图像, T 是对图像 f 进行办理的操作符,定义在点(x,y) 的指定领域内。
定义点 (x,y) 的空间周边地区的主要方法是,使用中心位于 (x,y)的正方形或长方形地区,。
此地区的中心从原点 ( 如左上角 )开始逐像素点挪动,在挪动的同时,该地区会包括不一样的领域。
T 应用于每个地点 (x,y),以便在该地点获取输出图像g。
在计算 (x,y)处的 g 值时,只使用该领域的像素。
灰度变换 T 的最简单形式是使用领域大小为1×1,此时 ,(x,y) 处的 g 值仅由 f 在该点处的亮度决定,T 也变成一个亮度或灰度级变化函数。
当办理单设(灰度)图像时,这两个术语能够交换。
因为亮度变换函数仅取决于亮度的值,而与(x,y)没关,所以亮度函数往常可写做以下所示的简单形式:s=T(r)此中, r 表示图像 f 中相应点 (x,y)的亮度, s 表示图像 g 中相应点 (x,y) 的亮度。
2.2 算法设计f=imread('1.jpg');g=imhist(f,256);%显示其直方图g1=imadjust(f,[0 1],[1 0]);%灰度变换,实现明暗变换(负片图像 )figure,imshow(g1)%将 0.5 到 0.75 的灰度级扩展到范围 [0 1]g2=imadjust(f,[0.5 0.75],[0 1]);figure,imshow(g2)g=imread(2.jpg');h=log(1+double(g)); h=mat2gray(h);h=im2uint8(h); %对输入图像对数映照变换%将矩阵 h 变换为灰度图片%将灰度图变换为8 位图figure,imshow(h)2.3 实验结果及剖析经过图形灰度变换实验,认识掌握了一般图像办理所要抵达的成效,理解了图像在生活中的作用,可是它只好办理一些黑白的图像,在实验中我用彩色图片就不可以,心有余而力不足,很难解决更高层次的问题,所以还需要更多的图像办理方法来办理图像。
3图像的几何变换3.1 算法原理3.2 算法设计3.3 实验结果及剖析4图像加噪(用输入参数控制不一样噪声),而后使用空域和频域进行滤波办理4.1 算法原理a)调入并显示原始图像 Sample2-1.jpg 。
b)利用 imnoise 命令在图像 Sample2-1.jpg 上加入高斯 (gaussian) 噪声c)利用预约义函数 fspecial 命令产生均匀 (average)滤波器11 11 9 111 1d)分别采纳 3x3 和 5x5 的模板,分别用均匀滤波器以及中值滤波器,对加入噪声的图像进行办理并察看不一样噪声水平下,上述滤波器办理的结果;e)选择不一样大小的模板,对加入某一固定噪声水平噪声的图像进行办理,察看上述滤波器办理的结果。
f)利用 imnoise 命令在图像 Sample2-1.jpg 上加入椒盐噪声 (salt & pepper)g)重复 c)~ e)的步骤h)输出所有结果并进行议论。
4.2 算法设计I=imread('3.jpg');imshow(I);J = imnoise(I,'gauss',0.02); %增添高斯噪声J = imnoise(I,'salt & pepper',0.02); %增添椒盐噪声figure,imshow(J);ave1=fspecial('average',3); %产生 3×3 的均值模版ave2=fspecial('average',5); %产生 5×5 的均值模版K = filter2(ave1,J)/255; % 均值滤波3×3 figure,imshow(K);L = filter2(ave2,J)/255;%均值滤波 5×5 figure,imshow(L);M = medfilt2(J,[3 3]);%中值滤波 3×3 模板figure,imshow(M);N = medfilt2(J,[4 4]);%中值滤波 4×4 模板figure,imshow(N);4.3 实验结果及剖析均值滤波对高斯噪声比对椒盐噪声有效,显然看到均值滤波器能很大程度上滤除高斯噪声,滤波后图像中的噪声残留不是很大,用均值滤波办理事后的图像显得有点模糊不清;中值滤波关于噪声失散度较小的高斯噪声力所不及,加入高斯噪声的图像经Butterworth 低通滤波器滤波后,能够显然看出噪声已经获取了有效克制,可是仍旧和对椒盐噪声的滤除结果相像,图像中残留大批的噪声,图像质量改良程度不高显得模糊不清。