Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How Do I represent the number of dots detected? total numbers of dots detected in every snapshot of the camera

Subject: How Do I represent the number of dots detected? total numbers of dots detected in every snapshot of the camera

From: michael Longard

Date: 3 Feb, 2013 07:27:07

Message: 1 of 1

I want to display the present, and after next snapshot the present would be a previous, total result of the dots detected in my GUI if every snapshot of the caemra at the GUI, how di i calculate it?..... this is my code..

originalImage = wa; % wa = the input image or video from snapshot
G = rgb2gray(im2double(originalImage));
B = im2bw(imfilter(G, fspecial('gaussian', sigma*3, sigma), 'replicate'), thres);
B1 = bwlabel(B);
dots = max(B1(:))
%calculate number of dots
presentdots = int2str(dots);
set(handles.pres, 'String', presentdots);
% and no idea for previous and total number of dots

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us