is it possible to convert binary image to rgb image or i want to replace all pixel values 0 by some red or green color in new image?
조회 수: 3 (최근 30일)
이전 댓글 표시
is it possible to convert binary image to rgb image or i want to replace all pixel values 0 by some red or green color in new image using matlab code?
댓글 수: 0
채택된 답변
Christoph
2011년 7월 20일
How about
image=repmat(double(image),[1,1,3]);
this way you have a matrix with 3 dimensions. image(:,:,1)is the red channel, image(:,:,2) the green one and image(:,:,3) is blue. Now you could set the channels according to your needs.
Hope this helps
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!