Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imgGray = read_as_grayscale('bloodcells/test_images/092.png');
- imgGray = padarray(imgGray,[50 50],'s'); % Mirror image to find edge/corner-cells
- cells = cell_detector(imgGray);
- imagesc(imgGray), colormap gray
- hold on
- plot(cells(1,:),cells(2,:),'y*')
- hold on
- rectangle('Position',[50 50 388 260])
- function centres = cell_detector(img)
- load linearClassifier.mat;
- result = imfilter(img,w); % Filter with linear classifier
- centres = strict_local_maxima(result);
- end
- function maxima = strict_local_maxima(image)
- max = ordfilt2(image, 9, ones(3,3));
- indicator = (image==max);
- [row, col] = find(indicator);
- maxima = [col row]';
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement