Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective : Improve Matlab programming skills Description : This optional project is to make a passport photo from the pictures taken by your mobile phone

Objective: Improve Matlab programming skills Description: This optional project is to make a passport photo from the pictures taken by your mobile phone or camera. The requirements are stated on the governments website:

Digital Image Head Size Template

image text in transcribed

-The top of the head, including the hair, to the bottom of the chin must be between 50% and 69% of the image's total height. The eye height (measured from the bottom of the image to the level of the eyes) should be between 56% and 69% of the image's height. - Image pixel dimensions must be in a square aspect ratio (meaning the height must be equal to the width). Minimum acceptable dimensions are 600 pixels (width) x 600 pixels (height). Maximum acceptable dimensions are 1200 pixels (width) x 1200 pixels (height).

Your program should take the following input parameters: 1. im the input image 2. headsize -- the top of the head, including the hair, to the bottom of the chin in a percentage of the images total height. (50% to 69%) 3. eyeheight the distance from the bottom of the image to the level of the eyes in a percentage of the images total height. (56% to 69%) 4. dim photo size in pixels. (600 to 1200)

The prototype of your matlab function:

photo = YourName_PassportPhoto(im, headsize, eyeheight, dim)

Implementation Step 1: Find the coordinates of the eyes. Rotate the image to level the head position Step 2: Find the coordinates of the chin and the top of the head. Step 3: Crop the image into the required head size ratio and eye height ratio. The head should be centered. Prompt an error message if the input image does not have enough pixels for cropping. No need to change the background of the input picture. Step 4: Resample the cropped image into required dimensions

600 px 600 px 50-69% 56-69%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

if ( userTickets > = 6 )

Answered: 1 week ago

Question

Calculate the lifetime value (LTV) of a loyal customer.

Answered: 1 week ago

Question

Use service tiering to manage the customer base and build loyalty.

Answered: 1 week ago