How to convert a multipage tif image in RGB into Grayscale

Hi, I have a multipage tif image in RGB mode obtained from a video. Since the video is recorded in RGB mode,
I need to convert this multipage tif image from RGB into Grayscale. Can anyone help me ?
Thank you very much.

답변 (2개)

Ben11
Ben11 2014년 6월 26일
So you have one single RGB image? If so you can use
rgb2gray(Image)
to get the grayscale. Otherwise you can access individual channels with (:,:,Channel), which will be grayscale. Is that it?

댓글 수: 3

Thank you for your help.
I know that I can use rgb2gray, but, since the status bar of the camera indicates that the video is taken in RGB mode, but, the image and the video itself looks gray already.
After I use imread to read the image, the array generated is a 800 x 1280 uint8 array.
while for using 'rgb2gray' function to convert RGB image into gray image, the data array should be 800 x 1280 x 3, and the camera it self is 12-bit digital.
So I am quite confused by this.
Oh so am I. What if you open the image with ImageJ? What type of image does it say it is? Can you convert it to RGB color for instance?
I opened the image using Image J. The information obtained by 'showinfor' indicates that it is "Bits per pixel: 8 (grayscale LUT)"
But the camera itself is 12 bit when taking the video.

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

Image Analyst
Image Analyst 2014년 6월 26일

0 개 추천

What output format do you want? An avi file (movie file)? I've not dealt with multipage tiff images before - is that what your video camera gave you?

댓글 수: 3

I need output of image in grayscale in tif format.
Since the camera is a high speed digital camera, the 'Phantom V711', so if I want to get any image, I first have to take a short video in 'Cine' format developed by Vision Research (the manufacture of Phantom V711), and then get a multipage or single page image from the video.
The status bar of the camera indicates that it is in RGB mode.
Do you want single frames (one image per one TIFF file)? Or a multi-page TIFF (multiple images in a single TIFF file)?
Yes, I know that I can get either single frame out of the video or multipage out of that video.
For me, either choice will be ok.
For multipage image file, I can load all frames of the image, and then average the intensity information over the number of frames.

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

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

질문:

zy
2014년 6월 26일

댓글:

zy
2014년 6월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by