(adsbygoogle = window.adsbygoogle || []).push({}); J = roifilt2(h, I, BW) filters the data in I with the two-dimensional linear filter h. BW is a binary image the same size as I that defines an ROI used as a mask for filtering. roifilt2 returns an image that consists of filtered values for pixels in locations where BW contains 1's, and unfiltered values for pixels in locations where BW contains 0's. For this syntax, roifilt2 calls filter2 to implement the filter.

For reference^

So as I understand it h is a "correlation kernel" which describes any number of filters. Average, sharpening, whatever. So say mine is a 5x5 averaging filter to blur my image.

Now, when I set my region of interest in BW, I tell roifilt2 which pixels to bother with. so say I set it to a single pixel. Only that pixel is modified, but what I don't know is are the other pixels surrounding it used in this modification?

Surely if you want to specify a region of interest, anything outside this is not of interest, so it shouldn't be used in the filtering process. But I have a feeling it is. Does anyone know if it is or not?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB - roifilt2 ambiguity in description

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads for MATLAB roifilt2 ambiguity |
---|

MATLAB MATLAB: forces acting on an object |

MATLAB Matlab histogram |

MATLAB Sovling Bernoulli's differential equation in matlab? |

MATLAB Matlab-like software |

MATLAB Matlab data into bins |

**Physics Forums | Science Articles, Homework Help, Discussion**