Question: function [ resultImageMatrix ] = doubleMyImage ( filename ) - function should accept ONE arguments: - a file name of an appropriately bit mapped unit

function [resultImageMatrix]= doubleMyImage(filename)
- function should accept ONE arguments:
- a file name of an appropriately bit mapped unit8 grayscale image.
- function should return ONE result:
- a matrix of the resultant image in unit8 matrix format. (NOT JPG, PNG, ETC)
Write a program that will double the horizontal and vertical dimensions of a grayscale image.
For example, if the image is 200 rows by 400 columns, grow it to 400 rows by 800 columns.
Be sure to parameterize any factors or variables that you might use.
The program should input a grayscale bitmap image (the golden grate bridge file is a good example) and perform mathematical analysis on the image matrix, perform the doubling function, and then provide the double sized visual. Note the size may not seem to increase, but the doubling should be notable in the pixel count and via whos.
- Maintain the aspect ratio. IE: make sure no unusual stretching of the image occurs.
- If you are having trouble doubling exactly, say you're method is off by a handful of pixels, you might consider trimming up after your expansion.
- Maintain as much image quality as you can.
- Do not use any builtin MATLAB functions to modify the image.
Note: This problem is intentionally open ended and not straight forward.
- I want you to think about this, without any image manipulation experience... develop your algorithm for the best way to double the image size while maintaining somewhat reasonable image quality.
- Think mathematically about how you will modify pixels based on neighboring pixels.
- If you are using Octave and encounter any issues with imread or imshow, let us know on the discussions ASAP as I can look into it and find a work around for you.
- I expect lots of different solutions
- I don't expect perfect images.
 function [resultImageMatrix]= doubleMyImage(filename) - function should accept ONE arguments: - a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!