Home > . > sfrmat3.m

sfrmat3 v2

PURPOSE ^

MatLab function: sfrmat3 Slanted-edge Analysis for digital camera and scanner

SYNOPSIS ^

function [status, dat, e, fitme, esf, nbin, del2] = sfrmat3(io, del, weight, a, oename)

DESCRIPTION ^

 MatLab function: sfrmat3   Slanted-edge Analysis for digital camera and scanner
                            evaluation. Updated version of sfrmat2.
  [status, dat, fitme, esf, nbin, del2] = sfrmat3(io, del, weight, a, oecfname);
       From a selected edge area of an image, the program computes
       the ISO slanted edge SFR. Input file can be single or
       three-record file. Many image formats are supported. The image
       is displayed and a region of interest (ROI) can be chosen, or
       the entire field will be selected by not moving the mouse
       when defining an ROI (simple click). Either a vertical or horizontal
       edge features can be analized.
  Input arguments:
      io  (optional)
        0 = (default) R,G,B,Lum SFRs + edge location(s)
          = 'sfrmat2'  R,G,B,Lum SFRs + edge location(s)but
            with the same calculations as the previous version, sfrmat2
        1 = Non GUI usage with supplied data array
      del (optional) sampling interval in mm or pixels/inch
          If dx < 1 it is assumed to be sampling pitch in mm
          If io = 1 (see below, no GUI) and del is not specified,
          it is set equal to 1, so frequency is given in cy/pixel.
      weight (optiona) default 1 x 3 r,g,b weighs for luminance weighting
      a   (required if io =1) an nxm or nxmx3 array of data
      oename  optional name of oecf LUT file containing 3xn or 1xn array

 Returns: 
       status = 0 if normal execution
       dat = computed sfr data
       fitme = coefficients for the linear equations for the fit to
               edge locations for each color-record. For a 3-record
               data file, fitme is a (4 x 3) array, with the last column
               being the color misregistration value (with green as 
               reference).
       esf = supersampled edge-spread functin array
       nbin = binning factor used
       del2 = sampling interval for esf, from which the SFR spatial
              frequency sampling is was computed. This will be 
              approximately  4  times the original image sampling.

EXAMPLE USAGE:
 sfrmat3     file and ROI selection and 
 sfrmat3(1) = GUI usage
 sfrmat3(0, del) = GUI usage with del as default sampling in mm 
                   or dpi 
 sfrmat3(2, del, weight) = GUI usage with del as default sampling
                   in mm or dpi and weight as default luminance
                   weights
 sfrmat3(4, dat) = non-GUI usage for data array, dat, with default
                   sampling and weights aplied (del =1, 
                   weights = [.3 .6 .1])
 [status, dat, fitme] = sfrmat3(4, del, weight, a, oecfdat);
                   sfr and edge locations, are returned for data
                   array dat using oecf array, oecfdat, with
                   specified sampling interval and luminance weights
 
Provided in support of digital imaging performance standards being development
by the International Imaging Industry Association (i3a.org).

Author: Peter Burns, 12 May 2015
 Copyright (c) 2009 Peter D. Burns, pdburns@ieee.org
******************************************************************

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Mon 27-Jul-2009 13:44:16 by m2html © 2003