X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 18 Sep 2007 08:19 AM by  anon
ROI and number of islands
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
18 Sep 2007 08:19 AM
    hi, given a roi_id, how can i get the number of blobs of the region? tanks.

    Deleted User



    New Member


    Posts:
    New Member


    --
    18 Sep 2007 08:19 AM
    I have a suggestion, but I want to be clear that this is not something i've tried, so i'm not sure it will work. But it'd be pretty cool if it did :) You will probably need to adjust this some, but here it is: 1. Create a mask image for your ROI such that the pixels in the ROI are 1, those outside it are 0. Your life will be much easier if you just create masks of the outlines of the blobs/islands, without the islands being filled, but i'm not sure if you can do that. I'd have to think more about it and dont have time at the moment. 2. Call FIND_BOUNDARY() using the output of #1 as input. Download FIND_BOUNDARY() at http://www.dfanning.com/p...s/find_boundary.pro. 3. If FIND_BOUNDARY() succeeds, set pixels in the mask at the boundary it finds to 0, and increment a counter variable. 4. Repeat step 3 until no more boundaries are found. Later in the week when i have some time i'll try this myself to see if i can get it to work. FIND_BOUNDARY() can give weird results sometimes, particularly if the blobs/islands are tiny, but for ROI's in an image I think it might be ok. Jeff
    You are not authorized to post a reply.