Defining a minimum area of contours

Hi,
We have some applications which generate contour of meteorological parameters but are finding with wind direction in particular that many of the contours are very thin and/or small and are unrealistic. This typically happens when the direction changes dramatically over a small area. We have tried blurring/smoothing the data but there is a limit to how far we can go.
So my question is, is there any way or does anyone know of any methods (blurring/filtering aside) with which to force the contouring algorithms to make the polygons conform to a minimum size or width??
Cheers

 Accepted Answer

If you have the Image Processing Toolbox, you could run rangefilt():
J = rangefilt(I) returns the array J, where each output pixel contains the range value (maximum value − minimum value) of the 3-by-3 neighborhood around the corresponding pixel in the input image I.
You could take a histogram of that image to see how many places the range is high, meaning that there would be many contours crammed into a small, narrow region. Knowing that you could choose your contour levels appropriately.

1 Comment

Hi,
sorry for the delay in coming back to this, got tied up. This is a very good solution (and will mark it as an answer) but unfortunately it doesn't completely solve my issue. The reason is that (as I have just been informed) the contour levels are predefined as I must do this process multiple times and have consistency with the levels.
Cheers for the idea though, I am going to see if I can do some type of histogram procedure anyway

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!