I have thermal images from FLIR camera that has 2 bytes per pixel. I am not sure how I could check in Ubuntu if these images have 2 bytes per pixel or not.
Also, how can I convert a 2 byte per pixel image to a 1 byte per pixel image?
$ exiv2 frame0171.tiff
File name : frame0171.tiff
File size : 4194510 Bytes
MIME type : image/tiff
Image size : 1024 x 1024
Camera make :
Camera model :
Image timestamp :
Image number :
Exposure time :
Aperture :
Exposure bias :
Flash :
Flash bias :
Focal length :
Subject distance:
ISO speed :
Exposure mode :
Metering mode :
Macro mode :
Image quality :
Exif Resolution : 1024 x 1024
White balance :
Thumbnail : None
Copyright :
Exif comment :
$ file frame0171.tiff
frame0171.tiff: TIFF image data, little-endian, direntries=14, height=1024, bps=182, compression=none, PhotometricIntepretation=RGB, width=1024
$ exiv2 Rec-000026_16bit_counts.tif
File name : Rec-000026_16bit_counts.tif
File size : 2097433 Bytes
MIME type :
Image size : 0 x 0
Rec-000026_16bit_counts.tif: No Exif data found in the file
$ file Rec-000026_16bit_counts.tif
Rec-000026_16bit_counts.tif: Big TIFF image data, little-endian
$ exiv2 Rec-000026_tiff.tif
File name : Rec-000026_tiff.tif
File size : 1816013 Bytes
MIME type : image/tiff
Image size : 778 x 778
Camera make :
Camera model :
Image timestamp :
Image number :
Exposure time :
Aperture :
Exposure bias :
Flash :
Flash bias :
Focal length :
Subject distance:
ISO speed :
Exposure mode :
Metering mode :
Macro mode :
Image quality :
Exif Resolution : 778 x 778
White balance :
Thumbnail : None
Copyright :
Exif comment :
$ file Rec-000026_tiff.tif
Rec-000026_tiff.tif: TIFF image data, little-endian
An image typically contains a small amount of header data and large amount of image data. In most cases the percent of data in header is negligibly small so we can neglect it and do a simple calculation and see that it contains 4 bytes per pixel. Divide file size by resolution, you will get bytes per pixel. (But it must be verified that the result is close to an integer)
>>> 4194510/(1024*1024)
>>> 4.0002
Here, 4194510 is the file size in bytes, and 1024*1024 is the resolution.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments