How I can divide a color image in to blocks and access the RGB of each individual block?

답변 (2개)

Image Analyst
Image Analyst 2013년 6월 7일

댓글 수: 3

Sir, Could you help me in extracting the shape of a object in color image
% 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
yagnesh 2013년 6월 11일
y=imread('colorimage.jpg');
R=y(:,:,1);
G=y(:,:,2);
B=y(:,:,3);
in this way you can saperate

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

질문:

2013년 6월 7일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by