Rank: 106 based on 487 downloads (last 30 days) and 2 files submitted
photo

Tao Peng

E-mail
Company/University
University of Maryland

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Tao View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
17 Nov 2010 Screenshot Detect circles with various radii in grayscale image via Hough Transform Detect circular shapes in a grayscale image. Resolve their center positions and radii. Author: Tao Peng circular hough transf..., circle detection, gradient, radius, center, image analysis 359 45
  • 4.72222
4.7 | 36 ratings
06 Dec 2005 Screenshot Detect lines in grayscale image using Hough Transform Detection of lines (line segments) in a grayscale image using gradient-based Hough Transform. Author: Tao Peng image analysis, line detection hough ... 128 11
  • 4.0
4.0 | 12 ratings
Comments and Ratings on Tao's Files View all
Updated File Comment by Comments Rating
22 May 2012 Detect circles with various radii in grayscale image via Hough Transform Detect circular shapes in a grayscale image. Resolve their center positions and radii. Author: Tao Peng adiba, Amalia

Dear Mr Taopeng

would you please give me a reason, why while i compile from any example on your program, i got this error

??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.

Error in ==> imbmpinfo>decodeCompression

I'm using matlab 7.8 (2009a)
there's no problem while i try to call

rawimg = imread('TestImg_CHT_a3.bmp');

Thank you for yor reply

22 May 2012 Detect circles with various radii in grayscale image via Hough Transform Detect circular shapes in a grayscale image. Resolve their center positions and radii. Author: Tao Peng adiba, Amalia
01 Mar 2012 Detect circles with various radii in grayscale image via Hough Transform Detect circular shapes in a grayscale image. Resolve their center positions and radii. Author: Tao Peng Delgado, Daniel

Hello, I really need your help. I'm trying to detect the circle center of those red ball images but I can't find the correct parameters to make CircularHough_Grd to work. Thank you in advance, it's kinda urgent. It used to work perfectly on 160x120 images but now that those are 640x480 it fails.

Here is my code:

x = 90;

%% Read images
%images[];
for n=1:(numel(x)/3)
    images{n} = imread(sprintf('%d.jpg',n));
end

Temp = imfinfo('1.jpg');
width =Temp.Width;
height = Temp.Height;

%% Detect circles centers
tic;
for n=1:length(images)
    img = images{n};
    img2 = imadjust(img, [0 .7], [0 .5]);
    %img = imresize(img, 2);
    red = img2(:,:,1);
% red = img(:,:,1);
    %red = adapthisteq(red);
    fltr4img = [1 1 1 1 1; 1 2 2 2 1; 1 2 4 2 1; 1 2 2 2 1; 1 1 1 1 1];
% fltr4img = [1 1 1 1 1; 1 4 4 4 1; 1 4 12 4 1; 1 4 4 4 1; 1 1 1 1 1];
% fltr4img = [1 1 1 1 1; 1 4 8 4 1; 1 4 8 4 1; 1 4 8 4 1; 1 1 1 1 1];
% fltr4img = fltr4img / sum(fltr4img(:));
% imgfltrd = filter2( fltr4img , red );
% imgfltrd = filter2( fltr4img , img2(:,:,1) );
    imgfltrd = filter2( fltr4img , red );
% imgfltrd = red;

    %tic;
% [accum, circen, cirrad] = CircularHough_Grd(imgfltrd, [15 80], 8, 10);
% [accum, circen, cirrad] = CircularHough_Grd(imgfltrd, [0 26], 3, 4, 1);
    % [accum, circen, cirrad] = CircularHough_Grd(red, [11 50], 20, 13, 1);
    [accum, circen, cirrad] = CircularHough_Grd(imgfltrd, [90 120], 50, 5, 1);
    %toc

    if(length(circen)==2)
        %circenaccum {n} = circen(1,:)';
        circenaccum{n} = [circen(1,1);circen(1,2)];
        %circenaccum{n} = [(circen(1,1)-(width/2));(circen(1,2))-(height/2)];
    else
        circenaccum{n} = [0;0];
    end
   
    % if any(cirrad <= 0)
    % inds = find(cirrad>0);
    % cirrad = cirrad(inds);
    % circen = circen(inds,:);
    % end

    %imshow(img);
    figure(1); imagesc(accum); axis image;
    title('Accumulation Array from Circular Hough Transform');
% figure(2); imagesc(img2); colormap('gray'); axis image;
% figure(2); imagesc(img); colormap('gray'); axis image;
    figure(2); imagesc(imgfltrd); colormap('gray'); axis image;
% figure(9); surf(accum, 'EdgeColor', 'none'); axis ij;
% title('3-D View of the Accumulation Array');
    hold on;
    plot(circen(:,1), circen(:,2), 'r+');
    % for ii = 1 : size(circen, 1)
    % rectangle('Position',[circen(ii,1) - cirrad(ii), circen(ii,2) - cirrad(ii), 2*cirrad(ii), 2*cirrad(ii)],...
    % 'Curvature', [1,1], 'edgecolor', 'b', 'linewidth', 1.5);
    % end
    for k = 1 : size(circen, 1),
       DrawCircle(circen(k,1), circen(k,2), cirrad(k), 32, 'b-');
    end
    hold off;
    title(['Raw Image with Circles Detected ', ...
         '(center positions and radii marked)']);
% pause;
end
toc

%% Draw center points
figure
circenaccummat = cell2mat(circenaccum);
scatter(circenaccummat(1,:),circenaccummat(2,:))
% plot(circenaccummat(1,:), circenaccummat(2,:),'*b');
axis ij;

14 Feb 2012 Detect lines in grayscale image using Hough Transform Detection of lines (line segments) in a grayscale image using gradient-based Hough Transform. Author: Tao Peng Kumar , Nitin
10 Feb 2012 Detect circles with various radii in grayscale image via Hough Transform Detect circular shapes in a grayscale image. Resolve their center positions and radii. Author: Tao Peng Fer
Top Tags Applied by Tao
image analysis, circular hough transform, gradient, line detection hough transform segment gradient grayscale, radius
Files Tagged by Tao View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
17 Nov 2010 Screenshot Detect circles with various radii in grayscale image via Hough Transform Detect circular shapes in a grayscale image. Resolve their center positions and radii. Author: Tao Peng circular hough transf..., circle detection, gradient, radius, center, image analysis 359 45
  • 4.72222
4.7 | 36 ratings
06 Dec 2005 Screenshot Detect lines in grayscale image using Hough Transform Detection of lines (line segments) in a grayscale image using gradient-based Hough Transform. Author: Tao Peng image analysis, line detection hough ... 128 11
  • 4.0
4.0 | 12 ratings

Contact us at files@mathworks.com