Bit Per Pixel

조회 수: 3 (최근 30일)
VARUN JAIN
VARUN JAIN 2012년 5월 16일
Can any body plz. tell me how i calculate bpp(bits per pixel) for a image.
  댓글 수: 1
VARUN JAIN
VARUN JAIN 2012년 5월 16일
and image is in jpeg format and compress using transform method.

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

답변 (2개)

Walter Roberson
Walter Roberson 2012년 5월 16일
bits per pixel is 8 divided by the compression ratio . For example, if the compression ratio is 5:2 then bits per pixel is 8/(5/2)

Image Analyst
Image Analyst 2012년 5월 16일
the number you see when you do
class(yourImage);
will tell you how many bits are in your integer image once it's read into MATLAB. It will be probably be 8, but might be 16 (not sure if jpg supports 16 bit images but it might). Not all of those bits may be necessary. In other words, sometimes 10, 12, or 14 bit cameras will load their data into the upper or lower part of a 16 bit word, or you could have some bits that are so noisy that they're basically worthless. Of course it will be less if you use the bytes on disk of the compressed image. But you have to decide what you want to use for the bytes on disk - the actual bytes used, or the bytes in the file, which will include some slack space since data has to be stored as an integer number of disk sectors even if you only needed one byte on a sector. For example, a one byte data file could take up 8192 bytes on disk because it has to take up a whole sector.

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by