find multiple objects and their number in an image
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Liliana Malik
el 12 de Mzo. de 2018
Comentada: Image Analyst
el 13 de Mzo. de 2018
I am working on a project that classifies beans in an image how can i do that and how can i tell the number of beans of each type.
3 comentarios
KALYAN ACHARJYA
el 12 de Mzo. de 2018
Editada: KALYAN ACHARJYA
el 12 de Mzo. de 2018
When you classify it based on image segmentation (Apply various variable thresholding techniques) and count the number of objects within an image.
[label_Image, numberofObject]=bwlabel(segmented_binaryImage);
Respuesta aceptada
Image Analyst
el 12 de Mzo. de 2018
See my image segmentation tutorial in my File Exchange.
1 comentario
Image Analyst
el 13 de Mzo. de 2018
Create a feature vector for each pixel that includes the mean hue, saturation, and value in a window around the pixel plus the standard deviation of the values in the window. Use rgb2hsv() and conv2() and stdfilt().
hsvImage = rgb2hsv(rgbImage);
hImage = hsvImage(:, :, 1);
sImage = hsvImage(:, :, 2);
vImage = hsvImage(:, :, 3);
windowsSize = 21; % Some odd number.
kernel = ones(windowSize, windowSize)/windowSize^2;
localMeanH = conv2(hImage, kernel, 'same');
localMeanS = conv2(sImage, kernel, 'same');
localMeanV = conv2(vImage, kernel, 'same');
% Now use stdfilt
localSDH = stdfilt(hImage, ..... etc.
I'm sure you can figure out what to do next.
Más respuestas (0)
Ver también
Categorías
Más información sobre Recognition, Object Detection, and Semantic Segmentation en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!