필터 지우기
필터 지우기

Change bit depth for a PNG image

조회 수: 5 (최근 30일)
berkaoui sara
berkaoui sara 2014년 1월 15일
댓글: Image Analyst 2014년 1월 15일
hello , i have a dataset of images with 12 bit represantation and i want to know if it is possible to convert them to 8 bit representation . thanks

채택된 답변

Image Analyst
Image Analyst 2014년 1월 15일
Yes. How do you want to do it? Scale linearly? Or take the upper or lower 8 bits and throw away 4 bits? Maybe you can try mat2gray().
  댓글 수: 2
berkaoui sara
berkaoui sara 2014년 1월 15일
i have images in PNG format with 12 bits , i use the imcrop function to extract 128*128 regions from these images , when i get the wanted region , i note that there is a visual difference betwenn the original and the cropped image. I thought may be because the original image is high resolution, so I thought to change the bitdepth. do you think this is right?
Image Analyst
Image Analyst 2014년 1월 15일
The number of gray levels (bit depth) and the lateral size of the image (number of rows and columns) are unrelated/independent. You can adjust each on it's own. But I don't know what you want to do. Why do you think that you want to change the bit depth (number of intensity gray levels)? And what does that have to do with the pixel being high resolution (10 megapixels or whatever)?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by