|
|
Image InformationContentsByte-Array Images.8bit/.16bit ImagesByte-array images usually are named with the file extension '8bit' or '16bit' or of another number of bits. They are stored as a sequential series of DN (Digital Number) values, starting at the top of the image, one line at a time from left to right. Each DN value is an unsigned integer with the given number of bits. No information about image size is held inside the *bit file itself. E.g. For an 8bit file of an image which was 3 pixels wide by 2 pixels tall, there would be 6 bytes in the file. So an image having these DN values as shown:
would be stored in the file as a series of byte of values:
For images with more bits for pixel than 8 bit, the number of bytes per pixel should be rounded up to the next integer multiple of 8 (e.g. 13 would round up to 16). The result of dividing this number by 8 is the number of bytes used per pixel as it is stored in the file. As a check, the file size should be equal to: (number of lines) * (number of pixels in each line) * (number of bytes per pixel) .info FilesByte-array image files are usually accompanied by a '.info' file with the same name - this file contains various pieces of information about interpreting the image. Here are some commonly provided items of information in an info file:
Two items of important information in an info file are the slope and intercept of the DN values. You can use these numbers to read values from the image and translate them into real-world values. The equations for this are explained in our data guide (this also contains information about how to navigate images). The way to find where in the file a specific pixel is is given by the formula: (column + (row * width)) * number_of_bytes_per_pixel Where column is the column of the pixel (starting from 0), row is the row of the pixel (starting from 0) and width is the width of the image in pixels. Following is some code in C to read data from these images, but if you simply want to extract some data from specific points then we can provide this service. Code to extract byte-array image data
|