Research Ideas and Outcomes : Project Report
Project Report
Biospeckle Laser On Clouds, a digital gateway aiming at collaborative research improvement
expand article infoRoberto A Braga, Robson P Godinho§
‡ Federal University of Lavras, Lavras, Brazil
§ RPG Software, Lavras, Brazil
Open Access


The Dynamic Laser Speckle (DLS) is a photonic phenomenon transformed into a technique to monitor tiny changes in many materials, particularly in biological ones (Biospeckle Laser – BSL). Its high sensitivity is key to monitor tiny changes in the tissues that can characterise biological features in medical and in agricultural samples. This work aimed to develop an environment at the world-wide-web to share raw data of BSL and to offer access to an interactively online analysis with tutorials. The gateway designed was implemented using PHP and JavaScript tools solving the challenges of managing data (images) and online interactive use. The result was an easy-to-use environment boosting the BSL research. The early results presented thousands of accesses and of more than one hundred different users from all around the world.


Biospeckle laser, research, images, sharing, information


Dynamic Laser Speckle (DLS) is a phenomenon that occurs when a coherent light shines on a surface that has a roughness equal or higher than the wavelength of the laser, our coherent light source. This phenomenon was considered at first as a noise during interferometry works, but its ability to bring useful information from the objects, illuminated by the laser, opened great opportunities of optical metrology (Rabal and Braga 2008). And most of the applications of the phenomenon as a sensor of activity are in the biological field, from medicine (Golubova et al. 2023) to agriculture (Zdunek et al. 2014).

Therefore, the dynamic laser speckle is named as biospeckle laser (BSL) when the application is in blood flow detection (Briers and Webster 1996), or in cancer cells monitoring (Gonzalez-Pena et al. 2014). Applications in seeds analysis (Braga et al. 2003; Xing et al. 2023), in fruit maturity classification (Kurenda et al. 2012; Yan et al. 2017) or in animal sperm motility (Carvalho et al. 2009) are some examples of a collection of applications in agriculture (Zdunek et al. 2014).

The adoption of the phenomenon as a technique can be accounted for since the middle 1970s for all around the world (Vieira and Braga 2020), however, without commercial devices dedicated to agricultural products. The absence of commercial devices can be considered one reason for the lack of standards in acquiring the images, as well as its processing and analysis (Braga 2017). A multitude of methodologies to process and to analyse the images makes the creation of a standard a challenge and a key demand. One contribution to gather the procedures of analysis are presented in the project Bio-Speckle Laser Tool Library (Braga and Rivera 2016) and in the digital book linked to the site project (Braga et al. 2016).

Despite all the efforts of development of the technique and its applications, the research still demands a creation of a database of raw BSL images to help new researchers to start dealing with the assembled speckle patterns to test the routines of analysis, as well as to help the sharing of work resulting in the increase in the standardisation of the data and the methodology.

The increase in of the use is recorded in literature regarding its applications or development to acquire and/or analyse the data [11] and that increase is the motivation fort the creation of a platform to share the data produced so far and so on.

that was the challenge of this work, to build a web-based software to create a gateway aiding the improvement of the research in biospeckle laser field by means of three dimensions: (i) Tutorial with guidelines to support the usage of BSL; (ii) Collaborative net environment with BSL raw data being shared and (iii) Interactive (online) service analysing BSL data for free.

The technical solutions designed to address the three objectives were based on cloud usage serving as storage of the data, information and online service. The PHP scripting language was adopted to create the features to use the web-based gateway and as the host of the online software. PHP is a well-known scripting language that provides solutions to serve as a backend, such as in the case of the tool developed to provide the risk assessment, the visualisation and communication about COVID-19 (Ghimire et al. 2021). Regarding data management, the PHP was used as an environment for generating cheminformatics structured data on the Web, in that case using Java and Python (Szeremeta and Tomaszuk 2021). In Precision Agriculture, the use of web-based solutions (Bazzi et al. 2019) aids the disponibility of key data in diverse formats and accessible by many forms and sources. The environment that aimed to make the work of farmers and researchers easier, was built using PHP language which, in this particular case, provides the storage, integration and management of agricultural data.

Here, we present a web-based solution for gathering raw data and its metadata from biospeckle laser applications, offering them in a public format, by means of cloud storing. The gateway was also designed to serve as an aid environment to run an online and interactive tool to analyse the user’s BSL data. Complimentarily, the gateway offers the access to tutorials and free software access to enhance and make the technique accessible.

Software description

The software was built in order to deliver different functionalities:

  • Public access to an original database of BSL raw images, based on a collaborative way;
  • Easy access to information about BSL and
  • Interactive and online interface to analyse the BSL data from users in a personal and remote way.


The software based on internet environment has three basic features:

  • The database of raw images of BSL to be downloaded and uploaded;
  • The interactive environment to analyse the BSL data by the user online;
  • The Tutorial area for the users to obtain more information about the BSL.

With these features, the users can develop their research by means of raw data from research already published, thus recognised by third parties. The exchange of information by the data-packs also offers the possibility of new joint works and the enhancement of the technique around the world.

Using the interactive function to address on-line the graphical and the numerical information from their own data, the users feel safe using the technique, since some users do not have sufficient knowledge regarding image mathematical computer processing. Finally, the test of data from others, obtained in the portal, will help the users to feel confident when testing their own data.

Gateway characteristics

The designed software can be summarised in the following Metadata and can be divided in three main modules: Accessing and building a database and tutorials; Administrative features; and Data analysis.


Current code version: V.1.0.1 Code archived DOI: 10.5281/zenodo.10038616 (Godinho 2023)

Link to code/repository used for this code version:

Link to reproducible capsule:

Legal code licence: GNU General Public Licence (GPL) v.3

Code versioning system used: git

Software code languages, tools and services used: PHP, Javascript

Support email for questions:

Accessing and building a database and tutorials

The two first features were obtained using the PHP language, since it is a language that is accepted in the majority of internet service hosts, including the low-cost servers. The backend build was programmed to receive the upload of the images, submitted to tests of integrity and receiving a moderation control before release to public access.

The managing of the images was provided by Javascript that runs in the user’s machine. The distributed processing is the key-factor of the efficiency of the procedures (Fig. 1). However, the seeking of efficiency of image management is done in other procedures, such as in the image upload. For instance, the upload of the images occurs with them placed in a line to be sent to the backend. The line is done to avoid the overload of the web connection and to avoid time-consuming in the backend.

Figure 1.  

Logical flow of the assessment of database.

The images are stored in a MySQL database and are linked to the additional information related to the image generation (metadata), such as information about the laser, the camera, the time-rate of image assembling and other relevant data to allow their use by third parties. The owner of the images can also include the DOI or the URL of where they were published originally, paper or report.

When the images are ready to start uploading, a report with all the information (metadata) is created and approved by the owner. The images are sent one-by-one to avoid overloading the backend. Thus, when the user enables the uploading, the metadata and the sequence of images are received in the backend to be released by the moderator, who checks the pertinence of the data.

Once approved to publish by the website administrator, the data are placed in an environment named Catalog, where the users can find all the collection of data to proceed with the download.

The gateway was built upon a framework with protection during each step of the use. This protocol aimed to achieve a fast process during the reception of the images comprising the analysis of the files and their assembling.

Administrative features of the solution

In the administrative feature of the solution, the security of the data and the control of access were implemented, with black and white IP list checking. The pages are individually treated receiving permissions of access to avoid the irregular use of the system’s rules by common users. In addition, regarding the security, the portal uses the protocol HTTPS.

The management of users is already provided for the administrators of the portal, with options of use permissions for some functionalities or even exclusion. The system also provided a link of contact by means of an email.

A backup function of the data in the portal was built and the operation of the system is registered and stored.

Data analysis

The online analysis of data from users is provided by JavaScript running graphical and numerical functions as presented in Equation 1 and Equation 2, respectively.

\(GAVD = E[|I_k - I_{k+1}|]\) (1)

where GAVD is an outcome matrix representing the heat map in grey or pseudocolours, relative to the map of activity and the I is the image in time k, from 1 to N (number of images acquired in a particular time rate in seconds); E[.] is the expectation operator [14]. The expectation is obtained from the occurrence matrix [14], that is a secondary matrix, linked to the time history of speckle patterns (THSP) of each pixel of the images in time. Thus, the THSP is a matrix with the values of the selected pixels in time.

The GAVD is, therefore, the graphical outcome of the Absolute Value of the Differences (AVD) function, that is used in the numerical analysis of the BSL. In the online tool, we used the AVD#1 represented by the Equation 2

\(AVD = E [| i - j |]\) (2)

where i and j are the grey values in the occurrence matrix [14]. In the numerical approach, the THSP is used to construct the Co-Occurrence Matrix, and the THSP is formed by random points, in a Gaussian distribution, collected from an area selected by the user interactively.

In our interactive tool, we used the graphical and numerical outcomes to help the user to test the technique and to have easy contact with it, which allows the learning of the graphical and numerical features and their meaning. The human-machine interface can be summarised by some steps.

In Fig. 2, we can observe the first step linked for the preparation of the dataset, here named as datapack. Thus, a collection of RGB images in 2D matrices is transformed in grey-scale, when it is the case and, thus, a sequence of images is created forming a 3D matrix.

Figure 2.  

Flow of the data-pack construction, from a sequence of matrices in 2D to a matrix in 3D format.

The second step is the generation of the map of activity from the sequence of speckle pattern images. Using Javascript’s features, we dealt with the images, using them as an up-dated buffer for the mathematical operations. In addition, to reduce the time-consuming and increase the security of the operation, the developed programme was run in the user’s local machine, thus avoiding the traffic of data. In Fig. 3, we can see the process of image checks, size and number of images, followed by the image processing using the interactive AVD function.

Figure 3.  

Flow of the image pre-processing and AVD implementation with graphical outcome.

In the numerical process of the AVD, the operation of matrices was replaced by images manipulation, using the best of Javascript. The images (matrices with grey-scale values) were used to aid the user to define the desired area for the numerical analysis (with a graphical outcome) and as the datapack of the numerical analysis.

The data used in the numerical analysis is constructed from a collection of random points weighted in a Gaussian distribution. The interactive operation allows the tailoring of the Gaussian function (the number points and the standard deviation) by the user, as well as the selection of the spot area where the numerical analysis will be conducted. A graphical outcome of AVD is plotted to aid the user to move the selected points using a computer mouse over the graphical map of activity (graphical AVD outcome).

Therefore, the microprocessor responsible for the operations, such as the rendering, of the images is the graphic processor, which, in most hardware, is represented by a dedicated graphics card. While the memories of the mother-boards commonly use the DDR4 (~3,200 MHz), the dedicated graphic cards can use the DDR6 (12,500 MHz).

However, when the user’s computer does not have a dedicated graphic card, the system reserves an area of the RAM memory for image renderisation. In this case, the running of the online analysis will take some seconds more, but not compromising the online sensation.

The distributed operation associated with the image processing in Javascript offers an experience of real-time analysis, when the graphical outcome can be used interactively by the user to obtain the numerical value of AVD within the random-gaussian points positioned by the user him/herself. Therefore, the numerical values can be accessed in real-time and the user can evaluate in the whole image the biological activity measured by the AVD. This procedure can be run as many times as the users wish over the graphical outcome as a guide.

An option of off-line analysis is offered to those needing further and detailed analysis.

Implementation details – Some results

Using the gateway, one can start by the main page (Landing page) of the portal, where the user can see all the possible actions (Fig. 4). The main bar in the top presents the functionalities, as well as the login or the new register options. The information in the landing page is related to the statistics of usage, such as the number of views and distributions of users around the world including the statistics per country.

Figure 4.  

Print screen of the landing page with the functionalities and information of the portal. The contrast was enhanced for better visualisation.

Downloading data

The functionality of dealing with raw data can be seen in Fig. 5, where a crop of the download screen presents the view of the data with its thumbnail and all descriptions of the data, such as the sample illuminated, the type of laser, time rate of image assembling etc. The data are downloaded in “zip” format, that includes the sequence of images and the metadata.

Figure 5.  

Crop of the download screen function, with the metadata of a coffee seed. The options include the download of raw data by common users registered, to edit and delete the data by the owner of the upload.

Online analysis

In Fig. 6, we can observe the outcome of the Online Analysis function with the result of a maize seed analysis. The outcome presents the graphical and the numerical results, where the graphical is a low resolution preview of the map of activity. The preview image is the reference to the user selecting with the mouse the area where she/he wants to evaluate the numerical outcome, the activity presented by the AVD.

Figure 6.  

Crop image of the Online Analysis screen with the preview in low resolution of a corn seed map of activity, the collection of points (in black) in the area where the user wants to know the numerical activity presented by the AVD index. The histogram of the points is also presented to help the user evaluate saturation or under-exposure of the area selected to provide the numerical analysis.

To guide the user, a histogram of the points is presented, helping the selection of an area without saturation or under-exposure of light. The area and the number of points in Gaussian distribution can be tailored by the user in order to sharply define the observed area, i.e. avoiding the mixing of an area with high activity (seed) with another with low activity.

Final experience and evolution of the tool

The gateway BSL on Clouds was launched on 19 January of 2023 and, since then, we have had many users interacting with the platform. One can see that, after six months, more than 1800 accesses were made and with users (different IP) from countries represented by USA (37), Brazil (26), Europe (> 10), India (6) and Canada (5), amongst other countries in the five continents.

We have until now five datasets uploaded, related to speckle patterns from seeds (2), painting (1) and cancer cells (2).

The tests of online JavaScript were done by laboratories in different places using their own speckle images, presenting fast interactive results, without problems during the presentation of graphical results, as well as during the interactive numerical outcomes.

The solutions implemented in BSL on Clouds to manage datasets of many images and to provide online interactions without overloading the system operate in the same way of works that are used by web-workers (Verdu et al. 2016), which transforms a website into a application (web-app). One can also see the use of the framework MOA (Massive Online Analysis) to deal with huge amount of data (Maciel et al. 2020).

The development of a parallel JavaScript web application presents difficulties (Verdu et al. 2016) [Verdu] and it must be necessary for the development of alternative tools to implement it. BSL on Clouds gateway implemented some alternative procedures to deal with images (upload, download and online analysis). In the next versions, we can implement the solutions suggested in the literature (Verdu et al. 2016; Maciel et al. 2020) to enhance the data management and analysis.


The system to share, in a collaborative way, raw data of Biospeckle Laser using the world-wide-web was implemented successfully. It offers, at the same time, functionalities of downloading-uploading data and software, the access to tutorials and an interactive online data analyser. The result was an easy-to-use man-machine interface that can boost the BSL research, by means of JavaScript and PHP languages. The challenge to gather the functionalities to manage data and online interactive functions was addressed using the remote processing and the graphic card of the remote users.


This work was partially supported by Conselho Nacional de Pesquisa e Tecnologia 316938/2021-1.

Funding program

Productivity Research Grant - PQ1A

Hosting institution

Federal University of Lavras - UFLA

Ethics and security

There are no issues regarding ethics and security of human and animals in this work.

Author contributions

Braga R.A. idealised and planned the solution, interacting with the developer, working as well as in the report writing. Monitored and influenced the test of the platform.

Godinho R.P. developed the software solution and worked in the report writing. Active participation in the test of the platform.

Conflicts of interest

The authors have declared that no competing interests exist.


login to comment