Home > ISET > vcamera > scene > sceneCreate.m

sceneCreate

PURPOSE ^

Create a scene structure.

SYNOPSIS ^

function [scene,parms] = sceneCreate(sceneName,varargin)

DESCRIPTION ^

 Create a scene structure.

  [scene,parms] = sceneCreate(sceneName,varargin)

 A scene describes the light emitted from a planar object, say a flat
 screen display.  The scene is located at some distance from the center of
 the optics, has a field of view, and a spectral radiance distribution.
 All of these properties, and several others, can be set. A variety of
 images can be created automatically.  The routines that create these
 scenes, including this one, serve as a template for creating others. 

 MACBETH COLOR TEST PATTERNS

   The default, scene = sceneCreate, is a Macbeth color checker illuminated
   by a D65 light source with a mean luminance of 100 cd/m2.  The scene is
   described only a small number of spatial 64x96 (row,col).  This can be
   changed using the patchSize argument (default - 16 pixels).  The
   wavelength  400:10:700 samples, making it efficient to use for experiments.   

   Example:  scene = sceneCreate('macbeth',32);

      {'macbethd65'}  - Create a Macbeth D65 image.  Optional
         parameter of patch size (default = 16 pixels). 
      {'macbethd50'}         - D50 illuminant
      {'macbethillc'}        - Illuminant C
      {'macbethfluorescent'} - Fluorescent illuminant
      {'macbethtungsten'}    - Tungsten illuminant

   The size of the individual patches and the wavelength sampling are both
   parameters. They can be set using the calling procedure

         patchSizePixels = 16;
         spectrum.wave = [380:5:720]; 
         scene = sceneCreate('macbethTungsten',patchSizePixels,spectrum);

  SPATIAL TEST PATTERNS:   

      {'ringsrays'}            - Resolution pattern
      {'harmonic'}             - Harmonic
      {'sweepfrequency'}       - Increasing frequency to the right,
               increasing contrast upward
      {'lined65'}              - Line with D65 spectrum
      {'lineee''}              - Line with equal energy spectrum
      {'pointarray'}           - Point array with D65 spectrum
      {'gridlines'}            - Grid lines with D65 spectrum
      {'checkerboard'}         - Checkerboard with equal photon spectrum
      {'frequencyOrientation'} - Demosaicking test pattern, equal photon spectrum
      {'slantedbar'}  - Used for ISO spatial resolution, equal photon spectrum
      {'zonePlate'}   - Circular zone plot, equal photon spectrum
      {'starPattern'} - Radial lines used to test printers and displays 

  Additional parameters are available for several of the patterns.  For
  example, the harmonic call can set the frequency, contrast, phase,
  angle, row and col size of the harmonic.

        parms.freq = 1; parms.contrast = 1; parms.ph = 0;
        parms.ang= 0; parms.row = 64; parms.col = 64; parms.GaborFlag=0;
        [scene,parms] = sceneCreate('harmonic',parms);   

  Many of the patterns can have an arbitrary image (row,col) size.  This
  is possible for whitenoise, impulse1dee,lined65,

         imageSize = 128; scene = sceneCreate('lined65',imageSize);

  Other patterns have different parameters:

         sceneCreate('slantedBar',imageSize,edgeSlope);
         scene = sceneCreate('checkerboard',pixelsPerCheck,numberOfChecks)
         scene = sceneCreate('gridlines',imageSize,pixelsBetweenLines);
         scene = sceneCreate('pointarray',imageSize,pixelsBetweenPoints);

 NOISE ANALYSIS TEST PATTERNS

      {'linearintensityramp'}  -
      {'uniformequalenergy'}   - Equal energy
      {'uniformequalphoton'}   - Equal photon density
      {'uniformd65'}           - 
      {'whitenoise'}           - Noise pattern for testing

    The uniform patterns are small by default (32,32).  If you would like
    them at a higher density (not much point), you can use
        sceneCreate('uniformD65',256) 
    where 256 is the image size in pixels.


 SCENES FROM IMAGES
      It is possible to create scenes  using data in image fiels.
      The high dynamic range, multispectral image data included in
      ISET-DATA\images\MultiSpectral directory are an important source of
      data.  It is also possible to simply read a tiff or jpeg file and
      create a scene structure.  These image-based scenes created by the
      call sceneFromFile which, in turn, calls this function.  

 Copyright ImagEval Consultants, LLC, 2003.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 14-Jan-2007 10:24:23 by m2html © 2003