资源简介
Miguel_2D_unwrapper使用说明,二维鲁棒性很强的解包裹算法,可以用于MATLAB调试和C语言调试。
代码片段和文件信息
//This program is written by Munther Gdeisat and Miguel Arevallilo Herra磂z to program the two-dimensional unwrapper
//entitled “Fast two-dimensional phase-unwrapping algorithm based on sorting by
//reliability following a noncontinuous path“
//by Miguel Arevallilo Herra磂z David R. Burton Michael J. Lalor and Munther A. Gdeisat
//published in the Applied Optics Vol. 41 No. 35 pp. 7437 2002.
//This program is written on 15th August 2007
//The wrapped phase map is floating point data type. Also the unwrapped phase map is foloating point
#include
#include
#include
#include
#include “mex.h“ //--This one is required
static float PI = 3.141592654;
static float TWOPI = 6.283185307;
//pixel information
struct PIXEL
{
//int x; //x coordinate of the pixel
//int y; //y coordinate
int increment; //No. of 2*pi to add to the pixel to unwrap it
int number_of_pixels_in_group; //No. of pixels in the pixel group
float value; //value of the pixel
float reliability;
int group; //group No.
int new_group;
struct PIXEL *head; //pointer to the first pixel in the group in the linked list
struct PIXEL *last; //pointer to the last pixel in the group
struct PIXEL *next; //pointer to the next pixel in the group
};
//the EDGE is the line that connects two pixels.
//if we have S PIXELs then we have S horizental edges and S vertical edges
struct EDGE
{
float reliab; //reliabilty of the edge and it depends on the two pixels
PIXEL *pointer_1; //pointer to the first pixel
PIXEL *pointer_2; //pointer to the second pixel
int increment; //No. of 2*pi to add to one of the pixels to unwrap it with respect to the second
};
//another version of Mixtogether but this function should only be use with the sort program
void Mix(EDGE *Pointer1 int *index1 int *index2 int size)
{
int counter1 = 0;
int counter2 = 0;
int *TemporalPointer = index1;
int *Result = (int *) calloc(size * 2 sizeof(int));
int *Follower = Result;
while ((counter1 < size) && (counter2 < size))
{
if ((Pointer1[*(index1 + counter1)].reliab <= Pointer1[*(index2 + counter2)].reliab))
{
*Follower = *(index1 + counter1);
Follower++;
counter1++;
}
else
{
*Follower = *(index2 + counter2);
Follower++;
counter2++;
}
}//while
if (counter1 == size)
{
memcpy(Follower (index2 + counter2) sizeof(int)*(size-counter2));
}
else
{
memcpy(Follower (index1 + counter1) sizeof(int)*(size-counter1));
}
Follower = Result;
index1 = TemporalPointer;
int i;
for (i=0; i < 2 * size; i++)
{
*index1 = *Follower;
index1++;
Follower++;
}
free(Result);
}
//this is may be the fastest sort program;
//see the explination in quickSort function below
void sort(EDGE *Pointer int *index int size)
{
if (size == 2)
{
if ((Pointer[*inde
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3647830 2015-09-22 23:34 Two_Dimensional_Phase_Unwrapping_FinalPDF.pdf
文件 17396 2011-07-26 10:07 Miguel_2D_unwrapper.cpp
文件 10240 2011-07-26 10:08 Miguel_2D_unwrapper.mexw32
文件 11264 2017-06-27 16:28 Miguel_2D_unwrapper.mexw64
文件 1170 2016-01-13 14:53 under_samples problem.m
文件 6074 2016-01-19 10:09 phaseunwrep_2D.m
- 上一篇:CMFCOutlookBar
- 下一篇:Cache模拟器200881
评论
共有 条评论