This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % first column of each panel is 1 + a multiple. For example, if the % panel width is 50 pixels, columns 51 to 100 will hold the second % panel (or column of panels). %- The above is true for rows and heights. % Hint: % A two-by-two comic (such as xkcd.jpg) boils down to the well % documented four quadrant problem. If you are having trouble starting, % start with splitting an image into four quadrants, and then generalize % that code for any number of rows and columns. img = imread(fn); %reads in the file [r c clr] = size(img); %finds the size of the image panelrows = floor(r./numr); %determines the number of rows per panel panelcols = floor(c./numc); %determines the number of columns per panel imarr = img((row_num.*panelrows)-panelrows+1:row_num.*panelrows, (col_num.*panelcols)-panelcols+1:col_num.*panelcols,:); %indexes the correct row and column to start and end at end e...
View Full Document
- Spring '08