I have the following picture which is a photo of pancreatic cells 
What I would like to do is being able to get the membrane of each cell (red filament) and then do a tessellation in order to get an idea of the length of a filament. So far I have tried to use the example given on the matlab website but the result is not really good...
I = imread('picture.tiff');
I_gray = rgb2gray(I);
[~, threshold] = edge(I_gray, 'sobel');
fudgeFactor = .5;
BWs = edge(I_gray,'sobel', threshold * fudgeFactor);
se90 = strel('line', 3, 90);
se0 = strel('line', 3, 0);
BWsdil = imdilate(BWs, [se90 se0]);
I have been searching for hours other way to do it but without any satisfying result... Is there a way to do so ? Maybe an other software than matlab could be more efficient. Thank you by advance !




I don't know anything about cells or tessellation or whatever. But if you want to detect those blobs in a non uniform background, then I might help. You need to analyse the blobs individually because of the non uniform background. You can't just set a fixed threshold to detect all blobs at once. First, you will detect each blob individually and then use individual threshold. Here is the example
The original image
I am choosing only the blue colour to analyse
1) Blur the image, since after blurring the blobs will have local maxima/minima at their centres
2) Use watershed transform to separate each blob region
Draw the boundaries
3) Here I analyse each blob individually and find an otsu threshold for each blob, then I detect the blobs and combine all detections
Remove some noise
If the background has higher contrast then the blobs, then you won't need to invert the image in watershed transform.