EE 409 – Mini Project 1 Due: 17.10.2017, 22:00 (Tuesday) Notice: A severe penalty will be applied in case of cheating 1. (Finding a suitable image file) Find a jpg color photo of yourself (you can take your own photo with your camera or get from your facebook page or use your profile photo at obs.ybu.edu.tr). The resolution of the image should be higher than 0.1 megapixel and lower than 1 megapixel. Open a document in Word and paste your photo. You will use this document(report) for submitting your work related to this homework. You should write the Matlab commands and their outputs in your report for the following questions. (Note: Always display the image using “imshow(f)” command where f is your image) 2. (Loading image file to Matlab) Write the Matlab command that you use to load your image into Matlab workspace in a variable called your name. 3. (Finding image resolution) Write the Matlab command that you use to find the horizontal and vertical resolution of the image that you loaded. How do you find the total pixel resolution in megapixels? Find and write total pixel resolution of your image in megapixels and the size of your image in bytes. 4. (Displaying image on screen) Write the Matlab command for displaying the image on screen. Take the screenshot of your screen and paste into your report. 5. (Saving the image to harddisk) Write the Matlab command for saving the image to your harddisk using your surname as filename in jpeg format with your desired quality level. 6. (Converting a color image into 8bit grayscale) Write the Matlab command for converting your color image to grayscale(uint8: 0-255 range). Display and report the grayscale image after conversion. 7. (Converting a color image into double grayscale) Write the Matlab command for converting your image to grayscale(double: 0-1 range). Display and report the grayscale image after conversion. 8. (Image transpose) Take the transpose of your grayscale image. Display and report the resultant image. 9. (Adding a constant to image) Add 100 to all the grayscale pixel intensity values(uint8: 0-255) of your image. Display and report the resultant image. Explain what happened to brightness(with a single sentence only). 10. (Subtracting a constant from image) Subtract 100 from all the grayscale pixel intensity values(uint8: 0-255) of your image. Display and report the resultant image. Explain what happened to brightness(with a single sentence only). 11. (Multiplying image with a constant) Multiply all the grayscale pixel intensity values(uint8:0-255) of your image by 2. Display and report the resultant image. Explain what happened to brightness(with a single sentence only).
12. (Dividing image by a constant) Divide all the grayscale pixel intensity values(uint8:0-255) of your image by 2. Display and report the resultant image. Explain what happened to brightness(with a single sentence only) 13. (Image difference) Subtract the divided image from the multiplied image. Display and report the resultant image. 14. (Image negative) Find the negative of your original color image and its grayscale converted version by taking the complement of the pixel values(Subtract pixel values from white pixel value). Display and report the resultant images. 15. (Converting grayscale into binary(black&white)) Select a threshold on your own and convert your grayscale image into black and white by using that threshold. Select 3 different thresholds and repeat. Display the resultant images. Compare & comment on the results. 16. (Manipulating pixel groups) Write the Matlab command for drawing a horizontal white line on the middle of the grayscale image by changing the intensity of the corresponding pixels to white(maximum). Write the Matlab command for drawing a black square box(100 pixels width&height) at the center of the image by changing the intensity of the corresponding pixels to black(minimum). Display and report the resultant images. 17. (Cropping a rectangular patch from image) Crop a [1aa x 2aa](where aa is the last 2 digits of your student ID number) pixels patch from the grayscale image using indexing method. Display and report the resultant patch. 18. (Finding average pixel value of an image) Write a Matlab script(with a double for loop) to find the average value of the pixels in the grayscale image.