Produce overlay between original image and labelled objects

Frank pennekampster at
Fri Nov 9 03:34:16 EST 2012

Hi Tony and Johannes,

in fact visualize_boundaries works fine and fulfills all I want, so I will 
stick with it. The bounding box approach seems fine too! 

Thanks to both of you for the quick response and the helpful hints! 



On Thursday, November 8, 2012 6:38:56 PM UTC+1, Tony S Yu wrote:
> On Thu, Nov 8, 2012 at 4:30 AM, Frank <pennek... at<javascript:>
> > wrote:
>> Hi,
>> I want to use Python and scikit image for detection, counting and 
>> measuring cells from digital pictures. So far most of the things I want to 
>> do work fine: I just use a global threshold which separates my cells well 
>> from the background. After labelling the thresholded objects the 
>> regionprops function provides many of the features I am interested in 
>> (area, centroid *etc*). 
>> To be completely satisfied, I would like to produce an overlay between 
>> the original image and the identified objects after thresholding for error 
>> checking. I searched a while to find the proper function to do so and then 
>> encountered the mark_boundaries function. However, that one is not working, 
>> because the function is not found after importing the skimage.segmentation 
>> module (ImportError: cannot import name mark_boundaries). Do you have any 
>> suggestions, why it is not working? Or maybe you know a better way to 
>> achieve my goal?
>> Many thanks,
>>     Frank
> Hi Frank,
> Are you using the latest release (0.7) or the development version on 
> github? It's a bit unfortunate, but the documentation link on the website 
> goes directly to the dev docs instead of the latest release.
> I believe `mark_boundaries` is only in the development version of 
> scikit-image, but really that was just a slight modification of 
> `visualize_boundaries`, which should be available in 0.7. Note: 
> `visualize_boundaries` doesn't work with grayscale images, so you may need 
> to call `skimage.color.gray2rgb`.
> Hope that helps.
> -Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the scikit-image mailing list