资源简介

2D 相位解卷绕的代码。用matlab及c++编写。适用于三维重建领域研究人员使用。

资源截图

代码片段和文件信息

clear; clc; close all
%This Matlab program calls a 2D Phase unwrapper written in C language
%The wrapped phase image is floating point data type. 
%Also the unwrapped phase image is floating data type.

%read the wrapped phase image from a file. 
image_width = 512;
image_height = 512;
fid = fopen(‘wrapped phase map float 512X512.dat‘);
WrappedPhase = fread(fid image_width * image_height ‘float‘);
fclose(fid);
WrappedPhase = reshape(WrappedPhase image_width image_height);
figure(1)
colormap(gray(256))
imagesc(WrappedPhase);

%call the 2D phase unwrapper from C language
%To compile the C code: in Matlab Command Window type
         mex Miguel_2D_unwrapper.cpp
%The wrapped phase should have the single (float in C) data type
WrappedPhase = single(WrappedPhase);
UnwrappedPhase = Miguel_2D_unwrapper(WrappedPhase);
figure(2)
colormap(gray(256))
imagesc(UnwrappedPhase);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件     1048576  1998-04-06 12:49  wrapped phase map float 512X512.dat
     文件         905  2011-07-26 10:08  Example1_2D_Phase_Unwrapper.m
     文件       17396  2011-07-26 10:07  Miguel_2D_unwrapper.cpp
     文件       10240  2011-07-26 10:08  Miguel_2D_unwrapper.mexw32

评论

共有 条评论