need help creating a 2D matrix of an image

조회 수: 7 (최근 30일)
Rao
Rao 2012년 7월 30일
i have an ycbcr image and i want to get the cb cr planes in a single 2d matrix .
Y=ycbcr(:,:,1);
Cb=ycbcr(:,:,2);
Cr=ycbcr(:,:,3);
by this im getting three 1d matrices but i want to get the color information i.e cbcr planes in a single 2d matrix.

답변 (3개)

Image Analyst
Image Analyst 2012년 7월 30일
That doesn't make sense to me. You have everything you need. For a given pixel at a given (row, column) you have all three component's values. What is this other thing you're trying to derive, why do you want it, and why would it be more useful than the 3D color image?

gargoyle
gargoyle 2012년 8월 2일
now im not sure, but i think this is what you want:
Y=zeros(size(ycbcr(:,:,1))); %
Y=ycbcr(:,:,1);
Cb=zeros(size(ycbcr(:,:,2)));
Cb=ycbcr(:,:,2);
Cr=zeros(size(ycbcr(:,:,3)));
Cr=ycbcr(:,:,3);
i've made 3 different empty mattrix assignments just to be explicit all the 3rd dimensions should have the same row,col size.

faraz.a
faraz.a 2013년 5월 25일
I want to find matrix of 0's and 1's (for white and black pixels) for a given binary image
  댓글 수: 1
Image Analyst
Image Analyst 2013년 5월 25일
Please start your own thread rather than adding on to all these other threads, and post your image and state what you want the binary image to represent.

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

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by