数字图像处理作业
《数字图像处理》期末大作业
《数字图像处理》期末大作业大作业题目及要求:一、题目:本门课程的考核以作品形式进行。
作品必须用Matlab完成。
并提交相关文档。
二、作品要求:1、用Matlab设计实现图形化界面,调用后台函数完成设计,函数可以调用Matlab工具箱中的函数,也可以自己编写函数。
设计完成后,点击GUI 图形界面上的菜单或者按钮,进行必要的交互式操作后,最终能显示运行结果。
2、要求实现以下功能:每个功能的演示窗口标题必须体现完成该功能的小组成员的学号(后三位)。
1)对于打开的图像可以显示其灰度直方图,实现直方图均衡化和直方图匹配(规定化)。
2)实现灰度图像的对比度增强,要求实现线性变换和非线性变换(包括对数变换和指数变换)。
3)实现图像的缩放变换、旋转变换等。
4)图像加噪(用输入参数控制不同噪声),然后使用空域和频域进行滤波处理。
5)采用robert算子,prewitt算子,sobel算子,拉普拉斯算子对图像进行边缘提取。
6)读入两幅图像,一幅为背景图像,一幅为含有目标的图像,应用所学的知识提取出目标。
3、认真完成期末大作业报告的撰写,对各个算法的原理和实验结果务必进行仔细分析讨论。
报告采用A4纸打印并装订成册。
附录:报告模板《数字图像处理》期末大作业班级:小组编号:组长:小组成员:浙江万里学院计算机与信息学院2013年12月目录(自动生成)1 绘制灰度直方图,实现直方图均衡化和直方图匹配(规定化)1.1 算法原理1.2 算法设计1.3 实验结果及对比分析图1 ××××××图2 ××××××分析***********************************************2 灰度图像的对比度增强2.1 算法原理2.2 算法设计2.3 实验结果及分析3 图形的几何变换3.1 算法原理3.2 算法设计3.3 实验结果及分析4 图像加噪(用输入参数控制不同噪声),然后使用空域和频域进行滤波处理4.1 算法原理4.2 算法设计4.3 实验结果及分析5 采用robert,prewitt,sobel,拉普拉斯算子对图像进行边缘提取5.1 算法原理5.2 算法设计5.3 实验结果及分析6 读入两幅图像,一幅为背景图像,一幅为含有目标的图像,应用所学的知识提取出目标6.1 算法原理6.2 算法设计6.3 实验结果及分析7 小结(感受和体会)(英文版)Two regulations promulgated for implementation is in the party in power for a long time and the rule of law conditions, the implementation of comprehensive strictly strategic plan, implementation in accordance with the rules and discipline to manage the party, strengthen inner-party supervision of major initiatives. The two regulations supporting each other, the < code > adhere to a positive advocate, focusing on morality is of Party members and Party leading cadres can see, enough to get a high standard; < rule > around the party discipline, disciplinary ruler requirements, listed as "negative list, focusing on vertical gauge, draw the party organizations and Party members do not touch the" bottom line ". Here, the main from four square face two party rules of interpretation: the first part introduces two party Revised regulations the necessity and the revision process; the second part is the interpretation of the two fundamental principles of the revision of laws and regulations in the party; the third part introduces two party regulations modified the main changes and needs to grasp several key problems; the fourth part on how to grasp the implementation of the two regulations of the party. < code > and < Regulations > revised the necessity and revised history of the CPC Central Committee the amendment to the Chinese Communist Party members and leading cadres honest politics several guidelines > and < Chinese Communist Party discipline and Punishment Regulations > column 1 by 2015 to strengthenparty laws and regulations focus. Two party regulations revision work lasted a Y ears, pooling the wisdom of the whole party, ideological consensus, draw historical experience, respect for the wisdom of our predecessors, which reflects the unity of inheritance and innovation; follow the correct direction, grasp the limited goals, adhere to the party's leadership, to solve the masses of the people reflect a focus on the problem. The new revision of the < code > and < rule >, reflects the party's 18 and the eighth session of the third, the spirit of the fourth plenary session, reflecting the experience of studying and implementing the General Secretary Xi Jinping series of important speech, reflects the party's eighteen years comprehensive strictly practice. (a) revised two regulations of the party need of < the ICAC guidelines > in < in 1997 Leaders as members of the Communist Party of China clean politics certain criteria (Trial) > based on revised, the promulgation and implementation of January 2010, to strengthen the construction of the contingent of leading cadres play an important role. But with the party to manage the party strictly administering the deepening, has not been able to fully meet the actual needs. Content is too complicated, "eight prohibition, 52 are not allowed to" hard to remember, and also difficult to put into practice; the second is concisely positive advocated by the lack of prohibited provisions excessive, no autonomy requirements; the third is banned terms and discipline law, both with the party discipline, disciplinary regulationsrepeat and Criminal law and other laws and regulations repeat; the fourth is to "clean" the theme is not prominent, not for the existing problems, and is narrow, only needle of county-level leading cadres above. < rule > is in 1997 < Chinese Communist Party disciplinary cases (Trial) > based on revision, in December 2003 the promulgation and implementation, to strengthen the construction of the party play very important role. Along with the development of the situation, which many provisions have been unable to fully meet the comprehensive strictly administering the practice needs. One is Ji law, more than half of the provisions and criminal law and other countries laws and regulations Repetition; two is the political discipline regulations is not prominent, not specific, for violation of the party constitution, damage the authority of Party Constitution of misconduct lack necessary and serious responsibility to pursue; third is the main discipline for the leading cadres, does not cover all Party members. Based on the above situation, need to < the criterion of a clean and honest administration > and < rule > the two is likely to be more relevant regulations first amendment. By revising, really put the authority of Party discipline, the seriousness in the party tree and call up the majority of Party members and cadres of the party constitution of party compasses party consciousness. (II) two party regulations revision process the Central Committee of the Communist Party of China attaches great importance to two regulations revision . Xi Jinping, general books recorded in the FifthPlenary Session of the eighth session of the Central Commission for Discipline Inspection, on the revised regulations < > made clear instructions. According to the central deployment, the Central Commission for Discipline Inspection from 2014 under six months begin study two regulations revision. The Standing Committee of the Central Commission for Discipline Inspection 4 review revised. Comrade Wang Qishan 14 times held a special meeting to study two regulations revision, amendment clarifies the direction, major issues of principle, path and target, respectively held a forum will listen to part of the province (area) secretary of the Party committee, Secretary of the Discipline Inspection Commission, part of the central ministries and state organs DepartmentThe first party committee is mainly responsible for people, views of experts and scholars and grassroots party organizations and Party members. Approved by the Central Committee of the Communist Party of China, on 7 September 2015, the general office of the Central Committee of the Party issued a notice to solicit the provinces (autonomous regions, municipalities) Party, the central ministries and commissions, state ministries and commissions of the Party (party), the General Political Department of the military, every 3 people organization of Party of two regulations revision opinion. Central Commission for Discipline Inspection of extensive solicitation of opinions, careful study, attracting, formed a revised sent reviewers. In October 8 and October 12, Central Committee PoliticalBureau Standing Committee and the Political Bureau of the Central Committee After consideration of the two regulations revised draft. On October 18, the Central Committee of the Communist Party of China formally issued two regulations. Can say, two laws amendment concentrated the wisdom of the whole party, embodies the party. Second, < code > and < Regulations > revision of the basic principles of two party regulations revision work and implement the party's eighteen, ten eight plenary, the spirit of the Fourth Plenary Session of the Eleventh Central Committee and General Secretary Xi Jinping important instructions on the revised < low political criterion > and < Regulations >, highlighting the ruling party characteristics, serious discipline, the discipline quite in front of the law, based on the current, a long-term, advance as a whole, with Bu Xiuding independent < rule > and < rule >. Main principle is: first, adhere to the party constitution to follow. The constitution about discipline and self-discipline required specific, awaken the party constitution of party compasses party consciousness, maintaining the authority of the constitution. General Secretary Xi Jinping pointed out that "no rules, no side round. Party constitution is the fundamental law, the party must follow the general rules. In early 2015 held the eighth session of the Central Commission for Discipline Inspection Fifth Plenary Session of the 16th Central Committee, Xi Jinping again pointed out that constitution is the party must follow the general rules, but also the general rules." the revisionof the < code > and < rule > is Method in adhere to the regulations established for the purpose of combining rule of virtue is to adhere to the party constitution as a fundamental to follow, the constitution authority set up, wake up the party constitution and party rules the sense of discipline, the party constitution about discipline and self-discipline specific requirements. 4 second is to adhere to in accordance with the regulations governing the party and the party. The Party of rule of virtue "de", mainly refers to the party's ideals and beliefs, excellent traditional style. The revised the < code > closely linked to the "self-discipline", insisting on the positive initiative, for all members, highlight the "vital few", emphasized self-discipline, focusing on the morality, and the majority of Party members and the ideological and moral standards. The revised < > Ji method separately, Ji, Ji Y an to Method, as a "negative list", emphasizing the heteronomy, focusing on vertical gauge. Is this one high and one low, a positive reaction, the strict party discipline and practice results transformation for the integration of the whole party to observe moral and discipline requirements, for the majority of Party members and cadres provides benchmarking and ruler. Third, insist on to. In view of the problems existing in the party at the present stage, the main problems of Party members and cadres in the aspect of self-discipline and abide by the discipline to make clearly defined, especially the party's eighteen years strict political discipline and political rules, organization and discipline andto implement the central eight provisions of the spirit against the four winds and other requirements into Disciplinary provisions. Not one pace reachs the designated position, focusing on in line with reality, pragmatic and effective. After the revision of major changes, major changes in the < code > and < rule > modified and needs to grasp several key problems (a) < code > < code > adhere to according to regulations governing the party and party with morals in combination, for at the present stage, the leadership of the party members and cadres and Party members in existing main problems of self-discipline, put forward principles, requirements and specifications, showing Communists noble moral pursuit, reflected at all times and in all over the world ethics from high from low 5 common requirements. One is closely linked to the "self-discipline", removal and no direct relation to the provisions of . the second is adhere to a positive advocate, "eight prohibition" 52 are not allowed to "about the content of the" negative list moved into synchronization amendment < cases >. Three is for all the party members, will apply object from the leadership of the party members and cadres to expand to all Party members, fully embodies the comprehensive strictly required. The fourth is prominent key minority, seize the leadership of the party members and cadres is the key, and put forward higher requirements than the ordinary Party members. Five is to simplify, and strive to achieve concise, easy to understand, easy to remember. The revised < code > is the ruling Party since the first insists ona positive advocate forAll Party members and the self-discipline norms, moral declaration issued to all members of the party and the National People's solemn commitment. > < criterion of a clean and honest administration consists of 4 parts, 18, more than 3600 words. After the revision of the < code >, a total of eight, 281 words, including lead, specification and Party member cadre clean fingered self-discipline norms, etc. Part 3 members low-cost clean and self-discipline, the main contents can be summarized as "four must" "eight code". Lead part, reiterated on ideal and faith, fundamental purpose, the fine traditions and work style, noble sentiments, such as "four must" the principle of requirements, strong tone of self-discipline, The higher request for 6 and supervised tenet, the foothold in permanent Bao the party's advanced nature and purity, to reflect the revised standards requirements. Members of self-discipline norms around the party members how to correctly treat and deal with the "public and private", "cheap and rot" thrifty and extravagance "bitter music", put forward the "four norms". Party leader cadre clean fingered self-discipline norms for the leadership of the party members and cadres of the "vital few", around the "clean politics", from civil servant of the color, the exercise of power, moral integrity, a good family tradition and other aspects of the leadership of the party members and cadres of the "four norms" < > < norm norm. "The Party member's self-discipline norms" and "party members and leading cadre clean fingered self-discipline norms," atotal of eight, collectively referred to as the "eight". "Four must" and "eight" of the content from the party constitution and Party's several generation of leaders, especially Xi Jinping, general secretary of the important discussion, refer to the "three discipline and eight points for attention" statements, and reference some embody the Chinese nation excellent traditional culture essence of epigrams. (2) the revised regulations, the main changes in the revised Regulations > to fully adapt to the strictly requirements, reflects the according to the regulations governing the law of recognition of deepening, the realization of the discipline construction and Jin Ju. < rule > is party a ruler, members of the basic line and follow. And the majority of Party members and cadres of Party organizations at all levels should adhere to the bottom line of thinking, fear discipline, hold the bottom line, as a preventive measure, to keep the party's advanced nature and purity. 1, respect for the constitution, refinement and discipline. Revised < rule > from comprehensive comb physical constitution began, the party constitution and other regulations of the Party of Party organizations and Party discipline requirements refinement, clearly defined in violation of the party constitution will be in accordance with regulations to give the corresponding disciplinary action. The original 10 categories of misconduct, integration specification for political discipline, discipline, honesty and discipline masses Ji Law and discipline and discipline and other six categories, the content of < rule >real return to Party discipline, for the majority of Party members and listed a "negative list. 7 2, highlighting the political discipline and political rules. > < Regulations according to the stage of the discipline of outstanding performance, emphasizing political discipline and political rules, organization and discipline, in opposition to the party's leadership and the party's basic theory, basic line, basic program and basic experience, the basic requirement of behavior made prescribed punishment, increase the cliques, against the organization such as violation of the provisions, to ensure that the central government decrees and the Party of centralized and unified. 3, adhere to strict discipline in the law and discipline In front, Ji separated. Revised < Regulations > adhere to the problem oriented, do Ji separated. Any national law existing content, will not repeat the provisions, the total removal of 79 and criminal law, repeat the content of the public security management punishment law, and other laws and regulations. In the general reiterated that party organizations and Party members must conscientiously accept the party's discipline, die van comply with national laws and regulations; at the same time, to investigate violations of Party members and even criminal behavior of Party discipline and responsibility, > < Regulations distinguish five different conditions, with special provisions were made provisions, so as to realize the connection of Party discipline and state law. 4, reflect Wind building and anti-corruption struggle of the latest achievements. < rule > the party's eighteen yearsimplement the spirit of the central provisions of the eight, against the requirements of the "four winds" and transformation for disciplinary provisions, reflecting the style construction is always on the road, not a gust of wind. In the fight against corruption out of new problems, increase the trading rights, the use of authority relatives profit and other disciplinary terms. Prominent discipline of the masses, the new against the interests of the masses and ignore the demands of the masses and other disciplinary terms and make provisions of the disposition and the destruction of the party's close ties with the masses.Discipline to protect the party's purpose. 8 of these regulations, a total of three series, Chapter 15, 178, more than 24000 words, after the revision of the regulations a total of 3 series, Chapter 11, 133, 17000 words, divided into "general" and "special provisions" and "Supplementary Provisions" Part 3. Among them, add, delete, modify the provisions of the proportion of up to nearly 90%. 1, the general general is divided into five chapters. The first chapter to the regulations of the guiding ideology, principles and scope of application of the provisions, highlight the strengthening of the party constitution consciousness, maintenance the authority of Party Constitution, increase the party organizations and Party members must abide by the party constitution, Y an Centralized centralized, would examine at all levels of the amended provisions implementing and maintaining Party discipline, and consciously accept the party discipline,exemplary compliance with national laws and regulations. The second chapter of discipline concept, disciplinary action types and effects of the regulations, will be a serious warning from the original a year for a year and a half; increase the Party Congress representative, by leaving the party above (including leave probation) punishment, the party organization should be terminated its representative qualification provisions. The third chapter of the disciplinary rules of use prescribed in the discipline rectifying process, non convergence, not close hand classified as severely or heavier punishment. "Discipline straighten "At least eighteen years of five years, these five years is to pay close attention to the provisions of the central eight implementation and anti -" four winds ". The fourth chapter on suspicion of illegal party disciplinary distinguish five different conditions, with special provisions were made provisions, to achieve effective convergence of Party and country 9 method. < rule > the provisions of Article 27, Party organizations in the disciplinary review found that party members have committed embezzlement, bribery, dereliction of duty dereliction of duty and other criminal law act is suspected of committing a crime shall give cancel party posts, probation or expelled from the party. The second is < Regulations > Article 28 the provisions of Party organizations in the disciplinary review But found that party members are stipulated in the criminal law, although not involved in a crime shall be investigated for Party discipline and responsibility shouldbe depending on the specific circumstances shall be given a warning until expelled punishment. This situation and a difference is that the former regulation behavior has been suspected of a crime, the feeling is quite strict, and the latter for the behavior not involving crime, only the objective performance of the provisions of the criminal code of behavior, but the plot is a crime to slightly. < Regulations > the 29 provisions, Party organizations in the discipline review found that party members and other illegal behavior, affect the party's image, the damage to the party, the state and the people's interests, we should depend on the situation Seriousness given disciplinary action. The loss of Party members, seriously damaging the party's image of behavior, should be given expelled from the party. At this article is party member is in violation of the criminal law outside the other illegal acts, such as violates the public security administration punishment law, customs law, financial laws and regulations behavior. The fourth is < cases > Article 32 stipulates, minor party members and the circumstances of the crime, the people's Procuratorate shall make a decision not to initiate a prosecution, or the people's court shall make a conviction and exempted from criminal punishment shall be given within the party is removed from his post, probation or expelled from the party. Party members and crime, sheets were fined in accordance with For acts; the principal Ordinance amended the provisions of the preceding paragraph. This is the new content, in order to achieve Ji method effectiveconvergence. Five is < > the thirty third article 10 of the provisions, the Party member due to an intentional crime is sentenced to criminal law (including probation) sheets or additional deprivation of political rights; due to negligence crime and was sentenced to three years or more (excluding three years) a penalty, shall give expelled punishment. Due to negligence crime is convicted and sentenced to three years (including three years) in prison or be sentenced to public surveillance, detention, shall in general be expelled from the party. For the individual may not be expelled from the party, should control Approval. This is followed and retained the original > < Regulations the provisions of punishment party authorization rules and report to a level party organizations. For is "party members with criminal acts, and by the criminal punishment, generally should be expelled from the party". The fifth chapter of probationary Party member of the discipline and discipline after missing members of the treatment and punishment decisions, such as the implementation of the provisions, clear the related party discipline and punishment decision made after, for duties, wages and other relevant alteration formalities for the longest time. 2, sub sub section will the original regulations of10 categories of acts of violation of discipline integration revised into 6 categories, respectively, in violation of the punishments for acts of political discipline "in violation of discipline behavior of punishment" in violation of integrity of disciplinary action points "of violation punishments for actsof mass discipline" "the violation of work discipline, punishment" in violation of discipline of life behavior punishment "6 chapters. 3, annex" Supplementary Provisions "clear authority making supplementary provisions of, cases of interpretative organ, as well as regulations implementation time and retroactivity etc.. 11 (3) learning understanding > < regulations needs to grasp several key problems The first problem -- about the violation of political discipline behavior > < new ordinance chapter 6 the political discipline column for the six disciplines, that is the main opposition to Party leadership and the opposition of the basic theory, basic line, basic program and basic experience, basic requirements of misconduct made provisions of the disposition, especially the eighteen since the CPC Central Committee put forward the Yan Mingzheng treatment of discipline and political rules requirements and practical achievements transformation for Discipline article, increase the false debate central policies, cliques, against the organization review, make no discipline of the principle of harmony terms. These are the party's eighteen years in comprehensive strictly Process combined with the practice of rich content. (1) false debate the central policies and undermine the Party of centralized and unified the problem is made in accordance with the provisions of the party constitution. Constitution in general programme requirements adhere to democratic centralism is one of the requirements of the construction of the party must adhere to the four cardinal. Applicationof this principle is not only the party the basic organization principle and is also the mass line in party life, it requires that we must fully develop inner-party democracy, respect for the dominant position of Party members, safeguarding the Party member democratic rights, give full play to the enthusiasm and creativity of the party organizations at all levels and Party members, at the same time, also must implement the right concentration, ensure the party's mission < the chaos in unity and concerted action to ensure that the party's decision to get quickly and effectively implementing. The Party Central Committee formulated the major principles and policies, through different channels and ways, fully listen to the party organizations and Party members of the opinions and suggestions, but 12 is some people face to face not to say back blather "" will not say, after the meeting said, "" Taiwan does not say, and nonsense ", in fact, not only disrupt the people thought, some causing serious consequences, the damage to the Party of the centralized and unified, hinder the central policy implementation, but also a serious violation of the democratic system of principles. There is no doubt that shall, in accordance with the Regulations > 4 Specified in Article 6 to give the appropriate punishment. For did not cause serious consequences, to give criticism and education or the corresponding tissue processing. (2) about the destruction of the party's unity < New Regulations > the forty eighth to fifty second article, to damage Party's unity unified and violation of political discipline, punishment situationmade explicit provisions. Article 52 of the new "in the party get round group, gangs seek private gain, cliques, cultivate private forces or through the exchange of interests, for their own to create momentum and other activities to gain political capital, given a serious warning or withdraw from their party posts disposition; if the circumstances are serious, to give Leave a party to observation or expelled from the party. (3) on against the organization review of the provisions of the constitution, party loyalty honesty is party members must comply with the obligations. Members must obey the organization decision, shall not violate the organization decided encounters by asking questions to find organization, rely on the organization, shall not deceive the organization, against the organization. For example, after the investigation does not take the initiative to explain the situation, but to engage in offensive and defensive alliance, hiding the stolen money is against survey organization, is a violation of the behavior of political discipline. Article 24 of the original > < Regulations, although the provisions of the interference, hinder group review the behavior of the fabric can be severely or 13 Aggravated punishment, but did not put this kind of behavior alone as a discipline for qualitative amount of discipline. > < new regulations increase the Article 57, "anti organization review, one of the following acts, given a warning or serious warning; if the circumstances are relatively serious, giving removed from or placed on probation within the party post; if the circumstances are serious, give。
数字图像处理大作业
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.图像增强:在图像平面中对图像的像素灰度值进行运算处理,使之更适合于人眼的观察或机器的处理的一种技术。
2.图像复原;,将降质图像重建成接近于或完全无退化的原始理想图像的过程3.图像锐化;图像锐化就是补偿图像的轮廓,增强图像的边缘及灰度跳变的部分,使图像变得清晰。
4.边缘检测;使用数学方法提取图像像元中具有亮度值(灰度)空间方向梯度大的边、线特征的过程。
解答题1直方图均衡化基本步骤:(1)计算原图像的归一化灰度级别及其分布概率pr(rk)=nk/n。
(2)根据直方图均衡化公式求变换函数的各灰度等级值sk。
(3)将所得的变换函数的各灰度等级值转化成标准的灰度级别值。
也即把第(2)步求得的各sk值,按靠近原则近似到与原图像灰度级别相同的标准灰度级别中。
此时获得的即是均衡化后的新图像中存在的灰度级别值,其对应的像素个数不为零;对于那些在变换过程中“被丢失了的”灰度级别值,将其像素个数设为零。
(4)求新图像的各灰度级别值sl’(l=0,1,…,L-1)的像数数目。
在前一步的计算结果中,如果不存在灰度级别值sl’,则该灰度级别的像素数目为零;如果存在灰度级别值sl’,则根据其与之相关的sk=T(rk)和sk的对应关系,确定该灰度级别sl’的像数数目。
(5)用sk代替sl’(k,l=0,1,…,L-1),并进而求新图像中各灰度级别的分布概率ps(sk)=mk/n。
(6)画出经均衡化后的新图像的直方图。
2. 图像增强时,平滑和锐化有哪些实现方法,各列举出几个模板和滤波器。
平滑的实现方法:邻域平均法,中值滤波,多图像平均法,频域低通滤波法。
锐化的实现方法:微分法,高通滤波法。
3.梯度法与Laplacian算子检测边缘的异同点。
不同点:梯度算子是利用阶跃边缘灰度变化的一阶导数特性,认为极大值点对应于边缘点;而Laplacian算子检测边缘是利用阶跃边缘灰度变化的二阶导数特性,认为边缘点是零交叉点。
相同点:都能用于检测边缘,且都对噪声敏感。
(完整版)数字图像处理大作业
数字图像处理1.图像工程的三个层次是指哪三个层次?各个层次对应的输入、输出对象分别是什么?①图像处理特点:输入是图像,输出也是图像,即图像之间进行的变换。
②图像分割特点:输入是图像,输出是数据。
③图像识别特点:以客观世界为中心,借助知识、经验等来把握整个客观世界。
“输入是数据,输出是理解。
2.常用的颜色模型有哪些(列举三种以上)?并分别说明颜色模型各分量代表的意义。
①RGB(红、绿、蓝)模型②CMY(青、品红、黄)模型③HSI(色调、饱和度、亮度)模型3.什么是图像的采样?什么是图像的量化?1.采样采样的实质就是要用多少点来描述一幅图像,采样结果质量的高低就是用前面所说的图像分辨率来衡量。
简单来讲,对二维空间上连续的图像在水平和垂直方向上等间距地分割成矩形网状结构,所形成的微小方格称为像素点。
一副图像就被采样成有限个像素点构成的集合。
例如:一副640*480分辨率的图像,表示这幅图像是由640*480=307200个像素点组成。
2.量化量化是指要使用多大范围的数值来表示图像采样之后的每一个点。
量化的结果是图像能够容纳的颜色总数,它反映了采样的质量。
针对数字图像而言:采样决定了图像的空间分辨率,换句话说,空间分辨率是图像中可分辨的最小细节。
量化决定了图像的灰度级,即指在灰度级别中可分辨的最小变化。
数字图像处理(第三次课)调用图像格式转换函数实现彩色图像、灰度图像、二值图像、索引图像之间的转换。
图像的类型转换:对于索引图像进行滤波时,必须把它转换为RGB图像,否则对图像的下标进行滤波,得到的结果是毫无意义的;2.用MATLAB完成灰度图像直方图统计代码设计。
6789101112131415161718192021222324252627282930title('lady-lenna');if isrgb(a);b=rgb2gray(a);%RGB转换为灰度图像endsubplot(2,2,2);imshow(b);%显示图像title('ladygaga-lenna');[m,n]=size(a);%返回图像大小e=zeros(1,256);for k=0:255for i=1:mfor j=1:nif a(i,j)==ke(k+1)=e(k+1)+1;%灰度值相同的进行累加endendendendsubplot(2,2,4);bar(e);%画图像的灰度直方图title('灰度直方图');c=imrotate(a,20);%图像的旋转subplot(2,2,3);imshow(c);数字图像处理(第四次课)编写matlab函数,实现在医学图像中数字减影血管造影。
完整版数字图像处理作业题及部分答案
1.数字图像与连续图像相比具有哪些优点?连续图像f(x,y)与数字图像I(c,r)中各量的含义是什么?它们有何联系和区别? (To be compared with an analog image, what are the advantagesof a digital image? Let f(x,y) be an analog image, I(r, c) be a digital image, please giveexplanation and comparison for defined variables: f/I, x/r, and y/c)2.图像处理可分为哪三个阶段? 它们是如何划分的?各有什么特点? (We can divide image processing into 3 stages, what are they? how they are divided? What are their features?)答:低级处理---低层操作,强调图像之间的变换,是一个从图像到图像的过程;中级处理---中层操作,主要对图像中感兴趣的目标进行检测和测量,从而建立对图像的描述,是一个从图像到数值或符号的过程;高级处理---高层操作,研究图像中各目标的性质和相互联系,得出对图像内容含义的理解以及对原来客观场景的解释;3.试从结构和功能等角度分析人类视觉中最基本的几个要素是什么?什么是马赫带效应? 什么是同时对比度?它们反映了什么共同问题? (According to the structure and function of theeyes, what are the basic elements in human vision? What is the Mach Band Effect? What is Simultaneous Contrast? What common facts can we infer from both Mach Band Effect and Simultaneous Contrast?)答:人的视觉系统趋向于过高或过低估计不同亮度区域边界的现象称为“马赫带”效应;同时对比度指的是人的视觉系统对某个区域感觉到的亮度除了依赖于它本身的强度,还与背景有关. 马赫带效应和同时对比度现象表明人所感觉到的亮度并不是强度的简单函数.4.比较说明像素邻域、连接、通路以及连通基本概念的联系与区别。
硕士研究生《数字图像处理》作业
研究生《数字图像处理》考试1. 编写程序完成不同滤波器的图像频域降噪和边缘增强的算法并进行比较,得出结论。
● 图像频域降噪的实验原理与算法分析:图像的能量大部分集中在幅度谱的低频和中频部分,而图像的边缘和噪声对应于高频部分,因此能降低高频成分幅度的滤波器就能减弱噪声的影响,由卷积定理,在频域实现低通滤波的数学表达式:),(),(),(v u F v u H v u G =1. 理想低通滤波器(ILPF )0),(),(01),(D v u D D v u D v u H >≤⎩⎨⎧=2. 巴特沃斯低通滤波器(BLPF ) nD v u D v u H 20),()12(11),(⎥⎦⎤⎢⎣⎡-+=3. 指数型低通滤波器(ELPF ) 2),(0),(nD v u D ev u H ⎥⎦⎤⎢⎣⎡-=● 图像频域降噪的实验过程: 1. 理想低通滤波器程序I=imread('xpy.jpg'); f=double(I); g=fft2(f); g=fftshift(g); [M,N]=size(g); d0=100;m=fix(M/2);n=fix(N/2); for i=1:Mfor j=1:Nd=sqrt((i-m)^2+(j-n)^2); if(d<=d0) h=1; else h=0; endresult(i,j)=h*g(i,j);endend>> result=ifftshift(result);>> J1=ifft2(result);>> J2=uint8(real(J1));>> imshow(J2)2.巴特沃斯低通滤波器程序I=imread('xpy.jpg');f=double(I);g=fft2(f);g=fftshift(g);[M,N]=size(g);nn=2;d0=30;m=fix(M/2);n=fix(N/2);for i=1:Mfor j=1:Nd=sqrt((i-m)^2+(j-n)^2);h=1/(1+0.414*(d/d0)^(2*nn));result(i,j)=h*g(i,j);endendresult=ifftshift(result);J1=ifft2(result);J2=uint8(real(J1));imshow(J2)3.高斯低通滤波器程序I=imread('xpy.jpg');f=double(I);g=fft2(f);g=fftshift(g);[M,N]=size(g);d0=100;m=fix(M/2);n=fix(N/2);for i=1:Mfor j=1:Nd=sqrt((i-m)^2+(j-n)^2);h=exp(-(d.^2)./(2*(d0^2)));result(i,j)=h*g(i,j);endendresult=ifftshift(result);J1=ifft2(result);J2=uint8(real(J1));imshow(J2)图像频域降噪的实验结果分析与讨论下面是理想低通滤波器、巴特沃斯低通滤波器、高斯低通滤波器的滤波效果分析与讨论。
电大一网一《数字与图像处理》2023春季学期数字与图像处理第2次平时作业-100分
新疆开放大学直属《数字与图像处理》2023春季学期数字与图像处理第2
次平时作业-100分
题1:下列哪一个不是数字图像处理的目的。
A.存储和传输
B.显示和打印
C.增强和恢复
D.可视化
正确答案:D
题2:下列算法中属于图象锐化处理的是:()
A.低通滤波
B.加权平均法
C.高通滤波
D.中值滤波
正确答案:C
题3:下列算法中属于局部处理的是:()
A.灰度线性变换
B.二值化
C.傅立叶变换
D.中值滤波
正确答案:D
题4:下列哪一项不是伪彩色图像增强的方法。
A.过滤法
B.密度切割法
C.灰度级-彩色变换
D.滤波法。
《数字图像处理》作业题目
数字图像处理作业班级:Y100501姓名:**学号:*********一、编写程序完成不同滤波器的图像频域降噪和边缘增强的算法并进行比较,得出结论。
频域降噪。
对图像而言,噪声一般分布在高频区域,而图像真是信息主要集中在低频区,所以,图像降噪一般是利用低通滤波的方法来降噪。
边缘增强。
图像的边缘信息属于细节信息,主要由图像的高频部分决定,所以,边缘增强一般采取高通滤波,分离出高频部分后,再和原频谱进行融合操作,达到边缘增强,改善视觉效果,或者为进一步处理奠定基础的目的。
1频域降噪,主程序如下:I=imread('lena.bmp'); %读入原图像文件J=imnoise(I,'gaussian',0,0.02);%加入高斯白噪声A=ilpf(J,0.4);%理想低通滤波figure,subplot(222);imshow(J);title('加噪声后的图像');subplot(222);imshow(A);title('理想低通滤波');B=blpf(J,0.4,4);%巴特沃斯低通滤波subplot(223);imshow(B);title('巴特沃斯低通滤波');C=glpf(J,0.4);%高斯低通滤波subplot(224);imshow(C);title('高斯低通滤波');用到的滤波器函数的程序代码如下:function O=ilpf(J,p) %理想低通滤波,p是截止频率[f1,f2]=freqspace(size(J),'meshgrid');hd=ones(size(J));r=sqrt(f1.^2+f2.^2);hd(r>p)=0;y=fft2(double(J));y=fftshift(y);ya=y.*hd;ya=ifftshift(ya);ia=ifft2(ya);O=uint8(real(ia));function O=blpf(J,d,n) %巴特沃斯低通滤波器,d是截止频率,n是阶数[f1,f2]=freqspace(size(J),'meshgrid');hd=ones(size(J));r=f1.^2+f2.^2;for i=1:size(J,1)for j=1:size(J,2)t=r(i,j)/(d*d);hd(i,j)=1/(t^n+1);endendy=fft2(double(J));y=fftshift(y);ya=y.*hd;ya=ifftshift(ya);ia=ifft2(ya);O=uint8(real(ia));function O=glpf(J,D) %高斯滤波器,D是截止频率[f1,f2]=freqspace(size(J),'meshgrid');r=f1.^2+f2.^2;Hd=ones(size(J));for i=1:size(J,1)for j=1:size(J,2)t=r(i,j)/(D*D);Hd(i,j)=exp(-t);endendY=fft2(double(J));Y=fftshift(Y);Ya=Y.*Hd;Ya=ifftshift(Ya);ia=ifft2(Ya);O=uint8(real(ia));运行结果如图1所示。
数字图像处理期末大作业
数字图像处理期末大作业一、问题描述实现第十章中采用Hough变换来检测图像中圆的过程。
,通过包括平滑(把细节去除),边缘检测(得到轮廓)以及Hough变换得到的圆,并把结果叠加到原来的灰度图像上。
给出具体的过程,中间结果,最后结果,实现的代码,并写出报告。
二、图片的获取以及预处理针对老师提供的一副硬币图片,要求检测出其中的hough圆,并叠加到原图像上以便增强图像。
在检测hough圆之前,首先要对图像进行平滑处理,进行拉普拉斯变换,然后检测垂直方向,水平方向,+45度和-45度方向的边缘,将四个方向的边缘叠加起来,得到总的边缘,对该图像进行二值化,然后对得到的图像检测其hough圆,得到圆形边缘,将该图像叠加到原图像上,就实现了图像边缘增强的目的。
三、图像处理算法的基本原理以及处理结果本实验流程图如下:1.读取图像图像处理的第一步就是对所采集的图像进行读入,本次实验的输入图像是一幅灰度图像,不需要将图像转换成为灰度图像,直接利用函数imread ()完成。
原图像如下所示:原图像2.图像预处理在图像预处理中,我们完成了两步工作,首先使用方差为1的高斯噪声对图像进行平滑,然后进行拉普拉斯变换,即)],(*)([2y x f r h ∇,222r 2e 21)(σσ-=πr h 为方差为2σ的高斯噪声,本实验中12=σ。
又),(*)]([)],(*)([22y x f r h y x f r h ∇=∇,其中2224222]2[)(σσσr er r h --=∇,将)(2r h ∇和),(y x f 分别进行傅里叶别换,将其逐点相乘,再进行傅里叶反变换,就得到了预处理后的图像。
3.边缘检测对水平,垂直,+45度,-45度方向进行边缘检测,本实验中我们采用了Prewitt 梯度算子,它用于检测水平方向,垂直方向,+45度方向和-45度方向的掩膜分别如下:水平掩膜 垂直掩膜 +45度掩膜 -45度掩膜使用这四个掩膜分别对上一步得到的图像逐点进行处理,就可以得到四个方向的边缘了(本实验中边缘的一个像素都不处理),再将它们加起来,就得到了总的边缘,实验结果如下:水平边缘垂直边缘-45度边缘总的边缘如下图所示:4.二值化对上图得到的图像进行二值化,这里我采用的是循环方式确定图像全局阈值,即首先以图像的平均值作为阈值,将图像分成两部分,分别求两部分的平均值,新的阈值为这两个平均值的均值,重复上述过程,直到两次阈值之差小于特定的值时停止,并以最后一次得到的阈值对图像进行二值化,本实验中我要求两次阈值之差小于0.5时停止,最后得到的全局阈值为 -102.1332,二值化后的图像如下所示:二值化后的图像5.Hough变换检测圆形边界Hough 变换的原理就是利用图像全局特征将边缘像素连接起来组成区域封闭边界,它将图像空间转换到参数空间,在参数空间对点进行描述,达到检测图像边缘的目的。
数字图像处理作业
数字图像处理一、图像复原1、(1)matlab程序代码(使用电路板图片)a=imread('C:\Users\SUN\Desktop\a.tif'); %读图像b=imnoise(a,'gaussian',0,800/255^2); %加入0均值,方差800的噪声。
c=imnoise(b,'salt & pepper',0.1); % 在(a)的基础上,进一步加入椒盐噪声进一步污染图像(Pa=Pb=0.1的椒盐噪声)subplot(2,4,1),imshow(a) ,title('原始图像') %显示图片subplot(2,4,2),imshow(b) ,title('高斯噪声污染')subplot(2,4,3),imshow(c) ,title('继续被椒盐噪声污染')h=ones(5,5)/25; %算术均值滤波g1=imfilter(c,h);subplot(2,4,4),imshow(g1) ,title('算数均值滤波')%g2=power(exp(imfilter(log(double(c)),4*fspecial('average',2))),1/4); %几何均值滤波g2=exp(imfilter(log(double(c)),fspecial('average',1)));subplot(2,4,5),imshow(uint8(g2)) ,title('几何均值滤波')g3= medfilt2(c,[5,5]); %中值滤波subplot(2,4,6),imshow(g3) ,title('中值滤波')i=ones(5,5)/20;g4=imfilter(c,i);subplot(2,4,7),imshow(g4) ,title('修正后的α均值滤波')运行结果:(2)matlab程序代码(使用含有自己的图片)a=imread('C:\Users\SUN\Desktop\i.jpg'); %读图像a1=rgb2gray(a);b=imnoise(a1,'gaussian',0,800/255^2); %加入0均值,方差800的噪声。
数字图像处理作业
数字图像处理作业题目:图像膨胀与图像腐蚀学院:班级:学号:姓名:一、实验原理1、膨胀:给图像中的对象边界添加像素。
将与物体接触的所有背景点合并到该物体中,使边界向外部扩张的过程。
利用它可以填补物体中的空洞。
B对X膨胀所产生的二值图像D是满足以下条件的点(x,y)的集合:如果B的原点平移到点(x,y),那么它与X的交集非空。
数学表达式:可以使用imdilate函数进行图像膨胀,imdilate函数需要两个基本输入参数,即待处理的输入图像和结构元素对象。
结构元素对象可以是strel函数返回的对象,也可以是一个自己定义的表示结构元素邻域的二进制矩阵。
此外,imdilate还可以接受两个可选参数:PADOPT(padopt) ——影响输出图片的大小、PACKOPT(packopt).——说明输入图像是否为打包的二值图像(二进制图像)。
2、腐蚀:删除对象边界某些像素。
一种消除边界点,使边界向内部收缩的过程。
利用它可以消除小而且无意义的物体。
B对X腐蚀所产生的二值图像E是满足以下条件的点(x,y)的集合:如果B 的原点平移到点(x,y),那么B将完全包含于X中。
数学表达式:可以使用imerode函数进行图像腐蚀。
imerode函数需要两个基本输入参数:待处理的输入图像以及结构元素对象。
此外,imerode函数还可以接受3个可选参数:PADOPT(padopt) ——影响输出图片的大小、PACKOPT(packopt).——说明输入图像是否为打包的二值图像(二进制图像)。
M——指定原始图像的行数。
二、实验内容1、膨胀的实验步骤步骤1,首先创建一个包含矩形对象的二值图像矩阵。
BW=zeros(9,10);BW(4:6,4:7) =1步骤2,使用一个3×3的正方形结构元素对象对创建的图像进行膨胀。
SE=strel('square',3)步骤3,将图像BW和结构元素SE传递给imdilate函数。
数字图像处理作业
DISP11、说明图象数字化与图象空间分辨率之间的关系。
答:图像数字化包括两个过程:采样和量化。
而图像的空间分辨率是在图像采样过程中选择和产生的。
空间分辨率用来衡量数字图像对模拟图像空间坐标数字化的精度。
2、说明图象数字化与图象灰度分辨率之间的关系。
答:图像数字化包括两个过程:采样和量化。
而图像灰度分辨率是在图像量化过程中选择和产生的。
灰度分辨率是只对应同一模拟图像的亮度分布进行量化操作所采用的不同量化级数,也就是说可以用不同的灰度级数来表示同一图像的灰度分布。
3、看图说明伪彩色图象采集卡的工作原理,并说明LUT的原理和作用。
答:模拟图像数据由摄像头采集后,经A/D转换器处理,转化成数字信号,传给帧处理器经过其处理后,然后查询LUT表,经过D/A转换器输出RGB三色。
LUT(显示查找表)实际上就是一张像素灰度值的映射表,它将实际采样到的像素灰度值经过一定的变换,变成了另外一个与之对应的灰度值,这样可以很容易根据需求得到相应的颜色,它的优点在于易于调整、起到突出图像的有用信息、增强图像的光对比度的作用。
DISP21、粗略画出下列图象的傅立叶变换图象:变换后的图像如下:(从左至右)2、证明付里叶变换的可分离性及快速算法可行性。
答:可分离性:对于二维傅里叶变换,若把y看成一个常数,则可得到沿x方向的u=0,1,……,N-1的一维傅里叶变换,再将y看成一个变量,x不变,则可得到y方向上v=0,1,……,N-1的一维傅里叶变换,因此二维傅里叶变换可分离。
快速算法可行性:假设N是2的L次方,对于有N个点的傅里叶变换,需要完成N*N次复数乘法和N*(N-1)次复数加法,而对于快速算法,则有(N/2)*L个蝶形算法,因此运算量为(N/2)*㏒2N个复乘和N㏒2N个复加,在N较大时,计算量比DFT少很多。
证明:可分离性:F(u,v)=(1/N)∑∑f(x,y)exp[-j2π(ux+vy)/N]其变换核g(x,y,u,v)= exp[-j2π(ux+vy)/N]= exp(-j2πux/N)*exp(-j2πvy/N)所以,F(u,v)=(1/N)∑{[∑f(x,y)exp(-j2πux/N)]exp(-j2πvy/N)}这相当于先对x进行傅里叶变换,再对y进行傅里叶变换,可分离性证毕。
数字图像处理作业
结合每个人的本专业学科、工作应用, 谈谈数字图像处理的关系或在本专业的应用?答:数字图像处理技术的应用几乎无处不在, 例如有的U 盘和电脑安装了指纹识别系统, 气象中心对云图变化的分析系统, 上网视频聊天室的图像传输系统, 计算机阅卷系统, 车牌识别系统, 邮编识别系统等等, 都是实际工作和生活中对数字图像处理的应用。
除前面介绍的例子之外, 试举一些其它的图像应用的工程例子。
答:在工程中的应用也很广泛, 而且有十分大的发展前景, 这里举两个例子:制烟厂里检查香烟数量的系统, 有效的保证了没盒烟中香烟的数量, 而且大大提高了效率;地下资源的勘测系统, 可以对地下资源进行不同光谱分析, 较为可观的得到地下资源信息。
图像处理与计算机图形学的区别与联系是什么?区别: 数字图像处理对客观存在的图像惊醒处理和分析, 从而得到有用信息的学科。
计算机图形学: 对客观存在的或想象中的事物通过建立数学模型, 用图像的方式表达出来。
联系:都是用计算机进行点、面处理, 使用光栅显示器等。
在图像处理中, 需要用计算机图形学中的交互技术和手段输入图形、图像和控制相应的过程;在计算机图形学中, 也经常采用图像处理操作来帮助合成模型的图像。
画出视觉信息在眼球内(视网膜中)的传输过程模型示意图, 并扼要说明?如下图:瞳孔直径可调节, 控制进入人眼内的光通量;而晶状体可调节曲率, 改变焦距, 使不同距离的图在视网膜上成像画出黑白视觉扩展模型, 并略加说明。
黑白视觉扩展模型:2-3 什么叫图像逼真度和图像可懂度? 采用归一化方均误差NMSE 计算下面两幅数字图像的逼真度111111(,)111(,)101111111f j k f j k ∧⎡⎤⎡⎤⎢⎥⎢⎥==⎢⎥⎢⎥⎢⎥⎢⎥⎣⎦⎣⎦答: 图像逼真度: 描述被评价图像与标准图像的偏离程度图像可懂度: 表示图像能向人或机器提供信息的能力由公式计算得NMSE=1/92-4 给出一幅4bit 的图像A (见下图)。
数字图像处理课程作业答案
g 1 ( r b)
10
Homework 1
由式 r g b 1 的 定义,上面得到的颜色分量是归一 化了的。由式可以恢复 RGB 分量
16
Homework 2
P175 3. 二维Fourier变换有哪些性质? 答:二维 Fourier 变换具有 (1) 可分性 (2) 线性 (3) 共轭对称性 (4) 旋转性 (5) 比例变换特性
(6) 帕斯维尔(Parseval)定理 (7) 相关定理 (8) 卷积定理
17
Homework 2
若R=G=B=180,则 Y=R=G=B=180, Cb=Cr=128。
14
Homework 2
A2. MATLAB图像处理工具箱支持哪四种基本图 像类型? 答:MATLAB图像处理工具箱支持四种基本的图 像类型:
二值图像(Binary Images)
索引图像(Indexed Images) 灰度图像(Grayscale Images) 真彩色图像( Truecolor Images)
24
Homework 2
P175 16. 延拓,即:
f ( x) fe x 0 x 0,1,2,, N 1 x N , N 1,,2 N 1
相关。
8
Homework 1
25. 如何由RGB模型转换为HSI 模型?
答: 为了由[0,1]范围的 RGB 值得到同样在[0, 1]范围内的 HSI 值,可以得出了以下几个表达 式: I 1 / 3( R G B)
数字图像处理作业答案
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。
定义:单位光源面积在法线方向上,单位立体角内所发出的光流。
解释:这个是最容易被误解的概念了。
亮度是针对光源而言,而且不是对点光源,是对面光源而言的。
数字图像处理作业题
[0 0 0 500 5250 500 200 100 100 150 200 150 50 0 0 0]
解:对第一个病人表示瘤的像素数为
S1=100+200+300+200+100=900,S8=100+200+300+200+100=900
瘤的大小不变
瘤所在区域的灰度平均值为
f1=(100*5+200*6+300*7+200*8+100*9)/900=7,f8=(100*7+200*8+300*9+200*10+100*11)/900=9
解:基于计算机的图像处理系统的硬件一般包括图像输入设备、图像输出设备(打印机)、计算机和显示器。
数字图像处理系统的基本结构:
9.由于数字图像处理是大规模的矩阵运算,计算机编程效率的高低决定着一个系统能否进入实际应用。写出一个对灰度图像进行灰度变换的算法,其变换函数为p(x,y)=F(p(x,y)),图像大小为512×512的256级灰度图像。
4 4 4 4 4 4 4 4
5 5 5 5 5 5 5 6
5 6 6 6 6 6 6 6
7 7 7 7 7 7 7 7
均衡化后的直方图为:
15.假定你有两张相隔八个月拍摄的一病人的胸部X光片。两张胶片都显示有一小瘤,该小瘤也许是良性的,也许是恶性的。小瘤的大小和密度在八个月期间都发生了变化,但仅凭视觉检查,放射学家不能肯定小瘤是变得更坏或更好了。下面是每幅图像的包含有小瘤的一块区域的直方图。在胶片上,低灰度级代表黑色。问小瘤是变大还是变小?密度是变得更高还是更低?记住X射线是负图像,越密的物体亮度越高。
[0 200 500 3000 9000 3000 500 200 100 200 300 500 627 500 300 200 100 0 0 0]
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
解:
4 链码: 8 链码: 4 链码微分: 8 链码微分: 归一化 4 链码微分: 归一化 8 链码微分: 32223301000301211022 544660107023144 30010113003111303201 702021771216301 00101130031113032013 017020217712163
Image_result=Image_division(Image_gray,97,97); figure,imshow(Image_result); title('´¦Àíºó¶þÖµ»¯Í¼Ïñ');
%输出二进制处理图像
%分块阈值分割处理
图像分块函数 Image_division():
function Image_result = Image_division(Image_gray,row_space_argument,col_space_argument) row=size(Image_gray,1); col=size(Image_gray,2); row_space=row_space_argument; col_space=col_space_argument; row_num=round(row/row_space); col_num=round(col/col_space); %区域分割 t1=(0:row_num-1)*row_space+1; t2=(1:row_num)*row_space; t3=(0:col_num-1)*col_space+1; t4=(1:col_num)*col_space; for i=1:row_num for j=1:col_num t1(i)=isboundary(t1(i),row); t2(i)=isboundary(t2(i),row); t3(i)=isboundary(t3(i),col); t4(i)=isboundary(t4(i),col); x=t1(i):t2(i); y=t3(j):t4(j); if(y>80) temp = Image_gray(x,y); Image_result(x,y)=Image_handle(temp); else Image_result(x,y)=1; end end end end %对于边界的处理,全为1 %块行起始坐标 %块行终止坐标 %块列起始坐标 %块列终止坐标 %原始矩阵行数 %原始矩阵列数 %行间隔 %列间隔 %行分割块数 %列分割块数
3)
效果展示:
8
数字图像处理
2011 年 10 月 31 日
9
6
数字图像处理
主程序模块:
Image_original=imread('HW2.jpg'); figure,imshow(Image_original); title('Ô-ʼͼÏñ');
%输出原始图像 %转化为灰度图 %读取图像文件
2011 年 10 月 31 日
Image_gray=rgb2gray(Image_original);
解:
(1) 如下图所示:
S 面积=5*9-8=37(单位正方体的面积)
2
数字图像处理 (2)
2011 年 10 月 31 日
根据网上搜索资料,目前比较流行的是基于 Freeman 链码的图像中多 个区域面积的计算方法:
算法 基于 Freeman 4-链码的目标面积计算 step1 把目标面积变量 area 设为 0,把起始点的纵坐标值 y0 赋给变 量 y。 Step2 对每一个链码的元素(值 0,1,2,3)执行
解:
(a)有影响,但影响不同。将最高位置 0,直方图中 128~255 的灰度数据叠加进 0~ 127 的区域内,对对比度的影响的也较大;将最低位置 0,直方图中相邻的两格合并, 但总体影响很小,对比度影响也较小。 (b)均衡化只是把峰拉伸了,不过峰值却并未改变,因此直方图不能变成平坦的。
5
数字图像处理
Image_2bw_temp=im2bw(Image_gray,level); %转化为二进制图像 Image_2bw=double(Image_2bw_temp); end
图像分块越界函数 isboundary ():
function temp = isboundary(temp,stdard) if (temp >= stdard) temp = stdard; end end
算法 基于 Freeman 8-链码的目标面积计算 Step1 初始化,A=0, i=1。 Step2 对每一个链码的元素执行
Step3 结束。 算法 基于三角形的目标面积计算 Step1 计算出所有轮廓点的坐标,即 Step2 初始化,A = 0,i = 1。 Step3 对每一个链码元素执行 Step4 结束。 3. 请将下面的图和其直方图对应起来:
2. 假 定 4- 链 码 从 左 下 角 开 始 , 方 向 规 定 如 下 图 所 示 。 所 得 编 码 是 11100010030003332212223222 (1) 画出链码表示的图形,求此链码所表示的感兴趣区的面积; (2) 如何不画图而直接根据编码求面积(可以选用程序流程图、程序说明或者 数学公式来表示)。
清华大学自动化系
数字图像处理
第二次作业
ZHT 张海涛 2008011535
2011 年 10 月 31 日
数字图像处理
2011 年 10 月 31 日
1. 写出描述下图中目标体(灰色)边界的 4 链码,8 链码,4 链码微分,8 链码 微分,归一化 4 链码微分,和归一化 8 链码微分。图中"+"给出链码的起始 点。
4
数字图像处理
2011 年 10 月 31 日
解:
(a)对应(e) ; (b)对应(g) ; (c)对应(f) ; (d)对应(h) 。
4. 图中白色代表位于本底的象素,其余代表前景象素。本底象素和前景象素之 间的距离是无限大。求: (a) 左上角点 p 和右下角点 q 之间的按城市街道距离和棋盘格距离计算的最 短路径长度。 (b) 前景的 8 连通区和 4 连通区的个数以及相应的背景连通区的个数。 (注意, 背景区不以打格的地方为限,不是前景的地方即为背景)
2011 年 10 月 31 日
编程题
目的:通过实际问题熟悉图像分割的理论和方法 内容:文字识别是图像处理中的一种典型应用,在大多数文字识别算法中,首先需要将文本 从背景中分离出来,以便进行倾斜校正和字符分割,因此分割的过程很重要。然而在实际应 用中,我们得到的经常是下图所示那样的图像,存在光照不足,阴影…… 请利用图像分割的理论和方法,对该图像进行二值分割处理,实现前景文字与背景的分离。
解:
(a)p 与 q 之间的城市街道距离:21 P 与 q 之间的棋盘格距离:14 (b)前景的 8-连通区个数:1;相应的背景 4-连通区个数:10; 前景的 4-连通区个数:9;相应的背景 8-连通区个数:4;
5. 请解释一般情况下: (a) 用 8 比特来表示灰度图的灰度,如果将最高位或者最低位都置 0,对该 图的直方图以及对比度是否产生影响?如果有影响,请说明。 (b) 为什么数字图像经直方图均衡化之后,直方图仍不能变成很平坦的。
3
数字图像处理
ห้องสมุดไป่ตู้
2011 年 10 月 31 日
switch (code) { case 0: area = area + y break; case 1: y = y + 1; break; case 2: area = area - y; break; case 3: y = y – 1; break; } Step3 如果所有的边界链元素都被处理过了,则目标面积在被保存在 变量 area 里。
实验平台:
操作系统:Windows7 编程平台:MATLAB20011a
任务内容:
1) 原理: 图像分割方法选取: 全局阈值分割; 阈值选取: 为简单的中值, Level
Max Min ; 2
2)
分块全局: 但由于光线照明不足,阴暗等原因,全局的阈值在原始图像较暗的区域无 法有效的分离,故采用将图片分割成许多小块,每块用全局阈值分割; 修正: 由于图像最左侧空白部分,用中值作为阈值二分化,始终存在低灰度值的情况, 所以对于这部分,在进行分块全局阈值分割时,单另处理,全部赋值为 1,即只作为背 景. 代码及其说明:
7
数字图像处理
阈值生成及二分化函数 Image_handle():
function Image_2bw = Image_handle( Image_gray )
2011 年 10 月 31 日
Image_max=double(max(max(Image_gray))); %最大值并输出双精度值 Image_min=double(min(min(Image_gray))); %最小值并输出双精度值 level=((Image_max+Image_min)/2)/255; %获得最佳阈值