A
anonymous
I am looking for imformation about how to quickly w/low processing reduce
noise in a image. I seen a couple of examples of other ways off
http://en.wikipedia.org/wiki/Median_filter (at the bottom of the page) but I
can't understand the formula.
Currently I am taking the image down to a byte array and doing a standard
"median" filter against the image where you take the current pixel and
compare against the surrounding pixels to get the "median" value. i.e.
for(y = 1; y < height - 1; y++)
for(x=1; x < width - 1; x++)
{
ArrayList Red = new arraylist(), green....... blue.......
for(yy = y-1; yy < y+1; yy++)
for(xx = x - 1; xx < x+; xx++)
Add to red, green, blue
// sort red, green, blue
Red.sort();
gree....
blue....
// each array's total size is 9 bytes which means the median is the
4th value of each array after the sort
redmedian = red[4]
blue......
gree......
}
This is working like a champ and given the desired results but at a hugh
cost to processing and time to process. Im running off a dual core machine
and its running around 50% proc and taking around 500ms to complete this.
noise in a image. I seen a couple of examples of other ways off
http://en.wikipedia.org/wiki/Median_filter (at the bottom of the page) but I
can't understand the formula.
Currently I am taking the image down to a byte array and doing a standard
"median" filter against the image where you take the current pixel and
compare against the surrounding pixels to get the "median" value. i.e.
for(y = 1; y < height - 1; y++)
for(x=1; x < width - 1; x++)
{
ArrayList Red = new arraylist(), green....... blue.......
for(yy = y-1; yy < y+1; yy++)
for(xx = x - 1; xx < x+; xx++)
Add to red, green, blue
// sort red, green, blue
Red.sort();
gree....
blue....
// each array's total size is 9 bytes which means the median is the
4th value of each array after the sort
redmedian = red[4]
blue......
gree......
}
This is working like a champ and given the desired results but at a hugh
cost to processing and time to process. Im running off a dual core machine
and its running around 50% proc and taking around 500ms to complete this.