フィルターのクリア

Operation on BMP, TIFF images

6 ビュー (過去 30 日間)
LOKESH
LOKESH 2012 年 4 月 26 日
The Algorithm for Grayscale works for JPEG images by dividing it into 3 components-R,G and B. How can it be applied to a BMP or a TIFF file. Do I need to change my algorithm or some Technique will work just as the case for Color JPEG images.
Any suggestions...
  2 件のコメント
Geoff
Geoff 2012 年 4 月 26 日
Bitmaps and tiffs are generally RGB as well. The difference with BMP and TIFF is that the file formats support an alpha channel as well. But this won't affect your image data. Are you actually experiencing a problem? Perhaps you need to provide more information.
LOKESH
LOKESH 2012 年 4 月 26 日
Thanks. I mean to say can I divide the TIFF and BMP Color images to R,G & B components as RGB Image & convert back to TIFF or BMP images respectively with cat().
Dividing it into RGB components can give 3 Grayscales on which I can apply my algorithm which works with grayscale images.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 4 月 26 日
Yes. You read all those image varieties using imread(), getting out image data without any remaining information about the file format. You use imwrite() to write image data to an image file.
JPEG images are always RGB. BMP might not be. You can look at ndim() of the image data: if it is 4 then you have CMYK or RGBA; if it is 3 then you have RGB; if it is 2 then you have grayscale or binary.
  1 件のコメント
LOKESH
LOKESH 2012 年 4 月 26 日
ndim() is not found !!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by