필터 지우기
필터 지우기

How would i convert a grayscale image to a false color image?

조회 수: 24 (최근 30일)
jeremy wright
jeremy wright 2012년 8월 29일
I would like to convert images that are grayscale to color. I need to find out a way to save images that look like what happens when you type image(grayscaleimage) into the code.

답변 (1개)

Image Analyst
Image Analyst 2012년 8월 29일
For the first question on pseudocoloring, use colormap() or ind2rgb().
For the second question on saving a grayscale image, either really grayscale or one converted to rgb via ind2rgb(), use imwrite().
  댓글 수: 3
jeremy wright
jeremy wright 2012년 8월 30일
I just thought of something, would I be able to color a video?
Image Analyst
Image Analyst 2012년 8월 30일
So give it a colormap, like
pseudoColoredImage = ind2rgb(grayImage, jet(256));
You can pseudocolor a video by doing it one frame at a time and writing it back out as a color video. Use the VideoWriter class.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by