See my manual convolution demo. You'll need to change it to make the inner loops change their starting and ending values depending on the size of the blur window you read from your blur map (which hopefully is composed of only odd numbers). Should be really, really easy with only about 2 lines needing to be added
- call blurmap = imread(filename) to read in your blur image.
- get the blur window width between the second and third for loop by reading the blurmap at that row and column:windowWidth = blurmap(row, column)
and two to be modified -- the limits on the inner two for loops.
But let me know if you can't figure it out and attach your blur image.