[Pkg-octave-commit] [octave-bsltl] 01/02: Imported Upstream version 1.0.2

Rafael Laboissière rlaboiss-guest at moszumanska.debian.org
Mon Sep 19 21:18:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

rlaboiss-guest pushed a commit to branch master
in repository octave-bsltl.

commit 2fe71d76ae6663fe393423694b2acefac821c165
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Sat Aug 20 16:18:59 2016 -0300

    Imported Upstream version 1.0.2
---
 CITATION                                   |  21 +
 COPYING                                    | 674 +++++++++++++++++++++++++++++
 DESCRIPTION                                |  14 +
 INDEX                                      |  16 +
 NEWS                                       |  29 ++
 README.md                                  |   5 +
 TASKS                                      |   3 +
 doc/manual.css                             |  84 ++++
 doc/overview.html                          | 483 +++++++++++++++++++++
 doc/overview.init                          |  20 +
 doc/overview.texi                          | 337 +++++++++++++++
 inst/__bsltl_package_register__.m          |  46 ++
 inst/mfiles/Contents.m                     |  90 ++++
 inst/mfiles/data/datacut.m                 | 105 +++++
 inst/mfiles/data/datapack.m                | 223 ++++++++++
 inst/mfiles/data/datapack_to_gif.m         | 105 +++++
 inst/mfiles/extras/hbpmf.m                 |  69 +++
 inst/mfiles/extras/mwindowing.m            |  91 ++++
 inst/mfiles/extras/threshold2d.m           |  73 ++++
 inst/mfiles/filter/datapack_conv.m         |  90 ++++
 inst/mfiles/filter/firfilterbank.m         | 186 ++++++++
 inst/mfiles/filter/firsynthesisbank.m      | 159 +++++++
 inst/mfiles/filter/firsynthesispath.m      | 173 ++++++++
 inst/mfiles/filter/freqmod.m               |  70 +++
 inst/mfiles/filter/qmfmaker.m              |  90 ++++
 inst/mfiles/filter/qmfmirror.m             |  85 ++++
 inst/mfiles/graphic/fujii.m                | 104 +++++
 inst/mfiles/graphic/gendiff.m              | 114 +++++
 inst/mfiles/graphic/moments/graphavd.m     |  99 +++++
 inst/mfiles/graphic/moments/graphim.m      | 100 +++++
 inst/mfiles/graphic/moments/graphptd.m     | 101 +++++
 inst/mfiles/graphic/moments/graphrvd.m     |  98 +++++
 inst/mfiles/graphic/others/graphmhi.m      | 105 +++++
 inst/mfiles/graphic/stats/graphkurt.m      | 134 ++++++
 inst/mfiles/graphic/stats/graphskew.m      | 140 ++++++
 inst/mfiles/graphic/stdcont.m              | 134 ++++++
 inst/mfiles/numerical/avd.m                | 173 ++++++++
 inst/mfiles/numerical/coom.m               |  94 ++++
 inst/mfiles/numerical/extras/stscorr.m     | 106 +++++
 inst/mfiles/numerical/extras/thsp2corr.m   | 122 ++++++
 inst/mfiles/numerical/inertiamoment.m      | 132 ++++++
 inst/mfiles/numerical/numad.m              | 114 +++++
 inst/mfiles/numerical/pmf/pmfad.m          |  82 ++++
 inst/mfiles/numerical/pmf/pmfrd.m          |  87 ++++
 inst/mfiles/numerical/rvd.m                | 167 +++++++
 inst/mfiles/numerical/thsp/thsp.m          |  92 ++++
 inst/mfiles/numerical/thsp/thsp_gaussian.m | 186 ++++++++
 inst/mfiles/numerical/thsp/thsp_line.m     |  73 ++++
 inst/mfiles/numerical/thsp/thsp_random.m   | 114 +++++
 inst/mfiles/quality/homogeneity.m          | 182 ++++++++
 inst/mfiles/quality/satdark.m              | 199 +++++++++
 inst/mfiles/quality/sscont.m               | 104 +++++
 inst/mfiles/undocumented/datapack_to_bmp.m | 117 +++++
 53 files changed, 6614 insertions(+)

diff --git a/CITATION b/CITATION
new file mode 100644
index 0000000..1d94b84
--- /dev/null
+++ b/CITATION
@@ -0,0 +1,21 @@
+To cite thee BSLTL package in publications use:
+
+	Roberto Alves Braga Júnior, Fernando Pujaico Rivera and Junio Moreira (2015).
+	BSLTL: Biospeckle Laser Tool Library.
+	URL http://www.nongnu.org/bsltl/
+
+A BibTeX entry for LaTeX users is:
+
+	@misc{BSLTL,
+		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.
+
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 3 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, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/DESCRIPTION b/DESCRIPTION
new file mode 100644
index 0000000..2d42f8c
--- /dev/null
+++ b/DESCRIPTION
@@ -0,0 +1,14 @@
+Name: bsltl
+Version: 1.0.2
+Date: 2016-07-22
+Author: Roberto Alves Braga Junior <robertobraga at deg.ufla.br>, Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>, Junio Moreira <juniomoreira at iftm.edu.br>
+Maintainer: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+Title: Biospeckle Laser Tool Library.
+Description: The BSLTL package is a free collection of OCTAVE/MATLAB routines for working with the biospeckle laser technique.
+Categories: Biospeckle Laser, Dynamic Laser Speckle,  Processing Images
+#Problems: Nothing that I know
+Url: http://www.nongnu.org/bsltl/
+Depends: octave (>= 3.8.0), control (>= 2.2.3), signal (>= 1.2.2)
+License: GPLv3+
+#SystemRequirements: 
+#BuildRequires:
diff --git a/INDEX b/INDEX
new file mode 100644
index 0000000..a83c886
--- /dev/null
+++ b/INDEX
@@ -0,0 +1,16 @@
+# Functions in the library
+BSLTL >> Bio-Speckle Laser Tool Library
+Data
+ datacut datapack datapack_to_gif
+Extras
+ hbpmf mwindowing threshold2d
+Filter
+ datapack_conv firfilterbank firsynthesisbank firsynthesispath freqmod qmfmaker qmfmirror
+Graphic
+ fujii gendiff stdcont graphavd graphim graphptd graphrvd graphmhi graphkurt graphskew
+Numerical
+ avd coom inertiamoment numad rvd stscorr thsp2corr pmfad pmfrd thsp thsp_gaussian thsp_line thsp_random
+Quality
+ homogeneity satdark sscont
+WithoutTutorial
+ datapack_to_bmp
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..fa90dab
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,29 @@
+===============================================================================
+bsltl-1.0.2   Release Date: 2016-07-14   Release Manager: Fernando Pujaico R.
+===============================================================================
+** datapack.m fixed error when the address does not initialize with '~/'.
+
+===============================================================================
+bsltl-1.0.1   Release Date: 2016-06-30   Release Manager: Fernando Pujaico R.
+===============================================================================
+** datapack_to_bmp.m function change the type of the return value. Now is 
+   returned a datapack struct with the fields: {file, format, init, dir, nel}.
+** datapack.m function now expand images dir with '~/', with the home path value.
+** thsp_gaussian.m function got a new characteristic in your fourth parameter.
+   Now is accepted, optionally, a graphic handler as fourth parameter; also
+   can be selected the color of the plotted points.
+** Added texinfo overview and consequently overview.html.
+** datapack_to_bmp.m function got a new characteristic in your second parameter.
+   this is equal to improve in datapack.m. 
+** datapack.m function got a new characteristic in your second parameter.
+   Now is possible load images with the format: 
+   img0001.bmp, img0002.bmp, ..., img0009.bmp, img0010.bmp, img0011.bmp. 
+   using the command: DATA=datapack(IMAGESDIR,'img%04d',1,12,'bmp');
+** thsp.m function got a new characteristic in your second parameter.
+   Now R=1 and R='line' select a line in the datapack. Similarly, 
+   R=2 and R='column' select a column in the datapack.
+
+===============================================================================
+bsltl-1.0.0   Release Date: 2016-04-22   Release Manager: Fernando Pujaico R.
+===============================================================================
+ ** Begin - version 1.0.0 of BSLTL.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..76bd4f4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+# BioSpeckle Laser Tool Library (BSLTL)
+
+To informations about the package, please visit the [doc/overview.html](./doc/overview.html) file.
+
+
diff --git a/TASKS b/TASKS
new file mode 100644
index 0000000..b3c200e
--- /dev/null
+++ b/TASKS
@@ -0,0 +1,3 @@
+* We need to eliminate dependecy of fir1(ORDER,CUTOFF) in the function qmfmaker.m
+* We need to create datapack_from_bmp.
+* We need work with the datapack struct and not with the 3D marix.
diff --git a/doc/manual.css b/doc/manual.css
new file mode 100644
index 0000000..3a919bb
--- /dev/null
+++ b/doc/manual.css
@@ -0,0 +1,84 @@
+/*
+This is part of the GNU Octave Interval Package Manual.
+Copyright 2015-2016 Oliver Heimlich.
+See the file manual.texinfo for copying conditions.
+*/
+
+/*
+Modified by: Fernando Pujaico Rivera 04 may 2016.
+*/
+
+ at font-face { font-family: 'Roboto Condensed'; src: local('Roboto Condensed'),
+	url('https://fontlibrary.org/assets/fonts/roboto-condensed/71405335c70332d94afd24ae4f06c9b2/4b8b4b377e8cb358cf886d13c7bb287c/RobotoCondensedBold.ttf') format('truetype');
+	font-weight: bold; font-style: normal; }
+ at font-face { font-family: 'Roboto Condensed'; src: local('Roboto Condensed'),
+	url('https://fontlibrary.org/assets/fonts/roboto-condensed/71405335c70332d94afd24ae4f06c9b2/9b1d05d1b332e5b95ad86e71ca8404fb/RobotoCondensedBoldItalic.ttf') format('truetype');
+    	font-weight: bold; font-style: italic; }
+ at font-face { font-family: 'Roboto Condensed'; src: local('Roboto Condensed'),
+	url('https://fontlibrary.org/assets/fonts/roboto-condensed/71405335c70332d94afd24ae4f06c9b2/d02fffb6890e4f28023dd149916d1b8a/RobotoCondensedItalic.ttf') format('truetype');
+	font-weight: normal; font-style: italic; }
+ at font-face { font-family: 'Roboto Condensed'; src: local('Roboto Condensed'),
+	url('https://fontlibrary.org/assets/fonts/roboto-condensed/71405335c70332d94afd24ae4f06c9b2/b0b1845ecce8ab6a503971e808a8409c/RobotoCondensedRegular.ttf') format('truetype');
+	font-weight: normal; font-style: normal; }
+ at font-face { font-family: 'Fantasque Sans Mono'; src: local('Fantasque Sans Mono'),
+	url('https://fontlibrary.org/assets/fonts/fantasque-sans-mono/db52617ba875d08cbd8e080ca3d9f756/b145f0e884b2da8f1b112d26e7cefd3d/FantasqueSansMonoBold.ttf') format('truetype');
+	font-weight: bold; font-style: normal; }
+ at font-face { font-family: 'Fantasque Sans Mono'; src: local('Fantasque Sans Mono'),
+	url('https://fontlibrary.org/assets/fonts/fantasque-sans-mono/db52617ba875d08cbd8e080ca3d9f756/49319cbd53210c32099631ac89b1e70a/FantasqueSansMonoBoldItalic.ttf') format('truetype');
+	font-weight: bold; font-style: italic; }
+ at font-face { font-family: 'Fantasque Sans Mono'; src: local('Fantasque Sans Mono'),
+	url('https://fontlibrary.org/assets/fonts/fantasque-sans-mono/db52617ba875d08cbd8e080ca3d9f756/5c07fe59e84e4594ffa87ae1a72b130d/FantasqueSansMonoItalic.ttf') format('truetype');
+	font-weight: normal; font-style: italic; }
+ at font-face { font-family: 'Fantasque Sans Mono'; src: local('Fantasque Sans Mono'),
+	url('https://fontlibrary.org/assets/fonts/fantasque-sans-mono/db52617ba875d08cbd8e080ca3d9f756/cc70dc22137e92aaef169e1de38a6ec7/FantasqueSansMonoRegular.ttf') format('truetype');
+	font-weight: normal; font-style: normal; }
+body > * { max-width: 42em; }
+div.header { max-width: 100%; }
+hr { margin-left: 0; border: none; border-top: 3px double #657b83; }
+div.header, div.float-caption { color: #657b83; }
+ul, ol { max-width: 39.5em; padding-left: 2.5em; }
+div.example, div.display, div.indentedblock, div.smalldisplay, div.lisp, div.smallindentedblock, div.smallexample, div.smalllisp { max-width: 38.8em; margin-left: 3.2em; }
+blockquote { margin-left: 3.2em; margin-right: 3.2em; max-width: 35.6em; }
+body, span.roman { font-family: 'Roboto Condensed', sans-serif; }
+body { padding-left: 7.5em; padding-right: 7.5em; }
+h1, h2, h3, h4, h5, pre.menu-comment { font-family: 'Roboto Condensed', serif; text-align: left !important; }
+div.float table, img { margin-left: auto; margin-right: auto; }
+div.float table { width: 38em; }
+div.float table, div.float th { border-collapse: collapse; border-top: 1px solid black; border-bottom: 1px solid black; }
+div.float th, div.float td { padding: 0.5em; }
+dd > p:first-child { margin-top: 0; }
+a { color: #268bd2; }
+a:visited { color: #d33682; }
+div.alpha-list + ol { list-style-type:lower-alpha; }
+div.zero-list + ol { counter-reset: item -1; }
+div.zero-list + ol > li { display:block; }
+div.zero-list + ol > li:before { content: counter(item) "."; counter-increment: item; display:inline-block; margin-left: -2.5em; min-width: 2em; margin-right: 0.2em; text-align: right; }
+.sf-logo { display:block; text-align: center; padding-top: 2em; padding-bottom: 2em; }
+code, samp { font-family: 'Fantasque Sans Mono', monospace; padding: 0 0.1em; font-style: italic; }
+pre.example, pre.smallexample, pre.verbatim { font-family: 'Fantasque Sans Mono', monospace; }
+pre.example { background-color: #fdf6e3; color: #657b83; padding: 0.5em; }
+pre.verbatim { background-color: #000000; color: #00FF00; padding: 0.5em; }
+.example { margin-bottom: 1em; }
+.example + .example { margin-top: -0.5em }
+
+
+.top-nav {
+  float: right;
+  font-weight: bold;
+  padding: 8px;
+  margin: 5px;
+}
+
+.top-nav a {
+  color: white;
+  text-decoration: none;
+  text-shadow: 1px 1px 5px black;
+  padding: 8px;
+}
+
+.darkblock {
+  border-radius: 10px; -webkit-border-radius: 10px; -moz-border-radius: 10px;
+  background: #111E0D; background: #111E0D -webkit-gradient(linear, left top, left 280%, from(#111E0D), to(#7C896F));
+  color: white;
+}
+
diff --git a/doc/overview.html b/doc/overview.html
new file mode 100644
index 0000000..0a14fcd
--- /dev/null
+++ b/doc/overview.html
@@ -0,0 +1,483 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- The BSLTL package is a free collection of OCTAVE/MATLAB routines for working with the
+biospeckle laser technique.
+Copyright (C) 2016 Fernando Pujaico Rivera -->
+<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
+<head>
+<title>Biospeckle Laser Tool Library</title>
+
+<meta name="description" content="Biospeckle Laser Tool Library">
+<meta name="keywords" content="Biospeckle Laser Tool Library">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="makeinfo">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link href="#Top" rel="start" title="Top">
+<link href="#Index" rel="index" title="Index">
+<link href="#SEC_Contents" rel="contents" title="Table of Contents">
+<link href="dir.html#Top" rel="up" title="(dir)">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.indentedblock {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
+div.smalllisp {margin-left: 3.2em}
+kbd {font-style:oblique}
+pre.display {font-family: inherit}
+pre.format {font-family: inherit}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: inherit; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: inherit; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.nocodebreak {white-space:nowrap}
+span.nolinebreak {white-space:nowrap}
+span.roman {font-family:serif; font-weight:normal}
+span.sansserif {font-family:sans-serif; font-weight:normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+<link rel="stylesheet" type="text/css" href="manual.css">
+
+
+  <STYLE> #jsMath_Warning {display: none} </STYLE>
+  <SCRIPT SRC="../../jsMath/easy/load.js"></SCRIPT>
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+
+	<div class="top-nav darkblock">
+       	<a href="http://www.nongnu.org/bsltl/index.html">Home</a> |
+       	<a href="http://www.nongnu.org/bsltl/documentation.html">Documentation</a> |
+       	<a href="overview.html">Overview</a> |
+       	<a href="http://www.nongnu.org/bsltl/examples.html">Examples</a> |
+       	<a href="http://www.nongnu.org/bsltl/code.html" target="_blank">Code</a> |
+       	<a href="http://www.nongnu.org/bsltl/download.html" target="_blank">Download</a> |
+       	<a href="https://savannah.nongnu.org/projects/bsltl/" target="_blank">Develop</a>
+	</div><br>
+
+<h1 class="settitle" align="center">Biospeckle Laser Tool Library</h1>
+
+
+
+
+
+
+<a name="SEC_Contents"></a>
+<h2 class="contents-heading">Table of Contents</h2>
+
+<div class="contents">
+
+<ul class="no-bullet">
+  <li><a name="toc-Citations-1" href="#Citations">1 Citations</a></li>
+  <li><a name="toc-Dependencies-1" href="#Dependencies">2 Dependencies</a>
+  <ul class="no-bullet">
+    <li><a name="toc-Octave-dependencies" href="#Octave-dependencies">2.1 Octave dependencies</a></li>
+  </ul></li>
+  <li><a name="toc-Installtion" href="#Installation">3 Installtion</a>
+  <ul class="no-bullet">
+    <li><a name="toc-Method-1_003a-Online-_002d-Only-in-OCTAVE" href="#Method-1_003a-Online-_002d-Only-in-OCTAVE">3.1 Method 1: Online - Only in OCTAVE</a></li>
+    <li><a name="toc-Method-2_003a-Offline-_002d-Only-in-OCTAVE" href="#Method-2_003a-Offline-_002d-Only-in-OCTAVE">3.2 Method 2: Offline - Only in OCTAVE</a></li>
+    <li><a name="toc-Method-3_003a-Offline-_002d-In-MATLAB-or-OCTAVE" href="#Method-3_003a-Offline-_002d-In-MATLAB-or-OCTAVE">3.3 Method 3: Offline - In MATLAB or OCTAVE</a></li>
+  </ul></li>
+  <li><a name="toc-Using-the-BSLTL-package-1" href="#Using-the-BSLTL-package">4 Using the BSLTL package</a>
+  <ul class="no-bullet">
+    <li><a name="toc-Example-code-of-method-1-and-2-_002d-Getting-the-AVD-value-of-line-240" href="#Example-code-of-method-1-and-2-_002d-Getting-the-AVD-value-of-line-240">4.1 Example code of method 1 and 2 - Getting the AVD value of line 240</a></li>
+    <li><a name="toc-Example-code-of-method-3-_002d-Getting-the-AVD-value-of-column-100" href="#Example-code-of-method-3-_002d-Getting-the-AVD-value-of-column-100">4.2 Example code of method 3 - Getting the AVD value of column 100</a></li>
+  </ul></li>
+  <li><a name="toc-Contributing-to-the-package-1" href="#Contributing-to-the-package">5 Contributing to the package</a>
+  <ul class="no-bullet">
+    <li><a name="toc-Contributing-from-mailing-list" href="#Contributing-from-mailing-list">5.1 Contributing from mailing list</a></li>
+    <li><a name="toc-Contributing-through-a-patch" href="#Contributing-through-a-patch">5.2 Contributing through a patch</a></li>
+  </ul></li>
+  <li><a name="toc-Copyright-1" href="#Copyright">6 Copyright</a></li>
+  <li><a name="toc-Versions-1" href="#Versions">7 Versions</a></li>
+  <li><a name="toc-BSLTL-project-group-1" href="#BSLTL-project-group">8 BSLTL project group</a></li>
+  <li><a name="toc-Support-or-Contact-1" href="#Support-or-Contact">9 Support or Contact</a></li>
+  <li><a name="toc-Index-1" href="#Index">Index</a></li>
+</ul>
+</div>
+
+
+<a name="Top"></a>
+<div class="header">
+<p>
+Next: <a href="#Citations" accesskey="n" rel="next">Citations</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Introduction"></a>
+<h1 class="top">Introduction</h1>
+
+<p>The BSLTL package is a free collection of OCTAVE/MATLAB routines for working with the
+biospeckle laser technique.(version 1.0.2).
+</p>
+<p>Implemented technics:
+</p><ul>
+<li> Graphical methods: Fujii, GD, Std, Mean, Contrast, PTD, MHI, Kurtosis, Skewness, etc.
+
+</li><li> Numerical methods: AVD, IM, NCOM, THSP, RVD, Corr, etc.
+</li><li> Filtering
+</li><li> Quality test
+</li><li> etc
+</li></ul>
+
+
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">• <a href="#Citations" accesskey="1">Citations</a>:</td><td>  </td><td align="left" valign="top">How to cite the library.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Dependencies" accesskey="2">Dependencies</a>:</td><td>  </td><td align="left" valign="top">About the dependencies of the BSLTL package.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Installation" accesskey="3">Installation</a>:</td><td>  </td><td align="left" valign="top">About the intallation methods.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Using-the-BSLTL-package" accesskey="4">Using the BSLTL package</a>:</td><td>  </td><td align="left" valign="top">About as to use the BSLTL package.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Contributing-to-the-package" accesskey="5">Contributing to the package</a>:</td><td>  </td><td align="left" valign="top">How contribute with the package
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Copyright" accesskey="6">Copyright</a>:</td><td>  </td><td align="left" valign="top">Legal notice copyright.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Versions" accesskey="7">Versions</a>:</td><td>  </td><td align="left" valign="top">Labeling criteria.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#BSLTL-project-group" accesskey="8">BSLTL project group</a>:</td><td>  </td><td align="left" valign="top">Authors.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Support-or-Contact" accesskey="9">Support or Contact</a>:</td><td>  </td><td align="left" valign="top">Links of interest.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Index">Index</a>:</td><td>  </td><td align="left" valign="top">Complete index.
+</td></tr>
+</table>
+
+<hr>
+<a name="Citations"></a>
+<div class="header">
+<p>
+Next: <a href="#Dependencies" accesskey="n" rel="next">Dependencies</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Citations-1"></a>
+<h2 class="chapter">1 Citations</h2>
+
+
+<p>To cite the BSLTL package in publications use:
+</p><div class="display">
+<pre class="display">Roberto Alves Braga Júnior, Fernando Pujaico Rivera and Junio Moreira (2016).
+BSLTL: Biospeckle Laser Tool Library.
+URL http://www.nongnu.org/bsltl/
+</pre></div>
+<a name="index-Citations-as-plain"></a>
+
+<p>A BibTeX entry for LaTeX users is:
+</p><pre class="verbatim">@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/}
+}
+</pre><a name="index-Citations-as-bibtex"></a>
+<p>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.
+</p>
+<hr>
+<a name="Dependencies"></a>
+<div class="header">
+<p>
+Next: <a href="#Installation" accesskey="n" rel="next">Installation</a>, Previous: <a href="#Citations" accesskey="p" rel="prev">Citations</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Dependencies-1"></a>
+<h2 class="chapter">2 Dependencies</h2>
+
+<a name="Octave-dependencies"></a>
+<h3 class="section">2.1 Octave dependencies</h3>
+<p>Some functions inside BSLTL package depend of signal package;
+at the same time the signal package depends of control package.
+Thus, we recommend install first the control package and later the signal package
+with the following online OCTAVE installation commands.
+</p><div class="example">
+<pre class="example">pkg install -forge control
+pkg install -forge signal
+</pre></div>
+<a name="index-Dependencies-of-Octave_002dForge"></a>
+
+<p>In operating systems based in GNU/Linux can be necessary install first the 
+library <code>liboctave-dev</code> in the system, given that OCTAVE uses this library 
+to install the control package. The next code is an example (Ubuntu/Debian) of 
+command install in the system.
+</p>
+<pre class="verbatim">sudo apt-get install liboctave-dev
+</pre><a name="index-Dependencies-of-GNU_002dLinux"></a>
+
+<hr>
+<a name="Installation"></a>
+<div class="header">
+<p>
+Next: <a href="#Using-the-BSLTL-package" accesskey="n" rel="next">Using the BSLTL package</a>, Previous: <a href="#Dependencies" accesskey="p" rel="prev">Dependencies</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Installtion"></a>
+<h2 class="chapter">3 Installtion</h2>
+
+
+<a name="Method-1_003a-Online-_002d-Only-in-OCTAVE"></a>
+<h3 class="section">3.1 Method 1: Online - Only in OCTAVE</h3>
+<a name="index-Method-1"></a>
+<p>The next OCTAVE code, install the last version of BSLTL package directly from 
+octave-forge website in the default install directory.
+</p><div class="example">
+<pre class="example">pkg install -forge -auto bsltl
+</pre></div>
+<p>With this method the package is configured for be loaded automatically when OCTAVE start.
+</p>
+<a name="Method-2_003a-Offline-_002d-Only-in-OCTAVE"></a>
+<h3 class="section">3.2 Method 2: Offline - Only in OCTAVE</h3>
+<a name="index-Method-2"></a>
+<p>The next OCTAVE code, install the BSLTL package, 
+<a href="http://download.savannah.gnu.org/releases/bsltl/">bsltl-1.0.2.tar.gz</a>, 
+in the directory: ~/lib/octmat
+</p>
+<p>If the BSLTL package was downloaded in the directory: /download_path
+</p><div class="example">
+<pre class="example">pkg prefix ~/lib/octmat
+pkg install -auto /download_path/bsltl-1.0.2.tar.gz
+</pre></div>
+<p>With this method the package is configured for be loaded automatically when OCTAVE start.
+</p>
+<a name="Method-3_003a-Offline-_002d-In-MATLAB-or-OCTAVE"></a>
+<h3 class="section">3.3 Method 3: Offline - In MATLAB or OCTAVE</h3>
+<a name="index-Method-3"></a>
+<p>If the BSLTL package, <a href="http://download.savannah.gnu.org/releases/bsltl/">bsltl-1.0.2.tar.gz</a>, 
+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.
+</p><div class="example">
+<pre class="example">BSLTL_DIR='/home/user/lib/octmat/bsltl';
+addpath(genpath(BSLTL_DIR));
+</pre></div>
+<p>The function genpath generates a list with the directories and sub directories.
+The function addpath add directories to OCTAVE system path.
+</p>
+<p>In this method we install (add to  Octave system path) the BSLTL package each 
+time that we call our source files. 
+</p>
+<hr>
+<a name="Using-the-BSLTL-package"></a>
+<div class="header">
+<p>
+Next: <a href="#Contributing-to-the-package" accesskey="n" rel="next">Contributing to the package</a>, Previous: <a href="#Installation" accesskey="p" rel="prev">Installation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Using-the-BSLTL-package-1"></a>
+<h2 class="chapter">4 Using the BSLTL package</h2>
+
+<p>Many code examples  can be found in the <a href="http://www.nongnu.org/bsltl">homepage</a>
+of BSLTL library.
+</p>
+<a name="Example-code-of-method-1-and-2-_002d-Getting-the-AVD-value-of-line-240"></a>
+<h3 class="section">4.1 Example code of method 1 and 2 - Getting the AVD value of line 240</h3>
+<a name="index-Method-1-1"></a>
+<a name="index-Method-2-1"></a>
+<div class="example">
+<pre class="example">IMAGES_DIR = '/home/user/data/speckle/test1';
+
+DATA = datapack(IMAGES_DIR,'img',1,129,'bmp'); % Datapack of 129 images.
+                                               % 'img1.bmp', 'img2.bmp', 
+                                               % ...       , ...       ,
+                                               % 'img128.bmp', 'img129.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.
+</pre></div>
+
+<a name="Example-code-of-method-3-_002d-Getting-the-AVD-value-of-column-100"></a>
+<h3 class="section">4.2 Example code of method 3 - Getting the AVD value of column 100</h3>
+<a name="index-Method-3-1"></a>
+<div class="example">
+<pre class="example">BSLTL_DIR = '/home/user/lib/octmat/bsltl';
+addpath(genpath(BSLTL_DIR));
+
+IMAGES_DIR = '/home/user/data/speckle/test1';
+
+DATA = datapack(IMAGES_DIR,'img',1,129,'bmp'); % Datapack of 129 images.
+                                               % 'img1.bmp', 'img2.bmp', 
+                                               % ...       , ...       ,
+                                               % 'img128.bmp', 'img129.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.
+</pre></div>
+
+<hr>
+<a name="Contributing-to-the-package"></a>
+<div class="header">
+<p>
+Next: <a href="#Copyright" accesskey="n" rel="next">Copyright</a>, Previous: <a href="#Using-the-BSLTL-package" accesskey="p" rel="prev">Using the BSLTL package</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Contributing-to-the-package-1"></a>
+<h2 class="chapter">5 Contributing to the package</h2>
+
+<p>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.
+</p>
+<a name="Contributing-from-mailing-list"></a>
+<h3 class="section">5.1 Contributing from mailing list</h3>
+
+<p>To contribute to the BSLTL package using your email account,
+you can send your proposal to the
+<a href="https://savannah.nongnu.org/mail/?group=bsltl">mailing list</a>
+</p>
+<a name="Contributing-through-a-patch"></a>
+<h3 class="section">5.2 Contributing through a patch</h3>
+
+<p>To contribute to the BSLTL package through a patch:
+</p>
+<ul>
+<li> Clone the package; making a local copy of BSLTL source repository;
+<pre class="verbatim">git clone http://git.savannah.gnu.org/r/bsltl.git
+
+cd bsltl
+</pre></li><li> Make your changes in the source code;
+</li><li> Commit the changeset into your local repository;
+<pre class="verbatim">git add *
+
+git commit -m "Here, you describe the modification made."
+</pre></li><li> Create the patch; export the last changeset (commit) to a diff file;
+<pre class="verbatim">git format-patch -1 -o ../
+</pre></li><li> Submit it to the <a href="https://savannah.nongnu.org/patch/?func=additem&group=bsltl">patch tracker</a>.
+</li></ul>
+
+
+<hr>
+<a name="Copyright"></a>
+<div class="header">
+<p>
+Next: <a href="#Versions" accesskey="n" rel="next">Versions</a>, Previous: <a href="#Contributing-to-the-package" accesskey="p" rel="prev">Contributing to the package</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Copyright-1"></a>
+<h2 class="chapter">6 Copyright</h2>
+<div class="display">
+<pre class="display">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.
+</pre></div>
+
+<hr>
+<a name="Versions"></a>
+<div class="header">
+<p>
+Next: <a href="#BSLTL-project-group" accesskey="n" rel="next">BSLTL project group</a>, Previous: <a href="#Copyright" accesskey="p" rel="prev">Copyright</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Versions-1"></a>
+<h2 class="chapter">7 Versions</h2>
+
+<p>The increment in the version number has a meaning. To a version number 
+with the format ’va.b.c’ (by example: v1.0.2).
+</p><ul>
+<li> An increment in ’c’ indicates a modification or correction in the code.
+</li><li> An increment in ’b’ indicates that at least a new function was added in the code.
+</li><li> An increment in ’c’ is reserved to great modifications in the code.
+</li></ul>
+
+<hr>
+<a name="BSLTL-project-group"></a>
+<div class="header">
+<p>
+Next: <a href="#Support-or-Contact" accesskey="n" rel="next">Support or Contact</a>, Previous: <a href="#Versions" accesskey="p" rel="prev">Versions</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="BSLTL-project-group-1"></a>
+<h2 class="chapter">8 BSLTL project group</h2>
+
+<ul>
+<li> Roberto Alves Braga Júnior <a href="mailto:robertobraga at deg.ufla.br">robertobraga at deg.ufla.br</a>
+</li><li> Fernando Pujaico Rivera    <a href="mailto:fernando.pujaico.rivera at gmail.com">fernando.pujaico.rivera at gmail.com</a>
+</li><li> Junio Moreira	           <a href="mailto:juniomoreira at iftm.edu.br">juniomoreira at iftm.edu.br</a>
+</li></ul>
+
+<hr>
+<a name="Support-or-Contact"></a>
+<div class="header">
+<p>
+Next: <a href="#Index" accesskey="n" rel="next">Index</a>, Previous: <a href="#BSLTL-project-group" accesskey="p" rel="prev">BSLTL project group</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Support-or-Contact-1"></a>
+<h2 class="chapter">9 Support or Contact</h2>
+
+<p>Having trouble with the package? Check out our 
+<a href="http://www.nongnu.org/bsltl/documentation.html">documentation</a> or 
+<a href="https://savannah.nongnu.org/mail/?group=bsltl">contact support</a>.
+</p>
+<p>Please, also visit the
+<a href="http://www.nongnu.org/bsltl/">Home page of BSLTL project</a>.
+</p>
+<hr>
+<a name="Index"></a>
+<div class="header">
+<p>
+Previous: <a href="#Support-or-Contact" accesskey="p" rel="prev">Support or Contact</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a>   [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Index-1"></a>
+<h2 class="unnumbered">Index</h2>
+
+<table><tr><th valign="top">Jump to:   </th><td><a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
+   
+<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
+   
+<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
+   
+</td></tr></table>
+<table class="index-cp" border="0">
+<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
+<tr><td colspan="4"> <hr></td></tr>
+<tr><th><a name="Index_cp_letter-C">C</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Citations-as-bibtex">Citations as bibtex</a>:</td><td> </td><td valign="top"><a href="#Citations">Citations</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Citations-as-plain">Citations as plain</a>:</td><td> </td><td valign="top"><a href="#Citations">Citations</a></td></tr>
+<tr><td colspan="4"> <hr></td></tr>
+<tr><th><a name="Index_cp_letter-D">D</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Dependencies-of-GNU_002dLinux">Dependencies of GNU-Linux</a>:</td><td> </td><td valign="top"><a href="#Dependencies">Dependencies</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Dependencies-of-Octave_002dForge">Dependencies of Octave-Forge</a>:</td><td> </td><td valign="top"><a href="#Dependencies">Dependencies</a></td></tr>
+<tr><td colspan="4"> <hr></td></tr>
+<tr><th><a name="Index_cp_letter-M">M</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Method-1">Method 1</a>:</td><td> </td><td valign="top"><a href="#Installation">Installation</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Method-1-1">Method 1</a>:</td><td> </td><td valign="top"><a href="#Using-the-BSLTL-package">Using the BSLTL package</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Method-2">Method 2</a>:</td><td> </td><td valign="top"><a href="#Installation">Installation</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Method-2-1">Method 2</a>:</td><td> </td><td valign="top"><a href="#Using-the-BSLTL-package">Using the BSLTL package</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Method-3">Method 3</a>:</td><td> </td><td valign="top"><a href="#Installation">Installation</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Method-3-1">Method 3</a>:</td><td> </td><td valign="top"><a href="#Using-the-BSLTL-package">Using the BSLTL package</a></td></tr>
+<tr><td colspan="4"> <hr></td></tr>
+</table>
+<table><tr><th valign="top">Jump to:   </th><td><a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
+   
+<a class="summary-letter" href="#Index_cp_letter-D"><b>D</b></a>
+   
+<a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
+   
+</td></tr></table>
+
+<hr>
+
+
+
+</body>
+</html>
diff --git a/doc/overview.init b/doc/overview.init
new file mode 100644
index 0000000..6066f78
--- /dev/null
+++ b/doc/overview.init
@@ -0,0 +1,20 @@
+use strict;
+
+
+set_from_init_file('AFTER_BODY_OPEN', "\
+	<div class=\"top-nav darkblock\">\
+       	<a href=\"http://www.nongnu.org/bsltl/index.html\">Home</a> |\
+       	<a href=\"http://www.nongnu.org/bsltl/documentation.html\">Documentation</a> |\
+       	<a href=\"overview.html\">Overview</a> |\
+       	<a href=\"http://www.nongnu.org/bsltl/examples.html\">Examples</a> |\
+       	<a href=\"http://www.nongnu.org/bsltl/code.html\" target=\"_blank\">Code</a> |\
+       	<a href=\"http://www.nongnu.org/bsltl/download.html\" target=\"_blank\">Download</a> |\
+       	<a href=\"https://savannah.nongnu.org/projects/bsltl/\" target=\"_blank\">Develop</a>\
+	</div><br>\n\n");
+
+set_from_init_file('EXTRA_HEAD', "\
+  <STYLE> #jsMath_Warning {display: none} </STYLE>\
+  <SCRIPT SRC=\"../../jsMath/easy/load.js\"></SCRIPT>");
+
+
+
diff --git a/doc/overview.texi b/doc/overview.texi
new file mode 100644
index 0000000..b24645c
--- /dev/null
+++ b/doc/overview.texi
@@ -0,0 +1,337 @@
+\input texinfo
+ at c #############################################################################
+ at c 
+ at c makeinfo --html overview.texi --no-split --css-ref=manual.css  --init-file=overview.init
+ at c 
+ at c #############################################################################
+
+ at set VERSION 1.0.2
+
+ at settitle Biospeckle Laser Tool Library
+
+ at copying
+The BSLTL package is a free collection of OCTAVE/MATLAB routines for working with the
+biospeckle laser technique.
+Copyright @copyright{} 2016 Fernando Pujaico Rivera
+ at end copying
+
+ at documentencoding utf-8
+
+ at titlepage
+ at title Biospeckle Laser Tool Library (BSLTL)
+ at page
+ at vskip 0pt plus 1filll
+ at insertcopying
+ at end titlepage
+
+ at c Output the table of the contents at the beginning.
+ at contents
+
+ at ifnottex
+ at node Top
+ at top Introduction
+
+The BSLTL package is a free collection of OCTAVE/MATLAB routines for working with the
+biospeckle laser technique.(version @value{VERSION}).
+
+Implemented technics:
+ at itemize @bullet
+ at item
+Graphical methods: Fujii, GD, Std, Mean, Contrast, PTD, MHI, Kurtosis, Skewness, etc.
+ at c @math{FUJII=\frac{200}{NTIMES-1} \sum \limits_{k=1}^{NTIMES-1} \frac{|I_{k}-I_{k+1}|}{I_{k}+I_{k+1}}} 
+ at c @math{GD=\frac{1}{\binom{NTIMES}{2}} \sum\limits_{k=1}^{NTIMES-1} \sum\limits_{l=1}^{NTIMES-k} |I(k)-I(k+l)|} 
+ at c @math{Mean= \frac{1}{NTIMES} \sum\limits_{k=1}^{NTIMES} I(k) \approx E[I(k)]} 
+ at c @math{Std = \sqrt{ \frac{1}{NTIMES} \sum\limits_{k=1}^{NTIMES} (I(k)-Mean)^2  }} 
+
+ at item
+Numerical methods: AVD, IM, NCOM, THSP, RVD, Corr, etc.
+ at c @math{AVD=\sum \limits_{ij} NCOM(i,j)|i-j|} 
+ at c @math{IM=\sum \limits_{ij} NCOM(i,j)|i-j|^2} 
+ at c @math{RVD=\sum \limits_{ij} NCOM(i,j)(i-j)} 
+ at item
+Filtering
+ at item
+Quality test
+ at item
+etc
+ at end itemize
+
+ at end ifnottex
+
+ at menu
+* Citations::    How to cite the library.
+* Dependencies:: About the dependencies of the BSLTL package.
+* Installation:: About the intallation methods.
+* Using the BSLTL package:: About as to use the BSLTL package.
+* Contributing to the package:: How contribute with the package
+* Copyright::    Legal notice copyright.
+* Versions::     Labeling criteria.
+* BSLTL project group:: Authors.
+* Support or Contact:: Links of interest.
+* Index::        Complete index.
+ at end menu
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node Citations
+ at chapter Citations
+
+
+To cite the BSLTL package in publications use:
+ at display
+Roberto Alves Braga Júnior, Fernando Pujaico Rivera and Junio Moreira (2016).
+BSLTL: Biospeckle Laser Tool Library.
+URL http://www.nongnu.org/bsltl/
+ at end display
+ at cindex Citations as plain
+
+A BibTeX entry for LaTeX users is:
+ at verbatim
+ at 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/}
+}
+ at end verbatim
+ at cindex Citations as bibtex
+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.
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node Dependencies
+ at chapter Dependencies
+
+ at section Octave dependencies
+Some functions inside BSLTL package depend of signal package;
+at the same time the signal package depends of control package.
+Thus, we recommend install first the control package and later the signal package
+with the following online OCTAVE installation commands.
+ at example
+pkg install -forge control
+pkg install -forge signal
+ at end example
+ at cindex Dependencies of Octave-Forge
+
+In operating systems based in GNU/Linux can be necessary install first the 
+library @code{liboctave-dev} in the system, given that OCTAVE uses this library 
+to install the control package. The next code is an example (Ubuntu/Debian) of 
+command install in the system.
+
+ at verbatim
+sudo apt-get install liboctave-dev
+ at end verbatim
+ at cindex Dependencies of GNU-Linux
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node Installation
+ at chapter Installtion
+
+
+ at section Method 1: Online - Only in OCTAVE
+ at cindex Method 1
+The next OCTAVE code, install the last version of BSLTL package directly from 
+octave-forge website in the default install directory.
+ at example
+pkg install -forge -auto bsltl
+ at end example
+With this method the package is configured for be loaded automatically when OCTAVE start.
+
+ at section Method 2: Offline - Only in OCTAVE
+ at cindex Method 2
+The next OCTAVE code, install the BSLTL package, 
+ at url{http://download.savannah.gnu.org/releases/bsltl/, bsltl- at value{VERSION}.tar.gz}, 
+in the directory: ~/lib/octmat
+
+If the BSLTL package was downloaded in the directory: /download_path
+ at example
+pkg prefix ~/lib/octmat
+pkg install -auto /download_path/bsltl- at value{VERSION}.tar.gz
+ at end example
+With this method the package is configured for be loaded automatically when OCTAVE start.
+
+ at section Method 3: Offline - In MATLAB or OCTAVE
+ at cindex Method 3
+If the BSLTL package, @url{http://download.savannah.gnu.org/releases/bsltl/, bsltl- at value{VERSION}.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.
+ at example
+BSLTL_DIR='/home/user/lib/octmat/bsltl';
+addpath(genpath(BSLTL_DIR));
+ at end example
+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. 
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node Using the BSLTL package
+ at chapter Using the BSLTL package
+
+Many code examples  can be found in the @url{http://www.nongnu.org/bsltl, homepage}
+of BSLTL library.
+
+ at section Example code of method 1 and 2 - Getting the AVD value of line 240
+ at cindex Method 1
+ at cindex Method 2
+ at example
+IMAGES_DIR = '/home/user/data/speckle/test1';
+
+DATA = datapack(IMAGES_DIR,'img',1,129,'bmp'); % Datapack of 129 images.
+                                               % 'img1.bmp', 'img2.bmp', 
+                                               % ...       , ...       ,
+                                               % 'img128.bmp', 'img129.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.
+ at end example
+
+ at section Example code of method 3 - Getting the AVD value of column 100
+ at cindex Method 3
+ at example
+BSLTL_DIR = '/home/user/lib/octmat/bsltl';
+addpath(genpath(BSLTL_DIR));
+
+IMAGES_DIR = '/home/user/data/speckle/test1';
+
+DATA = datapack(IMAGES_DIR,'img',1,129,'bmp'); % Datapack of 129 images.
+                                               % 'img1.bmp', 'img2.bmp', 
+                                               % ...       , ...       ,
+                                               % 'img128.bmp', 'img129.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.
+ at end example
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node Contributing to the package
+ at chapter 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.
+
+ at section Contributing from mailing list
+
+To contribute to the BSLTL package using your email account,
+you can send your proposal to the
+ at url{https://savannah.nongnu.org/mail/?group=bsltl, mailing list}
+
+ at section Contributing through a patch
+
+To contribute to the BSLTL package through a patch:
+
+ at itemize @bullet
+ at item
+Clone the package; making a local copy of BSLTL source repository;
+ at verbatim
+git clone http://git.savannah.gnu.org/r/bsltl.git
+
+cd bsltl
+ at end verbatim
+ at item
+Make your changes in the source code;
+ at item
+Commit the changeset into your local repository;
+ at verbatim
+git add *
+
+git commit -m "Here, you describe the modification made."
+ at end verbatim
+ at item
+Create the patch; export the last changeset (commit) to a diff file;
+ at verbatim
+git format-patch -1 -o ../
+ at end verbatim
+ at item
+Submit it to the @url{https://savannah.nongnu.org/patch/?func=additem&group=bsltl, patch tracker}.
+ at end itemize
+
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node Copyright
+ at chapter Copyright
+ at display
+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.
+ at end display
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node Versions
+ at chapter Versions
+
+The increment in the version number has a meaning. To a version number 
+with the format 'va.b.c' (by example: v at value{VERSION}).
+ at itemize @bullet
+ at item
+An increment in 'c' indicates a modification or correction in the code.
+ at item
+An increment in 'b' indicates that at least a new function was added in the code.
+ at item
+An increment in 'c' is reserved to great modifications in the code.
+ at end itemize
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node BSLTL project group
+ at chapter BSLTL project group
+
+ at itemize @bullet
+ at item
+Roberto Alves Braga Júnior @email{robertobraga@@deg.ufla.br}
+ at item
+Fernando Pujaico Rivera    @email{fernando.pujaico.rivera@@gmail.com}
+ at item
+Junio Moreira	           @email{juniomoreira@@iftm.edu.br}
+ at end itemize
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node Support or Contact
+ at chapter Support or Contact
+
+Having trouble with the package? Check out our 
+ at url{http://www.nongnu.org/bsltl/documentation.html, documentation} or 
+ at url{https://savannah.nongnu.org/mail/?group=bsltl, contact support}.
+
+Please, also visit the
+ at url{http://www.nongnu.org/bsltl/, Home page of BSLTL project}.
+
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ at node Index
+ at unnumbered Index
+
+ at printindex cp
+
+ at bye
diff --git a/inst/__bsltl_package_register__.m b/inst/__bsltl_package_register__.m
new file mode 100644
index 0000000..f74221f
--- /dev/null
+++ b/inst/__bsltl_package_register__.m
@@ -0,0 +1,46 @@
+%  Copyright (C) 2016 Carnë Draug <carandraug at octave.org>
+%  Copyright (C) 2016  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+%  Undocumented internal function
+%  Adapted-by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  original-work: __geometry_package_register__.m Carnë Draug <carandraug at octave.org>
+
+%% PKG_ADD: __bsltl_package_register__ (1);
+%% PKG_DEL: __bsltl_package_register__ (-1);
+
+function subdir_paths = __bsltl_package_register__ (loading = 0)
+	
+%% loading = 0 :	Returns the installation paths of BSLTL pakage.
+%% loading > 0 :	Add the BSLTL installation paths and 
+%%					returns the installation paths of BSLTL pakage.
+%% loading < 0 :	Remove the BSLTL installation paths and 
+%%					returns the the remove paths of BSLTL pakage.
+
+	%% Get full path, with luck we can retreive the package name from here
+	base_pkg_path = fileparts (make_absolute_filename (mfilename ('fullpath')));
+
+	subdir_paths = genpath(fullfile (base_pkg_path, 'mfiles'));
+
+	if		(loading > 0)
+		addpath (subdir_paths);
+	elseif	(loading < 0)
+		rmpath  (subdir_paths);
+	endif
+
+end
diff --git a/inst/mfiles/Contents.m b/inst/mfiles/Contents.m
new file mode 100644
index 0000000..213bd27
--- /dev/null
+++ b/inst/mfiles/Contents.m
@@ -0,0 +1,90 @@
+%                   Bio Speckle Laser Tool Library
+%  
+%  Version: 1.0.0
+% 
+%  Code developers:  Roberto Alves Braga Junior  <robertobraga at deg.ufla.br>
+%                    Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com>
+%                    Junio Moreira <juniomoreira at iftm.edu.br>
+%
+%  data/             * Functions for to work with data packages.
+%
+%      datacut.m         - Cuts an image portion of a data package.
+%      datapack.m        - Creates a data package from a image set.
+%      datapack_to_gif.m - Creates a gif file from a image set.
+%      
+%  extras/           * Free functions without  category.
+%
+%      hbpmf.m           - Returns the entropy of a probability mass function.
+%      stscorr.m         - Implements a correlation between images.
+%      threshold2d.m     - Implements a threshold over a 2D matrix.
+%
+%  filter/           * Functions to the frequency processing.
+%
+%      datapack_conv.m   - No-Causal convolution.
+%      firfilterbank.m   - FIR Filter Bank.
+%      firsynthesisbank.m- FIR Synthesis Bank.
+%      firsynthesispath.m- FIR Synthesis Path.
+%      freqmod.m         - Frequency Module.
+%      qmfmaker.m        - Quadrature Mirror Filter maker.
+%      qmfmirror.m       - Mirror of Quadrature Mirror Filter.
+%
+%  graphic/          * Graphic functions of activity indicators.
+%
+%      moments/          * Graphical functions relative to inertia moment.
+%
+%          graphavd.m        - Implements the graphic AVD technique.
+%          graphim.m         - Implements the graphic inertia moment technique.
+%          graphptd.m        - Implements the graphic PTD technique.
+%          graphrvd.m        - Implements the graphic RVD technique.
+%
+%      others/           * Free graphical functions without  category.
+%
+%          graphmhi.m        - Implements the MHI technique.
+%
+%      stats/            * Graphical functions relative to statistical moments
+%
+%          graphkurt.m       - Implements the graphic kurtosis technique.
+%          graphskew.m       - Implements the graphic skewness technique.
+%
+%      fujii.m           - Implements the Fujii technique.
+%      gendiff.m         - Implements the generalized differences technique.
+%      stdcont.m         - Implements the contrast, std and mean technique.
+%
+%  numerical/        * Numerical functions of activity indicators.
+%
+%      extras/           * Extra functions
+%
+%          stscorr.m         - Correlation.
+%          thsp2corr.m       - THSP to Correlation.
+%
+%      pmf/              * Probability mass function.
+%
+%          pmfad.m           - Returns the probability mass function of AVD.
+%          pmfrd.m           - Returns the probability mass function of RVD.
+%
+%      thsp/             * Time history speckle pattern.
+%
+%          thsp.m            - Returns the time history speckle pattern (THSP).
+%          thsp_gaussian.m   - Returns the THSP of a set of Gaussian points.
+%          thsp_line.m       - Returns the THSP of a line of points.
+%          thsp_random.m     - Returns the THSP of a set of random points.
+%
+%      avd.m             - Implements the absolute value of differences.
+%      coom.m            - Implements the co-occurrence.
+%      inertiamoment.m   - Implements the inertia moment.
+%      numad.m           - Implements the numerical average difference.
+%      rvd.m             - Implements the regular value of differences.
+%
+%  quality/          * Functions for the quality test.
+%
+%      homogeneity.m     - Implements a study of homogeneity.
+%      satdark.m         - Implements a study of saturated and dark sections.
+%      sscont.m          - Implements a study of spatial speckle contrast.
+%
+%  undocumented/     * Functions without description in the reference and user manual.
+%
+%      datapack_to_bmp.m - Saves the images inside of datapack in a set of BMP files
+%
+
+
+
diff --git a/inst/mfiles/data/datacut.m b/inst/mfiles/data/datacut.m
new file mode 100644
index 0000000..9f34874
--- /dev/null
+++ b/inst/mfiles/data/datacut.m
@@ -0,0 +1,105 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [DATACUT varargout]=datacut(DATA)
+%
+%  DATACUT is a function in graphic mode that selects and cuts a portion of
+%  data pack (DATA).
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  DATACUT=datacut(DATA);
+%  [DATACUT LINES COLUMNS]=datacut(DATA);
+%
+%  Input:
+%  DATA is the speckle data pack. 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) represent NLIN and
+%       N(1,2) represent NCOL and
+%       N(1,3) represent NTIMES.
+%
+%  Output:
+%  DATACUT Is the cut part of speckle data pack. Where DATACUT is a 3D matrix 
+%          created grouping NTIMES cut parts of DATA.
+%  LINES   [Optional] Is a vector with two elements, these are the first line
+%          and the last line in the cut of DATA.
+%  COLUMNS [Optional] Is a vector with two elements, these are the first column
+%          and the last column in the cut of DATA.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A. Braga Jr <robertobraga at deg.ufla.br>
+%  Date:   08 of July of 2015.
+%  Review: 25 of February of 2016.
+%
+
+    NSIZE = size(DATA);
+
+    if (length(NSIZE)~=3) 
+       error('This function need a 3D matrix.');
+    end
+
+    NLIN  = NSIZE(1,1);
+    NCOL  = NSIZE(1,2);
+    NTIMES= NSIZE(1,3);
+
+    
+	SIGMA = zeros(NLIN,NCOL);
+    ED = zeros(NLIN,NCOL);
+
+    for k = 1:NTIMES
+        ED = ED+ DATA(:,:,k);
+    end
+
+    ED=ED/NTIMES;
+
+    for k = 1:NTIMES 
+       SIGMA =  SIGMA + (DATA(:,:,k)-ED).^2;
+    end
+
+    SIGMA = sqrt(SIGMA/(NTIMES-1));
+
+    ALERTA='<< CHOOSE A REGION CLICKING WITH MOUSE IN TWO POINTS >>';
+
+    warndlg(ALERTA);
+
+    figure;
+    imagesc(SIGMA);
+    title(ALERTA);
+
+    [COL,LIN]=ginput(2);
+    COL=round(sort(COL));
+    LIN=round(sort(LIN));
+
+    rectangle('Position',[COL(1), LIN(1), COL(2)-COL(1), LIN(2)-LIN(1)], 'LineWidth',3, 'EdgeColor','b');
+    DATACUT=DATA(LIN(1):LIN(2),COL(1):COL(2),:);
+
+    if(nargout>=2)
+		varargout{1}=COL;
+    end
+
+    if(nargout>=3)
+        varargout{2}=LIN;
+    end
+
+end
diff --git a/inst/mfiles/data/datapack.m b/inst/mfiles/data/datapack.m
new file mode 100644
index 0000000..dba4969
--- /dev/null
+++ b/inst/mfiles/data/datapack.m
@@ -0,0 +1,223 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [DATA] = datapack(IMGDIR,IMGNAME,IMGN1,IMGN2,IMGFMT,varargin)
+%  This function creates a data pack (3D matrix) from a set of images in a directory. 
+%  All images should have the same number of lines and columns, and similar format.
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  DATA = datapack(IMGDIR,IMGNAME,IMGN1,IMGN2,IMGFMT);
+%
+%  %% To filenames: 'seed1.bmp', 'seed2,bmp', ..., 'seed128.bmp'
+%  DATA = datapack('/user/images/sample1','seed',1,128,'bmp');
+%
+%  %% To filenames: 'img1coffee.bmp', 'img2coffee,bmp', ..., 'img100coffee.bmp'
+%  DATA = datapack('/user/images/sample1','img%dcoffee',1,100,'bmp');
+%
+%  %% To filenames: 'img0001.bmp', 'img0002,bmp', ..., 'img0123.bmp'
+%  DATA = datapack('/user/images/sample1','img%04d',1,123,'bmp');
+%
+%  Input:
+%  IMGDIR  is a directory path where the images are, with format names as
+%          NAME=[IMGNAME,'.',IMGFMT].
+%  IMGNAME is the format filename, example: if the files in IMGDIR have names as 
+%          'fig1.bmp', then IMGNAME='fig' or IMGNAME='fig%d'. If IMGNAME not
+%          contain a format specifiers of family %d, them this format specifiers 
+%          is added at the final of IMGNAME string. The format string is similar
+%          to the function printf of others programming languages.
+%          Only are permitted format specifiers of family %d, given that will
+%          be replaced a decimal number.
+%  IMGN1   is the index of the first image, example: if the files have names from 
+%          'fig1.bmp' until 'fig4.bmp', then IMGN1=1.
+%  IMGN2   is the index of the last image, example: if the files have names from 
+%          'fig1.bmp' until 'fig4.bmp', then IMGN2=4.
+%  IMGFMT  is the filetype of the image files, example: if the files have names 
+%          as 'fig1.bmp', then IMGFMT='bmp'. Current is only permitted IMGFMT='bmp'.
+%  LPOS    [Optional] This value is optional. It is the first line position for a window
+%          analysis.
+%  CPOS    [Optional] This value is optional. It is the first column position for a window
+%          analysis.
+%  NLIN    [Optional] This value is optional. It is the number of lines of a window under analysis.
+%  NCOL    [Optional] This value is optional. It is the number of columns of a window under analysis.
+%
+%  Output:
+%  DATA    is the speckle data. Where DATA is a 3D matrix created grouping NTIMES=IMGN2-IMGN1+1
+%          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.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira <juniomoreira at iftm.edu.br>
+%                      Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date:   09 of May of 2013.
+%  Review: 13 of March of 2016.
+%
+
+	% Verify the presence of 9 parameters
+	if((nargin==6)||(nargin==7)||(nargin==8))
+		error('For window mode it is necessary 9 parameters: datapack(IMGDIR,IMGNAME,IMGN1,IMGN2,IMGFMT,LPOS,CPOS,NLIN,NCOL);');
+	end
+       
+	%Verify if the obligatory parameters are correct
+	if(~(ischar(IMGDIR)&&ischar(IMGNAME)&&isnumeric(IMGN1)&&isnumeric(IMGN2)&&ischar(IMGFMT)))
+
+		if(~ischar(IMGDIR))
+			disp('First parameter is not a string.');
+		end
+		if(~ischar(IMGNAME))
+			disp('Second parameter is not a string.');
+		end
+		if(~isnumeric(IMGN1))
+			disp('Third parameter is not a integer.');
+		end
+		if(~isnumeric(IMGN2))
+			disp('4th parameter is not a integer.');
+		end
+		if(~ischar(IMGFMT))
+			disp('5th parameter is not a string.');
+		end
+		error('Error in the parameters format of datapack function.');
+
+	end
+
+	if(strcmp(IMGFMT,'bmp')==0)
+		error('5th parameter should be equal to string: bmp');
+	end
+
+	IMGN1=round(IMGN1);
+	IMGN2=round(IMGN2);
+
+    IMGDIR=replace_tild_home(IMGDIR);
+
+	%Verify the existence of the directory
+	if(exist(IMGDIR)~=7)
+		error(['No exist directory: ', IMGDIR]);
+	end
+
+	if(length(strfind(IMGNAME,'%'))==0)
+		IMGNAME=[IMGNAME,'%d'];
+	end
+	PRENAME=[IMGNAME,'.',IMGFMT];
+	FIRSTFILE=fullfile(IMGDIR,sprintf(PRENAME,IMGN1));
+
+	%Verify if at least the first file exists
+	if(exist(FIRSTFILE)~=2)
+		error(['No exist the file: ',FIRSTFILE]);
+	end
+
+    IMGTEMP = imread (FIRSTFILE);
+    SizeIMG = size(IMGTEMP);
+
+	if(size(IMGTEMP,3)~=1)
+		error('The image should be a grayscale image!!!.');
+	end
+    
+    
+    Nlines   = SizeIMG(1,1);
+    Ncolumns = SizeIMG(1,2);   
+
+	if(nargin>=9)
+		% Verify if the optional input is integer
+		if(~(isnumeric(varargin{1})&&isnumeric(varargin{2})&&isnumeric(varargin{3})&&isnumeric(varargin{4})))
+			error('The optional arguments should be integers');
+		end
+
+		LPOS=varargin{1};
+		CPOS=varargin{2};
+		NLIN=varargin{3};
+		NCOL=varargin{4};
+
+		if((LPOS+NLIN-1)>Nlines)
+			error('Selected line in window out of range.');
+		end
+		if((CPOS+NCOL-1)>Ncolumns)
+			error('Selected column in window out of range.');
+		end
+		WINDOW=1;
+	else
+		WINDOW=0;
+	end  
+    
+	numImages=IMGN2-IMGN1+1;
+    
+	% Begin 
+    disp(['Loading images from:',IMGDIR]);
+    disp('Please wait...');
+    
+    
+    if WINDOW == 0
+
+        DATA = zeros(Nlines,Ncolumns,numImages);
+        for II = 1:numImages
+            nome = fullfile(IMGDIR,sprintf(PRENAME,IMGN1+II-1));
+            DATA(:,:,II) = imread(nome);            
+        end
+
+    else
+
+        DATA = zeros(NLIN,NCOL,numImages);
+        for II = 1:numImages
+            nome = fullfile(IMGDIR,sprintf(PRENAME,IMGN1+II-1));
+            TODO= imread(nome);
+            DATA(:,:,II) = TODO(LPOS:(NLIN+LPOS-1),CPOS:(NCOL+CPOS-1));
+        end    
+
+    end
+    
+ 	disp('DATA Pack loaded...[OK]');
+    
+end
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+function newpath=replace_tild_home(oldpath)
+%% Replaces the initial text '~/' in the variable oldpath, by the home path in 
+%% gnu-linux or win, the function returns the result in the newpath variable.
+
+    newpath=oldpath;
+    if(length(oldpath)>=2)
+    if(strcmp(oldpath(1:2),'~/'))
+        if    ( length(getenv('HOME'))>0 )
+            if(length(oldpath)>2)
+                newpath=fullfile(getenv('HOME'),oldpath(3:end));
+            else
+                newpath=fullfile(getenv('HOME'));
+            end
+        elseif( length(getenv('HOMEPATH'))>0 )
+            if(length(oldpath)>2)
+                newpath=fullfile(getenv('HOMEDRIVE'),getenv('HOMEPATH'),oldpath(3:end));
+            else
+                newpath=fullfile(getenv('HOMEDRIVE'),getenv('HOMEPATH'));
+            end
+        else
+            newpath=oldpath;
+        end
+    end
+    end
+end
+
diff --git a/inst/mfiles/data/datapack_to_gif.m b/inst/mfiles/data/datapack_to_gif.m
new file mode 100644
index 0000000..0de2773
--- /dev/null
+++ b/inst/mfiles/data/datapack_to_gif.m
@@ -0,0 +1,105 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function h=datapack_to_gif(DATA,Filename,Frames,varargin)
+%
+%  This function creates a gif file from the data pack (DATA).
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  datapack_to_gif(DATA,Filename,Frames);
+%  datapack_to_gif(DATA,Filename,Frames,Map);
+%  datapack_to_gif(DATA,Filename,Frames,Map,Time);
+%  
+%  Input:
+%  DATA     is the speckle data pack. 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.
+%  Filename is the name of gif file.
+%  Frames   is the number of frames in the gif file. In the number of images (NTIMES) 
+%           is less than the number of frames (Frames), then overwrite Frames=NTIMES;
+%  Map      [Optional] is the colormap, this value can be: jet, gray, hsv, ..., etc.
+%           By default: jet. See: colormap('list')
+%  Time     [Optional] is the time between frames in the gif file. By default: 0.5 sec.
+%
+%  Output:
+%  h        is the name of gif file.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>      
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 09 of July of 2015.
+%  Review: 25 of February of 2016.
+%
+
+	NTIMES = size(DATA,3);
+	Step   = round(NTIMES/Frames);
+
+	if(Step == 0)
+		Step=1;
+	end
+		
+	Max=max(max(max(DATA)));
+
+	D=(DATA*64/Max);
+
+
+	if (nargin<4)
+		map = jet;
+	else
+		if(ismatrix(varargin{1}))
+			map=varargin{1};
+		else
+			map=jet;
+		end
+	end
+
+	Time=0.5;
+	if(nargin>4)
+		if(isscalar(varargin{2}))
+			Time=varargin{2};
+		end
+	end
+
+
+	%Write the first frame to a file named animGif.gif
+	imwrite(	D(:,:,1),map,Filename,'gif','LoopCount',...
+				inf,'DelayTime',Time);
+
+    NFRAMES=1;
+
+	%Loop through and write the rest of the frames
+	for ii=2:Step:NTIMES
+	     imwrite(D(:,:,ii),map,Filename,'gif','writemode',...
+				'append','DelayTime',Time);
+
+        NFRAMES=NFRAMES+1;
+        if(NFRAMES == Frames)   break;
+	end
+
+	h=Filename;
+
+end
diff --git a/inst/mfiles/extras/hbpmf.m b/inst/mfiles/extras/hbpmf.m
new file mode 100644
index 0000000..26d6365
--- /dev/null
+++ b/inst/mfiles/extras/hbpmf.m
@@ -0,0 +1,69 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function H=hbpmf(Pr)
+%
+%  The function returns the binary entropy of a probability mass function.
+%
+%  $H=-\sum\limits_i Pr(i)*log_2(Pr(i))$
+%  $H=-\sum\limits_{ij} Pr(i,j)*log_2(Pr(i,j))$
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  H=hbpmf(Pr);
+%
+%  Input:
+%  Pr   is a probability mass function. The sum of all values Pr(a) could be 1.0.
+%       Pr can be a vector or matrix.
+%
+%  Output:
+%  H    The binary entropy of a probability mass function.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com> 
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date:   08 of July of 2015.
+%  Review: 25 of February of 2016.
+%
+	if(length(size(Pr))~=2)
+		error('Pr only can be a 1D vector or 2D marix.');
+	end
+
+    if(abs(sum(sum(Pr))-1.0)>128*eps)
+		error('Sum Probability is not 1.0');
+	end
+
+	N=size(Pr);
+
+	H=0;
+	for II=1:N(1,1)
+	for JJ=1:N(1,2)
+		if(Pr(II,JJ)>0)
+			H=H-Pr(II,JJ)*log2(Pr(II,JJ));
+		end
+	end
+	end
+
+
+end
diff --git a/inst/mfiles/extras/mwindowing.m b/inst/mfiles/extras/mwindowing.m
new file mode 100644
index 0000000..f6fb1b4
--- /dev/null
+++ b/inst/mfiles/extras/mwindowing.m
@@ -0,0 +1,91 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function MATW = mwindowing(MAT,WLines,WColumns)
+%
+%  This function divides the MAT matrix in windows of WLines lines and WColumns 
+%  columns, then in each one of these windows it is calculated the mean value of all 
+%  elements. 
+%
+%  With theirs information is created a new matrix MATW with the same 
+%  size and windows of MAT, and the mean values in the MAT matrix are replaced 
+%  in all elements, for each window, in the MATW matrix.
+%  
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  MATW = mwindowing(MAT,WLines,WColumns);
+%  Mean values, of the elements in the window of 8x10 pixels, in the MAT matrix.
+%  MATW = mwindowing(MAT,8,10);
+%  
+%  Input:
+%  MAT      is a matrix with NLIN lines and NCOL columns.
+%  WLines   is the number of lines in each analysis window.
+%  WColumns is the number of columns in each analysis window.
+%
+%  Output:
+%  MATW     is a matrix with the mean values, of the elements in 
+%           the window of WLinesxWColumns pixels, in the MAT matrix.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of August of 2015.
+%  Review: 25 of February of 2016.
+%
+    NSIZE = size(MAT);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+
+	if(rem(NLIN,WLines)~=0)
+		TEXT1=['WLines must be multiple of: ',mat2str(factor(NLIN)),'.'];
+		TEXT2=['The last ',num2str(rem(NLIN,WLines)),' pixel lines (botom) were not processed'];
+		warning([TEXT1,TEXT2]);
+	end
+
+	if(rem(NCOL,WColumns)~=0)
+		TEXT1=['WColumns must be multiple of: ',mat2str(factor(NCOL)),'.'];
+		TEXT2=['The last ',num2str(rem(NCOL,WColumns)),' pixel columns (right) were not processed'];
+		warning([TEXT1,TEXT2]);
+	end
+
+    MATW = zeros(NLIN,NCOL);
+
+    
+	LINESSTEPS   = 1 : WLines   : NLIN-(WLines  -1);
+	COLUMNSSTEPS = 1 : WColumns : NCOL-(WColumns-1);
+
+    for lin = LINESSTEPS
+	    for col = COLUMNSSTEPS
+
+			LINES   = lin:lin+(WLines-1);
+			COLUMNS = col:col+(WColumns-1);
+
+			MEANVAL  = mean(mean(MAT(LINES,COLUMNS))); 
+
+			MATW(LINES,COLUMNS)  = MEANVAL;
+    	end	
+    end
+
+end 
+
diff --git a/inst/mfiles/extras/threshold2d.m b/inst/mfiles/extras/threshold2d.m
new file mode 100644
index 0000000..3b510b1
--- /dev/null
+++ b/inst/mfiles/extras/threshold2d.m
@@ -0,0 +1,73 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [X1 varargout]=threshold2d(X,U)
+%
+%  It is a function that returns a matrix X with elements smaller than U.
+%  For this purpose all elements superior to U are truncated to U.
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  X1=threshold2d(X,U);
+%  [X1 X2]=threshold2d(X,U);
+%
+%  Input:
+%  X   is a 2D matrix that needs be truncated.
+%  U   is the threshold of matrix X. He makes all values higher than U are set to U.
+%      U can be the matrix X or a scalar value.
+%
+%  Output:
+%  X1  is the truncated matrix to threshold U.
+%  X2  [Optional] is the complement of the truncated matrix to threshold U. 
+%      X2 + X1 = X
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com> 
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date:   08 of July of 2015.
+%  Review: 25 of February of 2016.
+%
+    
+    if (length(size(X))~=2)
+        error('threshold2d() only work with 2D matrices.');
+    end
+
+	if (max(size(U))~=1)
+		if (size(U)~=size(X))
+        	error('The second parameter only can be a scalar value or a matrix with the same size as the first parameter.');
+		end
+    end
+
+	X_MENOR =(X<=U);
+	X_MAYOR =1-X_MENOR;
+
+	%values smaller than U
+	X1=X.*X_MENOR + X_MAYOR.*U;
+
+	if(nargout>=2)
+		%complement with values higher than U.
+		varargout{1}=X-X1;
+	end
+
+end
diff --git a/inst/mfiles/filter/datapack_conv.m b/inst/mfiles/filter/datapack_conv.m
new file mode 100644
index 0000000..75d32f5
--- /dev/null
+++ b/inst/mfiles/filter/datapack_conv.m
@@ -0,0 +1,90 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [DATAOUT] = datapack_conv(DATA,H)
+%
+%  This function implements a convolution for each pixel of datapack. 
+%
+%  It convolves each pixel of signal with the function H of M elements, 
+%  so that if 
+%  H    = [h0 h1 h2 ... h(M-1)]
+%  then its Z transform is:
+%  M2=floor(M/2);
+%  $H[Z] = h0 Z^{+M2} + h1 Z^{+M2-1} + ...  h(M-1) Z^{+M2-(M-1)}$ 
+%
+%  Thus H represents an impulse response with sample zero in h(M2).
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  DATAOUT = datapack_conv(DATA,H)
+%  
+%  Input:
+%  DATA   is a speckle data pack. 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.
+%  H      is a vector, where H represents a non-causal FIR filters centered in h(M2).
+%
+%  
+%  Output:
+%  DATAOUT  is obtained from the output of H FIR filter, in non-causal form, 
+%           where its input is each pixel of datapack. 
+%  
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 01 of December of 2015.
+%  Review: 25 of February of 2016.
+%
+
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+    if length(NSIZE)~=3
+		error('The datapack should have 3 dimensions.');
+	end
+
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+
+	M=length(H);
+	M2=floor(M/2);
+
+
+	%% Adding M/2 frames with zeros to datapack.
+	%% This new datapack is called of D.
+	D=zeros(NLIN,NCOL,M2+NTIMES+M2);
+	D(:,:,(1+M2):(NTIMES+M2))=DATA(:,:,1:NTIMES);
+
+	
+
+	%% Non-causal filtering using H coefficients
+	DATAOUT=filter(H,[1],D,[],3);
+	DATAOUT=DATAOUT(:,:,M2+1+M2:M2+NTIMES+M2);
+end
+
diff --git a/inst/mfiles/filter/firfilterbank.m b/inst/mfiles/filter/firfilterbank.m
new file mode 100644
index 0000000..a52af39
--- /dev/null
+++ b/inst/mfiles/filter/firfilterbank.m
@@ -0,0 +1,186 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [DATA0 DATA1] = firfilterbank(DATA,FILTER,MODE)
+%
+%  This function implements a filter bank for each pixel of a datapack. 
+%
+%  This function uses two FIR filters (H0 and H1) of order (M-1) in non-causal 
+%  form, so that if 
+%  H    = [h0 h1 h2 ... h(M-1)]
+%  then its Z transform is:
+%  M2=floor(M/2);
+%  $H[Z] = h0 Z^{+M2} + h1 Z^{+M2-1} + ...  h(M-1) Z^{+M2-(M-1)}$ 
+%
+%  The function implements some modes
+%  
+%  MODE0: This mode uses two FIR filters (H0 and H1), thus it can accept {H0} or 
+%         {H0 , H1} as input parameter. If only the H0 filter is delivered as  
+%         input parameter, then the H1 filter is calculated as
+%         the complement filter of H0. $H1[Z]= 1-H0[Z]$. 
+%         
+%  MODE2: This mode uses two FIR filters (H0 and H1), and it only can accept {H0} 
+%         as input parameter; H1 filter is calculated as the quadrature mirror 
+%         filter of H0. $H1[Z]= H0[-Z]$. At end the, there will be a 
+%         down-sampler by 2.
+%         This mode is commonly used with H0 as low pass FIR filter with cut-off 
+%         in pi/2 (for a 2*pi normalized frequency range). In order to have a perfect reconstruction
+%         it is necessary that $D[Z]=H0^2[Z]-H0^2[-Z]=A Z^B$ for any A and B.
+%
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  [DATA0 DATA1] = firfilterbank(DATA,FILTER,MODE);
+%  [DATA0 DATA1] = firfilterbank(DATA,H0,'MODE2');
+%  [DATA0 DATA1] = firfilterbank(DATA,H0,'MODE0');
+%  [DATA0 DATA1] = firfilterbank(DATA,[H0;H1],'MODE0');
+%  
+%  Input:
+%  DATA   is a speckle data pack. 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.
+%  FILTER is a matrix (with 2 lines) or a vector, where FILTER=H0 or FILTER=[H0;H1].
+%         H0 and H1 represent two FIR filters.
+%         FILTER=H0 is used in the mode 'MODE2', by other side FILTER=H0 or FILTER=[H0;H1] 
+%         can be used in the mode 'MODE0'.
+%  MODE   is the type of analysis selected of a filter bank. It can be 'MODE0' or 
+%         'MODE2'.
+%  
+%  Output:
+%  DATA0  is obtained from the output of H0 FIR filter, in non-causal form, 
+%         with input each pixel of datapack. If the mode used have a 
+%         down-sampler after filtering, then DATA0 is the output of down-sampler.
+%  DATA1  is obtained after the output of H1 FIR filter, in non-causal form, 
+%         with input each pixel of datapack. If the mode used have a 
+%         down-sampler after filtering, then DATA1 is the output of down-sampler.
+%  
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>  
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 01 of December of 2015.
+%  Review: 25 of February of 2016.
+%
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+    if length(NSIZE)~=3
+		error('The datapack should have 3 dimensions.');
+	end
+
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+
+	MODE=upper(MODE);
+
+	%% Processing the second parameter to get H0 and H1
+	[H0 H1]=processing_filter(FILTER,MODE);
+
+	%% Non-causal filtering using H0 coefficients
+	DATA0=datapack_conv(DATA,H0);
+
+	%% Non-causal filtering using H1 coefficients
+	DATA1=datapack_conv(DATA,H1);
+	
+
+	if		( strcmp(MODE,'MODE2')==1 )
+		DATA0=datapack_downsampling(DATA0,2);
+		DATA1=datapack_downsampling(DATA1,2);
+	elseif	( strcmp(MODE,'MODE0')==1 )
+		%
+	else
+		warning('The used mode no exist. Switching to: MODE0');
+	end
+	
+end
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% D is down sampling version of DATA.                                        %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+function D=datapack_downsampling(DATA,N)
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+    if length(NSIZE)~=3
+		error('The datapack should have 3 dimensions.');
+	end
+
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+
+	n=ceil(NTIMES/N);
+	steps=[0:n-1]*N+1;
+
+	D= DATA(:,:,steps);
+end
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Processing the second parameter.                                           %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+function [H0 H1]=processing_filter(FILTER,MODE)
+	if isvector(FILTER)
+		
+		H0=FILTER;
+
+		% Creating, H1, the quadrature mirror filter of H0.
+		if  strcmp(MODE,'MODE2') 
+			if  rem(length(FILTER),2)~=0
+				error(['Creating, H1, the quadrature mirror filter: Number of elements ', ...
+					   'of FIR filter must be even for creating quadrature filter.']);
+			end
+			%% H1 Quadrature filter of H0
+			H1=qmfmirror(H0);
+
+		%elseif ( strcmp(MODE,'MODE0' ) ) %%<--default
+		else
+			% H1[Z]= 1-H0[Z]. 
+			M=length(H0);	M2=floor(M/2);
+			H1=-H0;
+			H1(M2+1)=1-H0(M2+1);
+		end
+	elseif ismatrix(FILTER)
+		if size(FILTER,1)==2
+			if strcmp(MODE,'MODE2') 
+				error([ 'The MODE2 only accept a H0 filter vector (1xN_even).']);
+			end
+        	H0=FILTER(1,:);
+			H1=FILTER(2,:);
+			M=length(H0);
+		else
+			error('The second parameter should be a vector (1xN) or a matrix (2xN) with the parameters of FIR filters.');
+		end
+    end
+end
+
diff --git a/inst/mfiles/filter/firsynthesisbank.m b/inst/mfiles/filter/firsynthesisbank.m
new file mode 100644
index 0000000..8937b1a
--- /dev/null
+++ b/inst/mfiles/filter/firsynthesisbank.m
@@ -0,0 +1,159 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function DATA=firsynthesisbank(DATA0,DATA1,H0)
+%
+%  This function makes a step to synthesis filter bank for each pixel
+%  of datapacks DATA0 and DATA1. It uses up-samplers in your inputs and
+%  after FIR filters (G0 and G1) of order (M-1) in non-causal form. If
+%  H0    = [h0 h1 h2 ... h(M-1)]
+%  then your Z transform is:
+%  M2=floor(M/2);
+%  $H[Z] = h0 Z^{+M2} + h1 Z^{+M2-1} + ...  h(M-1) Z^{+M2-(M-1)}$ 
+%
+%  The function accepts the filter H0 as input parameter, so that the filters 
+%  G0 and G1  are calculated as $G0[Z]=H0[Z]$ and $G1[Z]= -H0[-Z]$. 
+%  H0 should be a low pass FIR filter with cut-off in pi/2 
+%  (for a 2*pi normalized frequency range) and, DATA0 and DATA1 the outputs of
+%  an step of a filter bank, as in the function firfilterbank() in MODE='MODE2'.
+%  In order to get a perfect reconstruction it is necessary that 
+%  $D[Z]=H0^2[Z]-H0^2[-Z]=A Z^B$ for any A and B.
+%
+%  
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  DATA=firsynthesisbank(DATA0,DATA1,H0);
+%  
+%  Input:
+%  DATA0  is a speckle data pack. Where DATA0 is a 3D matrix created grouping NTIMES 
+%         intensity matrices with NLIN lines and NCOL columns. When N=size(DATA0), then
+%         N(1,1) represents NLIN and
+%         N(1,2) represents NCOL and
+%         N(1,3) represents NTIMES.
+%         DATA0 is obtained after the down-sampler of output of H0 FIR filter in 
+%         a step of a filter bank with low-pass filter H0.
+%         DATA0 and DATA1 should have the same size.
+%  DATA1  is a speckle data pack. Where DATA1 is a 3D matrix created grouping NTIMES 
+%         intensity matrices with NLIN lines and NCOL columns. When N=size(DATA1), then
+%         N(1,1) represents NLIN and
+%         N(1,2) represents NCOL and
+%         N(1,3) represents NTIMES.
+%         DATA1 is obtained after the down-sampler of output of H1 FIR filter in 
+%         a step of a filter bank with low-pass filter H0.
+%         DATA1 and DATA0 should have the same size.
+%  H0     is a vector with the parameters of a FIR filter. H0 should be a low 
+%         pass filter with cut-off in pi/2 (for a 2*pi normalized frequency range).
+%         In order to ger a perfect reconstruction it is necessary that 
+%         $D[Z]=H0^2[Z]-H0^2[-Z]=A Z^B$ for any A and B.
+%  
+%  Output:
+%  DATA   is a synthesis of speckle datapacks DATA0 and DATA1. The number of images
+%         inside DATA is twice of the number of images of DATA0 and DATA1.
+%  
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 01 of December of 2015.
+%  Review: 27 of February of 2016.
+%
+	if ~isequal(size(DATA0),size(DATA1))
+		error('The datapacks should have the same sizes.');
+	end
+
+    NSIZE = size(DATA0);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+    if length(NSIZE)~=3
+		error('The datapack should have 3 dimensions.');
+	end
+
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+	
+	[G0 G1]=processing_filter(H0);
+
+	%% upsampling datapack.
+	DATA0_UP=datapack_upsampling(DATA0,2);
+
+	%% upsampling datapack.
+	DATA1_UP=datapack_upsampling(DATA1,2);
+
+	%% Non-causal filtering using G0 coefficients
+	DATA0_UP = datapack_conv(DATA0_UP,2*G0);
+
+	%% Non-causal filtering using G1 coefficients
+	DATA1_UP = datapack_conv(DATA1_UP,2*G1);
+
+	DATA=DATA0_UP+DATA1_UP;
+end
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Processing the third parameter.                                           %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+function [G0 G1]=processing_filter(H0)
+
+	if  rem(length(H0),2)~=0
+		error(['Creating, [G0 G1], the synthesis quadrature mirror filter: ', ...
+			   'Number of elements of FIR filter must be even.']);
+	end
+	
+	% Creating, G0= H0( Z),
+	G0=H0;
+
+	% Creating, G1=-H0(-Z),
+	G1=-qmfmirror(H0);
+	
+end
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% D is up sampling version of DATA.                                        %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+function D=datapack_upsampling(DATA,N)
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+    if length(NSIZE)~=3
+		error('The datapack should have 3 dimensions.');
+	end
+
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+
+	D=zeros(NLIN,NCOL,N*NTIMES);
+
+	steps=[0:(NTIMES-1)]*N+2;
+
+	D(:,:,steps)= DATA;
+end
+
diff --git a/inst/mfiles/filter/firsynthesispath.m b/inst/mfiles/filter/firsynthesispath.m
new file mode 100644
index 0000000..76b2e50
--- /dev/null
+++ b/inst/mfiles/filter/firsynthesispath.m
@@ -0,0 +1,173 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function DATAOUT=firsynthesispath(DATA,H0,SEQ)
+%
+%  This function makes a synthesis of a path in a filter bank, for each pixel
+%  of datapack DATA. 
+%
+%  It uses in cascade of reconstruction blocks Bi with i=1 to i=L=length(SEQ). 
+%  Each reconstruction block Bi is formed by:
+%  1) up-sampler by 2
+%  2) gain of 2
+%  3) Gj FIR FILTER, so that j=SEQ(L+1-i)
+%
+%  The function accepts the filter H0 as input parameter, so that the filters 
+%  G0 and G1  are calculated as $G0[Z]=H0[Z]$ and $G1[Z]= -H0[-Z]$.
+%  If
+%  H0    = [h0 h1 h2 ... h(M-1)]
+%  then your Z transform is:
+%  M2=floor(M/2);
+%  $H[Z] = h0 Z^{+M2} + h1 Z^{+M2-1} + ...  h(M-1) Z^{+M2-(M-1)}$ 
+% 
+%  H0 should be a low pass FIR filter with cut-off in pi/2 
+%  (for a 2*pi normalized frequency range).
+%  In order to get a perfect reconstruction it is necessary that 
+%  $D[Z]=H0^2[Z]-H0^2[-Z]=A Z^C$ for any A and C.
+%
+%  
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  DATAOUT=firsynthesispath(DATA,H0,SEQ);
+%  
+%  Input:
+%  DATA   is a speckle data pack. Where DATA is a 3D matrix created grouping NTIMES 
+%         intensity matrices with NLIN lines and NCOL columns. When N=size(DATA0), then
+%         N(1,1) represents NLIN and
+%         N(1,2) represents NCOL and
+%         N(1,3) represents NTIMES.
+%         DATA is obtained after the down-sampler of output of H0 FIR filter in 
+%         a step of a filter bank with low-pass filter H0.
+%  H0     is a vector with the parameters of a FIR filter. H0 should be a low 
+%         pass filter with cut-off in pi/2 (for a 2*pi normalized frequency range).
+%         In order to get a perfect reconstruction is necessary that 
+%         $D[Z]=H0^2[Z]-H0^2[-Z]=A Z^B$ for any A and B.
+%  SEQ    is a vector with binary values. These values indicates the path
+%         in the decomposition scheme used to get the datapack DATA.
+%  
+%  Output:
+%  DATAOUT is a synthesis of the speckle datapack DATA. The number of images
+%          inside DATAOUT is 2^{L=length(SEQ)} times of the number of images of DATA.
+%  
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 01 of December of 2015.
+%  Review: 27 of February of 2016.
+%
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+    if length(NSIZE)~=3
+		error('The datapack should have 3 dimensions.');
+	end
+
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+	
+	[G0 G1]=processing_filter(H0);
+
+	L=length(SEQ);
+	for II=L:-1:1
+		if(SEQ(II)==0)
+			DATA=reconstruction(DATA,G0);
+		else
+			DATA=reconstruction(DATA,G1);
+		end
+	end
+
+	DATAOUT=DATA;
+
+end
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% DATA -> UP2 -> 2-> G -> DATA_UP                                            %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+function DATA_UP=reconstruction(DATA,G)
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+	M=length(G);
+	M2=floor(M/2);
+
+	%% Upsampling datapack.
+	DATA_UP=datapack_upsampling(DATA,2);
+
+	%% Non-causal filtering using G coefficients
+	DATA_UP = datapack_conv(DATA_UP,2*G);
+
+end
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Processing the third parameter.                                           %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+function [G0 G1]=processing_filter(H0)
+
+	if  rem(length(H0),2)~=0
+		error(['Creating, [G0 G1], the synthesis quadrature mirror filter: ', ...
+			   'Number of elements of FIR filter must be even.']);
+	end
+	
+	% Creating, G0= H0( Z),
+	G0=H0;
+
+	% Creating, G1=-H0(-Z),
+	G1=-qmfmirror(H0);
+	
+end
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% D is up sampling version of DATA.                                        %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+function D=datapack_upsampling(DATA,N)
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+    if length(NSIZE)~=3
+		error('The datapack should have 3 dimensions.');
+	end
+
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+
+	D=zeros(NLIN,NCOL,N*NTIMES);
+
+	steps=[0:(NTIMES-1)]*N+2;
+
+	D(:,:,steps)= DATA;
+end
+
diff --git a/inst/mfiles/filter/freqmod.m b/inst/mfiles/filter/freqmod.m
new file mode 100644
index 0000000..ec89755
--- /dev/null
+++ b/inst/mfiles/filter/freqmod.m
@@ -0,0 +1,70 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [AH varargout]=freqmod(H,N)
+% This function returns the modulus of frequency response of function H.
+% Frequently H will be a FIR filter.
+%
+%  If  H    = [h0 h1 h2 ... h(M-1)] then your Z transform is:
+%  M2=floor(M/2);
+%  $H[Z] = h0 Z^{+M2} + h1 Z^{+M2-1} + ...  h(M-1) Z^{+M2-(M-1)}$ 
+%  and the function return $AH=|H[Z=e^{jW}]|$ for W from 0 to pi.
+%
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  AH=freqmod(H,N)
+%  [AH FREQN]=freqmod(H,N);
+%  
+%  Input:
+%  H     is a vector with the parameters of H function. 
+%  N     is the number of analysis points in the frequency response.
+%  Output:
+%  AH     is the modulus of frequency response of function H. 
+%         $AH=|H[Z=e^{jW}]|$ for W from 0 to pi.
+%  FREQN  [OPTIONAL] is the normalized frequency of points in AH, thus for the 
+%         point AH(id) we have W=FREQN(id)*pi.
+%  
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 01 of December of 2015.
+%  Review: 27 of February of 2016.
+%
+    M =length(H);
+    
+    TETA=[0:(N-1)]*pi/(N-1);
+    
+        
+    AH=0;
+    for II=1:M
+        AH=AH+H(II)*exp(i*TETA*(II-1));
+    end
+    AH=abs(AH);
+
+    if nargout>1
+        %FREQN=[0:(N-1)]/(N-1);
+        varargout{1}=[0:(N-1)]/(N-1);
+    end
+end
diff --git a/inst/mfiles/filter/qmfmaker.m b/inst/mfiles/filter/qmfmaker.m
new file mode 100644
index 0000000..96c89e5
--- /dev/null
+++ b/inst/mfiles/filter/qmfmaker.m
@@ -0,0 +1,90 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [H]=qmfmaker(ORDER)
+%
+%  This function returns a vector with the parameters of a FIR filter with cut-off 
+%  in pi/2 (for a 2*pi normalized frequency range). The function tries to fulfill 
+%  $D[Z] = H^2[Z]-H^2[-Z] = A Z^B$ for any A and B.
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  H=qmfmaker(ORDER);
+%  
+%  Input:
+%  ORDER  is the order of H=[h0 h1 ... h(ORDER)] FIR filter that try fulfill 
+%         $D[Z] = H^2[Z]-H^2[-Z] = A Z^B$ for any A and B.
+%         The number of elements of FIR filter must be even 
+%         and consequently the ORDER should be odd.
+%  Output:
+%  H     is a vector with the parameters of a FIR filter. H is a low pass 
+%         filter with cut-off in pi/2 (for a 2*pi normalized frequency range).
+%  
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>s
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 01 of December of 2015.
+%  Review: 27 of February of 2016.
+%
+	if  rem(ORDER+1,2)~=0
+		error(['The number of elements of FIR filter must be even and consequently the ORDER should be odd.']);
+	end
+
+	L=16;
+	A=0.5;	B=0.6;
+
+	[A B]=findminstd(A,B,L,ORDER);
+	[A B]=findminstd(A,B,L,ORDER);
+	[A B]=findminstd(A,B,L,ORDER);
+
+	CUTOFF=(A+B)/2;
+	H=fir1(ORDER,CUTOFF);
+end
+
+% Find the cut-off interval [CUTOFF_A0 CUTOFF_B0]
+% smaller than the standard deviation value of D=|H^2(Z)-H^2(-Z)| with Z=exp(i w), 
+% between the cut-off interval [CUTOFF_A CUTOFF_B].
+function [CUTOFF_A0 CUTOFF_B0]=findminstd(CUTOFF_A,CUTOFF_B,L,ORDER)
+	CUTOFF=linspace(CUTOFF_A,CUTOFF_B,L);
+	sigma=zeros(1,L);
+
+	for II=1:L	
+		H=fir1(ORDER,CUTOFF(II));
+		[H1 D]=qmfmirror(H,ORDER*2);
+		sigma(II)=std(D);
+	end
+	[m, id] = min(sigma);
+
+	if((id-1)>=1)
+		CUTOFF_A0=CUTOFF(id-1);
+	else
+		CUTOFF_A0=CUTOFF(1);
+	end
+
+	if((id+1)<=L)
+		CUTOFF_B0=CUTOFF(id+1);
+	else
+		CUTOFF_B0=CUTOFF(L);
+	end
+end
diff --git a/inst/mfiles/filter/qmfmirror.m b/inst/mfiles/filter/qmfmirror.m
new file mode 100644
index 0000000..3ca2095
--- /dev/null
+++ b/inst/mfiles/filter/qmfmirror.m
@@ -0,0 +1,85 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [H1 varargout]=qmfmirror(H0,varargin)
+%  This function returns the vector H1, the quadrature mirror filter 
+%  of H0. If  H0 = [h0 h1 h2 ... h(M-1)] then your Z transform is:
+%  M2=floor(M/2);
+%  $H[Z] = h0 Z^{+M2} + h1 Z^{+M2-1} + ...  h(M-1) Z^{+M2-(M-1)}$ 
+%  and
+%  $H1[Z]=H0[-Z]$
+%
+%  Additionally, the function returns $|D[Z=e^{i*W}]|$, where $D[Z] = H0^2[Z]-H0^2[-Z]$
+%  for W from 0 to pi.
+% 
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  H1=qmfmirror(H0);
+%  [H1 AD]=qmfmirror(H0);
+%  [H1 AD]=qmfmirror(H0,N);
+%  [H1 AD FREQN]=qmfmirror(H0);
+%  [H1 AD FREQN]=qmfmirror(H0,N);
+%  
+%  Input:
+%  H0     is a vector with the parameters of a FIR filter.
+%  N      [Optional] is the number of analyzed points in AD.
+%  Output:
+%  H1     is the quadrature mirror filter of H0. H0[Z]=H1[-Z]
+%  AD     [Optional] is a modulus of $D[Z=e^{i*W}]$, where $D[Z] = H0^2[Z]-H0^2[-Z]$.
+%         The number of analyzed points in AD is equal to N.
+%  FREQN  [Optional] is the normalized frequency of points in AD, thus for the 
+%         point AD(id) we have W=FREQN(id)*pi.
+%  
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 01 of December of 2015.
+%  Review: 27 of February of 2016.
+%
+    M =length(H0);
+	H1=zeros(1,M);
+
+    M2=floor(M/2);
+
+    for II=1:M
+        H1(II)=((-1)^(+M2+1-II) )*H0(II);
+    end
+
+    if nargout>1
+        D=(conv(H0,H0)-conv(H1,H1));
+
+        if nargin>1
+            N=varargin{1};
+        else
+            N=65;
+        end
+
+        [varargout{1} FREQN]=freqmod(D,N);
+        if nargout>2
+            varargout{2}=FREQN;
+        end
+    end
+end
+
diff --git a/inst/mfiles/graphic/fujii.m b/inst/mfiles/graphic/fujii.m
new file mode 100644
index 0000000..8bb16cf
--- /dev/null
+++ b/inst/mfiles/graphic/fujii.m
@@ -0,0 +1,104 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y] = fujii(DATA,varargin)
+%
+%  This function implements the Fujii Technique [1]. Use as
+%  input data a 3D matrix created grouping NTIMES intensity matrices I(k)
+%  1<=k<=NTIMES
+%
+%  I(k)=DATA(:,:,k)
+%
+%  $FUJII=\sum\limits_{k=1}^{NTIMES-1} \frac{|I(k)-I(k+1)|}{I(k)+I(k+1)+eps}$
+%
+%  The function is normalized to:
+%
+%  $Y=FUJII \frac{200}{NTIMES-1}$
+%
+%  Where (NTIMES-1) is the number of elements in the sum, 2 is a factor to
+%  to do $(I(k)+I(k+1))/2$, a mean value, and 100 is a percentage factor.
+%  Thus the Y matrix represents the expected percentage value of absolute difference 
+%  $|I(k)-I(k+1)|$ relative to the mean value $(I(k)+I(k+1))/2$ for any two 
+%  consecutive values.
+%
+%  $Y \approx 100*E[\frac{|I(k)-I(k+1)|}{(I(k)+I(k+1))/2}]$
+%
+%  References:
+%  [1] 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 = fujii(DATA);
+%  
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  SHOW [Optional] If SHOW is equal to the string 'off', then do not plot the result.
+%
+%  Output:
+%  Y   returns the Fujii matrix.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira <juniomoreira at iftm.edu.br>
+%  Code documented by: Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com>          
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of May of 2013.
+%  Review: 09 of March of 2016.
+%
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+    
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+    
+    Y = zeros(NLIN,NCOL);
+            
+    for k = 1:NTIMES-1
+        Y = abs(DATA(:,:,k) - DATA(:,:,k+1))./(DATA(:,:,k) + DATA(:,:,k+1) + eps) + Y;
+    end
+        
+	Y=Y*200/(NTIMES-1);
+
+	SHOW='';
+	if(nargin>=2)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+    if ( ~strcmp(SHOW,'off')) 
+		figure
+    	imagesc(Y);colorbar
+    	title('Fujii Method'); 
+		daspect ([1 1 1]);
+	end     
+
diff --git a/inst/mfiles/graphic/gendiff.m b/inst/mfiles/graphic/gendiff.m
new file mode 100644
index 0000000..7d03c31
--- /dev/null
+++ b/inst/mfiles/graphic/gendiff.m
@@ -0,0 +1,114 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y] = gendiff(DATA,varargin)
+%
+%  This function implements the Generalized Difference Technique [1]. Use as
+%  input data a 3D matrix created grouping NTIMES intensity matrices I(k)
+%  1<=k<=NTIMES
+%
+%  I(k)=DATA(:,:,k)
+%
+%  $GD=\sum\limits_{k=1}^{NTIMES-1} \sum\limits_{l=1}^{NTIMES-k} |I(k)-I(k+l)|$
+%
+%  The function is normalized  with the number of elements in the sum.
+%
+%  $Y=\frac{GD}{\binom{NTIMES}{2}}$
+%
+%  Where $\binom{NTIMES}{2}$ is the binomial coefficient of NTIMES and 
+%  2. It is the number of combinations of NTIMES items taken 2 at a time.
+%  Thus Y matrix represents the expected value of absolute difference 
+%  $|I(k1)-I(k2)|$ for any two different k1 and k2 values.
+%
+%  $Y\approx E[|I(k1)-I(k2)|]$
+%
+%  Reference:
+%  [1] ARIZAGA, R. et al. Display of the local activity using dynamical speckle 
+%      patterns. Optical Engineering, Redondo Beach, v. 41, n. 2, p. 287-294, 
+%      June 2002.
+%
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  Y = gendiff(DATA);
+%    
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  SHOW [Optional] If SHOW is equal to string 'off', then do not plot the result.
+%
+%  Output:
+%  Y    returns the Generalized Difference matrix.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira <juniomoreira at iftm.edu.br>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of May of 2013.
+%  Review: 09 of March of 2016.
+%  
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+    
+    if (NTIMES<2)
+        error('Number of frames used are not enough')
+    end
+    
+    disp('Start G.D. method ...'); 
+    
+    Y = zeros(NLIN,NCOL);
+          
+    for k1 = 1:NTIMES-1
+        for k2 = 1:NTIMES-k1 
+            Y = abs(DATA(:,:,k1) - DATA(:,:,k1+k2)) + Y;
+        end
+
+		if(mod(k1,round(NTIMES/10))==0)
+			disp([num2str(k1*100/(NTIMES-1)),' %']); 
+		end
+    end
+
+    disp('[OK]');
+	
+	Y=Y/nchoosek(NTIMES,2);
+
+	SHOW='';
+	if(nargin>=2)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+    if ( ~strcmp(SHOW,'off')) 
+		figure                 
+    	imagesc(Y); colorbar
+    	title('Generalized Difference Method');
+		daspect ([1 1 1]);
+	end
+        
diff --git a/inst/mfiles/graphic/moments/graphavd.m b/inst/mfiles/graphic/moments/graphavd.m
new file mode 100644
index 0000000..1846244
--- /dev/null
+++ b/inst/mfiles/graphic/moments/graphavd.m
@@ -0,0 +1,99 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [GAVD] = graphavd(DATA,varargin)
+%
+%  This function implements the Absolute Value of the Differences (AVD) method [1], 
+%  only using a pixel-by time, with the normalization of the co-occurrence matrix (COM) 
+%  proposed by CARDOSO, R.R. et al. [2]. 
+%  Use as input data a 3D matrix created grouping NTIMES intensity matrices I(k)
+%  1<=k<=NTIMES
+%
+%  I(k)=DATA(:,:,k)
+%
+%  $GAVD=\frac{1}{NTIMES-1}\sum\limits_{k=1}^{NTIMES-1} |I(k)-I(k+1)| \approx E[|I(k)-I(k+1)|]$
+%
+%
+%  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]  R.R. Cardoso, R.A. Braga, Enhancement of the robustness on dynamic speckle 
+%       laser numerical analysis, Optics and Lasers in Engineering, 
+%       Volume 63, December 2014, Pages 19-24, ISSN 0143-8166, 
+%       http://dx.doi.org/10.1016/j.optlaseng.2014.06.004.
+%
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  GAVD = graphavd(DATA);
+%    
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  SHOW [Optional] If SHOW is equal to string 'off', then do not plot the result.
+%
+%  Output:
+%  GAVD returns the GAVD matrix.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com> 
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>    
+%  Code adapted by:    Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 09 of August of 2015.
+%  Review: 09 of March of 2016.
+%  
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+    
+    if (NTIMES<2)
+        error('Number of frames used are not enough')
+    end
+    
+    GAVD = zeros(NLIN,NCOL);
+          
+    for k = 1:NTIMES-1
+ 
+        GAVD = abs(DATA(:,:,k) - DATA(:,:,k+1)) + GAVD;
+    end
+
+   	GAVD=GAVD/(NTIMES-1);
+
+	SHOW='';
+	if(nargin>=2)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+    if ( ~strcmp(SHOW,'off')) 
+		figure                 
+    	imagesc(GAVD); colorbar
+    	title('Graphic AVD Method');
+		daspect ([1 1 1]);
+	end    
diff --git a/inst/mfiles/graphic/moments/graphim.m b/inst/mfiles/graphic/moments/graphim.m
new file mode 100644
index 0000000..62f45dd
--- /dev/null
+++ b/inst/mfiles/graphic/moments/graphim.m
@@ -0,0 +1,100 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [GIM] = graphim(DATA,varargin)
+%
+%  This function implements the Inertia Moment (IM) [1] method, only on a pixel-by time, 
+%  with the normalization of the co-occurrence matrix (COM) proposed by 
+%  CARDOSO, R.R. et al. [2]. The function returns the graphic IM method.
+%  Use as input data a 3D matrix created grouping NTIMES intensity matrices I(k)
+%  1<=k<=NTIMES
+%
+%  I(k)=DATA(:,:,k)
+%
+%  $GIM=\frac{1}{NTIMES-1}\sum\limits_{k=1}^{NTIMES-1}(I(k)-I(k+1))^2 \approx E[(I(k)-I(k+1))^2]$
+%
+%  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]  R.R. Cardoso, R.A. Braga, Enhancement of the robustness on dynamic speckle 
+%       laser numerical analysis, Optics and Lasers in Engineering, 
+%       Volume 63, December 2014, Pages 19-24, ISSN 0143-8166, 
+%       http://dx.doi.org/10.1016/j.optlaseng.2014.06.004.
+% 
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  GIM = graphim(DATA);
+%    
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  SHOW [Optional] If SHOW is equal to string 'off', then do not plot the result.
+%
+%  Output:
+%  GIM  returns the Generalized Difference matrix.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>     
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.bf>
+%  
+%  Date: 10 of July of 2015.
+%  Review: 09 of March of 2016.
+% 
+
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+    
+    if (NTIMES<2)
+        error('Number of frames used are not enough')
+    end
+    
+    GIM = zeros(NLIN,NCOL);
+          
+    for k = 1:NTIMES-1
+ 
+        GIM = (DATA(:,:,k) - DATA(:,:,k+1)).^2 + GIM;
+    end
+
+	GIM=GIM/(NTIMES-1);
+
+	SHOW='';
+	if(nargin>=2)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+    if ( ~strcmp(SHOW,'off')) 
+		figure                 
+    	imagesc(GIM); colorbar
+    	title('Graphic IM Method');
+		daspect ([1 1 1]);
+	end
+        
diff --git a/inst/mfiles/graphic/moments/graphptd.m b/inst/mfiles/graphic/moments/graphptd.m
new file mode 100644
index 0000000..c648313
--- /dev/null
+++ b/inst/mfiles/graphic/moments/graphptd.m
@@ -0,0 +1,101 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [GPTD] = graphptd(DATA,P,varargin)
+%
+%  This function implements the Parameterized form of Temporal Difference (PTD) 
+%  [1] technique. Use as input data a 3D matrix created grouping NTIMES intensity 
+%  matrices I(k), 1<=k<=NTIMES
+%
+%  I(k)=DATA(:,:,k)
+%
+%  $PTD=\sum\limits_{k=1}^{NTIMES-1} |I(k)-I(k+1)|^P$
+%
+%  The function is normalized  with the number of elements in the sum.
+%  Thus, GPTD matrix represents the expected value of absolute difference 
+%  $|I(k)-I(k+1)|$ for any k value.
+%
+%  $GPTD=\frac{PTD}{NTIMES-1} \approx E[|I(k)-I(k+1)|^P]$
+%
+%  References:
+%  [1] Preeti D. Minz, A.K. Nirala, Intensity based algorithms for biospeckle 
+%      analysis, Optik - International Journal for Light and Electron Optics, 
+%      Volume 125, Issue 14, July 2014, Pages 3633-3636, ISSN 0030-4026, 
+%      http://dx.doi.org/10.1016/j.ijleo.2014.01.083.
+%
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  GPTD = graphptd(DATA);
+%    
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  P    is a parameter whose value may be positive integer as well as fraction.
+%  SHOW [Optional] If SHOW is equal to string 'off', then do not plot the result.
+%
+%  Output:
+%  GPTD returns the GPTD matrix.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>    
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 09 of August of 2015.
+%  Review: 09 of March of 2016.
+%  
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+    
+    if (NTIMES<2)
+        error('Number of frames used are not enough')
+    end
+    
+    GPTD = zeros(NLIN,NCOL);
+          
+    for k = 1:NTIMES-1
+ 
+        GPTD = abs(DATA(:,:,k) - DATA(:,:,k+1)).^P + GPTD;
+    end
+
+	GPTD=GPTD/(NTIMES-1);
+
+	SHOW='';
+	if(nargin>=3)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+    if ( ~strcmp(SHOW,'off'))   
+		figure                 
+	    imagesc(GPTD); colorbar
+	    title(['Graphic PTD Method with P=',num2str(P)]);
+		daspect ([1 1 1]);
+	end
+        
diff --git a/inst/mfiles/graphic/moments/graphrvd.m b/inst/mfiles/graphic/moments/graphrvd.m
new file mode 100644
index 0000000..f53209f
--- /dev/null
+++ b/inst/mfiles/graphic/moments/graphrvd.m
@@ -0,0 +1,98 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [GRVD] = graphrvd(DATA,varargin)
+%
+%  This function implements the Regular Value of the Differences method [1],
+%  only on a pixel-by time, with the normalization of the co-occurrence matrix (COM) 
+%  proposed by CARDOSO, R.R. et al. [2].
+%
+%  Use as input data a 3D matrix created grouping NTIMES intensity matrices I(k)
+%  1<=k<=NTIMES
+%
+%  I(k)=DATA(:,:,k)
+%
+%  $GRVD=\frac{1}{NTIMES-1}\sum\limits_{k=1}^{NTIMES-1} (I(k)-I(k+1))$
+%
+%
+%  References:
+%  [1]  Pujaico Rivera Fernando. Paper coming soon.
+%  [2]  CARDOSO, R.R.; BRAGA R.A. 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:
+%  GRVD = graphrvd(DATA);
+%    
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  SHOW [Optional] If SHOW is equal to string 'off', then do not plot the result.
+%
+%  Output:
+%  GRVD returns the GRVD matrix.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>    
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date:   09 of August of 2015.
+%  Review: 09 of March of 2016.
+%  
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+    
+    if (NTIMES<2)
+        error('Number of frames used are not enough')
+    end
+    
+    GRVD = zeros(NLIN,NCOL);
+          
+    for k = 1:NTIMES-1
+ 
+        GRVD = (DATA(:,:,k+1) - DATA(:,:,k)) + GRVD;
+    end
+
+	GRVD=GRVD/(NTIMES-1);
+
+	SHOW='';
+	if(nargin>=2)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+    if ( ~strcmp(SHOW,'off'))  
+		figure                 
+    	imagesc(GRVD); colorbar
+    	title('Graphic RVD Method');
+		daspect ([1 1 1]);
+	end
+        
diff --git a/inst/mfiles/graphic/others/graphmhi.m b/inst/mfiles/graphic/others/graphmhi.m
new file mode 100644
index 0000000..c48e85c
--- /dev/null
+++ b/inst/mfiles/graphic/others/graphmhi.m
@@ -0,0 +1,105 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function MHI=graphmhi(DATA,U,varargin)
+%
+%  This function implements  the Motion History Image (MHI) technique [1-2], 
+%  and considers a pixel as in activity, where it should have an 
+%  absolute intensity jump superior to U.  
+%
+%  References:
+%  [1]  Davis, J.W., 'Hierarchical motion history images for recognizing human 
+%       motion,' Detection and Recognition of Events in Video, 2001. Proceedings. 
+%       IEEE Workshop on , vol., no., pp.39,46, 2001. doi: 10.1109/EVENT.2001.938864
+%  [2]  R.P. Godinho, M.M. Silva, J.R. Nozela, R.A. Braga, 'Online biospeckle assessment
+%       without loss of definition and resolution by motion history image', 
+%       Optics and Lasers in Engineering, Volume 50, Issue 3, March 2012, Pages 366-372,
+%       ISSN 0143-8166, http://dx.doi.org/10.1016/j.optlaseng.2011.10.023.
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  graphmhi(DATA,U);
+%  graphmhi(DATA,U,'off');
+%  
+%  Input:
+%  DATA     is the speckle data pack. 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.
+%  U        is the activity threshold. Only considered as activity, it changes the 
+%           intensity values larger than U.
+%  SHOW     [Optional] If SHOW is equal to string 'off' then not plot the result.
+%           By default 'on'.
+%
+%  Output:
+%  MHI      is the motion history image matrix of data pack. The elements, in 
+%           the matrix, with higher values pertain to most recent activities
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>                    
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of July of 2015.
+%  Review: 23 of March of 2016.
+%
+    NSIZE = size(DATA); 
+    NLIN  = NSIZE(1,1);
+    NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+	% subtration of two images in sequence
+    S = cell(1,NTIMES-1);
+    for JJ = 1 : NTIMES-1
+        S{JJ} = abs( DATA(:,:,JJ) - DATA(:,:,JJ+1) );
+    end
+     
+	% threshold U
+    T = cell(1,NTIMES-1);
+    for JJ = 1 : NTIMES-1
+        T{JJ} = ( S{JJ} > U );
+    end
+    clear S;
+
+	% composition of the final image with weighting 
+    MHI = zeros(NLIN,NCOL);
+
+    k = 255 / sum(1:NTIMES-1);
+    for JJ = 1 : NTIMES-1
+        MHI = MHI + T{JJ} * (k * JJ);
+    end
+    clear T;
+
+	SHOW='';
+	if(nargin>=3)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+	if ( ~strcmp(SHOW,'off')) 
+	    imagesc(MHI); 
+	    title('Motion History Image');
+		daspect ([1 1 1]);
+	end
+end
diff --git a/inst/mfiles/graphic/stats/graphkurt.m b/inst/mfiles/graphic/stats/graphkurt.m
new file mode 100644
index 0000000..f750be6
--- /dev/null
+++ b/inst/mfiles/graphic/stats/graphkurt.m
@@ -0,0 +1,134 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Kurt varargout] = graphkurt(DATA,varargin)
+%
+%  This function calculates the temporal speckle kurtosis matrix (K). Use as
+%  input data a 3D matrix created grouping NTIMES intensity matrices I(k)
+%  1<=k<=NTIMES
+%
+%  I(k)=DATA(:,:,k)
+%
+%  $MU = \frac{1}{NTIMES} \sum\limits_{k=1}^{NTIMES} I(k) \approx E[I(k)]$
+%
+%  $SIGMA = \sqrt{ \frac{1}{NTIMES} \sum\limits_{k=1}^{NTIMES} (I(k)-MU])^2 }$
+%
+%  $K \approx E[\left(\frac{I(k)-MU}{SIGMA}\right)^4]$
+%
+%  The function additionally also returns the temporal standard deviation matrix 
+%  and temporal expected matrix.
+%
+%  
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  K       = graphkurt(DATA);
+%  [K D]   = graphkurt(DATA);
+%  [K D E] = graphkurt(DATA);
+%    
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  SHOW [Optional] If SHOW is equal to string 'off', then the result will not be plotted.
+%
+%  Output:
+%  K    returns the temporal speckle kurtosis matrix of image Data Pack.
+%  D    [Optional] returns the temporal standard deviation matrix of image Data Pack.
+%  E    [Optional] returns the temporal expected matrix of image Data Pack.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  Date: 16 of July of 2015.
+%  Review: 22 of July of 2015.
+%  Review: 23 of March of 2016.
+%
+
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+    
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+    
+    
+    SIGMA = zeros(NLIN,NCOL);
+    ED    = zeros(NLIN,NCOL);
+	Kurt  = zeros(NLIN,NCOL);
+
+            
+	for k = 1:NTIMES                
+        ED = ED+ DATA(:,:,k) ;
+    end
+	ED=ED/NTIMES;
+
+    for k = 1:NTIMES 
+                     
+        SIGMA =  SIGMA + (DATA(:,:,k)-ED).^2;
+    end
+    
+
+    SIGMA = sqrt(SIGMA/NTIMES) ;
+	
+	for k = 1:NTIMES 
+		Kurt=Kurt+((DATA(:,:,k)-ED)./SIGMA).^4;
+    end
+
+	Kurt=Kurt/NTIMES;
+
+	if(nargout>=2)
+		varargout{1}=SIGMA;
+	end
+
+	if(nargout>=3)
+		varargout{2}=ED;
+	end
+
+	SHOW='';
+	if(nargin>=2)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+    if ( ~strcmp(SHOW,'off'))     
+		figure   
+    	imagesc(ED); colorbar;
+    	title('Images: Speckle Mean');
+		daspect ([1 1 1]);  
+    
+		figure   
+    	imagesc(SIGMA); colorbar;
+    	title('Images: Speckle Standard Deviation');      
+		daspect ([1 1 1]);
+
+		figure   
+    	imagesc(Kurt); colorbar;
+    	title('Images: Speckle Kurtosis');    
+		daspect ([1 1 1]);
+	end
+
diff --git a/inst/mfiles/graphic/stats/graphskew.m b/inst/mfiles/graphic/stats/graphskew.m
new file mode 100644
index 0000000..46682c1
--- /dev/null
+++ b/inst/mfiles/graphic/stats/graphskew.m
@@ -0,0 +1,140 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Skew varargout] = graphskew(DATA,varargin)
+%
+%  This function calculates the temporal speckle skewness matrix (S). Use as
+%  input data a 3D matrix created grouping NTIMES intensity matrices I(k)
+%  1<=k<=NTIMES
+%
+%  I(k)=DATA(:,:,k)
+%
+%  $MU = \frac{1}{NTIMES} \sum\limits_{k=1}^{NTIMES} I(k) \approx E[I(k)]$
+%
+%  $SIGMA = \sqrt{ \frac{1}{NTIMES} \sum\limits_{k=1}^{NTIMES} (I(k)-MU)^2}$
+%
+%  $S \approx E[\left(\frac{I(k)-MU}{SIGMA}\right)^3]$
+%
+%  The function additionally returns the temporal standard deviation matrix 
+%  and temporal expected matrix.
+%
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  S       = graphskew(DATA);
+%  [S D]   = graphskew(DATA);
+%  [S D E] = graphskew(DATA);
+%    
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  SHOW [Optional] If SHOW is equal to string 'off', then the result will
+%  not be plotted.
+%
+%  Output:
+%  K    returns the temporal speckle skewness matrix of image Data Pack.
+%  D    [Optional] returns the temporal standard deviation matrix of image Data Pack.
+%  E    [Optional] returns the temporal expected matrix of image Data Pack.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviweed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 16 of July of 2015.
+%  Review: 22 of July of 2015.
+%  Review: 23 of March of 2016.
+%
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+    
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+    
+    
+    SIGMA = zeros(NLIN,NCOL);
+    ED    = zeros(NLIN,NCOL);
+	Skew  = zeros(NLIN,NCOL);
+
+            
+	for k = 1:NTIMES                
+        ED = ED+ DATA(:,:,k) ;
+    end
+	ED=ED/NTIMES;
+	%disp('Mean matrix calculated');
+
+    for k = 1:NTIMES 
+                     
+        SIGMA =  SIGMA + (DATA(:,:,k)-ED).^2;
+    end
+    
+
+    SIGMA = sqrt(SIGMA/NTIMES) ;
+
+	%disp('Deviation matrix calculated');
+	
+	for k = 1:NTIMES 
+		Skew=Skew+((DATA(:,:,k)-ED)./SIGMA).^3;
+    end
+
+	Skew=Skew/NTIMES;
+
+	%disp('Skewness matrix calculated');
+
+	if(nargout>=2)
+		varargout{1}=SIGMA;
+	end
+
+	if(nargout>=3)
+		varargout{2}=ED;
+	end
+
+	SHOW='';
+	if(nargin>=2)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+    if ( ~strcmp(SHOW,'off'))     
+		figure   
+	    imagesc(ED); colorbar;
+	    title('Images: Speckle Mean');   
+		daspect ([1 1 1]);   
+    
+		figure   
+	    imagesc(SIGMA); colorbar;
+	    title('Images: Speckle Standard Deviation');      
+		daspect ([1 1 1]);
+
+		figure   
+	    imagesc(Skew); colorbar;
+	    title('Images: Speckle Skewness');    
+		daspect ([1 1 1]);
+	end       
+ 
diff --git a/inst/mfiles/graphic/stdcont.m b/inst/mfiles/graphic/stdcont.m
new file mode 100644
index 0000000..521c527
--- /dev/null
+++ b/inst/mfiles/graphic/stdcont.m
@@ -0,0 +1,134 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [C varargout] = stdcont(DATA,varargin)
+%
+%  This function implements the temporal speckle contrast matrix [1], the temporal 
+%  speckle standard deviation matrix and the temporal speckle mean matrix. Use as
+%  input data a 3D matrix created grouping NTIMES intensity matrices I(k)
+%  1<=k<=NTIMES
+%
+%  I(k)=DATA(:,:,k)
+%
+%  $MU= \frac{1}{NTIMES} \sum\limits_{k=1}^{NTIMES} I(k) \approx E[I(k)]$
+%
+%  $SIGMA = \sqrt{ \frac{1}{NTIMES} \sum\limits_{k=1}^{NTIMES} (I(k)-MU)^2  }$
+%
+%  With difference of proposed in [1], here is used the population standard
+%  deviation. Finally
+%
+%  $C = SIGMA/MU$
+%
+%  The function additionally also returns the deviation and expected matrices.
+%
+%  Reference:
+%  [1] R. Nothdurft and G. Yao, 'Imaging obscured subsurface inhomogeneity using 
+%      laser speckle,' Opt. Express  13, 10034-10039 (2005). 
+%
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  C       = stdcont(DATA);
+%  [C D]   = stdcont(DATA);
+%  [C D E] = stdcont(DATA);
+%    
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  SHOW [Optional] If SHOW is equal to string 'off', then do not plot the result.
+%
+%  Output:
+%  C    returns the speckle contrast matrix of image Data Pack.
+%  D    [Optional] Returns the standard deviation matrix (SIGMA) of image Data Pack.
+%  E    [Optional] Returns the expected matrix (MU) of image Data Pack.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 16 of July of 2015.
+%  Review: 09 of March of 2016.
+%  
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+    
+    if (NTIMES<2)
+        error('Number of frames used are not enough.');
+    end
+    
+    
+    SIGMA = zeros(NLIN,NCOL);
+    ED = zeros(NLIN,NCOL);
+            
+	for k = 1:NTIMES                
+        ED = ED+ DATA(:,:,k) ;
+    end
+	ED=ED/NTIMES;
+
+    for k = 1:NTIMES 
+                     
+        SIGMA =  SIGMA + (DATA(:,:,k)-ED).^2;
+    end
+    
+
+    SIGMA = sqrt(SIGMA/(NTIMES)) ;
+
+	C=SIGMA./(ED);
+
+
+	if(nargout>=2)
+		varargout{1}=SIGMA;
+	end
+
+	if(nargout>=3)
+		varargout{2}=ED;
+	end
+
+	SHOW='';
+	if(nargin>=2)
+		if(ischar(varargin{1}))
+			SHOW=varargin{1};
+		end
+	end
+
+    if ( ~strcmp(SHOW,'off')) 
+		figure   
+	    imagesc(ED); colorbar;
+	    title('Images: Speckle Mean');
+		daspect ([1 1 1]);   
+    
+		figure   
+	    imagesc(SIGMA); colorbar;
+	    title('Images: Speckle Standard Deviation');      
+		daspect ([1 1 1]);
+
+		figure   
+	    imagesc(C); colorbar;
+	    title('Images: Speckle Contrast');      
+		daspect ([1 1 1]);
+	end
diff --git a/inst/mfiles/numerical/avd.m b/inst/mfiles/numerical/avd.m
new file mode 100644
index 0000000..fa7bcb3
--- /dev/null
+++ b/inst/mfiles/numerical/avd.m
@@ -0,0 +1,173 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y, varargout] = avd(COM,varargin)
+%
+%  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/
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%                      Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 01 of July of 2015.
+%  Review: 28 of March of 2016.
+%
+
+    Nsize = size(COM); 
+	if( (Nsize(1,1)~=256)||(Nsize(1,2)~=256) )
+		error('The co-occurrence matrix is not 256x256!!!.');
+	end
+
+	if( nargin~=nargout )
+		error('Error with the number of arguments Input/Out!!!.');
+	end
+
+	Ntot=sum(sum(COM));
+
+	%% First moment
+	Y=0;
+
+	%% Second moment, ARIZAGA[3] value difference with CARDOSO[2] COM normalization.
+	ENABLEavd2m=0;
+	ENABLECALCavd2m=0;
+	AVD2M=0;
+
+	%% Center second moment, variance of AVD.
+	ENABLEavd2c=0;
+	AVD2C=0;
+
+	%% Pseudo First moment with ARIZAGA[3] COM normalization.
+	ENABLEavdariz=0;
+	AVDARIZ=0;
+
+	for II=2:nargin
+		if(varargin{II-1}==2)
+			ENABLEavd2m=1;
+			IDOUTavd2m=II-1;
+		elseif(varargin{II-1}==3)
+			ENABLEavd2c=1;
+			ENABLECALCavd2m=1;
+			IDOUTavd2c=II-1;
+		elseif(varargin{II-1}==4)
+			ENABLEavdariz=1;
+			IDOUTavdariz=II-1;
+		else
+			error(['Inexistent Parameter: ',num2str(varargin{II-1}),'!!!']); 
+		end
+	end
+
+	
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+    for b1 = 1:Nsize(1,1)
+        for b2 = 1:Nsize(1,2) 
+            
+            Y = Y+ (COM(b1,b2)*abs(b1-b2)) /Ntot;    
+
+			%% Second moment, ARIZAGA[3] value difference with CARDOSO[2] COM normalization.
+			if((ENABLEavd2m==1)||(ENABLECALCavd2m==1))
+            	AVD2M = AVD2M + (COM(b1,b2)*( (b1-b2)*(b1-b2) ))/Ntot;
+			end
+
+			%% Pseudo first moment with ARIZAGA[3] COM normalization.
+			if(ENABLEavdariz==1)
+				norma = sum(COM(b1,:));
+				if norma == 0;
+					norma= 1;
+				end
+            	AVDARIZ = AVDARIZ + (COM(b1,b2)*abs(b1-b2) )/norma ;
+
+			end
+
+        end
+    end
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+if(ENABLEavd2m==1)
+	varargout{IDOUTavd2m}=AVD2M;
+end
+
+if(ENABLEavd2c==1)
+	varargout{IDOUTavd2c}=AVD2M-Y^2;
+end
+
+if(ENABLEavdariz==1)
+	varargout{IDOUTavdariz}=AVDARIZ;
+end
+
diff --git a/inst/mfiles/numerical/coom.m b/inst/mfiles/numerical/coom.m
new file mode 100644
index 0000000..f52d0c0
--- /dev/null
+++ b/inst/mfiles/numerical/coom.m
@@ -0,0 +1,94 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [C] = coom(THSP)
+%
+%  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/
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira <juniomoreira at iftm.edu.br>
+%                      Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com> 
+%  Code documented by: Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com> 
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of may of 2013.
+%  Review: 15 of august of 2013.
+%  Review: 22 of august of 2013.
+%  Review: 28 of March of 2016.
+%
+	a = size(THSP);
+	C = zeros(256,256);   
+
+	for linea = 1:a(1,1)
+	for col   = 1:a(1,2)-1    
+
+		d1 = THSP(linea,col)+1;
+		d2 = THSP(linea,col+1)+1;
+
+		d1=round(d1);
+		d2=round(d2);            
+
+		%Limits the value in the range
+		if (d1 >= 256)
+			d1 = 256;
+		end
+		if (d1<=1)
+			d1=1;
+		end
+		if (d2 >= 256)
+			d2 = 256;
+		end
+		if (d2<=1)
+			d2=1;
+		end
+
+		C(d1,d2) = C(d1,d2)+1;
+	end
+	end
+        
+    return;    
+
diff --git a/inst/mfiles/numerical/extras/stscorr.m b/inst/mfiles/numerical/extras/stscorr.m
new file mode 100644
index 0000000..1f94b31
--- /dev/null
+++ b/inst/mfiles/numerical/extras/stscorr.m
@@ -0,0 +1,106 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [C varargout] = stscorr(DATA,Tau,K0)
+%
+%  This function implements the spatial-temporal speckle correlation [1] 
+%  technique. The correlation is applied between K0 image and
+%  all other images. 
+%  Use as input data a 3D matrix created grouping NTIMES intensity matrices I(k)
+%  1<=k<=NTIMES
+%
+%  L    = [1:NTIMES]-K0
+%  LTau = L * Tau
+%
+%  $corr(A,B)= \frac{E[(A-\mu_A)(B-\mu_B)]}{\sqrt{E[(A-\mu_A)^2]E[(B-\mu_B)^2]}}$
+%
+%  $C(k)= corr(I(K0),I(k))$,  $\forall~1 \leq k \leq NTIMES$
+%
+%  [1] ZDUNEK, A. et al. New nondestructive method based on spatial-temporal
+%      speckle correlation technique for evaluation of apples quality during
+%      shelf-life. International Agrophysics, v. 21, n. 3, p. 305-310, 2007. 
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  C          = stscorr(DATA,Tau,K0)
+%  [C LTau]   = stscorr(DATA,Tau,K0)
+%  [C LTau L] = stscorr(DATA,Tau,K0)
+%  
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  Tau  is the sampling rate in seconds.
+%  K0   is the number of the reference frame used in correlation analysis.
+%
+%  Output: 
+%  C    is the correlation vector. This corresponds with the C(l*tau) values used 
+%       in [1] at equation (7), with the difference that negative values of 
+%       l*tau also are calculated.
+%  LTau [Optional] is the vector with the values of time l*tau in the vector C. This
+%       can have negative values.
+%  L    [Optional] is the vector with the values of index l in the vector C. This
+%       can have negative values.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira  <juniomoreira at iftm.edu.br>
+%                      Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 25 of August of 2013.
+%  Review: 28 of March of 2016.
+%
+
+    NSIZE = size(DATA);
+    NTIMES=NSIZE(1,3);
+    NEL=NSIZE(1,1)*NSIZE(1,2);
+  
+	C = zeros(1,NTIMES);
+
+	LL   = [1:NTIMES]-K0;
+	LTau = LL*Tau;
+
+    
+    for KK = 1:NTIMES
+        C(KK) = corr( reshape(DATA(:,:,K0),[NEL 1]) , reshape(DATA(:,:,KK),[NEL 1]) );
+    end
+
+	if (nargout>=2)
+		varargout{1}=LTau;
+	end
+
+	if (nargout>=3)
+		varargout{2}=LL;
+	end
+
+	figure(1)
+    plot(LTau,C,'-s');grid on;
+	xlim([min(LTau) max(LTau)]);
+	xlabel('k tau');
+	ylabel('Correlation coefficients');
+    title(['Spatial-Temporal Speckle Correlation Technique: k0=',num2str(K0)]);       
+        
+
diff --git a/inst/mfiles/numerical/extras/thsp2corr.m b/inst/mfiles/numerical/extras/thsp2corr.m
new file mode 100644
index 0000000..95ba1fe
--- /dev/null
+++ b/inst/mfiles/numerical/extras/thsp2corr.m
@@ -0,0 +1,122 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [C varargout] = thsp2corr(THSP, varargin)
+%
+%  This function implements the space-time speckle correlation [1] 
+%  technique. 
+%  Use as input data a matrix THSP  of M lines and NTIMES columns, that
+%  represents the intensity time evolution of M pixels in NTIMES samples.
+%
+%  CORR(i,l) = corr( THSP(:,i) , THSP(:,i+l) ) 
+%
+%  Correlation type 1:
+%  $corr(A,B)=\frac{E[AB]}{\sqrt{E[A^2]E[B^2]}}$
+%
+%  Correlation type 2 (Pearson correlation):
+%  $corr(A,B)= \frac{E[(A-\mu_A)(B-\mu_B)]}{\sqrt{E[(A-\mu_A)^2]E[(B-\mu_B)^2]}}$
+%
+%  $C(l) = \frac{1}{NTIMES/2}\sum\limits_{i=1}^{NTIMES/2} CORR(i,l)$, 
+%
+%  [1] ZiJie Xu, Charles Joenathan, and Brij M. Khorana. 'Temporal and spatial 
+%      properties of the time-varying speckles of botanical specimens'. 
+%      In: Optical Engineering 34.5 (1995), pages 1487-1502. 
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  C       = thsp2corr(THSP);
+%  C       = thsp2corr(THSP,2);
+%  [C L]   = thsp2corr(THSP);
+%  [C L]   = thsp2corr(THSP,2);
+%  
+%  Input:
+%  THSP is a 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 has values between 0 and 255, the function does not
+%       verify. The function truncates values outside this  interval.
+%  TYPE [optional] indicates the type of correlation used. If TYPE=1 then it is used
+%       the correlation type 1, in other case, it is used the Pearson correlation.
+%       By default it is used the correlation type 1.
+%
+%  Output: 
+%  C    is the correlation vector, with elements C(j) for all  0<=j<=NTIMES/2.
+%  L    is a vector with the times j of C(j). L=[0:NTIMES/2].
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>  
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by: Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 25 of August of 2015.
+%  Review: 28 of March of 2016.
+%
+	TYPE=1;
+
+    NSIZE = size(THSP);
+    M= NSIZE(1,1);
+    N= NSIZE(1,2);
+
+	N2=round(N/2);
+    
+	CMAT = zeros(N2,N2);
+
+	if (nargin>1)
+	if isnumeric(varargin{1})
+		TYPE=varargin{1};
+	end
+	end
+
+
+	if TYPE==1
+		for II=1:N2
+		for LL=1:N2
+			CMAT(II,LL)=pseudo_corr(THSP(:,II), THSP(:,II+LL) );
+		end
+		end
+	else
+		for II=1:N2
+		for LL=1:N2
+			CMAT(II,LL)=corr(THSP(:,II), THSP(:,II+LL) );
+		end
+		end
+	end
+
+    C    = zeros(1,N2+1);
+
+	C(1) =1.0;
+	for LL=1:N2
+		C(LL+1)=mean(CMAT(:,LL));
+	end
+
+	if (nargout>1)
+		varargout{1} = [0:N2];
+	end
+           
+  
+end
+
+function C=pseudo_corr(A,B)
+
+	C=sum(A.*B)/sqrt(sum(A.^2)*sum(B.^2));
+
+end
+
diff --git a/inst/mfiles/numerical/inertiamoment.m b/inst/mfiles/numerical/inertiamoment.m
new file mode 100644
index 0000000..00b0d59
--- /dev/null
+++ b/inst/mfiles/numerical/inertiamoment.m
@@ -0,0 +1,132 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y, varargout] = inertiamoment(COM,varargin)
+%
+%  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/
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%                      Junio Moreira <juniomoreira at iftm.edu.br>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 01 of July of 2015.
+%  Review: 28 of March of 2016.
+%
+    Nsize = size(COM); 
+	if( (Nsize(1,1)~=256)||(Nsize(1,2)~=256) )
+		error('The co-occurrence matrix is not 256x256!!!.');
+	end
+
+	if( nargin~=nargout )
+		error('Error with the number of arguments Input/Out!!!.');
+	end
+
+	Ntot=sum(sum(COM));
+
+	%% First moment
+	Y=0;
+
+	%% Pseudo First moment with ARIZAGA[2] COM normalization.
+	ENABLE_im_ariz=0;
+	IM_ARIZ=0;
+
+	for II=2:nargin
+		if(varargin{II-1}==2)
+			ENABLE_im_ariz=1;
+			IDOUT_im_ariz=II-1;
+		else
+			error(['Inexistent Parameter: ',num2str(varargin{II-1}),'!!!']); 
+		end
+	end
+
+	
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+    for b1 = 1:Nsize(1,1)
+
+		if(ENABLE_im_ariz==1)
+			norma = sum(COM(b1,:));
+			if norma == 0;
+				norma= eps;
+			end
+		end
+
+        for b2 = 1:Nsize(1,2) 
+            
+            Y = Y+ (COM(b1,b2)*(b1-b2)^2) /Ntot;    
+
+			%% Pseudo first moment with ARIZAGA[2] COM normalization.
+			if(ENABLE_im_ariz==1)
+			   	IM_ARIZ = IM_ARIZ + (COM(b1,b2)*(b1-b2)^2 )/norma ;
+			end
+
+        end
+    end
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+	if(ENABLE_im_ariz==1)
+		varargout{IDOUT_im_ariz}=IM_ARIZ;
+	end
+
diff --git a/inst/mfiles/numerical/numad.m b/inst/mfiles/numerical/numad.m
new file mode 100644
index 0000000..1752103
--- /dev/null
+++ b/inst/mfiles/numerical/numad.m
@@ -0,0 +1,114 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y, varargout] = numad(COM,varargin)
+%
+%  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/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 01 of July of 2015.
+%  Review: 28 of March of 2016.
+%
+    Nsize = size(COM); 
+	if( (Nsize(1,1)~=256)||(Nsize(1,2)~=256) )
+		error('The co-occurrence matrix is not 256x256!!!.');
+	end
+
+	if nargin > 2
+		error('This function only accepts two parameters!!!.');
+	end
+
+	if( nargin~=nargout )
+		error('Error with the number of arguments Input/Out!!!.');
+	end
+
+	ENABLEad2m=0;
+
+	if nargin > 1
+		if(varargin{1}==2)
+			ENABLEad2m=1;
+		else
+			error(['Inexistent type: ',num2str(varargin{1}),'!!!']);
+		end
+	end
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+	Ntot=sum(sum(COM));
+
+	%% First moment
+	Y=0;
+	%% Second moment
+	AD2M =0;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+    for b1 = 1:Nsize(1,1)
+        for b2 = 1:Nsize(1,2) 
+            
+            Y = Y+ (COM(b1,b2)/Ntot)*(abs(b1-b2)/(b1+b2+eps)) ;    
+
+			%% Second moment with CARDOSO[2] COM normalization.
+			if(ENABLEad2m==1)
+            	AD2M = AD2M + (COM(b1,b2)/Ntot)*( (b1-b2)^2/(b1+b2+eps)^2 );
+			end
+
+        end
+    end
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+if(ENABLEad2m==1)
+	varargout{1}=AD2M;
+end
diff --git a/inst/mfiles/numerical/pmf/pmfad.m b/inst/mfiles/numerical/pmf/pmfad.m
new file mode 100644
index 0000000..5f4cfd9
--- /dev/null
+++ b/inst/mfiles/numerical/pmf/pmfad.m
@@ -0,0 +1,82 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Pr varargout ]=pmfad(COM)
+%
+%  The probability mass function of absolute difference (PMFAD) represents the 
+%  probabilities of a random variable Z, being $Z=|i-j|$.
+% 
+%  $Pr(z+1)= P(|i-j|=z)$, $0 \leq z \leq 255$
+%
+%  Where i is one intensity id line in COM matrix and j is one intensity id column 
+%  in COM. Thus $Pr(z+1)= P(|i-j|=z)$ is the probability of happen an absolute
+%  intensity jump of value z. This function calculates the difference probability [1].
+%  The COM matrix needs a matrix of 256x256 elements.
+%
+%  References:
+%  [1]  R.M. Haralick, K. Shanmugam, and Its' Hak Dinstein. 'Textural Features 
+%       for Image Classification'. In: Systems, Man and Cybernetics, IEEE 
+%       Transactions on SMC-3.6 (Nov. 1973), pages 610-621. ISSN: 0018-9472. 
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  Pr = pmfad(COM);
+%  
+%  Input:
+%  COM  is the Co-Occurrence matrix. A 2D matrix with 256 lines and 256 columns.
+%
+%  Output:
+%  Pr   is the probability mass function, where  $Pr(z+1)= P(|i-j|=z)$ is the 
+%       probability of happen an absolute intensity jump of value z. 0<=z<=255
+%       Pr is a vector with 256 elements.
+%  Z    [OPTIONAL] is a vector with the absolute intensities jumps $|i-j|=z$.
+%       Z=[0:255];
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%	
+
+%  Code developed by:  Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com>                  
+%  Code documented by: Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com> 
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 01 of July of 2015.
+%  Review: 07 of July of 2015.
+%  Review: 28 of March of 2016.
+%
+    Nsize = size(COM); 
+	if( (Nsize(1,1)~=256)||(Nsize(1,2)~=256) )
+		error('The co-occurrence matrix is not 256x256!!!.');
+	end
+
+	Pr=zeros(1,256);
+
+	Ntot=sum(sum(COM));
+
+    for a1 = 1:Nsize(1,1)
+    for a2 = 1:Nsize(1,2) 
+            Pr(1,round(abs(a1-a2)+1))=Pr(1,round(abs(a1-a2)+1))+COM(a1,a2)/Ntot;
+    end
+    end
+
+	if(nargout>=2)
+		varargout{1}=[0:255];
+	end
+
+end
diff --git a/inst/mfiles/numerical/pmf/pmfrd.m b/inst/mfiles/numerical/pmf/pmfrd.m
new file mode 100644
index 0000000..8e3c9d5
--- /dev/null
+++ b/inst/mfiles/numerical/pmf/pmfrd.m
@@ -0,0 +1,87 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Pr varargout ]=pmfrd(COM)
+%
+%  The probability mass function of regular difference (PMFRD) represents the 
+%  probabilities of a random variable W, being $W=(i-j)$. 
+% 
+%  $Pr(w+256)=P((i-j)=w)$, $-255 \leq w \leq 255$
+%
+%  Where i is one intensity id line in COM matrix and j is one intensity id 
+%  column in COM. Thus  $Pr(w+256)=P((i-j)=w)$ is the probability of happen an 
+%  intensity jump of value i to value $j=i+w$, with -255<=w<=255. This function 
+%  calculates a similar difference probability proposed in [1]. The COM matrix 
+%  need have 256x256 elements.
+%
+%  References:
+%  [1]  R.M. Haralick, K. Shanmugam, and Its' Hak Dinstein. 'Textural Features 
+%       for Image Classification'. In: Systems, Man and Cybernetics, IEEE 
+%       Transactions on SMC-3.6 (Nov. 1973), pages 610-621. ISSN: 0018-9472. 
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  Pr = pmfrd(COM);
+%  
+%  Input:
+%  COM  is the Co-Occurrence matrix. A 2D matrix with 256 lines and 256 columns.
+%
+%  Output:
+%  Pr   is the probability mass function, where  $Pr(w+256)=P((i-j)=w)$ is the 
+%       probability of happen an intensity jump of value i to value j=i+w, with 
+%       -255<=w<=255. Pr is a vector with 511 elements.
+%  W    [OPTIONAL] is a vector with the intensities jumps $(i-j)=w$.
+%       W=[-255:255];
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+	
+%  Code developed by:  Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com>                     
+%  Code documented by: Fernando Pujaico Rivera  <fernando.pujaico.rivera at gmail.com> 
+%  Code adapted by:    Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 01 of July of 2015.
+%  Review: 07 of July of 2015.
+%  Review: 28 of March of 2016.
+%
+    Nsize = size(COM); 
+	if( (Nsize(1,1)~=256)||(Nsize(1,2)~=256) )
+		error('The co-occurrence matrix is not 256x256!!!.');
+	end
+
+	N=511;
+	L=(N+1)/2;
+
+	Pr=zeros(1,N);
+
+	Ntot=sum(sum(COM));
+
+
+    for a1 = 1:Nsize(1,1)
+    for a2 = 1:Nsize(1,2) 
+            Pr(1,round(a2-a1)+L)=Pr(1,round(a2-a1)+L)+COM(a1,a2)/Ntot;
+    end
+    end
+
+	if(nargout>=2)
+		varargout{1}=[-255:255];
+	end
+
+end
diff --git a/inst/mfiles/numerical/rvd.m b/inst/mfiles/numerical/rvd.m
new file mode 100644
index 0000000..39ebd7e
--- /dev/null
+++ b/inst/mfiles/numerical/rvd.m
@@ -0,0 +1,167 @@
+%  Copyright (C) 2015, 2016  Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y, varargout] = rvd(COM,varargin)
+%
+%  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/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>              
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%
+%  Date: 01 of July of 2015.
+%  Review: 28 of March of 2016.
+%
+    Nsize = size(COM); 
+	if( (Nsize(1,1)~=256)||(Nsize(1,2)~=256) )
+		error('The co-occurrence matrix is not 256x256!!!.');
+	end
+
+	if( nargin~=nargout )
+		error('Error with the number of arguments Input/Out!!!.');
+	end
+
+	Ntot=sum(sum(COM));
+
+	%% First moment
+	Y=0;
+
+	%% Second moment, ARIZAGA[3] value difference with CARDOSO[2] COM normalization.
+	ENABLErvd2m=0;
+	ENABLECALCrvd2m=0;
+	RVD2M=0;
+
+	%% Center second moment, variance of RVD.
+	ENABLErvd2c=0;
+	RVD2C=0;
+
+	%% Pseudo First moment with ARIZAGA[3] COM normalization.
+	ENABLErvdariz=0;
+	RVDARIZ=0;
+
+	for II=2:nargin
+		if(varargin{II-1}==2)
+			ENABLErvd2m=1;
+			IDOUTrvd2m=II-1;
+		elseif(varargin{II-1}==3)
+			ENABLErvd2c=1;
+			ENABLECALCrvd2m=1;
+			IDOUTrvd2c=II-1;
+		elseif(varargin{II-1}==4)
+			ENABLErvdariz=1;
+			IDOUTrvdariz=II-1;
+		else
+			error(['Inexistent Parameter: ',num2str(varargin{II-1}),'!!!']); 
+		end
+	end
+
+	
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+    for b1 = 1:Nsize(1,1)
+        for b2 = 1:Nsize(1,2) 
+            
+            Y = Y+ (COM(b1,b2)*(b2-b1)) /Ntot;    
+
+			%% Second moment, ARIZAGA[3] value difference with CARDOSO[2] COM normalization.
+			if((ENABLErvd2m==1)||(ENABLECALCrvd2m==1))
+            	RVD2M = RVD2M + (COM(b1,b2)*( (b2-b1)*(b2-b1) ))/Ntot;
+			end
+
+			%% Pseudo first moment with ARIZAGA[3] COM normalization.
+			if(ENABLErvdariz==1)
+				norma = sum(COM(b1,:));
+				if norma == 0;
+					norma= 1;
+				end
+            	RVDARIZ = RVDARIZ + (COM(b1,b2)*(b2-b1) )/norma ;
+
+			end
+
+        end
+    end
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+if(ENABLErvd2m==1)
+	varargout{IDOUTrvd2m}=RVD2M;
+end
+
+if(ENABLErvd2c==1)
+	varargout{IDOUTrvd2c}=RVD2M-Y^2;
+end
+
+if(ENABLErvdariz==1)
+	varargout{IDOUTrvdariz}=RVDARIZ;
+end
+
diff --git a/inst/mfiles/numerical/thsp/thsp.m b/inst/mfiles/numerical/thsp/thsp.m
new file mode 100644
index 0000000..2ac8fd6
--- /dev/null
+++ b/inst/mfiles/numerical/thsp/thsp.m
@@ -0,0 +1,92 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y] = thsp(DATA,R,S)
+%
+%  This function creates the THSP (Time History Speckle Pattern)[1][2] of a set 
+%  of pixels in a line or column of a datapack (DATA).
+%
+%  References:
+%  [1]  OULOMARA, G.; TRIBILLON, J.; DUVERNOY, J. Biological activity measurements 
+%       on botanical specimen surfaces using a temporal decorrelation effect of 
+%       laser speckle. Journal of Moderns Optics, London, v. 36, n. 2, p. 136-179, 
+%       Feb. 1989.
+%
+%  [2]  XU, Z.; JOENATHAN, C.; KHORANA, B. M. Temporal and spatial properties of 
+%       the time-varying speckles of botanical specimens. Optical Enginnering, Virginia, 
+%       v. 34, n. 5, p. 1487-1502, May 1995.
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  Y = thsp(DATA,R,S);
+%  Y = thsp(DATA,'line',100);   % THSP matrix with the line 100 of datapack.
+%  Y = thsp(DATA,1,100);        % THSP matrix with the line 100 of datapack.
+%  Y = thsp(DATA,'column',100); % THSP matrix with the column 100 of datapack.
+%  Y = thsp(DATA,2,100);        % THSP matrix with the column 100 of datapack.
+%  
+%  Input:
+%  DATA is the speckle data pack. 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.
+%  R    is a parameter of analysis: 
+%       if R is equal to 1 or 'line', you choose the lines of images to create the THSP and
+%       if R is equal to 2 or 'column', you choose the columns of images to create the THSP.
+%       In other cases the function returns error.
+%  S    is the line or column position used to make the time history speckle patterns.
+%       The function do not verify if S is in the  possible range, this check must be done by the user.
+%
+%  Output:
+%  Y    is the time history speckle patterns matrix. Where Y is a 2D matrix with
+%       M lines and NTIMES columns, being M equal to NCOL when R is 1 and M equal 
+%       to NLIN when R is 2.
+%       Y is a matrix where each column is a representation of one only line or column 
+%       in the S position of DATA.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira <juniomoreira at iftm.edu.br>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of May of 2013.
+%  Review: 28 of March of 2016.
+%
+    a = size(DATA);
+              
+    if ((R == 1) || strcmp(R,'line'))
+        Y = zeros(a(1,2),a(1,3));
+        for b = 1:a(1,3)            
+            Y(:,b) = (DATA(S,:,b))';
+        end
+    elseif ((R == 2) || strcmp(R,'column'))
+        Y = zeros(a(1,1),a(1,3));
+        for b = 1:a(1,3)
+            Y(:,b) = DATA(:,S,b);
+        end      
+    else
+	Y = 0;
+        error('Error in the THSP image: No valid value of R');
+    end    
+        
+return;
diff --git a/inst/mfiles/numerical/thsp/thsp_gaussian.m b/inst/mfiles/numerical/thsp/thsp_gaussian.m
new file mode 100644
index 0000000..514b8eb
--- /dev/null
+++ b/inst/mfiles/numerical/thsp/thsp_gaussian.m
@@ -0,0 +1,186 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y varargout] = thsp_gaussian(DATA, M,Sigma,varargin)
+%
+%  This function creates the THSP (Time History Speckle Pattern)[1][2] 
+%  of a set of M points (pixels) randomly (Gaussian) selected in EXAMPLE_MATRIX, 
+%  and through DATA(:,:,k) for all k value.   
+%  Around a point P0, M points are selected randomly, these points are concentrated
+%  mostly in a radius Sigma around the point P0.
+%
+%  References:
+%  [1]  OULOMARA, G.; TRIBILLON, J.; DUVERNOY, J. Biological activity measurements 
+%       on botanical specimen surfaces using a temporal decorrelation effect of 
+%       laser speckle. Journal of Moderns Optics, London, v. 36, n. 2, p. 136-179, 
+%       Feb. 1989.
+%
+%  [2]  XU, Z.; JOENATHAN, C.; KHORANA, B. M. Temporal and spatial properties of 
+%       the time-varying speckles of botanical specimens. Optical Engineering, Virginia, 
+%       v. 34, n. 5, p. 1487-1502, May 1995.
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  Y         = thsp_gaussian(DATA,M,Sigma);
+%  [Y POINTS]= thsp_gaussian(DATA,M,Sigma);
+%  [Y POINTS]= thsp_gaussian(DATA,M,Sigma,'on');
+%  [Y POINTS]= thsp_gaussian(DATA,M,Sigma,P0);
+%  [Y POINTS]= thsp_gaussian(DATA,M,Sigma,P0,'on');
+%  [Y POINTS]= thsp_gaussian(DATA,M,Sigma,HG);
+%  [Y POINTS]= thsp_gaussian(DATA,M,Sigma,HG,'on');
+%  
+%  Input:
+%  DATA    is the speckle data pack. 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.
+%  M       is the number of points, Gaussian randomly selected, in analysis.
+%  Sigma   is the standard deviation in pixels. 
+%  P0      [Optional] is the initial point [line column], around this point, M 
+%          values are selected to create the time history speckle pattern. If this parameter
+%          is not used, then a graphic window is enabled to the selection of a point P0.
+%          This parameter only can be the fourth parameter.
+%  HG      [Optional] is the used graphic handler; Additionally, it is enable the graphic 
+%          selection of a point P0 in the figure pointed by the graphic handler.
+%          This parameter only can be the fourth parameter.
+%  Show    [Optional] can be used in the last position of input, and its function 
+%          is used to enable a graphic output of the selected points that formed the
+%          THSP. Show='on', Show='on-red', Show='on-green' or Show='on-blue' to enable. 
+%          It is disabled in other cases, by default Show='off'.
+%          Show='on' plot the points in the color red, in other cases are used the
+%          specified colors.
+%
+%  Output:
+%  Y      is the time history speckle pattern. Where, Y is a 2D matrix with
+%         M lines and NTIMES columns.
+%  POINTS [Optional] is a matrix with two columns and 
+%         M lines. Thus, each line represents one point in study, (line,column).
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>   
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%                      Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  
+%  Date: 09 of July of 2015.
+%  Review: 01 of July of 2016.
+%
+    NSIZE = size(DATA); 
+    NLIN  = NSIZE(1,1);
+    NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+	Y      = zeros(M,NTIMES);        
+	POINTS = zeros(M,2);
+
+    EXAMPLE_MATRIX=DATA(:,:,1);
+
+	if(nargin<4)
+		imagesc(EXAMPLE_MATRIX);
+		P0=zeros(1,2);	
+        refresh;
+		msgbox('Please select one point');	
+		[ P0(2) P0(1)]=ginput(1);
+		disp('Point loaded.');
+	else
+		if( isvector(varargin{1})  && (length(varargin{1})==2) && ~ischar(varargin{1}) )
+            %disp('Point loaded.');
+		    P0=varargin{1};
+        elseif( ishghandle(varargin{1}) )
+            %disp('Graphic handle loaded.');
+			figure(varargin{1});
+			P0=zeros(1,2);
+            refresh(varargin{1})		
+			msgbox('Please select one point');
+			[ P0(2) P0(1)]=ginput(1);
+			disp('Point loaded.');
+		elseif( ischar(varargin{1}) )
+            %disp('Default gcf loaded.');
+			imagesc(EXAMPLE_MATRIX);
+			P0=zeros(1,2);	
+            refresh;	
+			msgbox('Please select one point');
+			[ P0(2) P0(1)]=ginput(1);
+			disp('Point loaded.');
+        else
+			error('The 4th input parameter should be a vector [a b], a graphic handler or a string.');
+		end
+	end
+
+    if( (P0(1)<1) || (P0(1)>NLIN) )
+        error(sprintf('The line of selected central point is out of datapack line limits. LINE:%d',P0(1)));
+    end
+    if( (P0(2)<1) || (P0(2)>NCOL) )
+        error(sprintf('The column of selected central point is out of datapack column limits. COLUMN:%d',P0(2)));
+    end
+
+	POINTS(:,1) = Sigma*randn([M 1])+P0(1);	%%lines
+	POINTS(:,2) = Sigma*randn([M 1])+P0(2);	%%columns
+
+	for m = 1:M	
+		POINTS(m,1)=round(POINTS(m,1));
+		POINTS(m,2)=round(POINTS(m,2));
+		while ( (POINTS(m,1)<1) || (POINTS(m,1)>NLIN) || (POINTS(m,2)<1) || (POINTS(m,2)>NCOL) )
+			POINTS(m,1) = round(Sigma*randn(1)+P0(1));	
+			POINTS(m,2) = round(Sigma*randn(1)+P0(2));
+		end
+	end
+
+	for m = 1:M	
+		for k = 1:NTIMES                
+			Y(m,k) = DATA( POINTS(m,1) , POINTS(m,2) , k);
+		end
+	end
+
+	SHOW='off';
+
+	if(nargin>3)
+		if(ischar(varargin{nargin-3}))
+			SHOW=varargin{nargin-3};
+		end
+	end
+
+	if(strcmp(SHOW,'on') || strcmp(SHOW,'on-red') || strcmp(SHOW,'on-green') || strcmp(SHOW,'on-blue'))
+        if( ishghandle(varargin{1}) )
+			figure(varargin{1});
+        else
+		    imagesc(EXAMPLE_MATRIX);
+        end
+		hold on;
+        if(strcmp(SHOW,'on') || strcmp(SHOW,'on-red') )
+		    scatter(POINTS(:,2),POINTS(:,1),'r');
+        elseif(strcmp(SHOW,'on-green') )
+		    scatter(POINTS(:,2),POINTS(:,1),'g');
+        elseif(strcmp(SHOW,'on-blue') )
+		    scatter(POINTS(:,2),POINTS(:,1),'b');
+        end
+		refresh 
+		hold off;
+	end
+
+	if(nargout >=2)
+		varargout{1}=POINTS;
+	end
+    
+end
+
diff --git a/inst/mfiles/numerical/thsp/thsp_line.m b/inst/mfiles/numerical/thsp/thsp_line.m
new file mode 100644
index 0000000..20e2724
--- /dev/null
+++ b/inst/mfiles/numerical/thsp/thsp_line.m
@@ -0,0 +1,73 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y] = thsp_line(DATA,R,S)
+%
+%  This function creates the THSP (Time History Speckle Pattern)[1][2] of a set 
+%  of pixels in a line in a data pack (DATA), (This function is an alias of 
+%  thsp() function).
+%
+%  References:
+%  [1]  OULOMARA, G.; TRIBILLON, J.; DUVERNOY, J. Biological activity measurements 
+%       on botanical specimen surfaces using a temporal decorrelation effect of 
+%       laser speckle. Journal of Moderns Optics, London, v. 36, n. 2, p. 136-179, 
+%       Feb. 1989.
+%
+%  [2]  XU, Z.; JOENATHAN, C.; KHORANA, B. M. Temporal and spatial properties of 
+%       the time-varying speckles of botanical specimens. Optical Enginnering, Virginia, 
+%       v. 34, n. 5, p. 1487-1502, May 1995.
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  Y = thsp_line(DATA,R,S);
+%  
+%  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.
+%  R    is a parameter of analysis: 
+%       if R is equal to 1, you choose the lines from the images to create the THSP and
+%       if R is equal to 2, you choose the columns of images to create the THSP.
+%       In other cases it returns error.
+%  S    is the line or column position used to create the time history speckle pattern.
+%       The function do not verify if S is in the range, this must be checked by the user.
+%
+%  Output:
+%  Y    is the time history speckle patterns matrix. Where Y is a 2D matrix with
+%       M lines and NTIMES columns, being M equal to NCOL when R is 1 and M equal 
+%       to NLIN when R is 2.
+%       Y is a matrix where each column is a representation of one only line or column 
+%       in the S position of DATA.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira <juniomoreira at iftm.edu.br>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of May of 2013.
+%  Review: 28 of March of 2016.
+%
+	Y = thsp(DATA,R,S);
+    
diff --git a/inst/mfiles/numerical/thsp/thsp_random.m b/inst/mfiles/numerical/thsp/thsp_random.m
new file mode 100644
index 0000000..44f86e4
--- /dev/null
+++ b/inst/mfiles/numerical/thsp/thsp_random.m
@@ -0,0 +1,114 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y varargout] = thsp_random(DATA, M,varargin)
+%
+%  This function creates the THSP (Time History Speckle Pattern)[1][2] of a set
+%  of  M points (pixels) randomly (Uniform) selected in DATA(:,:,1), and through 
+%  DATA(:,:,k) for all k value.
+%
+%  References:
+%  [1]  OULOMARA, G.; TRIBILLON, J.; DUVERNOY, J. Biological activity measurements 
+%       on botanical specimen surfaces using a temporal decorrelation effect of 
+%       laser speckle. Journal of Moderns Optics, London, v. 36, n. 2, p. 136-179, 
+%       Feb. 1989.
+%
+%  [2]  XU, Z.; JOENATHAN, C.; KHORANA, B. M. Temporal and spatial properties of 
+%       the time-varying speckles of botanical specimens. Optical Engineering, Virginia, 
+%       v. 34, n. 5, p. 1487-1502, May 1995.
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%  Y         = thsp_random(DATA, M);
+%  [Y POINTS]= thsp_random(DATA, M);
+%  [Y POINTS]= thsp_random(DATA, M, 'on');
+%  
+%  Input:
+%  DATA    is the speckle data pack. 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.
+%  M       is the number of points, randomly selected, in analysis.
+%  Show    [Optional] can be used in the last position of input, and its
+%          function is to enable a graphic outcome of selected points in the
+%          THSP. Show='on' to enable. And disable in other cases, by default Show='off'.
+%
+%  Output:
+%  Y      is the time history speckle pattern. Where Y is a 2D matrix with
+%         M lines and NTIMES columns.
+%  POINTS [Optional] is a matrix with two columns and 
+%         M lines. Thus, each line represents one point under study. (line,column).
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://nongnu.org/bsltl/
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira <juniomoreira at iftm.edu.br>
+%                      Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of May of 2013.
+%  Review: 28 of March of 2016.
+%
+    a     = size(DATA); 
+    NLIN  =a(1,1);
+    NCOL  =a(1,2);
+	NTIMES=a(1,3);
+
+	Y      = zeros(M,NTIMES);        
+	POINTS = zeros(M,2);
+
+	for b = 1:M
+
+            lin = randi(NLIN);	col = randi(NCOL);
+            POINTS(b,1) = lin;	POINTS(b,2) = col;
+
+            for c = 1:NTIMES                
+                Y(b,c) = DATA(lin,col,c);
+            end
+	end
+
+	SHOW='off';
+
+	if(nargin>2)
+		for II=3:nargin
+			if(ischar(varargin{II-2}))
+				SHOW=varargin{II-2};
+			end
+		end
+	end
+
+	if(strcmp(SHOW,'on'))
+		imagesc(DATA(:,:,1));
+		hold on;
+		scatter(POINTS(:,2),POINTS(:,1),'r');
+		refresh 
+		hold off;
+	end
+
+
+	if(nargout >=2)
+		varargout{1}=POINTS;
+	end
+    
+end
+
diff --git a/inst/mfiles/quality/homogeneity.m b/inst/mfiles/quality/homogeneity.m
new file mode 100644
index 0000000..42350af
--- /dev/null
+++ b/inst/mfiles/quality/homogeneity.m
@@ -0,0 +1,182 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [Y X] = homogeneity(DATA,WLines  ,WColumns,Type)
+%
+%  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
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of August of 2015.
+%  Review: 28 of March of 2016.
+%
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+
+	if(rem(NLIN,WLines)~=0)
+		TEXT1=['WLines must be multiple of: ',mat2str(factor(NLIN)),'.'];
+		TEXT2=['The last ',num2str(rem(NLIN,WLines)),' pixel lines (botom) were not processed'];
+		warning([TEXT1,TEXT2]);
+		%msgbox(TEXT1,TEXT2);
+	end
+
+	if(rem(NCOL,WColumns)~=0)
+		TEXT1=['WColumns must be multiple of: ',mat2str(factor(NCOL)),'.'];
+		TEXT2=['The last ',num2str(rem(NCOL,WColumns)),' pixel columns (right) were not processed'];
+		warning([TEXT1,TEXT2]);
+		
+	end
+
+	if (Type==1)
+		GMETHOD=graphavd(DATA,'off');
+		NAME='AVD';
+	elseif (Type==2)
+		[TMP GMETHOD]=stdcont(DATA,'off');
+		NAME='Deviation';
+	else
+		GMETHOD=graphim(DATA,'off');
+		NAME='Inertia Moment';
+	end
+
+    X = zeros(NLIN,NCOL);
+    Y = zeros(NLIN,NCOL);
+    
+	LINESSTEPS   = 1 : WLines   : NLIN-(WLines  -1);
+	COLUMNSSTEPS = 1 : WColumns : NCOL-(WColumns-1);
+	LSTEPS=length(LINESSTEPS);
+	CSTEPS=length(COLUMNSSTEPS);
+    H = zeros(LSTEPS,CSTEPS);
+
+	II=1;
+    for lin = LINESSTEPS
+		JJ=1;
+	    for col = COLUMNSSTEPS
+
+			LINES   = lin:lin+(WLines-1);
+			COLUMNS = col:col+(WColumns-1);
+
+			AVD  = mean(mean(GMETHOD(LINES,COLUMNS))); 
+
+			X(LINES,COLUMNS)  = AVD;
+			H(II,JJ)          = AVD;
+
+			JJ=JJ+1;
+    	end	
+		II=II+1;
+    end
+
+
+	II=2;
+    for lin = WLines+1: WLines : (LSTEPS-1)*WLines
+		JJ=2;
+	    for col = WColumns+1: WColumns : (CSTEPS-1)*WColumns
+
+			VEC=[H(II,JJ-1) H(II-1,JJ) H(II,JJ) H(II+1,JJ) H(II,JJ+1) ];
+
+			LINES   = lin:lin+(WLines-1);
+			COLUMNS = col:col+(WColumns-1);
+
+			Y(LINES,COLUMNS)  = std(VEC,1)/(mean(VEC)+eps);
+
+			JJ=JJ+1;
+    	end	
+		II=II+1;
+    end
+
+	Y=100*(1.0-Y/max(max(Y)));
+    
+    figure(1);
+    imagesc(X);    colorbar;
+    title(['Activity indicator: ',NAME]);
+	daspect([1 1 1]);
+
+    figure(2);
+    imagesc(Y);    colorbar;
+    title('Homogeneity test in analysis windows');
+	daspect([1 1 1]);
+
+end 
+
diff --git a/inst/mfiles/quality/satdark.m b/inst/mfiles/quality/satdark.m
new file mode 100644
index 0000000..a9e1a69
--- /dev/null
+++ b/inst/mfiles/quality/satdark.m
@@ -0,0 +1,199 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [F S D] = satdark(DATAFRAME,WLines,WColumns,MaxDark,MinSat,P)
+%
+%  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
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira <juniomoreira at iftm.edu.br>
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of August of 2015.
+%  Review: 28 of March of 2016.
+%
+    NSIZE = size(DATAFRAME);  
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+
+	if(rem(NLIN,WLines)~=0)
+		TEXT1=['WLines must be multiple of: ',mat2str(factor(NLIN)),'.'];
+		TEXT2=['The last ',num2str(rem(NLIN,WLines)),' pixel lines (botom) were not processed'];
+		warning([TEXT1,TEXT2]);
+		%msgbox(TEXT1,TEXT2);
+	end
+
+	if(rem(NCOL,WColumns)~=0)
+		TEXT1=['WColumns must be multiple of: ',mat2str(factor(NCOL)),'.'];
+		TEXT2=['The last ',num2str(rem(NCOL,WColumns)),' pixel columns (right) were not processed'];
+		warning([TEXT1,TEXT2]);
+		
+	end
+
+    F = zeros(NLIN,NCOL);
+    S = zeros(NLIN,NCOL);        
+    D = zeros(NLIN,NCOL);    
+     
+
+    for lin = 1: WLines   : ( NLIN-(WLines-1) )
+    for col = 1: WColumns : ( NCOL-(WColumns-1) )
+
+		LINES   = lin : lin+(WLines-1);
+		COLUMNS = col : col+(WColumns-1);
+
+		[f s d] = part_sat_dark( DATAFRAME( LINES , COLUMNS ) ,MaxDark,MinSat,P);            
+          
+		F( LINES , COLUMNS ) = f;
+		S( LINES , COLUMNS ) = s;
+		D( LINES , COLUMNS ) = d;
+    end
+    end
+    
+    figure(1);  
+    imagesc(F);  
+	colorbar;    
+    title('Preview');
+	daspect ([1 1 1]);
+
+    figure(2);  
+    imagesc(S);  
+	colorbar;
+    title('Saturation Zone Image');
+	daspect ([1 1 1]);
+
+    figure(3);  
+    imagesc(D);  daspect ([1 1 1])
+	colorbar;
+    title('Dark Zone Image');
+	daspect ([1 1 1]);
+end  
+
+
+function [F S D] = part_sat_dark(WINDOW,MaxDark,MinSat,P)
+%
+%  This function analises the window tagged as WINDOW, where
+%  a dark window is filled with 0, and a saturated window is
+%  filled with 255. To consider a window as dark or saturated, it
+%  should overcome a P percentage of pixels in the window.
+%
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>  
+%  Code adapted by:    Junio Moreira                   
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Date:   09 of August of 2015.
+%  Review: 15 of March of 2016.
+%
+%  This method only implements the values when the function
+%  is called satdark()
+%  
+%  Input:
+%  WINDOW    is the window under analysis.
+%  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 dark or saturate.
+%
+%  Output:
+%  F         is the dark or saturated window. 
+%            The dark windows are filled with 0, and the saturated windows are 
+%            filled with 255. To consider a window as dark or saturated, it
+%            should overcome a P percentage of pixels in the window.
+%  S         is a matrix with the same size of F, this matrix has ones if F 
+%            is saturated and zero in other case.
+%  D         is an matrix with the same size of F, this matrix has ones if F 
+%            is dark and zero in other case.
+%
+
+    WLines   = size(WINDOW,1);
+    WColumns = size(WINDOW,2);
+
+    F = zeros(WLines,WColumns);
+
+    num_pixels_sat  = sum(sum( WINDOW>=MinSat ));
+    num_pixels_dark = sum(sum( WINDOW<=MaxDark ));
+    
+    UMBRAL=WLines*WColumns*P/100;
+    
+    if     ( (num_pixels_sat >= UMBRAL) && (num_pixels_dark <= UMBRAL) )
+
+        F(:,:) = 255;
+		S=ones(WLines,WColumns);
+		D=zeros(WLines,WColumns);
+
+    elseif ( (num_pixels_sat <= UMBRAL) && (num_pixels_dark >= UMBRAL) )
+
+        F(:,:) = 0;
+		S=zeros(WLines,WColumns);
+		D=ones(WLines,WColumns);
+
+    elseif ( (num_pixels_sat <  UMBRAL) && (num_pixels_dark <  UMBRAL) ) 
+
+		F=WINDOW;
+		S=zeros(WLines,WColumns);
+		D=zeros(WLines,WColumns);
+
+    else
+		for II=1:WLines
+		for JJ=1:WColumns
+			if( JJ<=(II*WColumns/WLines) )
+				F(II,JJ)=255;
+			else
+				F(II,JJ)=0;
+			end
+		end
+		end
+		S=ones(WLines,WColumns);
+		D=ones(WLines,WColumns);		
+    end  
+ 
+end
diff --git a/inst/mfiles/quality/sscont.m b/inst/mfiles/quality/sscont.m
new file mode 100644
index 0000000..44a4ffd
--- /dev/null
+++ b/inst/mfiles/quality/sscont.m
@@ -0,0 +1,104 @@
+%  Copyright (C) 2015, 2016   Roberto Alves Braga Junior
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function [C,mC] = sscont(DATAFRAME,WLines,WColumns)
+%
+%  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
+%
+
+%  Code developed by:  Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%  Code adapted by:    Junio Moreira <juniomoreira at iftm.edu.br>               
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto Alves Braga Junior <robertobraga at deg.ufla.br>
+%
+%  Date: 09 of August of 2015.
+%  Review: 15 of March of 2016.
+%
+    NSIZE = size(DATAFRAME);    
+	NLIN=NSIZE(1,1);
+	NCOL=NSIZE(1,2);
+
+	if(rem(NLIN,WLines)~=0)
+		TEXT1=['WLines must be multiple of: ',mat2str(factor(NLIN)),'.'];
+		TEXT2=['The last ',num2str(rem(NLIN,WLines)),' pixel lines (botom) were not processed'];
+		warning([TEXT1,TEXT2]);
+		%msgbox(TEXT1,TEXT2);
+	end
+
+	if(rem(NCOL,WColumns)~=0)
+		TEXT1=['WColumns must be multiple of: ',mat2str(factor(NCOL)),'.'];
+		TEXT2=['The last ',num2str(rem(NCOL,WColumns)),' pixel columns (right) were not processed'];
+		warning([TEXT1,TEXT2]);
+		
+	end
+
+	TOTAL=WLines*WColumns;
+
+    C = zeros(NLIN,NCOL);    
+
+    for lin = 1:WLines  :NLIN-(WLines-1)
+    for col = 1:WColumns:NCOL-(WColumns-1)
+
+			LINES   = lin : lin+(WLines-1);
+			COLUMNS = col : col+(WColumns-1);
+
+            Z = DATAFRAME(LINES,COLUMNS);
+
+            C(LINES,COLUMNS) = std(reshape(Z,1,TOTAL),1)/(mean(mean(Z))+eps);
+    end        
+    end
+    
+    mC = mean(mean(C));
+
+    figure(1);    
+    imagesc(C);   colorbar
+    title(sprintf('Spatial speckle contrast method - %f.',mC));
+	daspect ([1 1 1]);
+     
+end
+
diff --git a/inst/mfiles/undocumented/datapack_to_bmp.m b/inst/mfiles/undocumented/datapack_to_bmp.m
new file mode 100644
index 0000000..330ff4c
--- /dev/null
+++ b/inst/mfiles/undocumented/datapack_to_bmp.m
@@ -0,0 +1,117 @@
+%  Copyright (C) 2015, 2016   Fernando Pujaico Rivera
+%
+%  This file is a part of the Bio Speckle Laser Tool Library (BSLTL) package.
+%
+%  This BSLTL computer package 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 3 of the
+%  License, or (at your option) any later version.
+%
+%  This BSLTL computer package is distributed hoping that it could 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, please download it from
+%  <http://www.gnu.org/licenses>.
+
+function h=datapack_to_bmp(DATA,DIRECTORY,PRENAME)
+%
+%  This function save the images inside of datapack in a set of BMP files.
+%  The formation rule of the BMP file names is:
+%
+%  NAME=fullfile(DIRECTORY,sprintf([PRENAME,'.bmp'],II));
+%
+%  Being II, the number of the saved image.
+%
+%  After starting the main routine just type the following command at the
+%  prompt:
+%
+%  h = datapack_to_bmp(DATA,DIRECTORY,PRENAME);
+%
+%  %% To filenames: 'seed1.bmp', 'seed2,bmp', ..., 'seed128.bmp'
+%  h = datapack_to_bmp(DATA,'','seed%d');
+%
+%  %% To filenames: 'img1coffee.bmp', 'img2coffee,bmp', ..., 'img100coffee.bmp'
+%  h = datapack_to_bmp(DATA,'','img%dcoffee');
+%
+%  %% To filenames: 'img0001.bmp', 'img0002,bmp', ..., 'img0123.bmp'
+%  h = datapack_to_bmp(DATA,'','img%04d');
+%
+%  
+%  Input:
+%  DATA      is the speckle data pack. 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.
+%  DIRECTORY is the address where the BMP files will be saved.
+%  PRENAME   is the format filename, example: if you search names as 
+%            'fig1.bmp', then PRENAME='fig' or PRENAME='fig%d'. If PRENAME not
+%            contain a format specifiers of family %d, them this format specifiers 
+%            is added at the final of PRENAME string. The format string is similar
+%            to the function printf of others programming languages.
+%            Only are permitted format specifiers of family %d, given that will
+%            be replaced a decimal number.
+%
+%  Output:
+%  h         returns a struct with the fields,
+%            h.file{i}: The name of i-th bmp file, 
+%            h.format:  The format filename,
+%            h.init:    The id of first element,
+%            h.dir:     The directory where the images will be saved, and
+%            h.nel:     The numbeer of images.
+%
+%
+%  For help, bug reports and feature suggestions, please visit:
+%  http://www.nongnu.org/bsltl
+%
+
+%  Code developed by:  Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>               
+%  Code documented by: Fernando Pujaico Rivera <fernando.pujaico.rivera at gmail.com>
+%  Code reviewed by:   Roberto A Braga Jr <robertobraga at deg.ufla.br>
+%  
+%  Date: 20 of February of 2016.
+%  Review: 28 of March of 2016.
+%
+	%Checking parameters
+	if(~(ischar(DIRECTORY)&&ischar(PRENAME)))
+
+
+		if(~ischar(DIRECTORY))
+			disp('Second parameter is not a string.');
+		end
+		if(~ischar(PRENAME))
+			disp('Third parameter is not a string.');
+		end
+		
+		error('Error in the parameters format of datapack function.');
+
+	end
+
+    NSIZE = size(DATA);
+	NLIN  = NSIZE(1,1);
+	NCOL  = NSIZE(1,2);
+	NTIMES= NSIZE(1,3);
+
+	DATA=uint8(DATA);
+
+	if(length(strfind(PRENAME,'%'))==0)
+		PRENAME=[PRENAME,'%d'];
+	end
+
+    mkdir(DIRECTORY);
+
+    h.file=cell(1,NTIMES);
+    h.format=[PRENAME,'.bmp'];
+    h.init=1;
+    h.dir=DIRECTORY;
+    h.nel=NTIMES;
+
+	for II=1:NTIMES
+		h.file{II}=fullfile(DIRECTORY,sprintf(h.format,II));
+		imwrite(DATA(:,:,II),h.file{II});
+	end
+
+end

-- 
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-bsltl.git



More information about the Pkg-octave-commit mailing list