EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
C语言代写
您的位置: 主页 > 编程案例 > C语言代写 >
代写C语言:C Processing代写 | Image Processing Homework |CSE 270M - C语言代写
发布时间:2021-07-25 20:06:57浏览次数:
CSE 270M Image Processing Homework Due: Thursday, October 10, 2019, 11:59pmClarification: This assignment is about implementing your own algorithms for processing images.  The Processing language has many methods that do the same things (filter(), rotate(), etc.).  Don t use any methods that do the processing for you.ZIP your submission, which should be your entire Processing sketch folder (not just the files in the folder, but the folder itself).C Processing代写Scoring 70 points.  See each problem for its value.  Liberal deductions (up to 25% of the assignment value) for code that is hard to read, poor variable names, lack of comments, and other style issues.  Processing has a keyboard shortcut, Ctrl-T on Windows, Command-T on Macs, that will clean up your source code for you quite a bit.  Press it.  I will charge you 2 points for leaving the pressing to me). Note that each of your filter methods should return a new PImage object, without modifying the PImage object that is passed in as an argument.(10 points)Write a PImage soften(PImage src, int strength)method that softens an image by computing the average of a pixel s color and the colors of its neighboring pixels.That is, to compute the new color for a pixel, average the colors of the original pixel and its neighbors (where strength determines how many neighbors).The strength refers to the size of the neighborhood of surrounding pixels that will be included.  The greater the strength, the larger the area.  Intuitively, think of a square wrapped around a pixel such that the number of pixels to the right, left, top, and bottom is equal to the strength.  Or, stated another way, with an example, if you use a strength of 3, then imagine a 7 by 7 grid of pixels with your pixel in the middle.Or, stated in a fancier way, if the strength is 3, then you should be considering all pixels whose Chebyshev distance to your pixel is less than or equal to 3.  Pixels at or near the border will require special attention.  For example, if you are using a strength of 5, and your pixel is at row 7, column 6, then it is easy to go out 5 in each direction from the center pixel.But if you are using a strength of 10, and your center pixel is at row 7, column 6, and you try to move left 10 (or up 6) you will go past the edge of the image.  In those cases, you should still compute the average of all the available pixels whose Chebyshev distance to your pixel is less than or equal to 3(10 points) In your soften()method, use millis() to print a measure of the time it takes to soften your image.  Only measure the part of the code that is doing the softening.  In other words, assuming you have a loop where all the calculations are taking place, note the time just before the loop starts, and again immediately after the loop ends, and print the elapsed milliseconds.Then, make your soften() method as efficient as possible using techniques from class.  Don t come up with a different algorithm: you still need to use the algorithm exactly as described above (averaging the colors of surrounding pixels), but find ways to tweak your code so that the algorithm performs as quickly as possible.  (I will, in a sense, grade on a curve, with the most efficient solutions earning the most points.  I will test your code on my own images.)(10 points) Write aPImage scramble(PImage src, int xDivs, int yDivs)  method that breaks an image up into rectangles, and then shuffles those rectangles randomly.  xDivs determines the number of horizontal divisions, and yDivs determines the number of vertical divisions.  So, for example, scramble(src, 4, 3) would result in a grid of 12 rectangles (4 columns, 3 rows), and then those rectangles would be scrambled.Note that xDivs must divide evenly into the width of the image, and yDivs must divide evenly into the height of the image.  Throw a helpful illegalArgumentException() if xDivs or yDivs is not a good value.  This would be an appropriate exception:IllegalArgumentException: yDivs 7 is not a divisor of the height 300(10 points) Write a method PImage bestMatch(PImage src, color[] palette)that returns a new PImage where each pixel in the new image is the color in palette that most closely matches the corresponding pixel in src.In other words, imagine you are trying to make a copy of src, but you are limited only to the colors in palette (like, if you were given a box of crayons, and told to use them to reproduce the image).  Find the best matching color in the palette for each pixel.  There are many definitions of best matching color , but we will use a straightforward approach: For a given pixel p, compute the Euclidean distance between the R,G,B values of p and the R,G,B values of each color in palette.Use the color in palette with the minimum Euclidean distance from p.  Note that Processing has a dist() method that can compute the distance between two 3D points.  An R,G,B color can be thought of as a 3D point, because it has 3 components.(5 points)Create a color[] randomPalette(int n)method that creates and returns an array of n random colors.  Modify your bestMatch() method to use the randomPalette() method so that it is easy for your instructor to try various sizes of palettes.(10 points)Write a PImage rotate(PImage src, float angle)method that rotates an image a specified number of degrees, about the center of the image.  Note that this will result in an image where some pixels will not have part of the image in it.(10 points) Make upat least one additional filter of your own.  Like the other filters, it should take a PImage source, and return a new PImage object, without modifying the original image.  The goal here is originality.  Don t take an existing filter algorithm and make modifications to it.  Rather, start from scratch to create a filter of your own.(5 points)Organize all your work by loading an image and showing a gallery of your results (in rows and columns).  For thesoften() method, call it with several strengths, so that the results can be compared.  So, when you run your program, the user should see a bunch of different versions of the loaded image (along with the time it took for each soften operation). 最先出自315代写 cs代写 作业代写 代写c 计算机视觉代写 processing代写 图像处理代写

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。