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


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

  Absolute Value of the Differences (AVD) method. This function implements
  the modification proposed by BRAGA, R.A. et al. [1] that is a modification
  of the Inertia Moment (IM) index.
  The AVD index can be implemented using:

  $Y\approx E[|i-j|]$
  $Y2\approx E[|i-j|^2]$
  $Y3\approx E[|i-j|^2] - E[|i-j|]^2$

  TYPE 1: The normalized co-occurrence matrix (COM) proposed by 
          CARDOSO, R.R. et al. [2]. The AVD first moment: $Y$.
  TYPE 2: The CARDOSO, R.R. et al. [2] COM normalization with quadratic AVD  
          The AVD second moment: $Y2$.
  TYPE 3: The AVD center second moment: $Y3$.
  TYPE 4: The normalized co-occurrence matrix (COM) proposed by 
          ARIZAGA, R. et al. [3] (Other pseudo first moment): $Y4$.

  References:
  [1]  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.
  [2]  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.
  [3]  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.

  After starting the main routine just type the following command at the
  prompt:
           [Y] = avd(COM);
        [Y Y2] = avd(COM,2);
  [Y Y2 Y3 Y4] = avd(COM,2,3,4);
  [Y Y4 Y3 Y2] = avd(COM,4,3,2);

  Input:
  COM  is a 2D matrix, with 256 lines and 256 columns, that represents the 
       Co-Occurrence Matrix of a THSP matrix. The element COM(a,b) in the 
       co-occurrence matrix represents the quantity of times that in two 
       successive columns, of THSP matrix, the intensity values jump from 
       a-1 to b-1.
  TYPE [Optional] can be used many options. When it is used
       the function returns an additional result in the same position.
       If TYPE is equal to 2, the function also returns the AVD second moment, using 
       CARDOSO[2] COM normalization with ARIZAGA[3] value difference.
       If TYPE is equal to 3, the function also returns the AVD center second moment. 
       If TYPE is equal to 4, the function also returns the AVD with ARIZAGA[3] 
       COM normalization.

  Output:
  Y     is the value of AVD first moment [1].

  Ytype If TYPE is equal to 2, the function also returns the AVD second moment, using 
        CARDOSO[2] COM normalization with ARIZAGA[3] value difference.
        If TYPE is equal to 3, the function also returns the AVD center second moment. 
        If TYPE is equal to 4, the function also returns the AVD with ARIZAGA[3] COM normalization.


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




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

  Absolute Value of the Differences (AVD) method.



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


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

  This function creates the Co-occurrence matrix (COM)[1]. Also known as GLCM 
  (gray-level co-occurrence matrices), GLCH (gray-level co-occurrence histograms) 
  or spatial dependence matrix. 

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

  After starting the main routine just type the following command at the
  prompt:
  C = coom(THSP);
  
  Input:
  THSP is an integer 2D matrix that represents the time history speckle pattern (THSP). 
	This matrix can be obtained using the function THSP. It is necessary that the
	THSP matrix only have values between 0 and 255, the function does not 
	verify. The function limits the values outside this interval.

  Output:
  C    is a 2D matrix, with 256 lines and 256 columns, that represents the 
       Co-Occurrence Matrix of a THSP matrix. The element C(a,b) in the C 
       co-occurrence matrix represents the quantity of times that, in two 
       successive columns of a THSP matrix, the intensity values changed from 
       a-1 to b-1.


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




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

  This function creates the Co-occurrence matrix (COM)[1].



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


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

  This function implements the Inertia Moment (IM) method  [1]. 
  This method can be used with different normalizations over the co-occurrence 
  matrix. Thus, they can be:

  $Y\approx E[(i-j)^2]$ 

  TYPE 1: The function uses the normalized co-occurrence matrix (COM) proposed by 
          CARDOSO, R.R. et al. [2]: $Y$.
  TYPE 2: The function uses the normalized co-occurrence matrix (COM) proposed by 
          ARIZAGA, R. et al. [1]: $Y2$.

  References:
  [1]  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.
  [2]  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] = inertiamoment(COM);
        [Y Y2] = inertiamoment(COM,2);

  Input:
  COM  is a 2D matrix, with 256 lines and 256 columns, that represents the 
       Co-Occurrence Matrix of THSP matrix. The element COM(a,b) in the 
       co-occurrence matrix represents the quantity of times that, in two 
       successive columns of a THSP matrix, the intensity values jump of 
       a-1 to b-1.
  TYPE [Optional] the function returns an additional 
       result in the same position in the output.
       If TYPE is equal to 2, the function also returns the inertia moment
       with ARIZAGA [2] co-occurrence normalization.

  Output:
  Y     is the value of inertia moment [1] with CARDOSO normalization [2].

  Ytype if TYPE is equal to 2, the function also returns the inertia moment. 
        ARIZAGA [2] co-occurrence normalization.


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




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

  This function implements the Inertia Moment (IM) method  [1].



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


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

  Numerical analysis of the modified AVD method [1]. This function implements
  the the numerical method [1] that is a modification
  over absolute difference (Fujii method)  [2]

  $Y \approx E[\frac{|i-j|}{i+j}]$
  $Y2\approx E[\frac{(i-j)^2}{(i+j)^2}]$  

  References:
  [1] Renan O Reis; Roberto Braga; Hector J Rabal.
      Light intensity independence during dynamic laser speckle analysis
  [2] FUJII, H. et al. Evaluation of blood flow by laser speckle image sensing. 
      Applied Optics, New York, v. 26, n. 24, p. 5321-5325, 1987.

  After starting the main routine just type the following command at the
  prompt:
           [Y] = numad(COM);
        [Y Y2] = numad(COM,2);

  Input:
  COM  is a 2D matrix, with 256 lines and 256 columns, that represents the 
       Co-Occurrence Matrix of THSP matrix. The element COM(a,b), in the 
       co-occurrence matrix, represents the quantity of times that, in two 
       successive columns of a THSP matrix, the intensity values jump of 
       a-1 to b-1.
  TYPE [Optional] the function returns an additional result.
       If TYPE is equal to 2, the function also returns the AD second moment. 

  Output:
  Y    is the value of the modified AVD first moment [1].

  Y2   if TYPE is equal to 2, the function also returns the AVD second moment. 


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




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

  Numerical analysis of the modified AVD method [1].



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


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

  Regular Value of the Differences (RVD) method [1]. This function implements the
  modification proposed by <Fernando Pujaico Rivera> over the AVD [2].
  This method can be combined with:

  $Y \approx E[(i-j)]$
  $Y2\approx E[(i-j)^2]$
  $Y3\approx E[(i-j)^2] -E[(i-j)]^2$

  TYPE 1: The normalized co-occurrence matrix (COM) proposed by 
          CARDOSO, R.R. et al. [2]. The RVD first moment: $Y$.
  TYPE 2: The CARDOSO, R.R. et al. [2] COM normalization with quadratic RVD  
          The RVD second moment: $Y2$.
  TYPE 3: The RVD center second moment: $Y3$.
  TYPE 4: The normalized co-occurrence matrix (COM) proposed by 
          ARIZAGA, R. et al. [3]: $Y4$.

  References:
  [1]  Pujaico Rivera Fernando. Paper coming soon.
  [2]  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.
  [3]  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.

  After starting the main routine just type the following command at the
  prompt:
           [Y] = rvd(COM);
        [Y Y2] = rvd(COM,2);
  [Y Y2 Y3 Y4] = rvd(COM,2,3,4);
  [Y Y4 Y3 Y2] = rvd(COM,4,3,2);

  Input:
  COM  is a 2D matrix, with 256 lines and 256 columns, that represents the 
       Co-Occurrence Matrix of a THSP matrix. The element COM(a,b), in the 
       co-occurrence matrix, represents the quantity of times that, in two 
       successive columns of a THSP matrix, the intensity values jump of 
       a-1 to b-1.
  TYPE [Optional] the function returns an additional result in the same position.
       If TYPE is equal to 2, the function also returns the RVD second moment, using the 
       CARDOSO[2] COM normalization with ARIZAGA[3] value difference.
       If TYPE is equal to 3, the function also returns the RVD center second moment. 
       If TYPE is equal to 4, the function also returns the RVD with ARIZAGA[3] 
       COM normalization.

  Output:
  Y    is the value of RVD first moment [?].

  X    If TYPE is equal to 2, the function also returns the RVD second moment, using the 
       CARDOSO[2] COM normalization with ARIZAGA[3] value difference.
       If TYPE is equal to 3, the function also returns the RVD center second moment. 
       If TYPE is equal to 4, the function also returns the RVD with ARIZAGA[3] COM normalization.


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




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

  Regular Value of the Differences (RVD) method [1].





