南昌大学数字图像处理(双语)期中考试试卷

合集下载

数字图像处理题库(87道)

数字图像处理题库(87道)

数字图像处理1、in the hardware peripherals of image processing, which of the following equipments does not belong to the input devices?——[单选题]A Electron cameraB CCD video cameraC Desktop image scannerD Light tape正确答案:D2、The number of bits required to store an 1024*512 image of 4 gray levels is ( )——[单选题]A 256KB 512KC 1MD 2M正确答案:C3、An image of size 1024 × 1024 pixels in which the intensity of each pixel is an8 bit quantity requires the storage space ( if not compressed).——[单选题]A 1 KBB 1 MBC 2 KBD 2 MB正确答案:B4、Intensity range of 8-bit pixel image is () .——[单选题]A 0 to 7B 0 to 15C 0 to 31D 0 to 255正确答案:D5、By its very nature, the appearance of false contours in image is because ( )——[单选题]A the number of gray levels of the image is not enoughB the spatial resolution of the image is not high enoughC the number of gray levels of the image is excessiveD the spatial resolution of the image is too enough正确答案:A6、In the process of image sampling and quantization, the appearance of checkboard effect is because ( )——[单选题]A the number of gray levels of the image is not enoughB the spatial resolution of the image is not high enoughC the number of gray levels of the image is excessiveD the spatial resolution of the image is too enough正确答案:B7、When you enter a dark room on a bright day, it takes some time to see well enough, this is the visual process or visual phenomenon of——[单选题]A Brightness adaptationB Brightness discriminationC Optical illusionD Simultaneous contrast正确答案:A8、Sampling of an image is required for ().——[单选题]A QuantizationB SharpeningC SmoothingD Digitization正确答案:D9、An image function f(x,y) is characterized by f(x,y)=i(x,y)r(x,y) where.——[单选题]A 0<i(x,y)<1&0<r(x,y)<∞B 0<i(x,y)<1&0<r(x,y)<1C 0<i(x,y)<∞&0<r(x,y)<∞D 0<i(x,y)<∞&0<r(x,y)<1正确答案:D10、A pixel p at coordinates (x,y) has four horizontal and vertical neighbours whose coordinates are given by.——[单选题]A (x-1,y-1),(x-1,y),(x,y-1),(x,y+1)B (x+1,y),(x-1,y),(x,y+1),(x,y-1)C (x+1,y-1),(x-1,y),(x-1,y+1),(x,y+1)D (x+1,y-1),(x-1,y),(x,y+1),(x-1,y+1)正确答案:B11、The D4 distance (city distance) between p and q with coordinates (x,y), (s,t) is defined as.——[单选题]ABCD正确答案:A12、Mach bands effect——[单选题]A can be analyzed using simutaneous contrastB depends on the brightness adaptive level of human visual systemC indicates the same fact as simutaneous contrastD indicates that the actual brightness distributions of the bands are influenced by the subjective brightness curve正确答案:C13、The lens focuses light from objects onto the——[单选题]A corneaB retinaC scleraD iris正确答案:B14、The spatial resolution of an image is determined by how ( ) was carried out.——[单选题]A QuantizationB SharpeningC SmoothingD Sampling正确答案:D15、In the human visual system, the perceived intensity of a region is related to the light intensities of the regions surrounding it, this is called ( ).——[单选题]A brightness adaptationB simultaneous contrastC brightness discriminationD optical illusions正确答案:B16、The colours of an object that we perceive are determined by the nature of( ).——[单选题]A the light reflected from the objectB the light shone onto the objectC the light absorbed by the objectD the external light正确答案:A17、The human visual system can perceive approximately different light intensity levelsHowever, at any one time we can only discriminate between a much smaller number,this is indicated in the phenomenon called ( ).——[单选题]A Brightness adaptationB Brightness discriminationC Optical illusionD Simultaneous contrast正确答案:A18、Suppose there is a pixel p at coordinates (x,y), it's diagonal neighbor has four pixels, whose coordinates are given by ( ).——[单选题]A (x-1,y-1),(x-1,y),(x,y-1),(x,y+1)B (x-1,y-1),(x+1,y-1),(x-1,y+1),(x+1,y+1)C (x+1,y-1),(x-1,y),(x-1,y+1),(x,y+1)D (x+1,y-1),(x-1,y),(x,y+1),(x-1,y+1)正确答案:B19、The distance (chessboard distance) between p and q with coordinates (x,y), (s,t) is defined as. ——[单选题]ABCD20、In Matlab, which command can we use to dispaly an image?——[单选题]A imreadB imshowC imhistD imwrite正确答案:B21、In matlab, suppose x=[1 2 3 4;5 6 7 8;9 10 11 12],after run the commandx(:,[2,3])=[];what is the size of x?——[单选题]A 1*4B 3*2C 3*4D 3*3正确答案:B22、In matlab command window, if we run the followong command,what is the result shown in the command window?X=[1 2 3 4;5 6 7 8;9 10 11 12];X(5)——[单选题]A 5B 6C 0D 10正确答案:B23、In Matlab,Suppose x is a 1*6 array,which command can delete the fifth element of x?——[单选题]A delete x(5)B delete x(4)C x(5)=[]D x(4)=[]正确答案:C24、In MATLAB,what is the result of the expression 3~=4?——[单选题]A 1B 0C 7D 1225、In matlab, the command "clear" is used to ( )——[单选题]A Shows the variable in the workspaceB Deletes all variables in the workspaceC clean the command windowD clean the figure window正确答案:B26、In MATLAB,what is the result of x after run the command x=1:2:10?——[单选题]A 1 2 3 4 5 6 7 8 9 10B 1 3 5 7 9 11C 1 3 5 7 9D 2 4 6 8 10正确答案:C27、if x=2.6 ,what is the result of round(x), floor(x), ceil(x) and fix(x)?——[单选题]A 2,2,3,2B 3,2,3,2C 3,2,3,3D 2,2,3,3正确答案:B28、In MATLAB,what is the result of the expression 3==3?——[单选题]A 1B 0C 7D 12正确答案:A29、if x=-2.6 ,what is the result of round(x), floor(x), ceil(x) and fix(x)?——[单选题]A -2,-3,-2,-2B -3,-3,-2,-2C -3,-3,-2,-3D -2,-3,-2,-330、In matlab, the command "save" is used to ( )——[单选题]A Shows the variable in the workspaceB Saves all variables in the workspace to diskC clean the command windowD clean the figure window正确答案:B31、In MATLAB,what is the result of x after run the command x=10:-2:1?——[单选题]A 10 9 8 7 6 5 4 3 2 1B 10 8 6 4 2 0C 10 8 6 4 2D 2 4 6 8 10正确答案:C32、In Matlab, which command can we use to read an image?——[单选题]A imshowB imreadC imhistD imwrite正确答案:B33、In MATLAB, what is the result of a(5) after run these two commands?A=[1 2 3 4];A(6)=6;——[单选题]A 6B 5C 4D 0正确答案:D34、In Matlab,Suppose x is a 2*3 array,which command can delete the 5th elementof x?——[单选题]A delete x(5)B delete x(4)C x(4)=[]D x(5)=[]35、In matlab, suppose x=[1 2 3 4;5 6 7 8;9 10 11 12],after run the commandx([1,3],:)=[];what is the size of x?——[单选题]A 3*2B 1*4C 3*4D 3*3正确答案:B36、In matlab,suppose x is a 3*4 matrix,after run the following command,what is the size of x?X=[1 2 3 4;5 6 7 8;9 10 11 12];Y=x(2,2:4);X=[x,y'];——[单选题]A 3*4B 4*3C 3*5D 5*3正确答案:C37、in Matlab,if we want to display four images in the same figure window as the layout shown in the following,which command do we need to use to display an image in the area 2?——[单选题]A subplot(1,4,2)B subplot(4,1,2)C subplot(2,2,2)D subplot(2,2,3)正确答案:C38、In matlab, suppose x=[1 2 3 4;5 6 7 8;9 10 11 12],after run the commandx=[x;13 14 15 16];what is the size of x?——[单选题]A 3*5B 4*4C 3*4D 3*3正确答案:B39、In Matlab,Suppose x is a 1*6 array,which command can add 3 elements to x?——[单选题]A add x(7:9)B add x(3)C x(9)=10D x(9)=[]正确答案:C40、The corresponding relations between an image and its gray histogram is ( )——[单选题]A one to oneB many-to-oneC one-to-manyD all false正确答案:B41、There is a light ring on the dark background of a gray level image, can be used to make the ring thinner.——[单选题]A Median filterB Max filterC Min filterD Midpoint filter正确答案:C42、In the following four operators, which one belongs to the secondderivative? .——[单选题]A SobelB RobertsC PrewittD Laplacian正确答案:D43、When powerlaw transformation is used to as grayscale transformation,Which type of images as follows can be the transformationPerformed on for enhancement if the power is over 1?——[单选题]A Overall image intensities are on the dark sideB Overall image intensities are on the bright sideC Image details are hidden in the dark backgroundD Images have both too bright and too dark background正确答案:B44、( )can be applied for motion detection.——[单选题]A additionB substactionC multiplicationD division正确答案:B45、In the following four filters, which one belongs to a linear filter?——[单选题]A Median filterB Averaging filterC Max filterD Min filter正确答案:B46、The purpose of compressing dynamic range of image graylevles can be achieved with the help of logarithmic transformation , because ( )——[单选题]A graylevels dynamic range before transformation is larger than that after transformationB only partial range of graylevel values ha been taken after transformationC the ranges of graylevel before and after the transformation are differentD logarithmic transformation curve is monotonically increasing curve正确答案:B47、Logarithmic transform is useful if we wish to enhance details in the ( ) areas of the image, but at the expense of details in the ( ) areas.——[单选题]A dark darkB dark brightC bright darkD bright bright正确答案:B48、The range of intensity change of certain scene image obtained from camera is called ( ),which is the range from the darkest to the brighest in an image.——[单选题]A gray levelB dynamic rangeC spatial resolutionD histogram正确答案:B49、The gray level of an overexposed (washed out) image focuses on ( ) range, while the gray level of an underexposed image focuses on ( ) range.——[单选题]A low-brightness ,low-brightnessB low-brightness ,high-brightnessC high-brightness ,low-brightnessD high-brightness ,high-brightness正确答案:C50、Geometric transformation of images does not change the pixel's( ),but change the pixel's( ).——[单选题]A positon, valueB value,positionC contrast,positionD position, contrast正确答案:B51、Corresponding to different scene contents, digital image can be generally divided into three types, they are ( )——[多选题]A binary imageB gray imageC index imageD color image正确答案:ABD52、Which of the following adjacencies can eliminate ambiguity of path between pixels ( )——[多选题]A 4-adjacencyB 8-adjacencyC m-adjacencyD mixed adjacency正确答案:CD53、Image digitization process consists of two steps——[多选题]A samplingB transformationC quantizationD scanning正确答案:AC54、The retina is covered with light receptors called——[多选题]A rodsB conesC foveaD lens正确答案:AB55、Image digitization process consists of two steps,sampling and quantization. These two steps determine the ( ) and ( ) of an image, respectively.——[多选题]A Spatial resolutionB ResolutionC Intensity level resolutionD Dynamic domain正确答案:AC56、(Single choice)Which adjacency between pixels is the sufficient condition of other types of adjacency ?——[多选题]A 4-adjacencyB 8-adjacencyC m-adjacencyD mixed adjacency正确答案:A57、Three commonly-used neighbors in image processing are( )——[多选题]A 4-neighborsB 8-neighborsC diagonal neighborsD mixed neighbors正确答案:ABC58、MATLAB variable names ( )——[多选题]A must begin with a letterB can contain any combination of letters, numbers and underscore (_C must be unique in the first 31 charactersD can begin with a number正确答案:ABC59、The commonly-used histogram processing methods include ( ) and ( ).——[多选题]A histogram equalizationB histogram adjustmentC histogram specificationD histogram transform正确答案:AC60、The following spatial filters belonged to non-linear filters are ( )——[多选题]A median filterB max filterC min filterD averaging filter正确答案:ABC61、The cone body is mainly located in the middle part of the retina,and is highly sensitive to color. ——[判断题]A 正确B 错误正确答案:A62、The total range of distinct intensity levels the eye can discriminate simultaneously is rather small when compared with the total adaptation range. ——[判断题]A 正确B 错误正确答案:A63、The colours that we perceive are determined by the nature of the light absorbed by an object. ——[判断题]A 正确B 错误64、If a command is followed by a semicolon (;), result of the computation is not shown on the command window.——[判断题]A 正确B 错误正确答案:A65、If a command is followed by a commas (,), result of the computation is not shown on the command window——[判断题]A 正确B 错误正确答案:B66、In command window of Matlab, Ellipsis (…) means continuing on the next line.——[判断题]A 正确B 错误正确答案:A67、MATLAB is case sensitive: “name”, “Name” and “NAME” are consider ed different variables——[判断题]A 正确B 错误正确答案:A68、In Matlab, a two-dimensional matrix is stored in memory in Column major order.——[判断题]A 正确B 错误正确答案:A69、In MATLAB relational operators ,false is represented by 0 and true is represented by 1 (non-zero).——[判断题]A 正确B 错误70、Suppose x is a 3*4 matrix, then a(2,3) is the 8th element of x when in memory.——[判断题]A 正确B 错误正确答案:A71、In Matlab, imshow funtuntion can display images on the screen.——[判断题]A 正确B 错误正确答案:A72、Break statement terminates the execution of a loop and passes the control to the next statement after the end of the loop.——[判断题]A 正确B 错误正确答案:A73、Continue statement terminates the current pass through the loop and returns control to the top of the loop.——[判断题]A 正确B 错误正确答案:A74、In Matlab, the command window can input commands and show the results. ——[判断题]A 正确B 错误正确答案:A75、In the binary image, each pixel value is represented by 1 bit, value 1 represents white and value 0 represents ( )——[填空题]正确答案:black76、Consider the image segment shown .Two pixels p and q are at the locations shown in the figure, please compute their Euclidean(),city-block ()andchessboard distances()respectively。

《数字图像处理》试题及答案.

《数字图像处理》试题及答案.

0 0 4 4 15 。

中间过程:先补上一圈的 0:0 解:结果: y1 17 15 29 17 29 0 0 02 5 9 0 0 7 8 2 0 03 1 8 0 0 0 0,然后和模板 0 0 0 1 0 0 0 0 0 1 0h( x, y 1 4 1作卷积,例如 y 中的-4 是这样得到的:0 2 7 . 1 4 1 =-4(即对应元 0 1 0 0 1 0 0 5 8 素相乘相加,其他的数同理。

1、如图为一幅 16 级灰度的图像。

请写出均值滤波和中值滤波的 3x3 滤波器;说明这两种滤波器各自的特点;并写出两种滤波器对下图的滤波结果(只处理灰色区域,不处理边界)。

(15 分)题5图答:均值滤波:中值滤波:(2 分)(2 分)均值滤波可以去除突然变化的点噪声,从而滤除一定的噪声,但其代价是图像有一定程度的模糊;中值滤波容易去除孤立的点、线噪声,同时保持图像的边缘。

(5 分)均值滤波:(3 分)中值滤波:(3 分) 2. 设有编码输入 X={x1,x2,x3,x4,x5,x6}, 其频率分布分别为p(x1=0.4,p(x2=0.3, p(x3=0.1,p(x4=0.1, p(x5=0.06,p(x6=0.04, 现求其最佳霍夫曼编码。

3 对数字图像 f(i,j(图象 1进行以下处理,要求: 1 计算图像 f(i,j的信息量。

(10 分) 2 按下式进行二值化,计算二值化图象的欧拉数。

0 0 1 2 3 2 1 3 1 5 6 6 2 6 2 1 3 7 0 7 2 5 3 2 2 6 6 5 7 0 2 3 1 2 1 3 2 2 1 1 3 5 6 5 6 3 2 2 2 7 3 6 1 5 4 0 1 6 1 5 6 2 2 1解:1统计图象 1 各灰度级出现的频率结果为 p(0=5/640.078;p(1=12/640.188; p(2=16/64=0.25; p(4=1/640.016; 信息量为 P(5=7/640.109; 7p(3=9/640.141 p(7=4/640.063 p(6=10/640.156; H P(i log 2 P(i i 0 2.75(bit 2)对于二值化图象,若采用 4-连接,则连接成分数为 4,孔数为 1,欧拉数为 4-1=3;若采用 8-连接,则连接成分数为 2,孔数为 2,欧拉数为 2-2=0; 1 给出一维连续图像函数傅里叶变换的定义,并描述空间频率的概念。

数字图像处理期中考试试卷2014

数字图像处理期中考试试卷2014

期中考试试卷
2014~2015学年第一学期
课程名称:数字图像处理教师姓名:袁杰试卷类型:闭卷
学号:
一、下图中X B对
X。

X
B
原点
膨胀运算结果腐蚀运算结果
开运算结果闭运算结果
二、已知某512x512大小的灰度图像经过两种不同降质过程后的图像幅度谱分别如下所示。

说明分别发生了什么样的降质过程,并估算两种降质过程的降质参数。

原始图像幅度谱降质图像1幅度谱降质图像2幅度谱
三、详细叙述对一组数据进行LZW编码的原理和步骤,只能用文字说明,不能画图或画表说明。

四、详细叙述傅立叶反投影法进行图像重建的原理和步骤,只能用文字说明,不能画图或画表说明。

五、详细叙述对二值图像中的线段进行Hough算法检测的原理和步骤,只能用文字说明,不能画图或画表说明。

六、现在有一张血液显微彩图,图中有众多血细胞,有的血细胞大,有的血细胞小。

现在要清点指定大小的血细胞的数量,请根据已学知识给出详细解决方案。

数字图像处理试卷及答案

数字图像处理试卷及答案

《数字图像处理》模拟试卷(A 卷)一、单项选择题(从下列各题四个备选答案中选出一个正确答案,并将其代号填在题前的括号内。

答案选错或未作选择者,该题不得分。

每小题1分,共10分)( )1.一幅灰度级均匀分布的图象,其灰度范围在[0,255],则该图象的信息量为:a. 0b.255c.6d.8( )2.图象与灰度直方图间的对应关系是:a.一一对应b.多对一c.一对多d.都不对( )3.下列算法中属于局部处理的是:a.灰度线性变换b.二值化c.傅立叶变换d.中值滤波( )4.下列算法中属于点处理的是:a.梯度锐化b.二值化c.傅立叶变换d.中值滤波( ) 5.一曲线的方向链码为12345,则曲线的长度为( )6. 下列算法中属于图象平滑处理的是:a.梯度锐化b.直方图均衡c. 中值滤波placian增强( )7.下列图象边缘检测算子中抗噪性能最好的是:a.梯度算子b.Prewitt算子c.Roberts算子d. Laplacian算子( )8.采用模板[-1 1]主要检测____方向的边缘。

a.水平b.45°c.垂直d.135°( )9.二值图象中分支点的连接数为:a.0b.1c.2d.3( )10.对一幅100′100像元的图象,若每像元用8bit表示其灰度值,经霍夫曼编码后压缩图象的数据量为40000bit,则图象的压缩比为:a.2:1b.3:1c.4:1d.1:2二、填空题(每空1分,共15分)1.图像锐化除了在空间域进行外,也可在进行。

2.图像处理中常用的两种邻域是和。

3.直方图修正法包括和两种方法。

4.常用的灰度内插法有、和。

5.多年来建立了许多纹理分析法,这些方法大体可分为和结构分析法两大类。

6.低通滤波法是使受到抑制而让顺利通过,从而实现图像平滑。

7.检测边缘的Sobel算子对应的模板形式为和。

8.一般来说,采样间距越大,图象数据量,质量;反之亦然。

三、名词解释(每小题3分,共15分)1.数字图像2.图像锐化3.灰度共生矩阵4.细化5.无失真编码四、判断改错题(下列命题是否正确,正确的就在题号前的括弧内打“√”,错误的打“×”并改正。

数字图像考试试题共14页word资料

数字图像考试试题共14页word资料

题型:填空(绪论)计算题,论述题数字图像------>>>>>>>>模拟图像绪论.ppt3.图像变换.ppt第四章.ppt第六章_图像分割.ppt第五章_图像复原.ppt(数字图像处理课件第四章.ppt 第六讲图像复原.ppt)1. 图像为什么要变换,图像变换选择的原则是什么?➢利用变换的某些性质,可以大大简化或加速图象处理过程。

使图像处理问题简化;➢空域图象经过变换后形成“对应域图象”,从中会看到在空域图象中不易看到的某些“东西”。

有利于图像特征提取;➢变换后形成“对应域图象”,会呈现某些性态,利用这些性态可完成图象处理中某个应用领域的应用。

有助于从概念上增强对图像信息的理解。

1)变换必须是可逆的。

2)变换不能损失信息。

3)变换必须是有好处的。

4)变换算法必须是不复杂的。

5)正交变换的特点是在变换域中图像能量将集中分布在低频率成分上,边缘、线状信息反映在高频率成分上,有利于图像处理2. 为什么要进行图像压缩?图像数据压缩为什么可能?图像冗余一般包括哪些?为什么要进行图像压缩如一张CD光盘可存600兆字节数据,这部电影光图像(还有声音)就需要160张CD光盘用来存储。

对图像数据进行压缩显得非常必要。

可能性用户通常允许图像失真。

当信道的分辨率不及原始图像的分辨率时,降低输入的原始图像的分辨率对输出图像分辨率影响不大。

用户对原始图像的信号不全都感兴趣,可用特征提取和图像识别的方法,丢掉大量无用的信息。

提取有用的信息,使必须传输和存储的图像数据大大减少。

一般原始图像中存在很大的冗余度。

图像冗余[1] 空间冗余——规则物体的物理相关性[2] 时间冗余——视频与动画画面间的相关性[3] 统计冗余——具有空间冗余和时间冗余[4] 结构冗余——规则纹理、相互重叠的结构表面[5] 信息熵冗余——编码冗余,数据与携带的信息[6] 视觉冗余——视觉、听觉敏感度和非线性感觉[7] 知识冗余——凭借经验识别[8] 其他冗余——上述7种以外的冗余3.什么是图像分割?图像分割一般有哪些方法?把焦点放在增强感兴趣对象图像分割是把图像分解成构成的部件和对象的过程排除不相干图像成分:图像分割的目标是重点根据图像中的物体将图像的像素分类,并提取感兴趣目标图像分割一般有哪些方法•不连续性•边界分割法•边缘连接分割法•相似性•阈值分割法•面向区域的分割•数学形态学图像处理4.叙述DPCM的基本原理DPCM:线性预测法通常称为差值脉冲编码调制法。

数字图像处理试卷及答案

数字图像处理试卷及答案

《数字图像处理》模拟试卷(A 卷)一、单项选择题(从下列各题四个备选答案中选出一个正确答案,并将其代号填在题前的括号内。

答案选错或未作选择者,该题不得分。

每小题1分,共10分)( )1.一幅灰度级均匀分布的图象,其灰度范围在[0,255],则该图象的信息量为: a. 0 b.255 c.6 d.8( )2.图象与灰度直方图间的对应关系是:a.一一对应b.多对一c.一对多d.都不对( )3.下列算法中属于局部处理的是:a.灰度线性变换b.二值化c.傅立叶变换d.中值滤波( )4.下列算法中属于点处理的是:a.梯度锐化b.二值化c.傅立叶变换d.中值滤波( ) 5.一曲线的方向链码为12345,则曲线的长度为( )6. 下列算法中属于图象平滑处理的是:a.梯度锐化b.直方图均衡c. 中值滤波placian增强( )7.下列图象边缘检测算子中抗噪性能最好的是:a.梯度算子b.Prewitt算子c.Roberts算子d. Laplacian算子( )8.采用模板[-1 1]主要检测____方向的边缘。

a.水平b.45°c.垂直d.135°( )9.二值图象中分支点的连接数为:a.0b.1c.2d.3( )10.对一幅100′100像元的图象,若每像元用8bit表示其灰度值,经霍夫曼编码后压缩图象的数据量为40000bit,则图象的压缩比为:a.2:1b.3:1c.4:1d.1:2二、填空题(每空1分,共15分)1.图像锐化除了在空间域进行外,也可在进行。

2.图像处理中常用的两种邻域是和。

3.直方图修正法包括和两种方法。

4.常用的灰度内插法有、和。

5.多年来建立了许多纹理分析法,这些方法大体可分为和结构分析法两大类。

6.低通滤波法是使受到抑制而让顺利通过,从而实现图像平滑。

7.检测边缘的Sobel算子对应的模板形式为和。

8.一般来说,采样间距越大,图象数据量,质量;反之亦然。

三、名词解释(每小题3分,共15分)1.数字图像2.图像锐化3.灰度共生矩阵4.细化5.无失真编码四、判断改错题(下列命题是否正确,正确的就在题号前的括弧内打“√”,错误的打“×”并改正。

南昌大学2007级“数字图像处理”试题及答案

南昌大学2007级“数字图像处理”试题及答案

-1 0 1-2 0 2-1 0 17. 写出4-链码10103322的形状数:03033133;8. 源数据编码与解码的模型中量化器()的作用是减少心里视觉冗余;9. 4标准主要编码技术有变换、小波变换等;10. 图像复原和图像增强的主要区别是图像增强主要是一个主观过程,而图像复原主要是一个客观过程;第10题:图像增强不考虑图像是如何退化的,而图像复原需知道图像退化的机制和过程等先验知识二、名词解释( 每小题5分,本题共20 分 )1、数字图像数字图像是指由被称作像素的小块区域组成的二维矩阵。

将物理图像行列划分后,每个小块区域称为像素()。

数字图像处理指用数字计算机及其它有关数字技术,对图像施加某种运算和处理,从而达到某种预想目的的技术.2、8-连通的定义-对于具有值V的像素p和q ,如果q在集合N8(p)中,则称这两个像素是8-连通的。

3、灰度直方图灰度直方图是指反映一幅图像各灰度级像元出现的频率。

4、中值滤波中值滤波是指将当前像元的窗口(或领域)中所有像元灰度由小到大进行排序,中间值作为当前像元的输出值。

像素的邻域邻域是指一个像元(x,y)的邻近(周围)形成的像元集合。

即{()}p、q为任意整数。

像素的四邻域像素p()的4-邻域是:(1),(1) ,(1), (1)三、简答题( 每小题10分,本题共30 分 ):1、举例说明直方图均衡化的基本步骤。

直方图均衡化是通过灰度变换将一幅图象转换为另一幅具有均衡直方图,即在每个灰度级上都具有相同的象素点数的过程。

直方图均衡化变换:设灰度变换(r)为斜率有限的非减连续可微函数,它将输入图象(x,y)转换为输出图象(x,y),输入图象的直方图为(r),输出图象的直方图为(s),则根据直方图的含义,经过灰度变换后对应的小面积元相等:(s)(r)直方图修正的例子假设有一幅图像,共有6 4(6 4个象素,8个灰度级,进行直方图均衡化处理。

根据公式可得:s2=0.19+0.25+0.20.65,s3=0.19+0.25+0.20.16=0.8l,s4=0.895=0.95,s6=0.98,s7=1.00由于这里只取8个等间距的灰度级,变换后的s值也只能选择最靠近的一个灰度级的值。

数字图像处理期中考试

数字图像处理期中考试

void CTeachV iew::OnStar() //画十字星{// TODO: Add your command handler code hereCTeachDoc* pDoc = GetDocument();int width,i,j;if(pDoc->BitCount == 8){if (pDoc->BmpWidth % 4 != 0)width = ((pDoc->BmpWidth / 4) + 1) * 4;elsewidth = pDoc->BmpWidth;for(j=0;j<pDoc->BmpHeight;j++)for(i=0;i<pDoc->BmpWidth;i++){if(i>((pDoc->BmpWidth/2)-5)&&i<((pDoc->BmpWidth/2)+5)||j>((pDoc->BmpHeight/2)-5)&&j<((pDoc->BmpHeight/2)+5)){pDoc->pImage[j*width+i]=0;}}}else{if (pDoc->BmpWidth % 4 != 0)width = ((pDoc->BmpWidth * 3 / 4) + 1) * 4;elsewidth = pDoc->BmpWidth * 3;for(j=0;j<pDoc->BmpHeight;j++)for(i=0;i<pDoc->BmpWidth;i++){if(i>((pDoc->BmpWidth/2)-5)&&i<((pDoc->BmpWidth/2)+5)||j>((pDoc->BmpHeight/2)-5)&&j<((pDoc->BmpHeight/2)+5)){pDoc->pImage[j*width+i*3]=0;//蓝分量pDoc->pImage[j*width+i*3+1]=0;//绿分量pDoc->pImage[j*width+i*3+2]=255;//红分量}}}OnInitialUpdate();}void CTeachV iew::OnSave() //8bit另存为{// TODO: Add your command handler code hereCTeachDoc* pDoc = GetDocument();ASSERT_VALID(pDoc);//保存对话框CString sF ileName;CFile file;CFileDia log dlg(FALSE, "bmp", sFileName,OFN_OVERWRITEPROMPT|OFN_HIDEREADONL Y,"图片文件(*.bmp)|*.bmp||", this);dlg.m_ofn.lpstrTitle = _T("保存图片");if (dlg.DoModal() == IDOK){CString fileName = dlg.GetPathName();file.Open(fileName, CFile::modeReadWrite|CFile::modeCreate);}file.Write(&pDoc->BitMapFileHeader,sizeof(BITMAPFILEHEADER));//保存文件头if(pDoc->BitCount==8)file.Write(pDoc->pBitMapInfo,sizeof(BITMAPINFOHEADER)+pDoc->ColorUsed *sizeof(RGBQUAD));file.Write(pDoc->pImage,pDoc->lImageSize);file.Close();// Invalidate(TRUE);}{CTeach_testDoc * pDoc = GetDocument();CClientDC dc(this);int i,j;int t=30,z=290;long pHist[256];CRect rect;GetClientRect( &rect );dc.FillSolidRect( rect, RGB(255,255,255) );if(pDoc->BitCount==8){for(i=0;i<256;i++){pHist[i]=0;}for(i=0;i<pDoc->BmpHeight;i++){for(j=0;j<pDoc->BmpWidth;j++){pHist[pDoc->pImage[i*pDoc->nWidth+j]]++;}}}dc.MoveTo(t,290);dc.LineTo(t,30);dc.MoveTo(t,290);dc.LineTo(t+258,290);for(i=0;i<256;i++){t=t+1;dc.MoveTo(t,z);dc.LineTo(t,z-pHist[i]/20);}}void CTeachV iew::On8bitpartsave() //8bit图片部分另存为{// TODO: Add your command handler code hereCTeachDoc* pDoc = GetDocument();ASSERT_VALID(pDoc);CString sF ileName;int i;CFile file;CFileDia log dlg(FALSE, "bmp", sFileName,OFN_OVERWRITEPROMPT|OFN_HIDEREADONL Y,"图片文件(*.bmp)|*.bmp||", this);dlg.m_ofn.lpstrTitle = _T("保存图片");if (dlg.DoModal() == IDOK){CString fileName = dlg.GetPathName();file.Open(fileName, CFile::modeReadWrite|CFile::modeCreate);}//控制图片大小pDoc->pBitMapInfo->bmiHeader.biWidth = 200;pDoc->pBitMapInfo->bmiHeader.biHeight = 200;file.Write(&pDoc->BitMapFileHeader,sizeof(BITMAPFILEHEADER));file.Write(pDoc->pBitMapInfo,sizeof(BITMAPINFOHEADER)+pDoc->ColorUsed *sizeof(RGBQUAD));//读取图像灰度和大小for(i=200;i<400;i++)file.Write(&pDoc->pImage[i*pDoc->nWidth+200],200);file.Close();}{CTeach_testDoc* pDoc = GetDocument();CClientDC dc(this);int i,j,nWidth;int t=320;long nHist[768];CRect rect;GetClientRect( &rect );dc.FillSolidRect( rect, RGB(255,255,255) );for ( i=0;i<256*3;i++){nHist[i]=0;}for (i=0;i<pDoc->BmpHeight;i++)for(j=0;j<pDoc->BmpWidth;j++){nHist[pDoc->pImage[i*pDoc->nWidth+j*3]]++;nHist[256+pDoc->pImage[i* pDoc->nWidth +j*3+1]]++;nHist[512+pDoc->pImage[i* pDoc->nWidth +j*3+2]]++;}for(i=0;i<=255;i++){CPen pen(PS_SOLID,1,RGB(0,0,255));CPen*oldpen =dc.SelectObject(&pen);dc.MoveTo(40+i,320);dc.LineTo(40+i,320-nHist[i]/20);dc.SelectObject(oldpen);}for(i=0+256;i<=255+256;i++){CPen pen(PS_SOLID,1,RGB(0,255,0));CPen*oldpen =dc.SelectObject(&pen);dc.MoveTo(40+i,320);dc.LineTo(40+i,320-nHist[i]/20);dc.SelectObject(oldpen);}for(i=0+256*2;i<=255+256*2;i++){CPen pen(PS_SOLID,1,RGB(255,0,0));CPen*oldpen =dc.SelectObject(&pen);dc.MoveTo(40+i,320);dc.LineTo(40+i,320-nHist[i]/20);dc.SelectObject(oldpen);}}void CTeachV iew::OnSave()//24bit另存为{// TODO: Add your command handler code hereCTeachDoc* pDoc = GetDocument();ASSERT_VALID(pDoc);//保存对话框CString sF ileName;CFile file;CFileDia log dlg(FALSE, "bmp", sFileName,OFN_OVERWRITEPROMPT|OFN_HIDEREADONL Y,"图片文件(*.bmp)|*.bmp||", this);dlg.m_ofn.lpstrTitle = _T("保存图片");if (dlg.DoModal() == IDOK){CString fileName = dlg.GetPathName();file.Open(fileName, CFile::modeReadWrite|CFile::modeCreate);}file.Write(&pDoc->BitMapFileHeader,sizeof(BITMAPFILEHEADER));//保存文件头if(pDoc->BitCount==24)file.Write(pDoc->pBitMapInfo,sizeof(BITMAPINFOHEADER));file.Write(pDoc->pImage,pDoc->lImageSize);file.Close();// Invalidate(TRUE);}void CTeachV iew::On24bitpartsave() //24bit图片部分另存为{// TODO: Add your command handler code hereCTeachDoc* pDoc = GetDocument();ASSERT_VALID(pDoc);CString sF ileName;int i;CFile file;CFileDia log dlg(FALSE, "bmp", sFileName,OFN_OVERWRITEPROMPT|OFN_HIDEREADONL Y,"图片文件(*.bmp)|*.bmp||", this);dlg.m_ofn.lpstrTitle = _T("保存图片");//设置保存路径if (dlg.DoModal() == IDOK){CString fileName = dlg.GetPathName();file.Open(fileName, CFile::modeReadWrite|CFile::modeCreate);}//控制图片大小pDoc->pBitMapInfo->bmiHeader.biWidth = 100;pDoc->pBitMapInfo->bmiHeader.biHeight = 100;file.Write(&pDoc->BitMapFileHeader,sizeof(BITMAPFILEHEADER));file.Write(pDoc->pBitMapInfo,sizeof(BITMAPINFOHEADER));//读取图像灰度和大小for(i=100;i<200;i++)file.Write(&pDoc->pImage[3*i*pDoc->nWidth+100*3],100*3);file.Close();}void CEmptyV iew::On8xinxi() //8bit直方图信息保存{// TODO: Add your command handler code hereCEmptyDoc *pDoc=GetDocument();ASSERT_VALID(pDoc);CString sF ileName;CFile file;CFileDia log dlg(FALSE, "txt", sFileName,OFN_OVERWRITEPROMPT|OFN_HIDEREADONL Y,"文本文件(*.txt)|*.txt||", this);dlg.m_ofn.lpstrTitle = _T("保存直方图");//设置保存路径if (dlg.DoModal() == IDOK){CString fileName = dlg.GetPathName();file.Open(fileName, CFile::modeReadWrite|CFile::modeCreate);}int nHist[256*3];int i,j;for ( i=0;i<256;i++){nHist[i]=0;}//求8位直方图对应灰度的像素个数for (i=0;i<pDoc->BmpHeight;i++)for(j=0;j<pDoc->BmpWidth;j++){nHist[pDoc->pImage[i*pDoc->nWidth+j]]++;}char ch[16]={0},a[3]={0};//ch数组存放像素个数,a数组存放灰度for(i=0;i<256;i++){itoa(nHist[i],ch,10);//将整数转化为字符itoa(i,a,10);void CEmptyV iew::On24xinxi() //24bit直方图信息保存{// TODO: Add your command handler code hereCEmptyDoc *pDoc=GetDocument();ASSERT_VALID(pDoc);CString sF ileName;CFile file;CFileDia log dlg(FALSE, "txt", sFileName,OFN_OVERWRITEPROMPT|OFN_HIDEREADONL Y,"文本文件(*.txt)|*.txt||", this);dlg.m_ofn.lpstrTitle = _T("保存直方图");//设置保存路径if (dlg.DoModal() == IDOK){CString fileName = dlg.GetPathName();file.Open(fileName, CFile::modeReadWrite|CFile::modeCreate);}int nHist[256*3];int i,j,nWidth;for ( i=0;i<256*3;i++){nHist[i]=0;}if (pDoc->BmpWidth%4==0){nWidth=pDoc->BmpWidth*3;}else{nWidth=(pDoc->BmpWidth*3/4+1)*4;}//求24位直方图对应灰度的像素个数for (i=0;i<pDoc->BmpHeight;i++)for(j=0;j<pDoc->BmpWidth;j++){nHist[pDoc->pImage[i*nWidth+j*3]]++;nHist[256+pDoc->pImage[i*nWidth+j*3+1]]++;nHist[512+pDoc->pImage[i*nWidth+j*3+2]]++;}char ch[16]={0},a[3]={0};//ch数组存放像素个数,a数组存放灰度file.Write("B", 1);//蓝分量file.Write("\r\n", 2);for(i=0;i<256;i++){itoa(nHist[i],ch,10);//将整数转化为字符itoa(i,a,10);file.Write(a, sizeof(a) );file.Write(":", 1 );file.Write(ch, sizeof(ch) );file.Write("\r\n", 2 );}file.Write("\r\n", 2 );file.Write("G", 1 );//红分量file.Write("\r\n", 2 );char b[3]={0};for(i=256;i<256*2;i++){itoa(nHist[i],ch,10);//将整数转化为字符itoa(i-256,b,10);file.Write(b, sizeof(b) );file.Write(":", 1 );file.Write(ch, sizeof(ch) );file.Write("\r\n", 2 );}file.Write("\r\n", 2 );file.Write("R", 1 );//红分量file.Write("\r\n", 2 );#include "math.h"void CTeachV iew::OnDuijiaoxian() //画对角线{// TODO: Add your command handler code hereCTeachDoc* pDoc = GetDocument();ASSERT_VALID(pDoc);int i,j,nWidth;double x=pDoc->BmpWidth;double y=pDoc->BmpHeight;double t=10*sqrt(2);if(pDoc->BitCount == 8){if (pDoc->BmpWidth % 4 != 0)nWidth = ((pDoc->BmpWidth / 4) + 1) * 4;elsenWidth = pDoc->BmpWidth;for(j=0;j<pDoc->BmpHeight;j++)for(i=0;i<pDoc->BmpWidth;i++){if(j>(y-t)*(i-t)/(x-t)&&j<y-(y-t)*(x-i-t)/(x-t)||j<y-(y-t)*(i-t)/(x-t)&&j>(y-t)*(x-i-t)/(x-t)){pDoc->pImage[j*nWidth+i]=0;}}}else{if (pDoc->BmpWidth % 4 != 0)nWidth = ((pDoc->BmpWidth * 3 / 4) + 1) * 4;elsenWidth = pDoc->BmpWidth * 3;for(j=0;j<pDoc->BmpHeight;j++)for(i=0;i<pDoc->BmpWidth;i++){if(j>(y-t)*(i-t)/(x-t)&&j<y-(y-t)*(x-i-t)/(x-t)||j<y-(y-t)*(i-t)/(x-t)&&j>(y-t)*(x-i-t)/(x-t)){ pDoc->pImage[j*nWidth+i*3]=0;pDoc->pImage[j*nWidth+i*3+1]=0;pDoc->pImage[j*nWidth+i*3+2]=255;}}}OnInitialUpdate();}void CTeach_testV iew::On8bitShizi() //黑色十字架{CTeach_testDoc *pDoc=GetDocument();int i,j;for(i=0;i<10;i++){for(j=pDoc->BmpWidth/3;j<pDoc->BmpWidth/3*2;j++){pDoc->pImage[(pDoc->BmpHeight/2+i)*pDoc->nWidth+j]=0;}}for(i=0;i<pDoc->BmpHeight/3;i++){for(j=pDoc->BmpWidth/2-5;j<pDoc->BmpWidth/2+5;j++)pDoc->pImage[(pDoc->BmpHeight/3+i)*pDoc->nWidth+j]=0; }Invalidate(TRUE);}void CTeachV iew::OnAverage() //直方图均衡化{// TODO: Add your command handler code hereCTeachDoc* pDoc = GetDocument();int nHist[256*3];int i,j,nWidth,temp=0,temp1=0,temp2=0,temp3=0;float a[256],b[256];if (pDoc->BmpWidth%4==0){nWidth=pDoc->BmpWidth;}else{nWidth=(pDoc->BmpWidth/4+1)*4;}for ( i=0;i<256;i++){nHist[i]=0;}for (i=0;i<pDoc->BmpHeight;i++)for(j=0;j<pDoc->BmpWidth;j++){nHist[pDoc->pImage[i*nWidth+j]]++;}////求概率密度for ( i=0;i<256;i++){a[i]=(float)nHist[i]/(pDoc->BmpHeight*pDoc->BmpWidth);}////求概率分布b[0]=a[0];for ( i=1;i<256;i++){b[i]=b[i-1]+a[i];}//////进行点运算for (i=0;i<pDoc->BmpHeight;i++)for(j=0;j<pDoc->BmpWidth;j++){temp=pDoc->pImage[i*nWidth+j];pDoc->pImage[i*nWidth+j]=(int)(255*b[temp]+0.5);//四舍五入}OnInitialUpdate();}void CTeachV iew::OnBiaoqian() //打理工标签{// TODO: Add your command handler code hereCTeachDoc* pDoc = GetDocument();ASSERT_VALID(pDoc);int i,j;int Width2,Height2,nWidth2;LPCTSTR lpszPathName;CString str=".//nit2.bmp";lpszPathName=str;pDoc->ReadImage(lpszPathName);Width2=pDoc->BmpWidth;Height2=pDoc->BmpHeight;if (Width2 % 4 != 0){nWidth2 = ((Width2 / 4) + 1) * 4;}else{nWidth2= Width2;}BYTE * newpImage=(BYTE*)malloc(nWidth2*Height2);for( j=0;j<Height2;j++)for ( i=0;i<Width2;i++){newpImage[j*nWidth2+i]=pDoc->pImage[j*pDoc->nWidth+i];}str=".//water1.bmp";lpszPathName=str;pDoc->ReadImage(lpszPathName);for( j=0;j<Height2;j++)for ( i=0;i<Width2;i++){pDoc->pImage[(pDoc->BmpHeight -Height2 + j) * pDoc->nWidth + (pDoc->BmpWidth -Width2 + i)]=0;pDoc->pImage[(pDoc->BmpHeight-Height2+j)*pDoc->nWidth+pDoc->BmpWidth-Width2+i]=newpImage[j*nWidth2+i];}Invalidate();}。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

得分
评阅人
第 1 页 共 6页
二、空域图像增强题 1(Image enhancement in the spatial domain) (20 分)
255
255
255
128
128
50 100 100
(a)
(b)
2
(c)
r Exponential of the form s = T(r) = 255 e , 0 ≤ r ≤ 255, with α being a positive constant, are useful for constructing smooth gray-level transformation functions. (1) Start with this basic function and construct transformation functions having the shapes shown in the above figures. (15 分) (2) What kind of transformation does the function of (a) approximately complete for an input of a gray intensity image? (5 分)
2、The visible spectrum consists of electromagnetic spectrum nearly in the range of wavelength: A. (10 – 400 nm) C. (400 – 700 nm) B. (0.01 – 10 nm) D. (700 – 1500 nm)
(b)
(a)
第 3 页 共 6页
第 4 页 共 6页
四、 频域图像增强题 1 (Image enhancement in Freq. Domain 1) (20 分) Given a continuous function f(t) = cos(2πnt), (1) Its period T = ? 得分 评阅人 (2) Its frequency F = ? (3) Its Fourier transform F (jΩ) = ? (4) The Nyquist rate fs = ? (5) If it is sampled with a rate higher than fs, what’s the sampling function? What do the sampled function and its Fourier transform like like? (6) If it is sampled with a rate lower than fs, answer the same problem as (5). (7) If it is sampled with the Nyquist rate at the instants t = 0, ∆T, 2∆T, …, answer the same problem as (5). 得分 评阅人 Answer: (1) The period T = 1/n. (2) The frequency F = n. (3) F (jΩ)=
试卷编号: 课程编号: 适用班级: 课程名称: 数字图像处理(双语) 姓名: 电子系各专业
五 20 六 0 七 0
( 考试形式: 班级:
)卷
学号: 考试日期:
八 0 九 0 十 0
ห้องสมุดไป่ตู้
学院: 信息工程学院 专业:
一 题分 得分 20 二 20 三 20 四 20
总分 100
累分人 签名
考生注意事项:1、本试卷共 5 页,请查看试卷中是否有缺页或破损。如有立即举手报告以便更换。 2、考试结束后,考生不得将试卷、答题纸和草稿纸带出考场。
-nn F()
Figure P4.4 1/2n and n is an integer. In terms of Fig. P4.4(b), we see that when ΔT = 1/2n all the positive and negative impulses would coincide, thus canceling each other and giving a result of 0 for the sampled data. (d) When the sampling rate is less than the Nyquist rate, we can have a situation such as the one illustrated in Fig. P4.4(c), which is the sum of two sine waves in this case. For some values of sampling, the sum of the two sines combine to form a single sine wave and a plot of the samples would appear as in Fig. 4.8 of the book. Other values would result in functions whose samples can describe any shape obtainable by sampling the sum of two sines.
3、For V = {1}, the subsets S1 and S2 are A. (m-connected) C. (4-connected) B. (8-connected ) D. (None of these 3)
4、Two pixels p and q are at the locations shown in the figure, their Euclidean, city-block and chessboard distances are respectively: A. De = ( C. D8 = ( ) 4 ) B. D4 = ( 6 ) 0 1 3 (q ) 4 0 2 4 5 0 7 5 6 1 6 6 7 2 5(p) 7 3
一、 基础知识填空题(1,2 为单项选择,每空 3 分,3,4 为多项选择,每空 2 分,共 20 分), 1 1、When you enter a dark room on a bright day, it takes some time to see well enough, this is the visual process or visual phenomenon of A. (Brightness adaptation.) C. (Optical illusion.) B. (Brightness discrimination.) D. (Simultaneous contrast.)
(1) (a)
得分 评阅人
so
.
(b)
so
第 2 be 页 共 6页 (c) , can not decided from the information given by the figure (c). We can specify with an arbitrary positive number, for example, the same as in (a) or in (b).
三、空域图像增强题 2(Image enhancement in the spatial domain) (20 分) The White bars in the test pattern shown are 7 pixels wide and 210 pixels high. The separator between bars is 17 pixels. What would this image look like after application of 得分 评阅人 1. A 3×3 median filter? 2. A 7×7 median filter? 3. A 9×9 median filter? 4. A 15×15 median filter? ( Note: in your answer, quantitative analysis is expected. ) Answer: The separator between bars is 17 pixels wide > 15, so none of the 4 filters can remove any black pixels. We can treat all black pixels as background. 1. Applying a 3 × 3 median filter removes the 1 pixel at the top left, top right, bottom left and bottom right locations of each bar, as shown in (a), which is an amplified corner of the filtered image. (a) 2. Applying a 7×7 median filter remove 6 pixels located at the top left, the top right, the bottom left, the bottom right of each bar, as shown in (b),which is an amplified corner of the median filtered image. 0111110 0001000 3×3 1111111 7×7 01111110 1111111 01111110 3. Applying a 9×9 median filter remove 10 pixels located at the top left, the top right, the bottom left, the bottom right of each bar, as shown in (c). which is an amplified corner of the median filtered image 0000000 9×9 0011100 0111110 4. This time all bars are disappeared.
相关文档
最新文档