讲解:COMP4421 Matlab 、MATLAB、CANVAS MatlabC/C++|Prolog

The Hong Kong University of Science and Technology Department of Computer Science and Engineering COMP4421 (Fall 2019)Assignment 3Total = 100 marksDue: 11:55pm, Dec 9, 2019Assignments must be submitted via CANVASLate Policy: 10% reduction; only one day late is allowed, i.e. 11:55pm, Dec 10OverviewThis assignment consists of two sections: programming section and written section. Both programming and written parts should be submitted via the CANVAS system. If you would like to finish the written assignment with hand writing, you may scan and upload it as a PDF file.Programming assignment specifics (60%)Pre-requirement2.1.1 Input: The input images are in the folder “input_imgs” (/Sample/input_imgs). You should test all the input images and paste the result images in the PDF file. Note that we will have some other test images for grading.2.1.2 Language: Matlab/Octave. 2.1.3 Functions to be used: In this assignment, you can use the built-in function for filtering and edge detection. However, you cannot use any built-in functionsrelating to the image warping and segmentation. 1/6Programming question 1 - Image Warping (40%)Based on the 4 corner points computed in Assignment 2, apply the image warping to transform the target A4 paper into a standard A4 form, that is, 210? ? 297? for vertical direction and 297? ? 210? for horizontal direction, where ? is the parameter decided by the user. Inside your own image warping function, you also need implement your own bilinear interpolation. Please describe your image warping algorithm briefly in the PDF file. The function prototype is given in the image_warping.m. If you cannot obtain the 4 corner points in Assignment 2, you can manually find the 4 corner points using some tools in Matlab/Octave.A sample output is provided as follows,Programming question 2 - Digit Segmentation (20%)Followed by the Task 2.1, our input images in this task are the transformed A4 paper with some hand-written digits on it. Your task here is to use a certain segmentation algorithm to segment each digit. Note that you can choose any segmentation methods. However, no matter which algorithm you choose to use, you should implement it by yourself. Please describe your segmentation algorithm briefly in the PDF file. The function prototype is given in the digit_segment.m.A sample output is provided as follows,2/6Here, I provide one of the algorithms I used in my program for the digit segmentation.Step 1: Threshold the input images to obtain binary images;Step 2: Horizontal projection. Count the number of white pixels along horizontal direction. The number of rows for the digits shouldCOMP4421 Matlab 作业代做、代写MATLAB作业、代做CANVAS作业 代写Matlab程序语言作业 帮做 be equal to the number of peaks in the projected histogram. We can then segment the digits by rows.Step 3: Vertical projection. For each row, we count the number of white pixels along vertical direction. The number of columns for the digits should be equal to the number of peaks in the projected histogram. We can then segment the digits by columns. [Note: for step 3 you may face the problem that some digits cannot be separated properly. Here is another idea for Step 3. Scan each column and count the number of black pixels, denoted as N. If N > H – n, where H is the height of the row_image obtained in Step 2 and n is a parameter defined by user, the column will be marked. The segmentation will be performed based on the marked column. This idea, which is similar to vertical projection, compares the height of the row_image and thus is easier to control.]I provide the pipeline combining Assignment 2 and Assignment 3 as follows. Note that only the parts in the orange dash box are required in this assignment.3/64/6Written assignment specifics (40%)Written question 1 - Image TransformationThere is an image I shown as follows. The transformation is defined as ?(??) ≡ ????, where ?? = 2? ? ? ?7 and ?? = 2??7. After the transformation using ?, point A, B, C and D are transformed to point E, F, G and H respectively.(Hint: For a 2x2 matrix ? = 2? ? ? ?7, the matrix inverse is ?:; = ;? 2 ? ?? ?? ? 7.)1a) Find the transformation matrix ??. Please show all your steps clearly.Suppose the intensity values of point I, K, L and M are 2, 5, 9 and 15 respectively.Image IImage I’ x y5/61b) Find the intensity value of point J using Bilinear Interpolation. Please show all your steps clearly.Written question 2 - QuantizationGiven a 4x4 gray-level image A as follows:13 115 24 231128 200 64 5555 255 74 35178 29 1 802a) Compute the quantization (uniform quantization) of A from 256 levels (8 bits) to 16 levels (4 bits).2b) Compute the column-wise improved gray-scale (IGS) quantization of A from 256 levels (8 bits) to 16 levels (4 bits).2c) Find the root-mean-square error and mean square signal-to-noise ratio of the result from your answers in 2a) and 2b).Image I’Image I x y6/6Written question 3 – Huffman codingGiven Huffman code in the below table.Symbol CodeC 01E 10M 00O 110P 1111R 11101T 111000U 1110013a) Decode the encoded string “011100011111110011110001011101” with the given Huffman code.3b) Compute the Huffman code for each symbol in the words “image processing” and fill in the following table. Show your steps clearly.Symbol Codeacegimnoprs转自:http://www.6daixie.com/contents/12/4568.html

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 217,406评论 6 503
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,732评论 3 393
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 163,711评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,380评论 1 293
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,432评论 6 392
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,301评论 1 301
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,145评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,008评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,443评论 1 314
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,649评论 3 334
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,795评论 1 347
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,501评论 5 345
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,119评论 3 328
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,731评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,865评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,899评论 2 370
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,724评论 2 354

推荐阅读更多精彩内容