background
UNESCO logo
 Bilko logo
Bilko Mini-lessons

Mini-lesson 6: opening binary flat files in Bilko

Lesson aim:

To introduce you to image file formats and how to open a binary flat file in Bilko.

Objectives:

By the end of this mini-lesson you will have learnt how to open a binary flat file exported from another package into Bilko and have learnt much about image file formats.

This mini-lesson assumes familiarity with the Introduction to Bilko Tutorial 2: Opening, viewing and saving images.

Download the lesson:

If you have already registered as a Bilko user you can download this lesson by entering your e-mail address in the box below. If you are new to Bilko please register first, using the link on the top menu bar.

spacerspacer spacer

 

 

Central part of a colour composite view of the AVHRR image used for this mini-lesson (showing Spain, Portugal, France, Morocco etc.).

Content Overview

This mini-lesson introduces you to some image file formats and shows you how to open an image exported from another application as a binary flat file. In some cases you find that one application cannot read another application's proprietary file type. However, almost all applications can both export and import files as binary flat files. This allows you to transfer files between applications such as remote sensing packages and GIS packages, when these cannot open each other’s files directly. To do this successfully you need to know a bit about file structure, both when exporting and importing.

In order to be able to import a binary flat file you need to know at least:

  1. The number of pixels in each line (i.e. the number of columns) of the image,

  2. The number of lines (or rows) in the image,

  3. The format of each pixel (e.g., is each pixel value stored as a single byte, two bytes or four bytes?),

  4. The way in which these bytes are coded. For example, if the file has been created on an Apple Macintosh or Unix system, then you might need to swap byte orders if importing onto a PC.

  5. The number of wavebands in the image flat file being imported.

  6. The interleave format of the image which normally has one of three options - Band Sequential (BSQ), Band Interleaved by Line (BIL) or Band Interleaved by Pixel (BIP).

Sample images:

A selection of images from this mini lesson are shown below.

 

Diagram of a Band Interleaved by Line (BIL) image for a hypothetical 4 waveband (blue, green, red and near-infrared) image. A binary flat file stored as Band Interleaved by Line (BIL) would have all the pixels in the first line of the image in the first waveband (blue) stored in sequence, followed by all those for the first line in the second waveband (green), followed by all those for the first line in the third waveband (red), and so on for all wavebands. This sequence would then be repeated for the second line of the image, then the third line, and so on until the last line (n) of the image.

 

The Bilko Open As flat file dialog box. This is opening all five bands of a 5-band 10-bit AVHRR (Advanced Very High Resolution Radiometer) image that is stored in 16-bit unsigned integer format with a Band Interleaved by Line (BIL) interleave format.

 

A 1500% zoom of part of the 5-band AVHRR Band Interleaved by Line binary flat file opened in Band Sequential interleave format to show the file's internal structure. Bands 1 and 2 are much darker than Band 3, with Bands 4 and 5 being of an intermediate brightness (grey). A section of the first 5 scan lines are shown for each of the 5 bands. The zoomed bit of the image is about 25 pixels across.

backarrow Previous: Mini-lesson 5 Last update: 31 January 2018      Contact          Up         Site Policy         Next: Mini-lesson 7 Next