Bit Per Pixel
14 次查看(过去 30 天)
显示 更早的评论
Can any body plz. tell me how i calculate bpp(bits per pixel) for a image.
回答(2 个)
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)
0 个评论
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Denoising and Compression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!