网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
05月14日漏签0天
matlab吧 关注:292,750贴子:1,659,400
  • 看贴

  • 图片

  • 吧主推荐

  • 游戏

  • 4回复贴,共1页
<<返回matlab吧
>0< 加载中...

Matlab ASCII image Calibration & 3D plot

  • 只看楼主
  • 收藏

  • 回复
  • yume123
  • 初涉江湖
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
我的电脑Vista
Matlab Ver.7.0.0 (R14)
我有两个程序 但是有些小问题。麻烦高手帮忙看看啊。急~


  • yume123
  • 初涉江湖
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
% Calibration Curve (calibrate k)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This program enables the user to input an ASCII file of calibrated images to calculate
% average phase from a predefined area. The values are then entered into an Excel table
% to plot the calibration curve
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp ('This first part is to choose the area of interest. Please enter the parameters');
% To get the area of interest
X1 = input ('Enter X starting pt>');
X2 = input ('Enter X ending pt>');
Y1 = input ('Enter Y starting pt>');
Y2 = input ('Enter Y ending pt>');
disp ('This next part is to get the output file name and input filename(s)');
cont      =      'y';
i     =     1;
Img_file     =     input         ('ASCII output filename>','s');
while cont ~= 'n'
     Img_file1     =     input     ('ASCII filename of unwrapped image>','s');
     I      =     load     (Img_file1 );
     I1      =     double (I);
    
     I2      =     I1(X1:X2,Y1:Y2);
      Mean         =     mean(I2);                %then average the area
     MeanMean     =     mean(Mean)  
     Array(i,1)     =     MeanMean;    
     clear I I1 I2 map Mean MeanMean
        i=i+1;
        cont     =     input ('Continue y/n?     >','s');
end,
dlmwrite(Img_file,Array,' ');


2026-05-14 04:20:28
广告
不感兴趣
开通SVIP免广告
  • yume123
  • 初涉江湖
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
%Plot3d.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%This program enables the 3D plot to be obtained when an unwrapped phase map in
%ASCII format is entered. The value of the calibration gradient previously obtained is %also entered.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Image     =     input     ('Enter ASCII filename of unwrapped image >','s');
%Obtained from Excel Plot. Refer to calibrate.m
y     =     input     ('Enter calibration curve gradient from the EXCEL plot >');
%Setting the maximum boundary
limit = input ('Enter maximum value of X coordinate>');                                                                      
%loading the phase map
Iob     =     load (Image);
%scaling function
k        =    1/y;        
Iac      =    k*Iob;
clear Iob y   %memory saving
%plotting the 3D plot
z         =    flipud(Iac);
figure;
hold;
mesh(z);
view([43 72]);
title('3D plot of test subject');
xlabel('pixel');
ylabel('pixel');
zlabel('height (mm)');
%side.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%This program enables the cross section height profile plot to be obtained when an
%unwrapped phase map in ASCII format is entered. The value of the calibration gradient
% previously obtained is also entered.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Phasemap is obtained from FRINGE PROCESSOR or an equivalent program
Image_1 = input     ('Enter ASCII filename of unwrapped image >','s');
%Obtained from Excel Plot. Refer to calibrate.m
y =     input     ('Enter calibration curve gradient from the EXCEL plot >');
%Entering Parameters for the Cross section plot.
limit = input ('Enter maximum value of X coordinate>');                                                                     
Section     = input     ('Please enter a cross section coordinate >');
%loading the phase map
Iob     = load (Image_1);
          
%scaling function.
k = 1/y;        
Iac = k*Iob;
clear Iob y %memory saving
%initial plot for checking purposes
z = flipud(Iac);
n2 = 1;
n = 1;
z1 = z(Section,:);
plot(z1,'r');
grid on;
title('Section plot of view([0 -90 0])');
xlabel('pixel');
ylabel('height (mm)');
%translation to correct the plot to z=o plane.  
check3 = input ('Is translation to z=0 plane needed (y/n)?','s');
if check3 == 'y'
    translate = input ('Enter the translation value(-ve values accepted)>');
    Iac = Iac + translate;
      
else
end
z2 = flipud(Iac);
z3 = z2(Section,:);
figure;
plot(z3,'b');
grid on;
title('Section plot of view([0 -90 0])');  
xlabel('pixel');
ylabel('height (mm)');


  • yume123
  • 初涉江湖
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
??? Index exceeds matrix dimensions.
Error in ==> Calibration at 28
     I2      =     I1(X1:X2,Y1:Y2);
运行calibration.m的时候 有时会有错误
要怎么改呢?


  • yume123
  • 初涉江湖
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
??? 3D
     |
Error: Missing variable or function.
运行3d plot.m的时候 马上显示这个错误 完全无法使用
怎么回事呢?
拜托高手看看 万分感谢 急~~


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 4回复贴,共1页
<<返回matlab吧
分享到:
©2026 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示