Thursday, 27 February 2014

The method of the curve fitting

As long as we can read the point and collect the value of each point. However, the curve you draw may not match with the original curve. As a reult, a curefitting function is needed to general smoother and closely to the base cureve. In this article, i will genreally introduce my way to do the curve fitting.

As we know, there are many ways to do the curve fitting such as ploynomial, expotential methods.However, we only have six weeks to do the project, so there may have no time to find the best way to generate a perfect curve. In this case, we will use the simplest way. First, i tried the polynomial functions which is inside of the matlab library called polyfit. This function will generate the coefiicients of the polynomial by different order. For example, if there are some dicrecte point, it could be represent by the equation y= a1+a2x+a3x^2+........+anx^(n+1). By this function, we could get the equation quickly. Then, there is a preblem, it is not sure about how many points for the curve and it can not determin the orders and if the order is higher, it will waste a lot of time or memory. As a result, I chooice a simple way. First, choose the first three points and do the curvefitting, then draw the line with the result between the first two points. Next, move another three points and do like this untill the last point. By this way, we do not need to care about how much data are input and save a lot of time. Here is a example:

If we input x and y:



Then we use curvefitting function:


From the figure, it shows that the curve we get pass through all the points. However, there still a problem that the curve is not extrem smooth as there is a peek in the third points.

We could also choose the range we want:




Friday, 21 February 2014

Work summary 2.21 (forth week)
In forth week, the team members concentrated on the part which is information extraction from images. This blog would use an image which theme is tiger to show how the software works.
The main user interface is shown blow.

Press the button named open a graph which means load a image to the software.

Then the image is loaded in the UI.

Next, press the button named find a curve and double click the mouse of left to get all the points which have same colour.


Finally, the software can transfer data on the left to the curve fitting program to get a curve and function related to points.

Wednesday, 12 February 2014

Work Summary 2.12

New functions that were added to the GUI program are:

1. Add a graph file

We have designed a button for this function before, now this function is realized. "Add a file" means importing a figure to the display window on the GUI. To meet the design requirement, the file format of the figure was confined to *.bmp only.The button of the function is shown as below.


To show the new character, we import a figure as an example.

For example, we add this figure into the GUI.


Just click the button and a dialog is displayed.


Choose it and then we can see that the figure is displayed.


2. Add data

This function enables us to put data contained in an Excel file into the GUI and display them in a table. First of all, we designed a table on the GUI.


By using the similar method as "Add a graph file", we realized this function. For example, we import an *.xslx file.



By clicking the button "Add data", a dialog is displayed.


Select file and then the data is displayed in the table.





Monday, 10 February 2014

The summary of the work in the second week.

In the first week, the team members were familiarising the details of the project and collecting the corresponding information.
During the second week, each member have been focusing on the part in which they involve. In accordance with the guide of supervisor, we already achieved some tasks of the project.
The aim of the project is that establishing a GUI program designed by MATLAB, which can be applied for recognising the data of images. Thus, an essential step is that collecting the data of specific part of the images.
Owing to the student who are concentrating on the loading and recognising data, based on the simple images such as basic curves, the data can be collected, and plot other new figures depending on the choices if different functions and the change of the input data.
Figure 1 Plot based on different functions.
As Figure 1 shown, when the data is obtained, input different data, it can plot the corresponding images.

Figure 2 Using mouse wheel to zoom in and out the image.
The Figure 2 displays the function that using the mouse wheel to zoom in and out the image to observe the image clear.

Figure 3 The cursor can indicate the position of the points on the curve.
In accordance with the aim of the project, the details of the points of the curve can be identified. Therefore, another function can be achieved is that when you press the button "Cursor", you can use the cursor to find the coordinate information of the points.
During this week , we are focusing on the curve fitting and the GUI interface design. Moreover, more functions are adding to the programme.
Keep going!

Monday, 3 February 2014

Begin the project!!!

As the blog of our project- A MATLAB GUI Application was created,the whole process of the project will be recorded in this blog. let's try our best to accomplish an excellent project!