Week 3
The goal for this week is to get my co-occurrence and derived texture measure algorithms to work. Once that is accomplished then the next step is to customize the functions. Currently my functions are programmed to take a whole image as input. But what I really want, is to be able to analyze a small window within an image at a time.
To help me debug my correlation function I created a function that compares two matrices. I computed the correlation matrix using my function, and then also using Matlab’s functions. I want to do an element wise comparison. Should any two elements not be the same, the function will output the x and y coordinates of the element, as well as mine vs. Matlab’s values.
One of my earlier errors was that intensity values gray tones) typically go from 0 to 255, however, Matlab indexes matrices starting from 1, not 0. Matlab’s graycomatrix function can compute different matrices depending on how many levels you ask it for, eth default being 8. So I had to make sure to specify 256 levels, not 255. When I ran my comparison program I found 17 instances out of 65536 that did not match. All of the instances were along the edge of the image. Hence, one of the hypothesis for why my function isn’t working correctly, deals with differences in how Matlab may have chosen to compute the elements along the border. Common strategies include adding a border, ignoring them, copying later values, or averaging them.
Though I was not finished debugging my program, I had run out of ideas …. So I turned my attention to building my DMP webpage. I knew nothing about web page making or html. Across from my desk a new graduate student moved in, his name is Ivan, and he told me a few thing about making tables. Also, I used ‘Webmaster in a Nutshell’ to learn a few web making principles. Lastly, I used a template I had used on a previous webpage I made while being a student teacher at High Tech High in San Diego, California. My older brother had used dreamweaver to help me make that old page.
Lesson learner: utilize any and all resources you have, build on previous work, enhance and rework with new knowledge from ‘experts’, books, and whatever other resources might be handy. My initial webpage was a one page with two links to word documents, one of the word documents was my resume, the other pictures I took from the Freemont street fair, Seattle, Washington June 2006. Before week’s end I had learned to turn word documents into web pages, thanks to some tips from Marta, and how to display pictures that were not word documents. From one of the other DMP student’s webpage’s code I learned to make buttons and I expanded my webpage.
Lesson learned: Start with ‘best for now’, keep revising.
Back to correlation, I read the article ‘A Tool Based on The Co-Occurrence Matrix to Measure the Performance of Dynamic Range Reduction Algorithms” by A. Ukovich, G. Impoco, and G. Ramponi to learn more about the co-occurrence matrix and the correlation measure. Using the explanations given in that article, and the formulas, I reprogrammed my algorithm and finally Thursday by noon I had a working correlation measure.
Lesson learned: when in doubt, research. The article does not directly talk about correlation measure, but it does talk about it while explaining their choice of measures and how the measures are implemented. Some time a slightly different viewpoint or an expanded explanation of a familiar concept can yield the necessary information. It’s all about catching the right wave length before you go, Oh, I see what you mean….! My research was fruitful!
I started implementing the co-occurrence, normalized co-occurrence matrix, energy, entropy, homogeneity, contrast, and correlation texture measures for small windows within an image.
This weekend I will go hiking with other CS grads, they have a hiking mailing list going. This weekend it will be Tyler, Colin, Susumo, Kayur, Craig, Sandra and me in the hike. We’ll go to Ashland lakes and to a waterfall just beyond.