Matlab calculates the feature roughness of thermal image sequence


The characteristic roughness Ra is a measure of the roughness. The formula is as follows.

Insert picture description here
Among them, k is the intercept of the vertical axis in the double logarithmic coordinate axis, and D is the fractal dimension. Ra considers the effects of fractal dimension D and scale factor k at the same time, which can uniquely characterize the roughness of the thermal image temperature field. When the temperature distribution of the thermal image temperature field is smoother, the Ra is smaller, and when the temperature field distribution is rougher, the Ra is larger.

1. Document and data introduction.

There are 55 thermal image data in mat format under the folder.
Insert picture description here
Each mat file contains a 200*300 juzhen variable.
Insert picture description here

2. Run the program and the results are as follows.

Fractal dimension
Insert picture description here
feature roughness
Insert picture description here

3. Part of the source code.

clc 
clear all

%%%%%%%%找到图片序列的最大值、最小值%%%%%%%%%%%%%%
%读取照片名
fid_file=fopen('E:\实用程序\热像\东北大学\k2-1-处理\k2-1-mat\k2-1-matname.txt');

%读新图像文件名
   
    %图像裁剪
    %picture=temp_picture;
    picture=temp_picture;
    %将差图像保存出来
    pic{k}= picture;
    
    %找每幅图像的最大值和最小值
%%%%%%%%%计算每张差图像的分形维数%%%%%%%%%%%%%%%%%%
for i=1:(k-1)
   photo=pic{i};
   %求图像大小
   [M N]=size(photo);
      %求最大灰度级G
   G=max_value-min_value;
   %确定不同子块长度L
   %拟合结果及相关系数
   %计算特征粗糙度
  %分形维数,相关系数,特征粗糙度
D=D'
R=R'
Ra=Ra'

Guess you like

Origin blog.csdn.net/peter_young1990/article/details/114417333