I've been working on processing of DNA gel electrophoresis images. Can anyone suggest me a method to determine the size of the dna bands after segmentation? Thanks in advance.
Show older comments
i used the following code to segment the image clear; close all; f = imread('Fig1022(a)(gel-image).tif'); h = fspecial('Sobel'); fd = double(f); g = sqrt(imfilter(fd, h, 'replicate').^2 + ... imfilter(fd, h', 'replicate').^2); %computing the gradient by Sobel operator directly subplot(231); imshow(f, []); title(' the original image');
L = watershed(g);
wr = L == 0; % get the watershed ridge lines;
subplot(232); imshow(wr); % note the servere oversegmentation
title('oversegmentation result'); %oversegmentation resulting fom applying the watershed
% tranform directly to the gradient magnitude image g, which due in part
% to the large number of regional minima.
%rm = imregionalmin(f); % compute the location of all regional minima.
rm = imregionalmin(g) % compute the location of all regional minima of gradient image
subplot(233); imshow(rm);
title(' regional minima of gradient magnitude image');
% To eliminate these extraneous minima, IPT function imextendedmim can be used
% this function uses the extended minima transform suggested by Soille [2003]
im = imextendedmin(f, 2); % obtain the internal markers
fim = f;
fim(im) = 175; % superimpose the extended minima locations as gray blobs
subplot(234); imshow(fim, []);
title(' internal markers');
% next external markers must be found
Lim = watershed(bwdist(im));
em = Lim == 0;
subplot(235); imshow(em);
title('external markers');
% then, a so-called technique of minima imposition is used to modify the
% original gray-scale image.
% mp = imiposemin(f, mask);
% modify the gradient image by imposing regional minima at the location of
% both the internal and external markers
g2 = imimposemin(g, im|em);
subplot(236); imshow(g2, []);
title(' modified gradient image');
%at last, compute the watershed transform of the marker-modified gradient image
L2 = watershed(g2);
f2 = f;
f2(L2 == 0) = 255;
figure; imshow(f2, []);
title('improved segmentation results');
Answers (0)
Categories
Find more on Genomics and Next Generation Sequencing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!