how to convert the rgb componet of image in 8bit - binary value for matlab?

2 ビュー (過去 30 日間)
sandy sorathiya
sandy sorathiya 2014 年 3 月 31 日
コメント済み: sandy sorathiya 2014 年 4 月 1 日
i want to convert the r,g and b componet of image in 8bit-binary format ...

回答 (1 件)

Image Analyst
Image Analyst 2014 年 3 月 31 日
What format are they in now? Normally most RGB images are in 8 bits per channel (24 bits total) unsigned 8 bit ("uint8"). What are yours? I'm not sure what you want to convert into what. What are you starting with (a 3D RGB image, or 3 separate gray scale color channels), and what do you want to end up with (a 3D RGB image, or 3 separate gray scale color channels)?
  1 件のコメント
sandy sorathiya
sandy sorathiya 2014 年 4 月 1 日
i want to hide the text in RGB image so that 1]i take one RGB image. 2]seprate each componet of RGB in r,g and b. 3]now i want to convert each componet into 8unit binary but each componet take the value unit8 becuse my original image size is 50*50 so HOW CAN I CONVERT ALL COMPONET IN ONALY 50*50 8 UNIT?
HERE IS MY CODE clear all; close all; clc; warning('off', 'Images:initSize:adjustingMag') RGB=imread('Untitled.png'); figure(); imshow(RGB); %-------- R=RGB(:,:,1); G=RGB(:,:,2); B=RGB(:,:,3);
disp('r componet'); R=RGB
disp('G componet'); G=RGB
disp('B componet'); B=RGB
R(:,:,2)=0; R(:,:,3)=0;
B(:,:,1)=0; B(:,:,2)=0;
G(:,:,1)=0; G(:,:,3)=0;
figure(2); imshow®; figure(3); imshow(G); figure(4); imshow(B);

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by