필터 지우기
필터 지우기

I need the code for extracting the digital numbers from the color planes!

조회 수: 2 (최근 30일)
I need a code to extract the digital numbers from the three color planes--red, green, blue
  댓글 수: 3
Ali Ibrahim
Ali Ibrahim 2017년 1월 25일
Here is a photo in the attachments I want to extract the digital numbers from the three color planes--red, green, blue .. Can you help?

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2017년 1월 25일
Look at impixelinfo() for telling you what the RGB values are as you mouse around.
Here are some snippets that might help you:
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
% Recombine separate color channels into a single, true color RGB image.
rgbImage = cat(3, redChannel, greenChannel, blueChannel);
% Mask image must be converted to the same integer type
% as the integer image we want to mask.
mask = cast(binaryImage, 'like', rgbImage);
% Multiply the mask by each color channel individually.
maskedRed = redChannel .* mask;
maskedGreen = greenChannel .* mask;
maskedBlue = blueChannel .* mask;
% Recombine separate masked color channels into a single, true color RGB image.
maskedRgbImage = cat(3, maskedRed, maskedGreen, maskedBlue);
Also see my File Exchange for some color image demos:
  댓글 수: 7
Ali Ibrahim
Ali Ibrahim 2017년 1월 26일
Sure.. Just follow this link: https://www.dropbox.com/s/n6ppznmang3xuw2/Project.docx?dl=0 Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Greg
Greg 2017년 1월 25일
편집: Greg 2017년 1월 25일
A = imread(filename);
A(:,:,1) is the red
A(:,:,2) is the green
See a pattern yet...?
  댓글 수: 1
Ali Ibrahim
Ali Ibrahim 2017년 1월 25일
the code is working .. I need just to organize that .. if you can help me in that.. I am little bit beginner in MATLAB.. I got thousands of numbers .. can I display that in a column ?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by