# Biospeckle Laser Tool Library

## Table of Contents

- 1 Citations
- 2 Installation
  - 2.1 Method 1: Online - Only in OCTAVE
  - 2.2 Method 2: Offline - Only in OCTAVE
  - 2.3 Method 3: Offline - In MATLAB or OCTAVE
- 3 Using the BSLTL package
  - 3.1 Example code of installation method 1 and 2 - Getting the AVD value of line 240
  - 3.2 Example code of installation method 3 - Getting the AVD value of column 100
  - 3.3 More code examples
- 4 Contributing to the package
  - 4.1 Contributing from mailing list
  - 4.2 Contributing through a patch
- 5 Copyright
- 6 Versions
- 7 BSLTL project group
- 8 Support or Contact
- Index

Next: Citations, Up: (dir) [Contents][Index]

# Introduction

The BSLTL package is a free collection of OCTAVE/MATLAB routines for working with the biospeckle laser technique.(version 1.3.1).

Implemented technics:

- Graphical methods: Fujii, GD, Std, Mean, Contrast, PTD, MHI, Kurtosis, Skewness, etc.
- Numerical methods: AVD, IM, NCOM, THSP, RVD, Corr, etc.
- Filtering
- Quality test
- etc

Next: Installation, Previous: Top, Up: Top [Contents][Index]

## 1 Citations

To cite the BSLTL package in publications use:

    Roberto Alves Braga Júnior, Fernando Pujaico Rivera and Junio Moreira (2016).
    BSLTL: Biospeckle Laser Tool Library.
    URL http://www.nongnu.org/bsltl/

A BibTeX entry for LaTeX users is:

    @misc{BSLTL1,
        author    = {Braga J\'unior, Roberto Alves and
                     Pujaico Rivera, Fernando and
                     Moreira, Junio},
        title     = {{BSLTL:} Biospeckle Laser Tool Library},
        year      = {2016},
        url       = {http://www.nongnu.org/bsltl/}
    }

We have invested a lot of time and effort in creating BSLTL package, please cite it when using it. See also ‘citation pkgname’ for citing other Octave package with pkgname name.

Next: Using the BSLTL package, Previous: Citations, Up: Top [Contents][Index]

## 2 Installation

### 2.1 Method 1: Online - Only in OCTAVE

The next OCTAVE code, install the last version of BSLTL package directly from octave-forge website in the default install directory.

    pkg install -forge -auto bsltl

With this method the package is configured for be loaded automatically when OCTAVE start.

### 2.2 Method 2: Offline - Only in OCTAVE

If the BSLTL package (bsltl-1.3.1.tar.gz) was downloaded in the directory: /download_path The next OCTAVE code, install the BSLTL package, in the directory: ~/lib/octmat

    pkg prefix ~/lib/octmat
    pkg install -auto /download_path/bsltl-1.3.1.tar.gz

With this method the package is configured for be loaded automatically when OCTAVE start.

### 2.3 Method 3: Offline - In MATLAB or OCTAVE

If the BSLTL package (bsltl-1.3.1.zip or bsltl-1.3.1.tar.gz) was uncompressed in the directory `'/home/user/lib/octmat/bsltl'`. For that this package can be used by a source file, it needs add the next code in the top of source file.

    BSLTL_DIR='/home/user/lib/octmat/bsltl';
    addpath(genpath(BSLTL_DIR));

The function genpath generates a list with the directories and sub directories. The function addpath add directories to OCTAVE system path.

In this method we install (add to Octave system path) the BSLTL package each time that we call our source files.

Next: Contributing to the package, Previous: Installation, Up: Top [Contents][Index]

## 3 Using the BSLTL package

### 3.1 Example code of installation method 1 and 2 - Getting the AVD value of line 240

The next code load 129 images from the directory pointed by the variable `IMAGES_DIR`; the images are called `'img001.bmp'`, `'img002.bmp'`, ..., `'img128.bmp'` and `'img129.bmp'`. The images are joined in a 3D matrix called `DATA`.

    IMAGES_DIR = '/home/user/data/speckle/test1';
    DATA = datapack(IMAGES_DIR,'img%03d',1,129,'bmp');

    THSP = thsp(DATA,'line',240);   % Getting the time history speckle pattern.
    COM  = coom(THSP);              % Getting the co-occurrence matrix.
    AVD  = avd(COM);                % Getting the AVD value.

Finally are calculated the time history speckle pattern (of pixels in the line number 240 of `DATA`),the co-occurrence matrix and the AVD value, and your values are stored in the variables `THSP`, `COM` and `AVD` respectively.

### 3.2 Example code of installation method 3 - Getting the AVD value of column 100

The next code load to octave enviroment all the code functions located in the address pointed by the variable `BSLTL_DIR`, including subdirectories.

Later the code load 129 images from the directory pointed by the variable `IMAGES_DIR`; the images are called `'img1.bmp'`, `'img2.bmp'`, ..., `'img128.bmp'` and `'img129.bmp'`. The images are joined in a 3D matrix called `DATA`.

    BSLTL_DIR = '/home/user/lib/octmat/bsltl';
    addpath(genpath(BSLTL_DIR));

    IMAGES_DIR = '/home/user/data/speckle/test1';
    DATA = datapack(IMAGES_DIR,'img%d',1,129,'bmp');

    THSP = thsp(DATA,'column',100); % Getting the time history speckle pattern.
    COM  = coom(THSP);              % Getting the co-occurrence matrix.
    AVD  = avd(COM);                % Getting the AVD value.

Finally are calculated the time history speckle pattern (of pixels in the column number 100 of `DATA`), the co-occurrence matrix and the AVD value, and your values are stored in the variables `THSP`, `COM` and `AVD` respectively.

### 3.3 More code examples

Many code examples can be found in the examples page of BSLTL library.

Next: Copyright, Previous: Using the BSLTL package, Up: Top [Contents][Index]

## 4 Contributing to the package

In the case that you want to include a new function in the library, submissions will only be accepted when they have the source code documented and they are accompanied by a tutorial (all these should be below General Public License or any compatible). The tutorial can be made with Latex, Texinfo, Markdown, or any support that uses plain text.

### 4.1 Contributing from mailing list

To contribute to the BSLTL package using your email account, you can send your proposal to the mailing list

### 4.2 Contributing through a patch

To contribute to the BSLTL package through a patch:

- Clone the package; making a local copy of BSLTL source repository;

      git clone http://git.savannah.gnu.org/r/bsltl.git

      cd bsltl

- Make your changes in the source code;
- Commit the changeset into your local repository;

      git add *

      git commit -m "Here, you describe the modification made."

- Create the patch; export the last changeset (commit) to a diff file;

      git format-patch -1 -o ../

- Submit it to the patch tracker.

Next: Versions, Previous: Contributing to the package, Up: Top [Contents][Index]

## 5 Copyright

    Copyright (c) 2016 BSLTL project group.

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
    USA.

Next: BSLTL project group, Previous: Copyright, Up: Top [Contents][Index]

## 6 Versions

The increment in the version number has a meaning. To a version number with the format ’va.b.c’ (by example: v1.3.1).

- An increment in ’c’ indicates a modification or correction in the code.
- An increment in ’b’ indicates that at least a new function was added in the code.
- An increment in ’c’ is reserved to great modifications in the code.

Next: Support or Contact, Previous: Versions, Up: Top [Contents][Index]

## 7 BSLTL project group

- Roberto Alves Braga Júnior robertobraga@deg.ufla.br
- Fernando Pujaico Rivera fernando.pujaico.rivera@gmail.com
- Junio Moreira juniomoreira@iftm.edu.br

Next: Index, Previous: BSLTL project group, Up: Top [Contents][Index]

## 8 Support or Contact

Having trouble with the package? Check out our documentation or contact support.

Please, also visit the Home page of BSLTL project.

Previous: Support or Contact, Up: Top [Contents][Index]

## Index

Jump to: | C M

| Index Entry |  | Section
C |  |
| Citations as bibtex: |  | Citations
| Citations as plain: |  | Citations
M |  |
| Method 1: |  | Installation
| Method 1: |  | Using the BSLTL package
| Method 2: |  | Installation
| Method 2: |  | Using the BSLTL package
| Method 3: |  | Installation
| Method 3: |  | Using the BSLTL package

Jump to: | C M