Masking the image [message #90624] |
Wed, 18 March 2015 09:31  |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
Folks,
Hi,
I am analyzing some radar data and the outputs are epsilon and sigma. In the data plot, i have a M*N matrix that in some areas, i do not have data but during the analysis, some wrong out puts showed up. As you can see here (the gray areas): (http://s16.postimg.org/ks92qc2dx/2015_03_19_172804.png). As you can see from this image, in the areas that i do not have data i get some wrong value (like 24 which is constant in this areas). I want to mask out thus areas.
mask = image(where ( image eq 24 ))
image = image * mask
But this might be not good solution, because probably in the areas that i have data, i have correct 24 value, which i do not mask those data.
Will you please give me some hints, tricks to solve this?
Thanks for any kind of helps in advance,
Cheers,
Dave
|
|
|
Re: Masking the image [message #90625 is a reply to message #90624] |
Wed, 18 March 2015 10:23  |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
On Wednesday, March 18, 2015 at 12:31:19 PM UTC-4, dave poreh wrote:
> Folks,
> Hi,
> I am analyzing some radar data and the outputs are epsilon and sigma. In the data plot, i have a M*N matrix that in some areas, i do not have data but during the analysis, some wrong out puts showed up. As you can see here (the gray areas): (http://s16.postimg.org/ks92qc2dx/2015_03_19_172804.png). As you can see from this image, in the areas that i do not have data i get some wrong value (like 24 which is constant in this areas). I want to mask out thus areas.
>
> mask = image(where ( image eq 24 ))
> image = image * mask
>
> But this might be not good solution, because probably in the areas that i have data, i have correct 24 value, which i do not mask those data.
> Will you please give me some hints, tricks to solve this?
> Thanks for any kind of helps in advance,
> Cheers,
> Dave
You might think about using LABEL_REGION and only masking out regions that contain some minimum number of pixels.
-Jeremy.
|
|
|