How I can divide a color image in to blocks and access the RGB of each individual block?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have tried using blockproc(), but could not get it.
0 Commenti
Risposte (2)
Image Analyst
il 7 Giu 2013
3 Commenti
Image Analyst
il 11 Giu 2013
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
% Threshold
redBlobs = redChannel > 200 & greenChannel < 40 & blueChannel < 70; % or whatever.
labeledImage = bwlabel(redBlobs);
measurements = regionprops(labeledImage, 'all');
allAreas = [measurements.Area];
allPerimeters = [measurements.Perimeter];
allECD = [measurements.EquivDiameter];
allCircularities = allPerimeters.^2 ./ (4 * pi * allAreas);
yagnesh
il 11 Giu 2013
y=imread('colorimage.jpg');
R=y(:,:,1);
G=y(:,:,2);
B=y(:,:,3);
in this way you can saperate
0 Commenti
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!