Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help please, spent over 4 hours and still can't get this program to work. Thanks for the help, will thumbs for complete answer!! ONLY matlab

Help please, spent over 4 hours and still can't get this program to work. Thanks for the help, will thumbs for complete answer!! ONLY matlab is compatible, if you do not have matlab please pass on this question. Other programs are not accepted unfortunately.

Create a Matlab program. The program is for an experiment which investigates whether the eyes contributes to the judgment of whether or not a person is smiling.

I have a matlab file that contains two sets of sample images that are 3-D matrices nonsmilingimagesand smilingimages. Each matrix has the size 36 x 50 x 50. There are 36 images. Each image is 50 pixels by 50 pixels. Unfortunately, I dont know how I could link the data but I knowing this info should help!

For the purposes of this experiment, we want to be able to make images where we mask either the mouth or the eyes.

Create a function called removeeyes.m that will take an input of one image, and apply a mask to that image to cover the eyes.

maskedimage = removeeyes(testimage);

Step 1: Determine the region of the image you want to mask for the eyes (Hint: Remember that the row index 1 and column index 1 are at the upper left corner of the image). You should choose a xed region for the eyes for all images, e.g. from row 11 to 20 and column 1:50. (I dont know that this is right, you have to check it.)

Step 2: Determine the minimum and maximum image intensity in the region to be removed. The range is the difference between the minimum and maximum.

Step 3: make a noise image of the right size (rows x columns) and right range. noiseimage = minimum + rand(rows,columns)*range

Step 4: Replace the appropriate region of the image with the noiseimage

THE EXPERIMENTAL PROGRAM

There are 4 conditions in this experiment in a 2 x 2 design. There are two types of images (smiling/nonsmiling) and two types of images (eyes visible/covered).

The experiment should present each of the images only once.

There are 36 smiling images. 18 randomly selected images should have the eyes masked using removeeyes.m.

There are 36 nonsmiling images and 18 should have eyes masked.

These 72 total images should be presented in a unique random order for each subject.

The experimenter should be able to control the randomization of the order of presentation by setting the state of each random number generator at the top of the program. This will also randomize which images have eyes masked for different subjects.

On each trial:

(1) Present a mask image using imagesc. A mask image is an image containing random values, e.g. imagesc(rand(50));

(2) Use the pause command to pause for 0.2 seconds, i.e., pause(0.2)

(3) Present a test image using imagesc

(4) Use the pause command to pause for 0.4 seconds,

(5) Present a new mask image using imagesc. A mask image is an image

containing random values, e.g. imagesc(rand(50)); (6) Collect a response of whether the face was smiling or nonsmiling (Dont

forget to error check the response).

At the end of the experiment, your script should calculate the proportions of trials they get correct for each of the 4 conditions in the 2 by 2 design. In the comments identify the variables that contain these hit rates.

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

Students also viewed these Databases questions