Difference between revisions of "Team:HZAU-China/Software"

m
m
Line 208: Line 208:
 
<a id="A1"> </a>
 
<a id="A1"> </a>
 
</div>
 
</div>
<h4>Colony radius calculating software</h4>
+
<h4>Colony radius calculation software</h4>
<p>In this project, the specific pattern of bacteria is formed by control the motility of bacteria. So the first step of this project is validating the different of motility. In experiment, the motility can be expressed by the size of bacteria colony. So we write a sequence photography program, and it can be used to take photo every 15 minutes combining with Raspberry Pi. After getting these pictures, we need to measure the diameter of colony. If we measure them manually, it will have a huge workload. So we write a program to help us.</p>
+
<p>In this project, the specific pattern of bacteria is formed by controlling the motility of bacteria. So the first step of this project is validating the difference of motility. In experiment, the motility can be represented by the size of bacteria colony. So we write a sequential photography program, and it can be used to take a photo every 15 minutes combined with Raspberry Pi computer. After getting these pictures, we need to measure the diameter of colony. If measured manually, it will be a huge amount of workload. So we write a Python program to help us.</p>
<p> This is a semi-automatic software. But it can only be used in sequence photograph. When this program running, you can see the GUI like Figure 1A, and the shell window is also useful for you to see the measure result. You need use two picture as inputs into this program. The first input is the first picture in the picture sequences and the second input is that picture you want to measure.</p>
+
<p>It is semi-automatic software and can be used in sequential photography. When this program is running, you can see the GUI like Figure 1A; the Python shell window is also useful for you to see the measure result (Figure 1B). You need two pictures as the input to this program. The first picture is the starting point in the picture sequences and the second picture is one you want to measure.</p>
<p>Warning: camera and the target object can’t be moved after shooting begin and the external light must be Invariant.</p>
+
<p>Warning: camera and the target object cannot be moved after shooting begins and the ambient light must be Invariant.</p>
 
<img src = "https://static.igem.org/mediawiki/2016/4/40/T--HZAU-China--img_process_soft.png" width="700px">
 
<img src = "https://static.igem.org/mediawiki/2016/4/40/T--HZAU-China--img_process_soft.png" width="700px">
<p style="text-align:center">Figure 1. Colony radius calculating software.</p>
+
<p style="text-align:center">Figure 1. Colony radius calculation software.</p>
 
<div class="random">
 
<div class="random">
 
<a id="A11"> </a>
 
<a id="A11"> </a>

Revision as of 19:41, 19 October 2016

body

Software

This year, we write a series of software for our project including colony radius calculation software, mathematical model software, device demo software and the core BioPaFiAR software (driver for the BioPaFiAR hardware device). Now we will introduce them one by one.

Colony radius calculation software

In this project, the specific pattern of bacteria is formed by controlling the motility of bacteria. So the first step of this project is validating the difference of motility. In experiment, the motility can be represented by the size of bacteria colony. So we write a sequential photography program, and it can be used to take a photo every 15 minutes combined with Raspberry Pi computer. After getting these pictures, we need to measure the diameter of colony. If measured manually, it will be a huge amount of workload. So we write a Python program to help us.

It is semi-automatic software and can be used in sequential photography. When this program is running, you can see the GUI like Figure 1A; the Python shell window is also useful for you to see the measure result (Figure 1B). You need two pictures as the input to this program. The first picture is the starting point in the picture sequences and the second picture is one you want to measure.

Warning: camera and the target object cannot be moved after shooting begins and the ambient light must be Invariant.

Figure 1. Colony radius calculation software.

Procedures:

1. After running this program, clicking the min track bar and move mouse. And you can see that the following window will change. The white parts are colonies. Move the track bar until the colony that you want to measure be the best.

2. After the adjustment is good, clicking left mouse button and move mouse to choose the colony you want. The selection box is a green box.

3. After choose a colony, the area will be shown in the litter window. If there is no other colony in the window, you can press “Enter” to calculate the diameter of the colony. The result will be shown in shell window. See in Figure 1B.

4. Press “Esc” to quick this program.

You can click here to download it.

Motility dynamic model software

On the base of previous dynamic model, we package the modeling program into a software with GUI. The program is coded using python2.7 and the GUI using traits/traitsUI. The image process using opencv-python and result was displayed by mayavi. Figure 2 shows the GUI.

Figure 2. Motility dynamic model software

Procedures:

1. Running this software.

2. Clicking the yellow folder shape icon in the back of “Choose File” to choose target image.

3. Adjusting the values of parameters including k, r, ps and time.

4. Choosing display mode to 2D or 3D.

5. Clicking “ok” button to solve PDE. The result will be shown in the bottom window. If you are interesting in this program, you can download it by clicking here.

Colony motion simulation software

Because the project needs to simulate the pattern formation of colonies, so the initial point of the colony in the culture dish plays a vital role for the growth period of formation. It is necessary to fit the colony image and the target image, and to compare with the image of the target in the experiment. We can have a pre experiment in the computer for bacteria growth and proliferation, so as to give some predictions and guidance to our experiment.

Analytical and simulation on the cellular automation models for the growth of colonies, the use of this program through the Matlab2014a test. In this experiment, we need to manually select the colony to form the target image

As shown below is an example of the usage of this software, a window appears when the program begin to run.

Figure 3. Motility Colony motion simulation software

The steps of using this program:

1. open the program.

2. click the load button in the interface and import your target image.

3. select a point in the area of the target image as the initial location of the bacteria.

4. click the run button to start the program.

5. click the stop button to suspend the program and view the current running status.

6. you can also select another position to inoculate so that the shape of the colony can grow into the target imgage faster.

7. click the quit button to exit the program.

Device demo software

Putting the bacteria in our AR environment, a system is needed to ensure the light signal from computer is accessible to our cell. So we have designed a device to lead the formation of colony pattern. You can see our hardware part to see more detail. In order to demonstrate our device more conveniently, we build a device demo software to show our device.

This soft was made in blender which is is a professional free and open-source 3D computer graphics software product used for creating animated films, visual effects, art, 3D printed models, interactive 3D applications and video games. And it was output by blender add-on “Save As Game Engine Runtime” as an executable file. This software is only applicable to the windows system. You can click here to download this soft or click here to download source files.

Movie 1. Device demo

If you want to use it, the operation is as follows:

Double-clicking “hardware.exe” to run this software. Press “A” to rotate the scene to left and press “D” to rotate to right. Clicking mouse left button to open the door and clicking again to close it. Rolling up the mouse wheel to close to the scene or rolling down to away from the scene. Press “Esc” to quit the program.

BioPaFiAR software

In this project, a light matrix projected from projector will be used to change the motion state of bacteria. And the light matrix is generated by computer which will collect colony image by camera. So we need a program to coordinate the work between the projector and camera. At first, the program can read image from camera. So we use opencv-python to control camera and process image. After read image from camera, we need separate colony from background. Because a huge reflection existing in dish’s wall will interfere the separation process, so we need to find a new way to separate it.

Guiding bacteria to form a specific pattern need to culture bacteria continually. In the meantime, in addition to the colony area, the illumination condition of the rest area is invariable. So we can get colony area by using the picture later to subtract the previous. Based on this thought, we will save a picture into memory before the colony appeared. After the colony appeared, we can read image from camera. Converting them to gray mode and thresholding them separately. Subtracting the former from the latter. Then we can get the colony. But in many times, the lack of resolution of camera may cause the beat noise. So we can use open operation to remove the noise.

After the above treatment, we can get a black and white image. We can use canny algorithm to detect edge and use dilation operator to extent edge. But how to combine with target image? Bitwise and operation can be used in dilated image and target image. then converting 255 values to green color and 0 values to red color and save it as an BGR image. Displaying the image in full screen, and projector will copy and project it onto colony.

Figure 4.BioPaFiAR software