CSE_ECE 478 Assignment 1-No Time to Die Solved

40.00 $ 20.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment

Description

5/5 - (1 vote)

In the yet-to-be-released movie, No Time to Die, 007 has to trace the evil of Ernst Stavro Blofield, a.k.a. Franz Oberhauser, his nemesis from Spectre. 007 and Dr. Swann start from London, M’s office, but they are being followed by S.P.E.C.T.R.E.’s thugs.

Q advises you to cover your tracks by generating fake images. To teach you, 007, Q has shown you an example of image matting(chroma-keying) where you will take an image of yourself on a green screen and add a fake background to it. How does the green screen help in this task?

(a) foreground image                     (b) background image                                  (c) result

  1. Generate images for your fake trail to leave for Blofield using this method.
    • Test your implementation using the provided foreground(jpg) and background(bg.jpg).
    • Graft 007 (jpg) onto Bond’s Skyfall mansion. Find this mansion’s image from the internet.
    • Be creative and do the same procedure with a background image of your choice with you in it! You can take any foreground green-screen image from the internet.
  2. As you are a focused agent, you are also worried about how many images you can store on the MI6 cloud with a size of 4 GB. If your fake trail colour images happen to have a size of 1280 x 720, and are stored for displaying on standard displays, calculate the number of images you can store in the cloud.

This will tell you how far you can escape, 007. Trust no one, James….

Figure 2: 007 and Dr. Swann in his Aston Martin DB5

This is a covert operation. Report to M about why you are doing any step theoretically along with your results. Do not share details of the mission with anyone else.

2.  MI6 Storage Issues : Part 1

Figure 3: M’s command center at MI6

In the movie, Skyfall, Silva hacked M’s computer to obtain info on the field agents to compromise MI6 and its digital network. Now Q has to work on a non-compromised system with very little storage. Q has retrieved image data on Silva, unfortunately they are very large for the system to handle.

Before you go on your assignment, M wants you to debrief your knowledge on image sizes. Calculate the dimensions of a square colour image that is used for MI6 command center displays. The image occupies a size of 168.75 MB.

3.  Don’t fly too close to the sun

The subminiature camera is an ultra-compact and portable still camera, primarily used for espionage and surveillance purposes. The MI6 utilized such devices, manufactured by their research and development division. They first appeared in the 1969 James Bond film, On Her Majesty’s Secret Service.

Figure 4: 007 taking a photo of the target

You have been assigned the mission of taking the photo of some very small enemy insignia, which is heavily guarded. You have to take the picture from as far away as possible, to avoid being shot.

The height of the insignia is t = 32.8cm, and your camera has a square CCD sensor of dimensions 10 x 10 mm with 1024 x 1024 pixels. Focal length the camera lens is adjusted to 62.5cm. You need to ensure that the insignia covers atleast 50 pixels in height, in your captured image, to be readable. What is the farthest distance d you can be from the insignia? Report d to the nearest integer.

  1. Le Chiffre Strikes Again!

In the movie, Casino Royale, Le Chiffre sends out a list of targets from MI6 to exterminate. The targets have been sent out such that the original image was corrupted by some procedure. Fortunately 007 intercepts those images in Montenegro to alert MI6 after a field agent was taken out. MI6 has the correct images of all targets and Bond knows the corruption procedure is same.

Use your DIP skills from lecture 2 to assist 007.

  1. Write a function bitQuantizeImage which takes an 8-bit image im and k, the number of bits to which the image needs to be quantized to and returns the k-bit quantized image. (10 points)
  2. M wants an experienced hand to take this assignment, so prove yourself by running the above function on 007 jpg and find all possible quantization results (k=1 to k=8).
  3. M is still not satisfied enough, so she commands you to show all the bit planes of 007 jpg. Pass the test.

(a) 007 test1.jpg                                                                      (b) 007 test2.jpg

  1. Now that you have passed, you are declared fit for active duty. Help 007 guess the corruption procedure for a target person’s image, person jpg, using the above functions. The correct images that you know for that corresponding person from the database is represented by person.jpg

You will be selecting the target person for whom you will be guessing the corruption procedure using the following method out of the following names {Q, M, Mallory, Tanner, Moneypenny}.

Calculate the modulus of your roll number against 5. Say it is k.

  • For k = 0 select Q (corresponding files are jpg and q corrupt.jpg)
  • For k = 1 select Moneypenny (corresponding files are jpg and moneypenny corrupt.jpg)
  • For k = 2 select Mallory (corresponding files are jpg and mallory corrupt.jpg)
  • For k = 3 select M (corresponding files are jpg and m corrupt.jpg)
  • For k = 4 select Tanner (corresponding files are jpg and tanner corrupt.jpg)

(a) m.jpg                                                                             (b) m corrupt.jpg

(a) mallory.jpg                                                                 (b) mallory corrupt.jpg

(a) q.jpg                                                                              (b) q corrupt.jpg

(a) tanner.jpg                                                                   (b) tanner corrupt.jpg

Good luck on the assignment, 007. As always, M expects reasons for all the tests and your assignment, so do include that.

  1. (20 points) 007 and Quantum.

Figure 10: The low light photograph

In the movie Quantum of Solace, 007 follows Dominic Greene to Breganz, Austria. He infiltrates the secret meeting and sees the members of the Organization Quantum. However the picture is taken in very low light and saved as quantum bad.jpg.

As Q you have the following tasks,

  1. Write a function linContrastStretching which takes any image im, integers a and b that enhances the contrast such that the resulting intensity range is [a,b] .
  2. Use this function to improve the intensity of the quantum bad.jpg and assist 007.

M wants you to debrief on your work in Breganz and has all your passports and credit cards on hold until then. Explain the improvement the contrast theoretically, so that she releases your documents and you can go on the next assignment with 007.

  1. (50 points) Think about your sins!

In the movie, 007 finds talks to Mr.White about how to find Oberhauser, the S.P.E.C.T.R.E. mastermind. Mr. White tells him to go to Dr. Madeleine Swann, his daughter. Turns out, Madeleine has only an image file named Map.jpg. 007 must use his Digital Image Processing skills to retrieve information.

M expects you to plot the histograms of images before and after you apply some histogram processing function. Since this is a covert operation, you will NOT be using any inbuilt functions for implementing the histogram processing operations. Perform the following operations:

  1. Write a function histEqualization which takes a grayscale image im, and applies histogram equalization on the entire image.
  2. Write a function histMatching which takes an input image and a reference image and applies histogram Matching on the input image by matching the histogram with that of the reference image.
  3. You are supposed to document the mathematical formulae for the function used above. Write them after implementation using markdown math/latex.(Refer Tutorial 1)
  4. Q asks you to practice histEqualization on practice range1.jpg and jpg.

(a) practice range1.jpg                                                                     (b) hist.jpg

007 now contacts Dr. Madeleine to find Oberhauser. He finds a weird image by the name Map.jpg. Immediately 007 realises that this is a map of a known place and pulls up a satellite image of the Sahara Desert by the name satellite img.jpg.

(a) Map.jpg                                                                      (b) satellite image.jpg

Decipher the map using the satellite image by applying histMatching. Somewhere in the map there will be an indicative piece of string denoting the name of a person who died. Also, for another task, remember the name of this person.

Figure 13: 007 and Dr. Swann at Blofield’s place, Sahara

7. (30 points) The villains of 007

An integral part of every 007 movie are Bond’s supervillains.

Your weakest links are your emotions, James. They make you predictable and unfortunately, vulnerable.

  1. Write a function piecewiseLinTransform to implement a piecewise linear transform

(1)

The function takes an input grayscale image, coefficients K1,K2 and intervals [a,b] for each linear segment and produces the transformed output image.

  1. Run the images through piecewiseLinTransform on jpg and bondvillain2.jpg. The piecewise linear functions to be used are given for each image.
  2. Take any image of any from the internet and run piecewiseLinTransform using any custom piecewise linear function that you like. Plot the function used.

Also, the psychiatrist on duty asks you to check your awareness, ’Do you notice any difference in the piecewise linear transforms of the two images, especially in the text overlay?’ Answer him with valid reasoning.

8. (30 points) Tomorrow Never Dies

In the 1997 movie, Tomorrow Never Dies 007 is tracking Elliot Carver’s stealth boat that will fire two missiles at H.M.S. Bedford of the British fleet. However it is very dark out in the South China Sea.

Step up into the role of 007 and use gamma transform to capture Elliot Carver. Convert the images to grayscale before applying any transform.

  1. Write a function gammaTransform that implements s = rγ on a grayscale image and vary γ.
  2. Use this function on png and increase illumination in the image. Report value of gamma used.
  3. Use this function on png and hide yourself as you try to apprehend Carver. Make illumination lesser. Report value of gamma used.
  4. Use this function on your Aston Martin DBS image, aston invisible.jpg to see the numberplate clearly so that you can travel to London to report for duty. You will be evaluated on how clear the number plate is after the transformation.

Figure 16: stealth.png

Figure 17: aston invisible.jpg

  1. (40 points) Is that the best you got?

Use the name of the person you found from Q6 to access the images needed for this task.

Use this link by putting the name with all lowercase letters:

https://tinyurl.com/<name of person>-dead

  1. You will find 4 grayscale images (jpg, james2.jpg, james3.jpg, james4.jpg) with different contrast levels, which correspond to parts of the same image.
  2. Retrieve the original image using these four images as best you can. You can use any combinations of techniques used in this assignment.
  3. You will be evaluated on how uniform your final output looks.

Figure 18: Fin

  • assignment-1-bv3xzr.zip