Re: area threshold [message #94384 is a reply to message #94383] |
Wed, 03 May 2017 05:55   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Wednesday, May 3, 2017 at 7:55:14 AM UTC+2, sid wrote:
> On Tuesday, May 2, 2017 at 2:53:16 PM UTC+5:30, Nikola Vitas wrote:
>> On Monday, May 1, 2017 at 11:37:55 AM UTC+1, gunvi...@gmail.com wrote:
>>> On Monday, May 1, 2017 at 3:29:49 PM UTC+5:30, Nikola Vitas wrote:
>>>> On Monday, May 1, 2017 at 9:00:01 AM UTC+1, sid wrote:
>>>> > hi all,
>>>> > can anyone give some ideas for giving area threshold. Right now I am using
>>>> > label_region, histogram and array_indices. Inorder to discard a region which is of n x n pixel area. But in this method some pixels are left without discarding and if I go for higher pixel area then the useful data also gets discarded.
>>>> > Therefore anyone has any better idea for area thresholding.
>>>> > thanks
>>>>
>>>> How is your n x x patch defined? By the values it contain or by position in a bigger image?
>>>>
>>>> Anyway, check for the logical operators, EQ, NE, GT, LT and similar and for the function WHERE. It's all in the IDL help files including useful examples.
>>>
>>> My n x n patch are defined by a position in a bigger image.
>>
>> You should specify your problem more specifically. What do you want to get as a result? Some statistics of the rest of the image or you just need to display the image with this patch masked out.
>
> I have got a binary image in that the region which is less than 10 x 10 pixels has to be discarded or shud be made zero from the patch. I want to estimate the total area of the rest of the region of the patch.
I think Nikola is right. You should better explain your problem. From what you wrote, here is what I understood. You want to exclude from your analysis a patch of nxn pixels. Depending on the analysis, there are different solutions. Since you mentioned the total area of the rest of the region (without the patch) then I would:
1) calculate area of patch: area_patch = n*n
2) calculate area of image: area_image = nCols*nRows
3) rest area is then: area_rest = area_image - area_patch
My guess though, is that this is not what you asked, so you should really explain better. Eventually post an image online somewhere to show the problem in greater detail.
Regards,
Helder
|
|
|