06
Mar

2012

2012

Many images have what appears to be a “film” of color overlaying the image. This can readily be observed in older photos that are, for example, tinted reddish. A relatively simple algorithm to clean up the colors in photos is one I happened upon by accident actually. I’m sure it’s well documented somewhere but I […]

03
Mar

2012

2012

2 Comments

Recently I've discovered a new passion of mine and that is the creation of tools that can be used to enhance learning, particularly in CS1/CS2 classrooms. To this end, I have turned a simple assignment into what I hope to be a tool that will give CS1/CS2 students a new way to visualize programming concepts. […]

05
Mar

2011

2011

The sample covariance matrix describes how the elements of the matrix relate to eachother. It is used, as you might have guessed, in computer vision as well as machine learning. http://en.wikipedia.org/wiki/Covariance_matrix

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
MATRIX* cov(MATRIX* matrix) { MATRIX* c = (MATRIX*)calloc(1, sizeof(MATRIX)); mInit(c, matrix->cols, matrix->cols, 0.0); MATRIX* m; m = mMatSubMean(matrix); MATRIX* row; int r; for (r = 0; r < m->rows; r++) { row = mGetRow(m, r, r + 1); c = add(c, dot(transpose(row), row)); } mMatScalarMul(c, 1.0 / (m->rows - 1)); free(m); return c; } |

The algorithm for determining the covariance of a matrix is relatively simple. Step 1: Get the mean of the matrix and subtract it […]

03
Mar

2011

2011

Row Reduced Echelon Form Without actually turning this into a linear algebra lesson, this method is used to solve a linear system of equations such as: 2x + 3y – 2z = 1 5x – 5y + 9z = 7 4x + 4y – 3z = 9 As you remember from algebra class, you can […]

Copyright Ben Barbour - Theme By SiteOrigin