# doc-cache created by Octave 7.3.0
# name: cache
# type: cell
# rows: 3
# columns: 3
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
homogeneity


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3158

  Homogeneity of spatial variability [1]. This function divides the
  data pack (DATA) in spatial regions of WLines lines and WColumns 
  columns, in these regions are calculated activity indicators selected 
  with the variable Type, over these values are calculate the homogeneities.
  Known an activity indicator value A(i,j) in the window (i,j), the homogeneity 
  value H(i,j) is calculated as

  $Z=\{A(i,j-1), A(i-1,j), A(i,j), A(i+1,j), A(i,j+1)\}$

  $H(i,j) = \frac{StandardDeviation\{Z\}}{Mean\{Z\}}$

  * Is used the populational case of standard deviation.

  References:
  [1]  Cardoso, R.R. ; Braga, R.A. ; Rabal, H.J. Alternative protocols on 
       dynamic speckle laser analysis. SPIE 8413, V International Conference 
       on Speckle Metrology. 2012

  [2]  BRAGA, R.A. et al. Evaluation of activity through dynamic laser speckle 
       using the absolute value of the differences, Optics Communications, v. 284, 
       n. 2, p. 646-650, 2011.

  [3] R. Nothdurft and G. Yao, 'Imaging obscured subsurface inhomogeneity using 
      laser speckle,' Opt. Express  13, 10034-10039 (2005). 

  [4]  ARIZAGA, R. et al. Speckle time evolution characterization by the 
       co-occurrence matrix analysis. Optics and Laser Technology, Amsterdam, 
       v. 31, n. 2, p. 163-169, 1999.

  [5]  BRAGA R.A. CARDOSO, R.R. Enhancement of the robustness on dynamic speckle 
       laser numerical analysis. Optics and Lasers in Engineering, 
       63(Complete):19-24, 2014.

  After starting the main routine just type the following command at the
  prompt:
  [Y X] = homogeneity(DATA,WLines,WColumns,Type);
  
  Input:
  DATA     is the speckle datapack. Where DATA is a 3D matrix created grouping NTIMES 
           intensity matrices with NLIN lines and NCOL columns. When N=size(DATA), then
           N(1,1) represents NLIN and
           N(1,2) represents NCOL and
           N(1,3) represents NTIMES.
  WLines   is the number of lines in the analysed window.
  WColumns is the number of columns in the analysed window.
  Type     If Type is 1, it is used as activity indicator the AVD [2] technique.
           If Type is 2, it is used as activity indicator the Temporal S. Std. Deviation [3].
           In other case it is used as activity indicator the inertia moment [4] technique.
           In the cases of AVD and/or inertia moment indicators, it is used the Cardoso[5] normalization
           over co-occurrence matrix. In all cases, the activity indicators
           were calculated as a mean over all points of each window, not only over a line.

  Output:
  Y        is the homogeneity percentages in the analysed windows [1].
           The homogeneity value H(i,j) is represented as a window (matrix) 
           with WLines x WColumns pixels inside Y. 

  X        is the activity indicator value in the analysed windows. The activity 
           indicator value A(i,j) is represented as a window (matrix) with 
           WLines x WColumns  pixels inside X.


  For help, bug reports and feature suggestions, please visit:
  http://www.nongnu.org/bsltl




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43

  Homogeneity of spatial variability [1].



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
satdark


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1797

  Saturation and sub-exposition of light[1]. Here it is tested if  
  an analysed windows of the image is saturated with light or is dark.

  [1]  Cardoso, R.R. ; Braga, R.A. ; Rabal, H.J. Alternative protocols on 
       dynamic speckle laser analysis. SPIE 8413, V International Conference 
       on Speckle Metrology. 2012

  After starting the main routine just type the following command at the
  prompt:
  [F S D] = satdark(DATAFRAME, WLines, WColumns, MaxDark, MinSat, P);
  % Analysis window of 6x5 pixels and 
  % 50 percent of pixels in the window to declare it dark or saturated.
  [F S D] = satdark(DATAFRAME,      6,        5, MaxDark, MinSat, 50);  

  Input:
  DATAFRAME is the image under analysis.
  WLines    is the number of lines in the analysed window.
  WColumns  is the number of columns in the analysed window.
  MaxDark   is the maximum gray-scale level that is considered as dark.
  MinSat    is the minimum gray-scale level that is considered as saturated.
  P         is the percentage of pixels in a window to declare it dark or saturated.

  Output:
  F         is an image with dark or saturated areas in analysed windows. 
            The dark windows are filled with 0, the saturated windows are 
            filled with 255. To consider a window as dark or saturated, 
            it should overcome a P percentage of pixels in analysis window.
  S         is a matrix with the same size of F, this matrix has ones in
            regions with saturated windows and zeros in other regions.
  D         is a matrix with the same size of F, this matrix has ones in
            regions with dark windows and zeros in other regions.


  For help, bug reports and feature suggestions, please visit:
  http://www.nongnu.org/bsltl




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46

  Saturation and sub-exposition of light[1].



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
sscont


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1309

  Spatial speckle contrast window [1] method. This consist in test the contrast 
  of speckles in a window region of an image. The image DATAFRAME is
  divided into windows of WLines pixel lines and WColumns pixel columns.
  The contrast in a window Cw is calculated as the quotient between spatial
  standard deviation (populational) and spatial mean in the window.
  All the pixels in the analysed window are filled with the contrast value.

  Cw=(Spatial Deviation)/(Spatial Mean)
  
  [1]  Cardoso, R.R. ; Braga, R.A. ; Rabal, H.J. Alternative protocols on 
       dynamic speckle laser analysis. SPIE 8413, V International Conference 
       on Speckle Metrology. 2012

  After starting the main routine just type the following command at the
  prompt:
  [C,mC] = sscont(DATAFRAME,WLines,WColumns);
  % Analysis window of 6x5 pixels.
  [C,mC] = sscont(DATAFRAME,6,5);  
  
  Input:
  DATAFRAME is the image under analysis.
  WLines    is the number of lines in the analysed window.
  WColumns  is the number of columns in the analysed window.

  Output:
  C         is the spatial speckle contrast window image.
  mC        is the mean value of the contrast in all windows.


  For help, bug reports and feature suggestions, please visit:
  http://www.nongnu.org/bsltl




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47

  Spatial speckle contrast window [1] method.





