Documentation – Legacy v5.1 and below

Image file formats and acquisition devices

Current Documentation
View previous documentation
View legacy documentation
All documentation versions

Imatest 5.0:  All functions of Imatest Image Sensor have been incorporated into Imatest Master.

 

Imatest can read a great many file types, including many not supported by standard Matlab. Imatest can also acquire files from a large number of devices. This page lists the file and device types. It is divided into four sections:

Standard (interchangeable) image files, Video files, Raw files, and Acquisition devices.

Most file types are recognized by their extensions, which are case-insensitive.

Standard (interchangeable) still image files

All the still image file types supported by the Matlab imread function.

BMP — Windows Bitmap JPEG (JPG) — Joint Photographic Experts Group PNG — Portable Network Graphics
CUR — Cursor File JPEG 2000 (JP2, JPX) PPM — Portable Pixmap
GIF — Graphics Interchange Format PBM — Portable Bitmap RAS — Sun Raster
HDF4 — Hierarchical Data Format PCX — Windows Paintbrush TIFF (TIF) — Tagged Image File Format
ICO — Icon File PGM — Portable Graymap XWD — X Window Dump

For full details, see Matlab documentation:  imread. Special cases of standard files are described below.

HDR (High Dynamic Range) files

Files with the HDR extension are read with the Matlab hdrread function and can be written by Read Raw, Image Processing and other Imatest modules using Matlab hdrwrite (Imatest 5.0+). These files have the Radiance HDR format.

Multi-image tiff

Some tiff tiles (extension tif or tiff) contain multiple images. These could be for a multispectral camera for different wavelength bands, or they may have different sizes. When these files are detected, Imatest lets you select which image to analyze.

By default, the Multi-image TIFF file selection window opens whenever a multi-image TIFF file is read.

multi_image_tifMulti-image TIFF file selection window

If you don’t want this window to appear during file reads, uncheck the Display this window… checkbox. (The image number to read is saved.) You can always open it from the Settings dropdown menu of the Imatest main window.

When opened during a file read, the image preview appears only after the Preview image checkbox is set.

When opened from the Settings dropdown menu, no image appears until you press Read file to view.

Currently, Imatest can’t analyze images from multi-image files in batches. (Images in multi-image files don’t always have the same size.) To prepare images for batch analysis, you can save the selected single image or all images (with _01 through _nn appended to the file name) by clicking one of the buttons on the upper-right.

Phase One raw tiff

Phase One raw files have the tiff extension. They are large files (>10MB), but the first image is a small thumbnail (width < 400 pixels; height < 300 pixels), and they are labeled as Phase One. When these files are detected they are treated as raw files, to be converted by dcraw.

Targa (TGA extension)

According to Wikipedia, Truevision TGA, often referred to as TARGA, is a raster graphics file format created in 1984 by Truevision Inc. (now part of Avid Technology).

DPX

Digital Picture Exchange (DPX) is a common file format used by the cinema industry for digital intermediate and visual effects work and is an ANSI/SMPTE standard (268M-2003). DPX supports several bit depths, but Imatest hasn’t been tested for all possible variations. If you run into difficulties, please contact us at support at imatest dot com.

A curiosity of the the DPX format is that the R and B channels may sometimes be switched (it’s not consistent in sample images we’ve downloaded from the web), and the order is not specified in the DPX header field. To handle this, the Settings dropdown menu of the Imatest main window has a DPX read: reverse RGB setting, which may or may not be checked. You should select the setting that gives correct colors.

CSV

Yes, old-fashioned Excel-readable CSV files have been used for storing infrared images. (This is, of course, hideously inefficient, and may well be obsolete.)

Raw files

Raw files contain linear data taken (more or less) directly from the image sensor output. They are typically not demosaiced, gamma-encoded, color-corrected, white-balanced, sharpened, or noise-reduced. To be usable in most applications, they must be converted to interchangeable formats. Imatest’s raw file support is described in detail in Raw files.

Commercial raw files

Commercial raw files (Canon, Nikon, Panasonic, Sony, etc.) have proprietary formats that are difficult to decode. In Imatest hey are converted to standard interchangeable still image formats by dcraw, which is included with Imatest. (You can, of course, convert them externally with any number of raw converters. Some customers use universal raw converters, such as Adobe Lightroom, to get consistent signal processing with a wide range of cameras.)

dcraw_dialog_boxThe main dcraw page has a comprehensive list of supported cameras, but does not list file extensions. There is no obvious list in dcraw.c, but there is a list in rawphoto.c.

3fr,arw,bay,bmq,cine,cr2,crw,cs1,dc2,dcr,dng,erf,fff,
hdr,ia,jpg,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,
orf,pef,pxn,qtk,raf,raw,rdc,rw2,sr2,srf,sti,tif,x3f

Files with these extensions (except for raw, which is widely used for development system raw files) are decoded by dcraw. Notable raw formats in the list are ARRIRAW format (ARW; for still frames from Arri cinema cameras), Adobe Digital Negative (DNG; Adobe’s attempt to standardize commercial raw formats– hasn’t gotten a lot of industry traction), and Fuji X-Trans sensors (which deviate from the standard Bayer pattern).

Imatest GUI for dcraw

Imatest has a GUI front-end for dcraw, shown on the right, that lets you select many options (demosaiced or Bayer raw, bit depth, linear or gamma-encoded, white balanced or not, converted to a color space or not). Details in Raw files – dcraw demosaicing.

Generalized read raw (binary/development system raw files)

Binary files, typically from development systems, are decoded using Generalized read raw (details here), which is particularly useful for Imatest IT (the Industrial Testing edition), used for manufacturing quality control.

Generalized read raw files are identified by their extension, which is set by the user in the File extension settings section of the setup window. Up to 16 extensions can be registered. (When we receive these files from customers, they almost always have the .raw extension, so we have to give them unique extensions.)

Generalized Read Raw
setup window

A great many options are available: the most important are width, height, and input and output pixel size (bit depth). Others include bit shift (auto, fixed, or none), pixel offset (defaults to 0), byte order (for 16+ bit depth: Little or Big Endian), rotation/mirroring, white balance and level, and demosaicing. Details in Raw files – Generalized Read Raw.

Video files

Imatest can acquire single frames or groups of frames from the video file formats supported by the Matlab VideoReader class.

Video files are recognized by the following extensions:  mov, avi, mj2, mpg, mp2, and m4v. When a file has one of these extensions, the Video Player window is opened.

Imatest Video Player window

This window has a number of options. You can press Play or Stop to see the contents of the file. You can select a frame for analysis by pressing Mark/Unmark Frame. you can select a range of frames by pressing Mark In, then Mark Out. The frames appear in the Selected frames box, which you can clear if necessary. When you have the appropriate frame or frames selected, press Yes, Continue.

Here is a complete list of all formats. We can add formats as required.

All Platforms

AVI, including uncompressed, indexed, grayscale, and Motion JPEG-encoded video (.avi)
Motion JPEG 2000 (.mj2)

All Windows®

MPEG-1 (.mpg)
Windows Media® Video (.wmv, .asf, .asx)
Any format supported by Microsoft® DirectShow®

Windows 7 or later

MPEG-4, including H.264 encoded video (.mp4, .m4v)
Apple QuickTime Movie (.mov)
Any format supported by Microsoft Media Foundation

Macintosh

Most formats supported by QuickTime Player, including:
MPEG-1 (.mpg)
MPEG-4, including H.264 encoded video (.mp4, .m4v)
Apple QuickTime Movie (.mov)
3GPP  3GPP2  AVCHD  DV

Linux®

Any format supported by your installed plug-ins for GStreamer 0.10 or above, as listed on http://gstreamer.freedesktop.org/documentation/plugins.html, including Ogg Theora (.ogg).
Before the Video reader was available, we extracted still frames from video using VLC Media Player by pausing the video on the frame of interest, then pressing Video, Take Snapshot. The save location was set by pressing Tools, Preferences, Video Settings. Once the frame was saved you could read it as a standard still image file (PNG).

Acquisition devices for Imatest

Imatest Master supports direct image acquisition from a large number of devices (in addition to all Imatest file formats). Direct acquisition is supported by three modules, which cover nearly all Imatest measurements:  Rescharts (all resolution charts— slanted-edges, Siemens Star, Log F-Contrast, Spilled Coins (Dead Leaves), etc.), Multicharts (a great variety of color and grayscale charts), and Uniformity Interactive (most flat-field measurements).

image_sensor_settings_dropdownEach of these modules has a Reload button, which causes the image to be continuously updated in realtime. This allows you to make adjustments on the system and see the effects immediately.

Settings in the Settings dropdown menu
of the Imatest main window

Image acquisition settings in the Settings dropdown menu, shown on the right, are used to select the acquisition device and to make certain settings. The Device Manager, shown below, is the interface to the Matlab Image Acquisition toolbox.

ON Semi Devware

Described in Imatest with DevWare.  You need to download and install the ON Semi Devware software. Both Devware and Imatest need to be started in administrator mode.

Omnivision

Described in Omnivision Quickstart for Imatest.

Android Camera Interface

Described in Android Camera Interface for Imatest IS.

Image Acquisition toolbox

Prior to acquiring images from devices supported by the Matlab Image Acquisition toolbox, the Device Manager should be opened by clicking the button on the lower-right of the Imatest main window, or from the settings dropdown menu of the Imatest, Rescharts, Multicharts, and Uniformity Interactive windows. A list of devices appears on the upper-left, and settings for the selected device appear below it.

Devices 2-7 in the Device List, which appear even when the devices are not present, are supported by custom Imatest code. The last four (DeckLink Studio 4K, Blackmagic WDM Capture, Microsoft LifeCam VX-7000 and DeckLink Video Capture) are available devices (namely a Microsoft webcam and a Blackmagic DeckLink Studio 4K framegrabber) detected by the Image Acquisition toolbox.

The image is blank when the Device Manager is opened. It appears once Start Preview has been pressed. Once you press Save, you can acquire the image with any of the three modules that support direct image acquisition— Rescharts, Multicharts, or Uniformity Interactive, and you can continuously refresh the display using the Reload button.

 

device_manager2The Imatest Device Manager

The Supported image acquisition hardware page has a list of supported devices and interfaces. More can be found on the Matlab Image Acquisition Toolbox Hardware Support page.