A company wishes to produce a greyscale display with pixels so…
Question Answered step-by-step A company wishes to produce a greyscale display with pixels so… A company wishes to produce a greyscale display with pixels so small that a humanwill be unable to see the individual pixels under normal viewing conditions.What is the minimum number of pixels per inch required to achieve this? Pleasestate all of the assumptions that you make in calculating your answer. It may behelpful to know that there are 150 000 cones per square millimetre in the humanfovea, and that there are exactly 25.4 millimetres in an inch.[6 marks]If the pixels could be only black or white, and greyscale was to be achieved byhalftoning, then what would the minimum number of pixels per inch be in orderthat a human could not see the halftone dots? Again, state any assumptions thatyou make.[2 marks]The company currently produces a display device with 2-bit greyscale (that is: fourdi erent shades of grey). Describe an error-di usion algorithm which will convertan 8-bit greyscale image into a 2-bit image suitable for display on this device. [Note:the two images must have the same number of pixels.][7 marks]Illustrate that your algorithm works using the following test image.20040250220[2 marks]You are asked to design a 44 ordered dither matrix. What rules should you followin the design?Consider the function zarg defined below:fun zarg f ([], e) = e| zarg f (x::xs, e) = f(x, zarg f (xs,e));Show that with the help of this function, it is possible to write an expression forthe sum of a given list of integers. Then describe what zarg does in general.(c) A polymorphic type of branching trees can be declared as follows. Note thatthe children of a branch node are given as a list of trees, and that only the leafnodes carry labels.datatype ‘a vtree = Lf of ‘a| Br of (‘a vtree) list;(i) Write function flat t that converts a given tree t of this type to a listof the labels (without eliminating duplicates). Your function should run inlinear time in the size of the tree. [4 marks](ii) Write function count x t that counts the number of times that x occursas a label in t, but without first converting t to a list.(iii) What is the type of count? Consider the problem of eliminating all duplicates from a list of strings. Write code for a function of type string list -> string list such that the output contains the same elements as the input, possibly reordered, but where every element occurs exactly once. The worst-case performance must be better than quadratic in the length of the list Java generics allows an ArrayList object to be constrained to use a single specifictype (e.g. ArrayList


