the color and pattern of an organism 's integument play ecologically and socially critical functions in most animal taxa . these phenotypic properties are determined by the interaction of light with the structure of the integument , which can exhibit optical scattering that varies both spatially ( across the surface of the integument ) and directionally ( with change in lighting and viewing direction ) . in complex biological materials , such as feathers , the direction of light scattering is influenced by the orientation of repeating milli - scale geometry . these milli - scale structures themselves may be embedded with nano - scale structures , such as melanin arrays , which often inherit the milli - scale orientation . from nano- to macro - scales , the structure of the integument has evolved functionally to increase the signaling capability of the organism . in order to assess the influence of the morphology of different scales upon the overall appearance , tools to measure and analyze the color of biological structures need flexibility to isolate directional light scattering at various scales of magnification . we developed image - based measurement tools to study how the performance of a feather 's complex and varied milli - scale morphology ( barb rami , distal barbules , and proximal barbules ) expands the range of expression possible from nano - scale structures alone . in a single image recorded by the camera , we observed that light reflected differently at different locations on the surface of the feather , that is , light reflectance was spatially - varying . when we moved the light and camera direction with respect to the feather , we observed the reflectance changed , that is , light reflectance was directionally - varying . following these observations , we designed a protocol to methodically move the light and camera around the subject using a spherical gantry , with which we captured 2 dimensions of surface position ( x and y ) , 2 dimensions of light direction ( latitude and longitude ) , and 2 dimensions of camera direction ( latitude and longitude ) ( figure 2 ) . in software we visually explored the 6 dimensions of the scattered light as a function of position , illumination direction and view direction . previous research into the reflectance from integuments has too frequently discounted the contribution of directionality -- e.g. diffuse vs. specular or isotropic vs. anisotropic reflection -- to color expression . most color measurements have fixed the incident light , object , and viewing geometry to carefully avoid directional effects . for instance , to eliminate specular reflection from color measurements , it is common to place the light normal to the surface and record the reflectance at 45 from the normal . studies that do link morphology to directionally - varying reflectance typically focus on the nano - scale and its iridescent consequences . few consider the contribution of micro- , milli- , and macro - scale geometries to the far - field optical signature . it is therefore common to employ a light detector to aggregate reflectance across a single area of interest that may include multiple milli- and/or macro - scale components , such as barb rami , barbules , and even entire feathers . when the region of interest is either smaller than the resolution limit of the detector or does not conform to the shape of the detector 's field of view , the common protocol specifies specimen dissection to isolate the light scattering from the specific milli - scale element . we have developed a more encompassing protocol for measurement acquisition and visualization that encourages exploration of the many variables often ignored in other more focused studies . we measure light scattering over a sphere of directions and across a region of space using a massive set of high - dynamic range , high - resolution photographs taken from a systematic set of light and viewing directions . we employ a high - resolution imaging sensor with its 2d array of fine - scale pixel detectors . aggregation in hardware occurs at the pixel - level , at a scale smaller than the milli - scale elements we are measuring . a second stage aggregates individual pixels in software as the user selects the shape and size of the region of interest . accordingly , a single measurement set can be repeatedly analyzed in software to explore different aspects of light interaction with material at multiple biologically - relevant positions and scales . by eliminating dissection and measuring the entire feather , our protocol has the advantage of leaving the morphology of the feather vane intact , retaining natural context and function that is , light 's interactions between constituent milli - scale elements . . measured 6d light scattering can not as yet be attributed to specific morphology within a hierarchy of scale with any singular instrument . we have developed a tool encompassing three complementary methods -- sampling reflectance using the gantry , exploring large data volumes in software , and visualizing data subsets graphically -- to extend our ability to measure 6d light scattering at any point on a material , down to the milli - scale . as protocols such as ours are employed , we predict biologists will identify a myriad of directionally- and spatially - varying traits and corresponding structural adaptations at multiple scales of development . using our tools we are engaged in characterizing the signaling potential of the directional and spatial expression of milli - scale structures , and hope to shed light on their adaptive consequences . we address a range of questions , such as : from any given observation point , which fine - scale elements or gross - scale regions of the feather reflect strongly ? how does the orientation of the fine - scale elements influence the direction of scattered light ? what morphological conditions produce a satiny gloss vs. a sequined sparkle of the iridescent ornament ? these questions may be asked about birds and their feathers but also about any other organisms that have evolved a particular surface appearance for signaling , camouflage , or other reasons . when using our methods to measure a sample , the experimenter must decide on a set of camera and light directions , and for each combination of camera and light directions , the camera makes several exposures with different shutter speeds . moving the camera requires additional processing , because it changes the view of the sample as seen in the image , so we normally use a small number of camera directions and a larger number of light source directions . in the detailed protocols below , we first describe how to perform a measurement with many light source directions and a single camera direction , and how to process and visualize the resulting data ( protocol 1 ) . in the primary protocol , which can be used by itself when a single view is sufficient to observe the phenomena being studied , we always keep the camera view perpendicular to the sample ( primary routine in figure 1 ) . when multiple camera directions are required , the resulting oblique views of the sample can be warped to undo the effects of moving the camera and thereby to align the images exactly with the canonical perpendicular view . to compute these warps , we perform additional calibration steps that use observations of targets placed around the sample to precisely determine the motion of the camera relative to the sample . protocol 2 details this calibration procedure and explains how to select parameters and run protocol 1 multiple times to gather data from multiple views ( secondary routines in figure 1 ) . finally , protocol 3 details the additional steps that must be inserted into protocol 1 to rectify the oblique views during data processing . prepare and mount the object to be measured prepare a thin ferrous metal mounting plate with a -inch aperture surrounded by a ring of targets ( as seen in figure 2).prepare the material to be measured . if measuring a feather , groom the barbs to correct for any unzipped or misaligned sections of the pennaceous vane.lay the surface of the object ( obverse face of the feather ) against the back side ( opposite the target ring ) of the plate.center the region of interest over the -inch aperture in the plate.lay a sheet of magnetic film with a 5/8-inch aperture against the back side of the object ( reverse face of the feather ) , thereby pressing the object flat against the plate.align the aperture of the film to the aperture of the plate without shearing the surface . the flattened surface , pinned around the circumference of the circular aperture , yields a planar macro - surface approximately coincident with the plate 's surface . prepare a thin ferrous metal mounting plate with a -inch aperture surrounded by a ring of targets ( as seen in figure 2 ) . if measuring a feather , groom the barbs to correct for any unzipped or misaligned sections of the pennaceous vane . lay the surface of the object ( obverse face of the feather ) against the back side ( opposite the target ring ) of the plate . center the region of interest over the -inch aperture in the plate . lay a sheet of magnetic film with a 5/8-inch aperture against the back side of the object ( reverse face of the feather ) , thereby pressing the object flat against the plate . align the aperture of the film to the aperture of the plate without shearing the surface . the flattened surface , pinned around the circumference of the circular aperture , yields a planar macro - surface approximately coincident with the plate 's surface . configure the gantry locate the center of the circular aperture at the origin of the gantry coordinate system.place a light source on the gantry outer arm . aim and narrowly focus the light at the object , ensuring that the aperture is uniformly illuminated for all light source angles.place a camera on the gantry inner arm . adjust the camera distance and the focal length of the macro lens until the ring of targets fills the width of the sensor.calibrate the rotational movements ( , ) of the camera and lamp arms . calibrate the inclination (  ) with respect to the object 's surface normal so that the camera and the lamp are aligned with the surface normal when  = 0 . calibrate the azimuth (  ) of the camera to the azimuth of the lamp . the absolute azimuthal orientation is not critical since the captured images may be rotated later in the protocol . locate the center of the circular aperture at the origin of the gantry coordinate system . aim and narrowly focus the light at the object , ensuring that the aperture is uniformly illuminated for all light source angles . place a camera on the gantry inner arm . adjust the camera distance and the focal length of the macro lens until the ring of targets fills the width of the sensor . calibrate the inclination (  ) with respect to the object 's surface normal so that the camera and the lamp are aligned with the surface normal when  = 0 . calibrate the azimuth (  ) of the camera to the azimuth of the lamp . the absolute azimuthal orientation is not critical since the captured images may be rotated later in the protocol . configure the camera focus and exposure rotate the camera until the object is viewed at a grazing angle . decrease the f - number to minimize the depth of field ( dof ) , then set the focus plane at the center of the aperture . increase the f - number to increase the dof until the ring of targets surrounding the aperture is in focus . a compromise between diffraction and dof - induced blur may be required.clip a color standard flat against the mounting plate . for rgb images use a macbeth color checker . for uv - visible - nir measurements use spectralon.photograph the color standard in raw format . calculate the color channel multipliers to white balance the image.find the exposure bracket that spans the dynamic range of the scene under the most extreme viewing and lighting directions.for each exposure time in the bracket , acquire a dark noise image by exposing the sensor with the lens cap on . decrease the f - number to minimize the depth of field ( dof ) , then set the focus plane at the center of the aperture . increase the f - number to increase the dof until the ring of targets surrounding the aperture is in focus . a compromise between diffraction and dof - induced blur may be required . for rgb images use a macbeth color checker . for uv - visible - nir measurements use spectralon . photograph the color standard in raw format . calculate the color channel multipliers to white balance the image . find the exposure bracket that spans the dynamic range of the scene under the most extreme viewing and lighting directions . for each exposure time in the bracket , acquire a dark noise image by exposing the sensor with the lens cap on . acquire measurements from a sparsely sampled sphere of incident directions position the camera axis normal to the surface plane { ,}={0,0}.step the light through of a series of uniformly distributed positions on the sphere , using a coarse sampling ( e.g. less than 500 points).for each incident light direction in the sampling : capture a raw image for each exposure time in the exposure bracket.capture a single image illuminated by the camera mounted flash synchronized to a relatively short exposure time to suppress the gantry lamp illumination.advance to the next incident light direction and repeat . position the camera axis normal to the surface plane { ,}={0,0}. step the light through of a series of uniformly distributed positions on the sphere , using a coarse sampling ( e.g. less than 500 points ) . for each incident light direction in the sampling : capture a raw image for each exposure time in the exposure bracket . capture a single image illuminated by the camera mounted flash synchronized to a relatively short exposure time to suppress the gantry lamp illumination . process measurements from sparsely sampled sphere using the debug ( document ) mode of dcraw to disable its demosaicing function , convert from raw format to greyscale , 16-bit , linear , pgm format : each dark noise exposure.each exposure of the object at each incident light direction . integrate all low dynamic range ( ldr ) greyscale exposures under gantry lamp illumination into a single high dynamic range ( hdr ) color image for each incident light direction . subtract the corresponding dark noise image from each ldr exposure.demosaic each ldr exposure to yield a one - quarter scale image.white balance each ldr exposure using the color channel multipliers computed in step 1.c.3.merge dark - noise - subtracted ldr exposures into a single hdr image by summing all the values at each pixel position and dividing by the sum of the exposure times , omitting overexposed pixels from both sums.store hdr image in exr format encoded in half - float precision and lossless wavelet ( piz ) compression . if the camera direction is not the canonical direction or the measurement run is part of a multiple camera direction set ( secondary routines in figure 1 and protocol 2 ) : convert the single ldr greyscale exposure of the flash - illuminated tracking targets for each incident light direction to a demosaiced , one - quarter scale , ldr color image in exr format.follow protocol 3 to use the flash - illuminated image to projective transform each hdr lamp - illuminated image into the canonical view . 
 rotate the hdr images into the desired orientation -- e.g. in our case a 90 rotation orients the rachis vertically and the feather tip up.crop the hdr images tightly around the circular aperture . masking the targets and metal plate outside the aperture reduces file size by up to 25%.permute the data in the entire set of hdr images to create a set of files , one for each of several blocks in the image , that contain all the directional reflectance values organized by pixel . these directional reflectance cache files are organized to enable quick access to all the directional color measurements at a single pixel position of the 2d projection of the 3d object . 
  using the debug ( document ) mode of dcraw to disable its demosaicing function , convert from raw format to greyscale , 16-bit , linear , pgm format : each dark noise exposure.each exposure of the object at each incident light direction . each exposure of the object at each incident light direction . integrate all low dynamic range ( ldr ) greyscale exposures under gantry lamp illumination into a single high dynamic range ( hdr ) color image for each incident light direction . subtract the corresponding dark noise image from each ldr exposure.demosaic each ldr exposure to yield a one - quarter scale image.white balance each ldr exposure using the color channel multipliers computed in step 1.c.3.merge dark - noise - subtracted ldr exposures into a single hdr image by summing all the values at each pixel position and dividing by the sum of the exposure times , omitting overexposed pixels from both sums.store hdr image in exr format encoded in half - float precision and lossless wavelet ( piz ) compression . 
  subtract the corresponding dark noise image from each ldr exposure . merge dark - noise - subtracted ldr exposures into a single hdr image by summing all the values at each pixel position and dividing by the sum of the exposure times , omitting overexposed pixels from both sums . store hdr image in exr format encoded in half - float precision and lossless wavelet ( piz ) compression . if the camera direction is not the canonical direction or the measurement run is part of a multiple camera direction set ( secondary routines in figure 1 and protocol 2 ) : convert the single ldr greyscale exposure of the flash - illuminated tracking targets for each incident light direction to a demosaiced , one - quarter scale , ldr color image in exr format.follow protocol 3 to use the flash - illuminated image to projective transform each hdr lamp - illuminated image into the canonical view . convert the single ldr greyscale exposure of the flash - illuminated tracking targets for each incident light direction to a demosaiced , one - quarter scale , ldr color image in exr format . follow protocol 3 to use the flash - illuminated image to projective transform each hdr lamp - illuminated image into the canonical view . rotate the hdr images into the desired orientation -- e.g. in our case a 90 rotation orients the rachis vertically and the feather tip up . crop the hdr images tightly around the circular aperture . masking the targets and metal plate outside the aperture reduces file size by up to 25% . permute the data in the entire set of hdr images to create a set of files , one for each of several blocks in the image , that contain all the directional reflectance values organized by pixel . these directional reflectance cache files are organized to enable quick access to all the directional color measurements at a single pixel position of the 2d projection of the 3d object . visualize spatially - varying light scattering across a hierarchy of scale to browse the measurements , use the custom simplebrowser application to interpret the data processed in step 1.e . simplebrowser opens to a window containing the image of the feather illuminated by the first incident lighting direction.on the image of the feather vane , individual pixels or groups of pixels in linear or rectangular arrangements may be selected ( figure 3 ) . a plot window showing reflectance as a function of direction cosines opens adjacent to the image window ( r1 in figure 4).by default , the direction of maximum luminance ( a transmittance direction in a typical feather measurement ) is assigned an exposure of 1 . decrease or increase the exposure in one - half stop ( 2 x ) increments to adjust the exposure of the reflectance color map.cycle the reflectance color map between luminance , rgb , and chromaticity ( see r1 , r2 , and r3 in figure 4 ) . for the following steps use rgb.to rotate the sphere , click on it to enable the trackball interface . drag the interface to cause rotation . to view the reflectance hemisphere , rotate the sphere 180 from its default position to view the transmittance hemisphere ( see t2 in figure 4).for another view of the data , select the polar plot mode to scale the radii of each direction on the unit sphere by their respective luminance values . change the color map of the luminance scaled sphere from rgb to chromaticity ( see p3 , f3 , s3 , a3 in figure 4).the illumination direction of the displayed image is circled in red in the directional scattering plot ( figure 4 ) . click any other incident lighting direction to show the image of the feather illuminated from that direction.decrease or increase the exposure of the image to reveal over and underexposed regions.to investigate reflectance across a hierarchy of scales , restore the plot mode to the unit sphere and the color map to rgb . in review , this plot displays the average directional reflectance from the selected rectangular region on the image.change the selection type from rectangular to linear ( figure 3 ) . this will allow study of the directional reflectance from individual fine - scale structures in the rectangular region.plot the reflectance of the linear average in a new window while maintaining the rectangular average for reference . adjust exposure and set color map to rgb.in the linear average plot , the distal barbules spanned by the linear region are seen to reflect light in directions horizontal ( figure 8) . select one of the illumination directions in the linear plot to display the highly reflective distal barbules in the image on the left.step the line towards the tip of the feather until it reaches the region of the feather where the proximal barbules branch from the adjacent rami . in the linear average plot select one of the directions to display the highly reflective proximal barbules in the image on the left.in the linear plot , observe the fine - scale structures that reflect light in directions horizontal and vertical combine to produce the far - field signal seen in the rectangular plot . 
  to browse the measurements , use the custom simplebrowser application to interpret the data processed in step 1.e . simplebrowser opens to a window containing the image of the feather illuminated by the first incident lighting direction . on the image of the feather vane , individual pixels or groups of pixels in linear or rectangular arrangements may be selected ( figure 3 ) . proceed by selecting a rectangular region of the feather vane for analysis . then , plot the average directional light scattering from the selected region . a plot window showing reflectance as a function of direction cosines opens adjacent to the image window ( r1 in figure 4 ) . by default , the direction of maximum luminance ( a transmittance direction in a typical feather measurement ) is assigned an exposure of 1 . decrease or increase the exposure in one - half stop ( 2 x ) increments to adjust the exposure of the reflectance color map . cycle the reflectance color map between luminance , rgb , and chromaticity ( see r1 , r2 , and r3 in figure 4 ) . for the following steps rotate the sphere 180 from its default position to view the transmittance hemisphere ( see t2 in figure 4 ) . for another view of the data , select the polar plot mode to scale the radii of each direction on the unit sphere by their respective luminance values . change the color map of the luminance scaled sphere from rgb to chromaticity ( see p3 , f3 , s3 , a3 in figure 4 ) . the illumination direction of the displayed image is circled in red in the directional scattering plot ( figure 4 ) . click any other incident lighting direction to show the image of the feather illuminated from that direction . decrease or increase the exposure of the image to reveal over and underexposed regions . to investigate reflectance across a hierarchy of scales , restore the plot mode to the unit sphere and the color map to rgb . in review , this plot displays the average directional reflectance from the selected rectangular region on the image . change the selection type from rectangular to linear ( figure 3 ) this will allow study of the directional reflectance from individual fine - scale structures in the rectangular region . plot the reflectance of the linear average in a new window while maintaining the rectangular average for reference . the distal barbules spanned by the linear region are seen to reflect light in directions horizontal ( figure 8) . select one of the illumination directions in the linear plot to display the highly reflective distal barbules in the image on the left . step the line towards the tip of the feather until it reaches the region of the feather where the proximal barbules branch from the adjacent rami . in the linear average plot select one of the directions to display the highly reflective proximal barbules in the image on the left . in the linear plot , observe the fine - scale structures that reflect light in directions horizontal and vertical combine to produce the far - field signal seen in the rectangular plot . multiple camera views and non - uniform directional sampling allow us to study particular features of the directional reflectance . with the addition of calibration steps 2.a and 2.b , two specific examples graphically illustrated as secondary routines ii.a and ii.b in figure 1 are set forward in steps 2.c and 2.d below . in such cases , the camera direction is altered from its canonical direction ( normal to the surface ) , meaning that the object is photographed from a direction inclined from its surface normal . since images must be mapped into the same coordinate system , we rectify and warp each photograph to match the canonical orientation by referencing the flash - photographed targets surrounding the sample ( figure 9 ) . calibrate camera projection and position : the purpose of these steps are to calculate the camera projection and position used in image transformation . clip a checker - patterned calibration target flat against the mounting plate.capture one image at the canonical camera view ( i.e. { ,}={0,0 } ) and several images at various other camera views spread over a 120 cone centered on the canonical view.load the images into the bouguet toolbox , a matlab camera calibration toolkit . export the intrinsic camera projection matrix ( p ) and the extrinsic camera position matrix ( m ) . the intrinsic camera projection is composed of the focal length and the principal point . the extrinsic camera position is composed primarily of a translation ; it translates the origin of the world to the camera position.solve for the matrix that transforms calibration - target coordinates to gantry turntable coordinates ( x ) , i.e. bouguet space to gantry space.unclip the checker pattern from the metal plate . 
  clip a checker - patterned calibration target flat against the mounting plate . capture one image at the canonical camera view ( i.e. { ,}={0,0 } ) and several images at various other camera views spread over a 120 cone centered on the canonical view . load the images into the bouguet toolbox , a matlab camera calibration toolkit . export the intrinsic camera projection matrix ( p ) and the extrinsic camera position matrix ( m ) . the intrinsic camera projection is composed of the focal length and the principal point . the extrinsic camera position is composed primarily of a translation ; it translates the origin of the world to the camera position . solve for the matrix that transforms calibration - target coordinates to gantry turntable coordinates ( x ) , i.e. bouguet space to gantry space . calibrate target positions and projection offsets : the purpose of these steps is to calculate the offsets between the calibration plane , the target plane , and the sample , and to locate the target positions . rotate the camera in gantry coordinates so that the optical axis is perpendicular to the surface plane , i.e. the canonical frame.capture an image of the ring of targets surrounding the aperture with flash illumination . this is the canonical image for image alignment.process the raw camera output ( protocol outlined in steps 1.e.3.a . and 1.e.4.).mask the region inside and outside the ring target zone , eliminating stray specular highlights that may confuse target recognition , then find the targets in the image.rotate the camera to a grazing angle and capture an image.calculate the canonical camera pose ( mc= m * rc ) and the grazing angle camera pose ( mg= m * rg ) based on the extrinsic camera matrix m in step 2.a.3 . which includes a translation based on the position of the bouguet checker pattern.redefine m by offsetting its translation by the thickness of the paper target - ring . iterate by trial and error ( recalculating m using a different offset for the calibration plane ) until the offset in gantry space between the plane of the bouguet checkerboard and the plane of the ring of targets , i.e. thickness of the paper target - ring , has been solved . verify the offset in each iteration by reprojecting the targets in the grazing angle image onto the targets of the canonical image.redefine m following the procedure of the previous step to reproject the apertured object in the grazing angle image onto the apertured object in the canonical image by trial and error until the offset in gantry space between the plane of the ring of targets and the plane of the apertured object , i.e. thickness of the metal plate , has been solved . rotate the camera in gantry coordinates so that the optical axis is perpendicular to the surface plane , i.e. the canonical frame . and 1.e.4 . ) . mask the region inside and outside the ring target zone , eliminating stray specular highlights that may confuse target recognition , then find the targets in the image . rotate the camera to a grazing angle and capture an image . calculate the canonical camera pose ( mc= m * rc ) and the grazing angle camera pose ( mg= m * rg ) based on the extrinsic camera matrix m in step 2.a.3 . which includes a translation based on the position of the bouguet checker pattern . redefine m by offsetting its translation by the thickness of the paper target - ring . iterate by trial and error ( recalculating m using a different offset for the calibration plane ) until the offset in gantry space between the plane of the bouguet checkerboard and the plane of the ring of targets , i.e. thickness of the paper target - ring , has been solved . verify the offset in each iteration by reprojecting the targets in the grazing angle image onto the targets of the canonical image . redefine m following the procedure of the previous step to reproject the apertured object in the grazing angle image onto the apertured object in the canonical image by trial and error until the offset in gantry space between the plane of the ring of targets and the plane of the apertured object , i.e. thickness of the metal plate , has been solved . measure seven non - uniformly sampled reflectance hemispheres ( secondary routine ii.a in figure 1 ) examine the directional distribution of the reflected light measured from the camera view normal to the surface , i.e. {  , }={0,0 } as described in protocol 1 . resample the reflectance hemisphere to record camera radiance from non - specular directions more sparsely and specular directions more densely.apply the same criteria to sample the reflectance in 6 additional camera directions uniformly distributed over half a hemisphere , i.e. {  , }={30,0 } , { 30,90 } , { 60,0 } , { 60,45 } , { 60,90 } , { 60,135}. predict the specular regions of the 6 additional runs from the viewing direction of each coupled with the reflection angle of the initial run.for each of the 7 non - uniformly sampled hemispheres , acquire and process measurements following the instructions in steps 1.d . above.visually browse the directional reflectance from the same region of the feather in each of the 7 non - uniformly sampled hemispheres , following the instructions in step 1.f . above . arrange the directional reflectance plots for each of the 7 camera directions on a polar coordinate system , where the placement of each plot is based on its camera direction ( see the visual results of routine ii.a in figure 1 ; also figure 5 ) . examine the directional distribution of the reflected light measured from the camera view normal to the surface , i.e. {  , }={0,0 } as described in protocol 1 . resample the reflectance hemisphere to record camera radiance from non - specular directions more sparsely and specular directions more densely . apply the same criteria to sample the reflectance in 6 additional camera directions uniformly distributed over half a hemisphere , i.e. {  , }={30,0 } , { 30,90 } , { 60,0 } , { 60,45 } , { 60,90 } , { 60,135}. predict the specular regions of the 6 additional runs from the viewing direction of each coupled with the reflection angle of the initial run . for each of the 7 non - uniformly sampled hemispheres , visually browse the directional reflectance from the same region of the feather in each of the 7 non - uniformly sampled hemispheres , following the instructions in step 1.f . above . arrange the directional reflectance plots for each of the 7 camera directions on a polar coordinate system , where the placement of each plot is based on its camera direction ( see the visual results of routine ii.a in figure 1 ; also figure 5 ) . measure finely - sampled semicircular paths to acquire detailed information about color change with angle ( secondary routine ii.b in figure 1 ) launch the simplebrowser application and input the processed measurements of the non - uniformly sampled reflectance hemisphere with camera direction { ,}={0,0 } as described in step 2.c.1 . select one pixel in the image , then fit a plane to the 90th percentile of the luminance of the hemispherical reflectance at the selected pixel position.construct a 1d acquisition run which finely samples specular reflectance in the specular plane . generate gantry arm angles in  half - angle increments in the plane defined in the previous step . start with the half - angle equal to 0 and increase the half - angle to 90. for each measurement in the acquisition run , keep the half - vector constant and equal to the surface normal so that each camera direction is located in the specular direction.acquire and process measurements following the instructions in steps 1.d . above.visually browse the 1d directional reflectance following the instructions in step 1.f . , while sampling a very small region ( e.g. 3x3 pixels ) centered on the same pixel used to fit the specular plane in step 2.d.1 . find the direction of peak reflectance , i.e. shading normal . construct 3 additional acquisition runs in the same manner as step 2.d.2 . , but set the half - vector to the shading normal rather than the surface normal . for the 3 additional runs , generate gantry arm angles that lie in planes containing the shading normal but which are rotated 45 , 90 , and 135 with respect to the specular plane defined in step 2.d.1.acquire and process measurements following the instructions in steps 1.d . above.visually browse the 1d directional reflectance following the instructions in step 1.f . , while sampling a very small region ( e.g. 3x3 pixels ) centered on the pixel used to fit the specular plane in step 2.d.1 . export from simplebrowser the average reflected radiance of this very small region.in matlab , plot its chromaticity as a function of half - angle on a chromaticity diagram ( figure 6 ) . plot its hue , chroma , and luminance as a function of the half - angle ( figure 7).construct four more 1d acquisition runs in the same four planes as above , but this time configure the light and camera directions to measure the width and decay of the specular reflectance . set the half - angle between the light and camera to a constant 10. generate gantry arm angles in 1 half - vector increments around the axis orthogonal to the plane . start with a half - vector equal to -80 and increase the half - vector to + 80 , where 0 equals the shading normal . note that not all camera directions are located in the specular direction.acquire , process and export measurements following the instructions in steps 1.d . matlab , plot its chromaticity on a chromaticity diagram as a function of the angle between the half - vector and the shading normal . plot its hue , chroma , and luminance as a function of the angle between the half - vector and the shading normal . launch the simplebrowser application and input the processed measurements of the non - uniformly sampled reflectance hemisphere with camera direction { ,}={0,0 } as described in step 2.c.1 . select one pixel in the image , then fit a plane to the 90th percentile of the luminance of the hemispherical reflectance at the selected pixel position . construct a 1d acquisition run which finely samples specular reflectance in the specular plane . generate gantry arm angles in  half - angle increments in the plane defined in the previous step . start with the half - angle equal to 0 and increase the half - angle to 90. for each measurement in the acquisition run , keep the half - vector constant and equal to the surface normal so that each camera direction is located in the specular direction . while sampling a very small region ( e.g. 3x3 pixels ) centered on the same pixel used to fit the specular plane in step 2.d.1 . find the direction of peak reflectance , i.e. shading normal . construct 3 additional acquisition runs in the same manner as step 2.d.2 . , but set the half - vector to the shading normal rather than the surface normal . for the 3 additional runs , generate gantry arm angles that lie in planes containing the shading normal but which are rotated 45 , 90 , and 135 with respect to the specular plane defined in step 2.d.1 . visually browse the 1d directional reflectance following the instructions in step 1.f . , while sampling a very small region ( e.g. 3x3 pixels ) centered on the pixel used to fit the specular plane in step 2.d.1 . export from simplebrowser the average reflected radiance of this very small region . in matlab , plot its chromaticity as a function of half - angle on a chromaticity diagram ( figure 6 ) . plot its hue , chroma , and luminance as a function of the half - angle ( figure 7 ) . construct four more 1d acquisition runs in the same four planes as above , but this time configure the light and camera directions to measure the width and decay of the specular reflectance . set the half - angle between the light and camera to a constant 10. generate gantry arm angles in 1 half - vector increments around the axis orthogonal to the plane . start with a half - vector equal to -80 and increase the half - vector to + 80 , where 0 equals the shading normal . plot its chromaticity on a chromaticity diagram as a function of the angle between the half - vector and the shading normal . plot its hue , chroma , and luminance as a function of the angle between the half - vector and the shading normal . projective transform each hdr image into the canonical view or the view direction orthogonal to the surface plane . this protocol is accessed by step 1.e.3.b when a measurement run is part of a multiple camera direction set , such as the examples outlined in protocol 2 and graphically illustrated as secondary routines in figure 1 . ( at grazing specular directions the diminished contrast between the white surface of the paper and the black ink can lead to target detection failure . compare the clarity of image a and b in figure 9 . ) load the target image illuminated by camera - mounted flash for a given lamp - camera directional pair ( b in figure 9 ) . roughly transform the target image into the canonical camera frame using the gantry camera matrix m computed in step 2.b.7 . locate the coordinates of the center of each target in the transformed target image ( c in figure 9 ) . match each target in the transformed target image to its reference target in the canonical image by finding the minimum distance between image and reference targets . discard any blurred targets caused by dof at grazing angles ( d in figure 9 ) . solve the 2d projective transform that maps image targets in the canonical frame to canonical - image targets in the same frame . untransform the warped - to - fit targets from the canonical image frame back to the original image frame through the plane of the apertured object ( m in step 2.b.8 . ) rather than the plane of the targets ( m in step 2.b.7 . ) . save the target coordinate pairs that map the apertured object in the target image to the apertured object in the canonical target image . infer a spatial projective transform from saved target coordinate pairs to transform the hdr image into the canonical frame ( e in figure 9 ) . it converts a camera 's proprietary raw - formatted image ( i.e. unprocessed ccd data ) to a standard image format . see http://www.cybercom.net/~dcoffin / dcraw/.   bouguet toolbox is a camera calibration toolbox for matlab developed by jean - yves bouguet . prepare and mount the object to be measured prepare a thin ferrous metal mounting plate with a -inch aperture surrounded by a ring of targets ( as seen in figure 2).prepare the material to be measured . if measuring a feather , groom the barbs to correct for any unzipped or misaligned sections of the pennaceous vane.lay the surface of the object ( obverse face of the feather ) against the back side ( opposite the target ring ) of the plate.center the region of interest over the -inch aperture in the plate.lay a sheet of magnetic film with a 5/8-inch aperture against the back side of the object ( reverse face of the feather ) , thereby pressing the object flat against the plate.align the aperture of the film to the aperture of the plate without shearing the surface . the flattened surface , pinned around the circumference of the circular aperture , yields a planar macro - surface approximately coincident with the plate 's surface . prepare a thin ferrous metal mounting plate with a -inch aperture surrounded by a ring of targets ( as seen in figure 2 ) . if measuring a feather , groom the barbs to correct for any unzipped or misaligned sections of the pennaceous vane . lay the surface of the object ( obverse face of the feather ) against the back side ( opposite the target ring ) of the plate . center the region of interest over the -inch aperture in the plate . lay a sheet of magnetic film with a 5/8-inch aperture against the back side of the object ( reverse face of the feather ) , thereby pressing the object flat against the plate . align the aperture of the film to the aperture of the plate without shearing the surface . the flattened surface , pinned around the circumference of the circular aperture , yields a planar macro - surface approximately coincident with the plate 's surface . configure the gantry locate the center of the circular aperture at the origin of the gantry coordinate system.place a light source on the gantry outer arm . aim and narrowly focus the light at the object , ensuring that the aperture is uniformly illuminated for all light source angles.place a camera on the gantry inner arm . adjust the camera distance and the focal length of the macro lens until the ring of targets fills the width of the sensor.calibrate the rotational movements ( , ) of the camera and lamp arms . calibrate the inclination (  ) with respect to the object 's surface normal so that the camera and the lamp are aligned with the surface normal when  = 0 . calibrate the azimuth (  ) of the camera to the azimuth of the lamp . the absolute azimuthal orientation is not critical since the captured images may be rotated later in the protocol . locate the center of the circular aperture at the origin of the gantry coordinate system . aim and narrowly focus the light at the object , ensuring that the aperture is uniformly illuminated for all light source angles . place a camera on the gantry inner arm . adjust the camera distance and the focal length of the macro lens until the ring of targets fills the width of the sensor . calibrate the inclination (  ) with respect to the object 's surface normal so that the camera and the lamp are aligned with the surface normal when  = 0 . calibrate the azimuth (  ) of the camera to the azimuth of the lamp . the absolute azimuthal orientation is not critical since the captured images may be rotated later in the protocol . configure the camera focus and exposure rotate the camera until the object is viewed at a grazing angle . decrease the f - number to minimize the depth of field ( dof ) , then set the focus plane at the center of the aperture . increase the f - number to increase the dof until the ring of targets surrounding the aperture is in focus . a compromise between diffraction and dof - induced blur for rgb images use a macbeth color checker . for uv - visible - nir measurements use spectralon.photograph the color standard in raw format . calculate the color channel multipliers to white balance the image.find the exposure bracket that spans the dynamic range of the scene under the most extreme viewing and lighting directions.for each exposure time in the bracket , acquire a dark noise image by exposing the sensor with the lens cap on . decrease the f - number to minimize the depth of field ( dof ) , then set the focus plane at the center of the aperture . increase the f - number to increase the dof until the ring of targets surrounding the aperture is in focus . a compromise between diffraction and dof - induced blur may be required . for rgb images use a macbeth color checker . for uv - visible - nir measurements use spectralon . photograph the color standard in raw format . calculate the color channel multipliers to white balance the image . find the exposure bracket that spans the dynamic range of the scene under the most extreme viewing and lighting directions . for each exposure time in the bracket , acquire a dark noise image by exposing the sensor with the lens cap on . acquire measurements from a sparsely sampled sphere of incident directions position the camera axis normal to the surface plane { ,}={0,0}.step the light through of a series of uniformly distributed positions on the sphere , using a coarse sampling ( e.g. less than 500 points).for each incident light direction in the sampling : capture a raw image for each exposure time in the exposure bracket.capture a single image illuminated by the camera mounted flash synchronized to a relatively short exposure time to suppress the gantry lamp illumination.advance to the next incident light direction and repeat . position the camera axis normal to the surface plane { ,}={0,0}. step the light through of a series of uniformly distributed positions on the sphere , using a coarse sampling ( e.g. less than 500 points ) . for each incident light direction in the sampling capture a single image illuminated by the camera mounted flash synchronized to a relatively short exposure time to suppress the gantry lamp illumination . process measurements from sparsely sampled sphere using the debug ( document ) mode of dcraw to disable its demosaicing function , convert from raw format to greyscale , 16-bit , linear , pgm format : each dark noise exposure.each exposure of the object at each incident light direction . integrate all low dynamic range ( ldr ) greyscale exposures under gantry lamp illumination into a single high dynamic range ( hdr ) color image for each incident light direction . subtract the corresponding dark noise image from each ldr exposure.demosaic each ldr exposure to yield a one - quarter scale image.white balance each ldr exposure using the color channel multipliers computed in step 1.c.3.merge dark - noise - subtracted ldr exposures into a single hdr image by summing all the values at each pixel position and dividing by the sum of the exposure times , omitting overexposed pixels from both sums.store hdr image in exr format encoded in half - float precision and lossless wavelet ( piz ) compression . if the camera direction is not the canonical direction or the measurement run is part of a multiple camera direction set ( secondary routines in figure 1 and protocol 2 ) : convert the single ldr greyscale exposure of the flash - illuminated tracking targets for each incident light direction to a demosaiced , one - quarter scale , ldr color image in exr format.follow protocol 3 to use the flash - illuminated image to projective transform each hdr lamp - illuminated image into the canonical view . rotate the hdr images into the desired orientation -- e.g. in our case a 90 rotation orients the rachis vertically and the feather tip up.crop the hdr images tightly around the circular aperture . masking the targets and metal plate outside the aperture reduces file size by up to 25%.permute the data in the entire set of hdr images to create a set of files , one for each of several blocks in the image , that contain all the directional reflectance values organized by pixel . these directional reflectance cache files are organized to enable quick access to all the directional color measurements at a single pixel position of the 2d projection of the 3d object . 
  using the debug ( document ) mode of dcraw to disable its demosaicing function , convert from raw format to greyscale , 16-bit , linear , pgm format : each dark noise exposure.each exposure of the object at each incident light direction . integrate all low dynamic range ( ldr ) greyscale exposures under gantry lamp illumination into a single high dynamic range ( hdr ) color image for each incident light direction . subtract the corresponding dark noise image from each ldr exposure.demosaic each ldr exposure to yield a one - quarter scale image.white balance each ldr exposure using the color channel multipliers computed in step 1.c.3.merge dark - noise - subtracted ldr exposures into a single hdr image by summing all the values at each pixel position and dividing by the sum of the exposure times , omitting overexposed pixels from both sums.store hdr image in exr format encoded in half - float precision and lossless wavelet ( piz ) compression . merge dark - noise - subtracted ldr exposures into a single hdr image by summing all the values at each pixel position and dividing by the sum of the exposure times , omitting overexposed pixels from both sums . store hdr image in exr format encoded in half - float precision and lossless wavelet ( piz ) compression . if the camera direction is not the canonical direction or the measurement run is part of a multiple camera direction set ( secondary routines in figure 1 and protocol 2 ) : convert the single ldr greyscale exposure of the flash - illuminated tracking targets for each incident light direction to a demosaiced , one - quarter scale , ldr color image in exr format.follow protocol 3 to use the flash - illuminated image to projective transform each hdr lamp - illuminated image into the canonical view . convert the single ldr greyscale exposure of the flash - illuminated tracking targets for each incident light direction to a demosaiced , one - quarter scale , ldr color image in exr format . follow protocol 3 to use the flash - illuminated image to projective transform each hdr lamp - illuminated image into the canonical view . rotate the hdr images into the desired orientation -- e.g. in our case a 90 rotation orients the rachis vertically and the feather tip up . crop the hdr images tightly around the circular aperture . masking the targets and metal plate outside the aperture reduces file size by up to 25% . permute the data in the entire set of hdr images to create a set of files , one for each of several blocks in the image , that contain all the directional reflectance values organized by pixel . these directional reflectance cache files are organized to enable quick access to all the directional color measurements at a single pixel position of the 2d projection of the 3d object . visualize spatially - varying light scattering across a hierarchy of scale to browse the measurements , use the custom simplebrowser application to interpret the data processed in step 1.e . simplebrowser opens to a window containing the image of the feather illuminated by the first incident lighting direction.on the image of the feather vane , individual pixels or groups of pixels in linear or rectangular arrangements may be selected ( figure 3 ) . a plot window showing reflectance as a function of direction cosines opens adjacent to the image window ( r1 in figure 4).by default , the direction of maximum luminance ( a transmittance direction in a typical feather measurement ) is assigned an exposure of 1 . decrease or increase the exposure in one - half stop ( 2 x ) increments to adjust the exposure of the reflectance color map.cycle the reflectance color map between luminance , rgb , and chromaticity ( see r1 , r2 , and r3 in figure 4 ) . for the following steps use rgb.to rotate the sphere , click on it to enable the trackball interface . drag the interface to cause rotation . to view the reflectance hemisphere , rotate the sphere 180 from its default position to view the transmittance hemisphere ( see t2 in figure 4).for another view of the data , select the polar plot mode to scale the radii of each direction on the unit sphere by their respective luminance values . change the color map of the luminance scaled sphere from rgb to chromaticity ( see p3 , f3 , s3 , a3 in figure 4).the illumination direction of the displayed image is circled in red in the directional scattering plot ( figure 4 ) . click any other incident lighting direction to show the image of the feather illuminated from that direction.decrease or increase the exposure of the image to reveal over and underexposed regions.to investigate reflectance across a hierarchy of scales , restore the plot mode to the unit sphere and the color map to rgb . in review , this plot displays the average directional reflectance from the selected rectangular region on the image.change the selection type from rectangular to linear ( figure 3 ) . this will allow study of the directional reflectance from individual fine - scale structures in the rectangular region.plot the reflectance of the linear average in a new window while maintaining the rectangular average for reference . adjust exposure and set color map to rgb.in the linear average plot , the distal barbules spanned by the linear region are seen to reflect light in directions horizontal ( figure 8) . select one of the illumination directions in the linear plot to display the highly reflective distal barbules in the image on the left.step the line towards the tip of the feather until it reaches the region of the feather where the proximal barbules branch from the adjacent rami . in the linear average plot the proximal barbules select one of the directions to display the highly reflective proximal barbules in the image on the left.in the linear plot , observe the fine - scale structures that reflect light in directions horizontal and vertical combine to produce the far - field signal seen in the rectangular plot . 
  to browse the measurements , use the custom simplebrowser application to interpret the data processed in step 1.e . simplebrowser opens to a window containing the image of the feather illuminated by the first incident lighting direction . on the image of the feather vane , individual pixels or groups of pixels in linear or rectangular arrangements proceed by selecting a rectangular region of the feather vane for analysis . then , plot the average directional light scattering from the selected region . a plot window showing reflectance as a function of direction cosines opens adjacent to the image window ( r1 in figure 4 ) . by default , the direction of maximum luminance ( a transmittance direction in a typical feather measurement ) is assigned an exposure of 1 . decrease or increase the exposure in one - half stop ( 2 x ) increments to adjust the exposure of the reflectance color map . cycle the reflectance color map between luminance , rgb , and chromaticity ( see r1 , r2 , and r3 in figure 4 ) . for the following steps rotate the sphere 180 from its default position to view the transmittance hemisphere ( see t2 in figure 4 ) . for another view of the data , select the polar plot mode to scale the radii of each direction on the unit sphere by their respective luminance values . change the color map of the luminance scaled sphere from rgb to chromaticity ( see p3 , f3 , s3 , a3 in figure 4 ) . the illumination direction of the displayed image is circled in red in the directional scattering plot ( figure 4 ) . click any other incident lighting direction to show the image of the feather illuminated from that direction . decrease or increase the exposure of the image to reveal over and underexposed regions . to investigate reflectance across a hierarchy of scales , restore the plot mode to the unit sphere and the color map to rgb . in review , this plot displays the average directional reflectance from the selected rectangular region on the image . change the selection type from rectangular to linear ( figure 3 ) this will allow study of the directional reflectance from individual fine - scale structures in the rectangular region . plot the reflectance of the linear average in a new window while maintaining the rectangular average for reference . the distal barbules spanned by the linear region are seen to reflect light in directions horizontal ( figure 8) . select one of the illumination directions in the linear plot to display the highly reflective distal barbules in the image on the left . step the line towards the tip of the feather until it reaches the region of the feather where the proximal barbules branch from the adjacent rami . in the linear average plot select one of the directions to display the highly reflective proximal barbules in the image on the left . in the linear plot , observe the fine - scale structures that reflect light in directions horizontal and vertical combine to produce the far - field signal seen in the rectangular plot . multiple camera views and non - uniform directional sampling allow us to study particular features of the directional reflectance . with the addition of calibration steps 2.a and 2.b , two specific examples graphically illustrated as secondary routines ii.a and ii.b in figure 1 are set forward in steps 2.c and 2.d below . in such cases , the camera direction is altered from its canonical direction ( normal to the surface ) , meaning that the object is photographed from a direction inclined from its surface normal . since images must be mapped into the same coordinate system , we rectify and warp each photograph to match the canonical orientation by referencing the flash - photographed targets surrounding the sample ( figure 9 ) . calibrate camera projection and position : the purpose of these steps are to calculate the camera projection and position used in image transformation . clip a checker - patterned calibration target flat against the mounting plate.capture one image at the canonical camera view ( i.e. { ,}={0,0 } ) and several images at various other camera views spread over a 120 cone centered on the canonical view.load the images into the bouguet toolbox , a matlab camera calibration toolkit . export the intrinsic camera projection matrix ( p ) and the extrinsic camera position matrix ( m ) . the intrinsic camera projection is composed of the focal length and the principal point . the extrinsic camera position is composed primarily of a translation ; it translates the origin of the world to the camera position.solve for the matrix that transforms calibration - target coordinates to gantry turntable coordinates ( x ) , i.e. bouguet space to gantry space.unclip the checker pattern from the metal plate . 
  clip a checker - patterned calibration target flat against the mounting plate . capture one image at the canonical camera view ( i.e. { ,}={0,0 } ) and several images at various other camera views spread over a 120 cone centered on the canonical view . export the intrinsic camera projection matrix ( p ) and the extrinsic camera position matrix ( m ) . the intrinsic camera projection is composed of the focal length and the principal point . the extrinsic camera position is composed primarily of a translation ; it translates the origin of the world to the camera position . solve for the matrix that transforms calibration - target coordinates to gantry turntable coordinates ( x ) , i.e. bouguet space to gantry space . calibrate target positions and projection offsets : the purpose of these steps is to calculate the offsets between the calibration plane , the target plane , and the sample , and to locate the target positions . rotate the camera in gantry coordinates so that the optical axis is perpendicular to the surface plane , i.e. the canonical frame.capture an image of the ring of targets surrounding the aperture with flash illumination . this is the canonical image for image alignment.process the raw camera output ( protocol outlined in steps 1.e.3.a . and 1.e.4.).mask the region inside and outside the ring target zone , eliminating stray specular highlights that may confuse target recognition , then find the targets in the image.rotate the camera to a grazing angle and capture an image.calculate the canonical camera pose ( mc= m * rc ) and the grazing angle camera pose ( mg= m * rg ) based on the extrinsic camera matrix m in step 2.a.3 . which includes a translation based on the position of the bouguet checker pattern.redefine m by offsetting its translation by the thickness of the paper target - ring . iterate by trial and error ( recalculating m using a different offset for the calibration plane ) until the offset in gantry space between the plane of the bouguet checkerboard and the plane of the ring of targets , i.e. thickness of the paper target - ring , has been solved . verify the offset in each iteration by reprojecting the targets in the grazing angle image onto the targets of the canonical image.redefine m following the procedure of the previous step to reproject the apertured object in the grazing angle image onto the apertured object in the canonical image by trial and error until the offset in gantry space between the plane of the ring of targets and the plane of the apertured object , i.e. thickness of the metal plate , has been solved . rotate the camera in gantry coordinates so that the optical axis is perpendicular to the surface plane , i.e. the canonical frame . and 1.e.4 . ) . mask the region inside and outside the ring target zone , eliminating stray specular highlights that may confuse target recognition , then find the targets in the image . rotate the camera to a grazing angle and capture an image . calculate the canonical camera pose ( mc= m * rc ) and the grazing angle camera pose ( mg= m * rg ) based on the extrinsic camera matrix m in step 2.a.3 . which includes a translation based on the position of the bouguet checker pattern . redefine m by offsetting its translation by the thickness of the paper target - ring . iterate by trial and error ( recalculating m using a different offset for the calibration plane ) until the offset in gantry space between the plane of the bouguet checkerboard and the plane of the ring of targets , i.e. thickness of the paper target - ring , has been solved . verify the offset in each iteration by reprojecting the targets in the grazing angle image onto the targets of the canonical image . redefine m following the procedure of the previous step to reproject the apertured object in the grazing angle image onto the apertured object in the canonical image by trial and error until the offset in gantry space between the plane of the ring of targets and the plane of the apertured object , i.e. thickness of the metal plate , has been solved . measure seven non - uniformly sampled reflectance hemispheres ( secondary routine ii.a in figure 1 ) examine the directional distribution of the reflected light measured from the camera view normal to the surface , i.e. {  , }={0,0 } as described in protocol 1 . resample the reflectance hemisphere to record camera radiance from non - specular directions more sparsely and specular directions more densely.apply the same criteria to sample the reflectance in 6 additional camera directions uniformly distributed over half a hemisphere , i.e. {  , }={30,0 } , { 30,90 } , { 60,0 } , { 60,45 } , { 60,90 } , { 60,135}. predict the specular regions of the 6 additional runs from the viewing direction of each coupled with the reflection angle of the initial run.for each of the 7 non - uniformly sampled hemispheres , acquire and process measurements following the instructions in steps 1.d . above.visually browse the directional reflectance from the same region of the feather in each of the 7 non - uniformly sampled hemispheres , following the instructions in step 1.f . above . arrange the directional reflectance plots for each of the 7 camera directions on a polar coordinate system , where the placement of each plot is based on its camera direction ( see the visual results of routine ii.a in figure 1 ; also figure 5 ) . examine the directional distribution of the reflected light measured from the camera view normal to the surface , i.e. {  , }={0,0 } as described in protocol 1 . resample the reflectance hemisphere to record camera radiance from non - specular directions more sparsely and specular directions more densely . apply the same criteria to sample the reflectance in 6 additional camera directions uniformly distributed over half a hemisphere , i.e. {  , }={30,0 } , { 30,90 } , { 60,0 } , { 60,45 } , { 60,90 } , { 60,135}. predict the specular regions of the 6 additional runs from the viewing direction of each coupled with the reflection angle of the initial run . for each of the 7 non - uniformly sampled hemispheres , visually browse the directional reflectance from the same region of the feather in each of the 7 non - uniformly sampled hemispheres , following the instructions in step 1.f . above . arrange the directional reflectance plots for each of the 7 camera directions on a polar coordinate system , where the placement of each plot is based on its camera direction ( see the visual results of routine ii.a in figure 1 ; also figure 5 ) . measure finely - sampled semicircular paths to acquire detailed information about color change with angle ( secondary routine ii.b in figure 1 ) launch the simplebrowser application and input the processed measurements of the non - uniformly sampled reflectance hemisphere with camera direction { ,}={0,0 } as described in step 2.c.1 . select one pixel in the image , then fit a plane to the 90th percentile of the luminance of the hemispherical reflectance at the selected pixel position.construct a 1d acquisition run which finely samples specular reflectance in the specular plane . generate gantry arm angles in  half - angle increments in the plane defined in the previous step . start with the half - angle equal to 0 and increase the half - angle to 90. for each measurement in the acquisition run , keep the half - vector constant and equal to the surface normal so that each camera direction is located in the specular direction.acquire and process measurements following the instructions in steps 1.d . and 1.e . above.visually browse the 1d directional reflectance following the instructions in step 1.f . , while sampling a very small region ( e.g. 3x3 pixels ) centered on the same pixel used to fit the specular plane in step 2.d.1 . find the direction of peak reflectance , i.e. shading normal . construct 3 additional acquisition runs in the same manner as step 2.d.2 . , but set the half - vector to the shading normal rather than the surface normal . for the 3 additional runs , generate gantry arm angles that lie in planes containing the shading normal but which are rotated 45 , 90 , and 135 with respect to the specular plane defined in step 2.d.1.acquire and process measurements following the instructions in steps 1.d . above.visually browse the 1d directional reflectance following the instructions in step 1.f . , while sampling a very small region ( e.g. 3x3 pixels ) centered on the pixel used to fit the specular plane in step 2.d.1 . export from simplebrowser the average reflected radiance of this very small region.in matlab , plot its chromaticity as a function of half - angle on a chromaticity diagram ( figure 6 ) . plot its hue , chroma , and luminance as a function of the half - angle ( figure 7).construct four more 1d acquisition runs in the same four planes as above , but this time configure the light and camera directions to measure the width and decay of the specular reflectance . set the half - angle between the light and camera to a constant 10. generate gantry arm angles in 1 half - vector increments around the axis orthogonal to the plane . start with a half - vector equal to -80 and increase the half - vector to + 80 , where 0 equals the shading normal . note that not all camera directions are located in the specular direction.acquire , process and export measurements following the instructions in steps 1.d . matlab , plot its chromaticity on a chromaticity diagram as a function of the angle between the half - vector and the shading normal . plot its hue , chroma , and luminance as a function of the angle between the half - vector and the shading normal . launch the simplebrowser application and input the processed measurements of the non - uniformly sampled reflectance hemisphere with camera direction { ,}={0,0 } as described in step 2.c.1 . select one pixel in the image , then fit a plane to the 90th percentile of the luminance of the hemispherical reflectance at the selected pixel position . construct a 1d acquisition run which finely samples specular reflectance in the specular plane . generate gantry arm angles in  half - angle increments in the plane defined in the previous step . start with the half - angle equal to 0 and increase the half - angle to 90. for each measurement in the acquisition run , keep the half - vector constant and equal to the surface normal so that each camera direction is located in the specular direction . above . visually browse the 1d directional reflectance following the instructions in step 1.f . , while sampling a very small region ( e.g. 3x3 pixels ) centered on the same pixel used to fit the specular plane in step 2.d.1 . find the direction of peak reflectance , i.e. shading normal . construct 3 additional acquisition runs in the same manner as step 2.d.2 . , but set the half - vector to the shading normal rather than the surface normal . for the 3 additional runs , generate gantry arm angles that lie in planes containing the shading normal but which are rotated 45 , 90 , and 135 with respect to the specular plane defined in step 2.d.1 . above . visually browse the 1d directional reflectance following the instructions in step 1.f . , while sampling a very small region ( e.g. 3x3 pixels ) centered on the pixel used to fit the specular plane in step 2.d.1 . export from simplebrowser the average reflected radiance of this very small region . in matlab , plot its chromaticity as a function of half - angle on a chromaticity diagram ( figure 6 ) . plot its hue , chroma , and luminance as a function of the half - angle ( figure 7 ) . construct four more 1d acquisition runs in the same four planes as above , but this time configure the light and camera directions to measure the width and decay of the specular reflectance . set the half - angle between the light and camera to a constant 10. generate gantry arm angles in 1 half - vector increments around the axis orthogonal to the plane . start with a half - vector equal to -80 and increase the half - vector to + 80 , where 0 equals the shading normal . acquire , process and export measurements following the instructions in steps 1.d . and 1.e . , plot its chromaticity on a chromaticity diagram as a function of the angle between the half - vector and the shading normal . plot its hue , chroma , and luminance as a function of the angle between the half - vector and the shading normal . projective transform each hdr image into the canonical view or the view direction orthogonal to the surface plane . this protocol is accessed by step 1.e.3.b when a measurement run is part of a multiple camera direction set , such as the examples outlined in protocol 2 and graphically illustrated as secondary routines in figure 1 . ( at grazing specular directions the diminished contrast between the white surface of the paper and the black ink can lead to target detection failure . compare the clarity of image a and b in figure 9 . ) load the target image illuminated by camera - mounted flash for a given lamp - camera directional pair ( b in figure 9 ) . roughly transform the target image into the canonical camera frame using the gantry camera matrix m computed in step 2.b.7 . locate the coordinates of the center of each target in the transformed target image ( c in figure 9 ) . match each target in the transformed target image to its reference target in the canonical image by finding the minimum distance between image and reference targets . discard any blurred targets caused by dof at grazing angles ( d in figure 9 ) . solve the 2d projective transform that maps image targets in the canonical frame to canonical - image targets in the same frame . untransform the warped - to - fit targets from the canonical image frame back to the original image frame through the plane of the apertured object ( m in step 2.b.8 . ) rather than the plane of the targets ( m in step 2.b.7 . ) . save the target coordinate pairs that map the apertured object in the target image to the apertured object in the canonical target image . infer a spatial projective transform from saved target coordinate pairs to transform the hdr image into the canonical frame ( e in figure 9 ) . it converts a camera 's proprietary raw - formatted image ( i.e. unprocessed ccd data ) to a standard image format . see http://www.cybercom.net/~dcoffin / dcraw/.   bouguet toolbox is a camera calibration toolbox for matlab developed by jean - yves bouguet . the primary measurement of our protocol ( routine i in figure 1 ) fixed the camera direction normal to the surface and only moved the light . since light scattering adheres to the principle of reciprocity , the result is the same whether we hold the camera constant while moving the light over the hemisphere or vice versa . when we fix either the camera or the light , the complete 4-dimensional direction set is undersampled . a fuller picture of the scattering behavior is observed when , unlike the primary measurement , both light and camera are moved away from the surface normal and in a multiplicity of directions . ideally , we could measure light scattering from many camera directions , even as many as the number of incident light directions , to yield a symmetrical data set . in practice , we can obtain sufficient information about different viewing positions by moving the camera a few times assuming 180 rotational symmetry about the surface normal . during the secondary measurement phase , we acquired measurements from 7 viewing directions distributed over the hemisphere and within 60 of the zenith ( routine ii.a in figure 1 ) . in the figures of this paper , we show representative data measured from a feather of lamprotornis purpureus ( purple glossy starling ) , the reflectance of which is iridescent , glossy , and anisotropic ( figure 5 ) . in each of the 7 viewing directions , the directions form a narrow band orthogonally oriented to the central axis of the feather ( see feather image in figure 4 ) . the iridescence color shift is subtle ( bluish - green at normal incidence and greenish - blue at grazing incidence ) when the feather is viewed normal to its surface as seen in the { 0,0 } rgb plot of figure 5 . as the viewing angle approaches grazing , the angles between the viewing direction and the grazing incident directions are maximized , leading to a more striking color shift ( bluish - green at 0 and magenta at 240 between incident and viewing directions ) as seen in the { 60,0 } rgb plot in figure 5 . we can afford to step the light and camera at much finer angular resolution when we restrict the movements to 1 dimension . figure 6 shows the chromaticity of the reflectance of l. purpureus plumage as a function of the angle between the incident and viewing directions , where the incident and viewing directions are in the plane containing the specular band , which is perpendicular to the longitudinal axis of the distal barbule . as the iridescent color arcs through chromaticity space , the hue shifts from bluish - green to purple . spatial variation in the directional reflectance is visible where different ( x , y ) coordinates of the integument correspond to different milli - scale structures . in the case of l. purpureus only one structure -- the distal barbule -- is visible over most of the area . by contrast , in c. cupreus , three milli - scale structures -- the rami , distal barbules , and proximal barbules -- are clearly distinguished in the data ; we can observe that reflectance from the feather is oriented with respect to the longitudinal axis of each structure ( figure 8) . this schematic overview depicts two mounting methods , the spherical gantry coordinate system , types of acquisition sampling and their respective results.click here to view larger figure . the flattened feather is visible through an aperture in a metal plate surrounded by a ring of targets . a spherical gantry can be posed to measure light scattering from a feather at multiple incident lighting and viewing directions . average directional scattering may be computed from a point , line or rectangular region of feather vane . example of directional scattering plotting functions ( r*=reflectance , t*=transmittance , p*=top , f*=front , s*=side , a*=arbitrary ) and color schemes ( * 1=luminance , * 2=rgb , * 3=chromaticity).click here to view larger figure . figure 5 . the luminance ( top ) and rgb color ( bottom ) of the hemispherical reflectance in direction cosine space as viewed from the ( elevation angle , azimuth angle ) coordinate pairs : { 0,0 } , { 30,0 } , { 30,90 } , { 60,0 } , { 60,45 } , { 60,90 } , and { 60,135}. the reflectance is averaged from a 2525 pixel rectangular region of the lateral vane of a tertial l. purpureus ( purple glossy starling ) feather . chromaticity of the reflectance as a function of the half - angle between the incident lighting and viewing directions : cie 1976 uniform chromaticity scales ( usc ) with magnified region.click here to view larger figure . reflectance as a function of the angle between the incident lighting and viewing directions , in - plane with ( red ) and perpendicular to ( shaded ) the longitudinal axis of the distal barbule : ( a ) dominant wavelength , ( b ) percent chroma , ( c ) percent luminance . average directional reflectance of distal barbules and proximal barbules between two adjacent rami of the c. cupreus ( african emerald cuckoo ) . ( a ) non - rectified image illuminated by gantry lamp , ( b ) non - rectified image illuminated by flash on camera , ( c ) filtered target candidates on affine - transformed , flash - illuminated image , ( d ) acceptably sharp targets within depth of field , ( e ) rectified lamp - illuminated image , ( f ) rotated feather tip up , cropped and masked.click here to view larger figure . though the performance and function of many pigmentary and structural colorations are well recognized , the morphology of many integuments is so complex that their structural detail and function are poorly understood . integuments have developed specializations that vary spatially over the surface of the organism to differentially reflect light directionally toward the viewer . directionality has received attention primarily in the study of iridescence due to its color shift with change of incident and viewing angle , and research into iridescence of biological integument has garnered primarily 1d and some 2d measurements . but generalized 6d measurements have not been routine in the study of integuments , iridescent or otherwise , and the literature on organismal color phenotypes is constrained by the lack of directional color data of the type our method provides . the feather is an especially rich integumentary material comprising arrangements of milli - scale structure of the barb : rami , distal barbules , and proximal barbules . the small scale of the elements and their complex arrangements make it difficult to discern the light scattering performance of the individual elements . our protocol successfully isolated milli - scale structure from the influence of macro - scale geometry . by characterizing the functional consequences of the directional expression of milli - scale structures to the far - field signature of the feather , we enabled inquiry into their adaptive consequences . other combinations could be used , but some ( e.g. all high ) lead to unworkably long measurement times . attention must be focused where it is important for the particular phenomena being studied . in choosing to employ an rgb camera with a bayer filter mosaic the rgb camera could be replaced and our protocol adapted to measure the relative color stimulus of any organism , e.g. sensitivity in the uv spectrum is needed to measure avian tetra - chromatic color . we demonstrated our protocol with tertial wing feathers since they are colorful and easily flattened against a reference plate . unfortunately , the aperture of the metal plate revealed only a fraction of the feather surface . if we could simultaneously measure the 3d shape of the feather surface while measuring its reflectance , we could avoid mechanically flattening the feather and instead measure the entire feather in its natural , unflattened state . interactive , specialized , integrated tools for visualizing data provide substantial benefit to scientists exploring and interpreting large data volumes . the greater the integration and interactivity , the easier connections in the data are observed . in our software , a user can interactively plot average directional scattering as a function of surface position ( figure 4 ) . further development of our software could integrate other plotting functions ( figures 6 , 7 ) to extend the interactive experience .
light interacts with an organism 's integument on a variety of spatial scales . 
 for example in an iridescent bird : nano - scale structures produce color ; the milli - scale structure of barbs and barbules largely determines the directional pattern of reflected light ; and through the macro - scale spatial structure of overlapping , curved feathers , these directional effects create the visual texture . 
 milli - scale and macro - scale effects determine where on the organism 's body , and from what viewpoints and under what illumination , the iridescent colors are seen . 
 thus , the highly directional flash of brilliant color from the iridescent throat of a hummingbird is inadequately explained by its nano - scale structure alone and questions remain . from a given observation point , which milli - scale elements of the feather are oriented to reflect strongly ? 
 do some species produce broader " windows " for observation of iridescence than others ? 
 these and similar questions may be asked about any organisms that have evolved a particular surface appearance for signaling , camouflage , or other reasons.in order to study the directional patterns of light scattering from feathers , and their relationship to the bird 's milli - scale morphology , we developed a protocol for measuring light scattered from biological materials using many high - resolution photographs taken with varying illumination and viewing directions . 
 since we measure scattered light as a function of direction , we can observe the characteristic features in the directional distribution of light scattered from that particular feather , and because barbs and barbules are resolved in our images , we can clearly attribute the directional features to these different milli - scale structures . keeping the specimen intact preserves the gross - scale scattering behavior seen in nature . 
 the method described here presents a generalized protocol for analyzing spatially- and directionally - varying light scattering from complex biological materials at multiple structural scales .