how to keep the binary values of a integer in same cell of a matrix.?

조회 수: 2 (최근 30일)
aditya kumar sahu
aditya kumar sahu 2016년 11월 10일
답변: KSSV 2016년 11월 10일
a=imread('f.jpg');
>> d=dec2bin(a);
>>e=dec2bin(d)-'0';
>>v=uint8(e);
The binary vallues for all pixels are stored in different columns.i.e for 128 the individual binary values i.e 1,0,0,0,0,0,0,0 are storing in one after other cells.i want to keep them in a single cell. when i use
cellstr(dec2bin(v,8));
it is coming as a cell array. but i want only in matrix.. Kindly anybody can solve

답변 (1개)

KSSV
KSSV 2016년 11월 10일
iwant = num2cell(v,2) ;

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by