【温度检测】基于matlab GUI热红外图像温度检测系统【含Matlab源码 1920期】

⛄一、 热红外图像温度检测简介

飞机主体合金可保持飞机外形承受空气动力,目前飞机主体材料用铝合金制造,其具有较高耐腐蚀性、高淬透性及高韧性。在飞机飞行时,由于发动机燃烧室燃烧等原因,导致飞机主体合金表面温度急速升高,使其发生故障的几率提升。因此,检测飞机主体合金表面温度尤为重要,当检测出高温时,可知飞机主体合金是否出现故障,以便迅速修复。

蒋凡等用标准温度法,研究电弧高温区自行判定的技术。荣彦超等在Matlab的基础上,研究短路熔痕凝固时,测量并计算熔体温度的方法,但检测过高温度的样本时,仍有检测失误的情况。

红外热成像技术具有检测面积大、检测速度快等优势,多用于目标探测、光学遥感等技术领域。在现有红外图像研究与应用范围内,通常只需研究图像内的目标,因此在图像处理时需突出目标与细节信息,并且降低图像噪声。本文作者研究基于红外图像的飞机主体合金温度检测法,采用改进的中值滤波算法,对采集图像进行去噪预处理;并用彩色图像种子区域生长法,提取红外图像中温度过高区域,实现不同温度下飞机主体合金高精度检测。

1 试验材料及方法
1.1 材料及准备

以38框BT20钛合金为试验样品,尺寸为150mm×80 mm×3 mm。放置于红外辐射器正前方180mm处。
用冷光源照射样品,用样品正前方1.0 m处的图像采集系统采集样品表面图像[9]。

1.2 方法
将样品表面温度升至50℃,采集其红外图像用于对照;用瞬态气动热试验模拟系统将样品温度从50℃升至1 000℃,升温速率为10℃/min,每升高50℃,保温1 min,直到1 000℃,保温8 s。期间对各温度样品表面温度进行检测,并采集红外图像。

1.2.1 红外图像预处理
对采集的飞机主体合金红外图像用改进的中值滤波算法进行预处理去噪。
提取红外图像中所有像素的灰度值,并按大小排序,提取排序中间值作为像素的灰度值:

【温度检测】基于matlab GUI热红外图像温度检测系统【含Matlab源码 1920期】
红外图像灰度值中的噪声呈正态分布,采用中值滤波算法进行处理,输出噪声方差近似值:
【温度检测】基于matlab GUI热红外图像温度检测系统【含Matlab源码 1920期】
1.2.2 彩色图像种子区域生长法
以RGB颜色空间为基础,采用种子区域生长法,提取红外图像内的数据信息和特征区域。

当背景温度变化时,红外图像的RGB值根据生成温度不同,与环境温度差距较大的特征区域会很明显。随温度升高,红色、绿色占比升高,变化梯度较大的是绿色占比,变化梯度较小的是红色占比,非单调性的是蓝色占比。种子区域生长法的作用是分割红外图像的绿色与红色占比。

红外图像中亮度越高,表示目标物的表面温度越高[15]。设定种子点为红外图像中亮度最高的像素点。遍历图像中待分割部分,确定矩阵大小,在此矩阵中计算像素均值,并取均值最大区域的中间点为种子点。

热故障或许发热程度不同,导致其特征出现在多个部位图像上。为将多个发热区域的种子点提取出来,找到亮度最高的像素点,以此为种子点,寻找与其像素值差距较小的点,并设定一定的像素值差距阈值,由此选取种子区域。

种子区域自动选取完后,寻找最佳种子生长条件,完成高温检测,为后续故障识别提供基础。最后,绿光、红光种子区域的交叉构成融合后的图像,即实现红外图像高温区域提取。

; ⛄二、部分源代码

function varargout = MainTempMonitor(varargin)
% MAINTEMPMONITOR MATLAB code for MainTempMonitor.fig
% MAINTEMPMONITOR, by itself, creates a new MAINTEMPMONITOR or raises the existing
% singleton*.

%
% H = MAINTEMPMONITOR returns the handle to a new MAINTEMPMONITOR or the handle to
% the existing singleton*.

%
% MAINTEMPMONITOR(‘CALLBACK’,hObject,eventData,handles,…) calls the local
% function named CALLBACK in MAINTEMPMONITOR.M with the given input arguments.

%
% MAINTEMPMONITOR(‘Property’,’Value’,…) creates a new MAINTEMPMONITOR or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before MainTempMonitor_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to MainTempMonitor_OpeningFcn via varargin.

%
% *See GUI Options on GUIDE’s Tools menu. Choose “GUI allows only one
% instance to run (singleton)”.

%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help MainTempMonitor

% Last Modified by GUIDE v2.5 26-Jun-2022 12:20:26

% Begin initialization code – DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name’, mfilename, …

‘gui_Singleton’, gui_Singleton, …

‘gui_OpeningFcn’, @MainTempMonitor_OpeningFcn, …

‘gui_OutputFcn’, @MainTempMonitor_OutputFcn, …

‘gui_LayoutFcn’, [] , …

‘gui_Callback’, []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code – DO NOT EDIT

% — Executes just before MainTempMonitor is made visible.

function MainTempMonitor_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.

% hObject handle to figure
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to MainTempMonitor (see VARARGIN)

% Choose default command line output for MainTempMonitor
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes MainTempMonitor wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% — Outputs from this function are returned to the command line.

function varargout = MainTempMonitor_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

% — Executes on button press in ReadFig.

function ReadFig_Callback(hObject, eventdata, handles)
% 读图
% hObject handle to ReadFig (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% global FileName
global I
[FileName,PathName] = uigetfile(‘.jpg’); % 打开窗口
TotalPath = [PathName, ”, FileName]; % 完整路径
IRGB = imread(TotalPath); % 读图
% I = rgb2gray(IRGB);
r = IRGB(:,:,1);
g = IRGB(:,:,2);
b = IRGB(:,:,3);
I = .299 _r + .587_g + .114*b; % 转灰度图
set(handles.text5,’String’,strcat(TotalPath,’ loaded.’)) % 显示加载

axis(handles.FigOri);
imshow(I)
title(‘彩色图像灰度化’) % 画灰度图

% — Executes on button press in AddNoise.

function AddNoise_Callback(hObject, eventdata, handles)
% 加噪声按钮
% hObject handle to AddNoise (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global I NoiseType J
if isempty(NoiseType) % 判断是否选择噪声类型
msgbox(‘未选择噪声类型’)
error(‘未选择噪声类型’)
end
t = get(handles.NoisePara, ‘String’);
if iscell(t)
tt = t{1};
elseif isa(t, ‘string’) || isa(t, ‘char’)
tt = t;
end

⛄三、运行结果

【温度检测】基于matlab GUI热红外图像温度检测系统【含Matlab源码 1920期】

; ⛄四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1]程杰.基于红外图像的飞机主体合金温度检测[J].兵器材料科学与工程. 2022,45(01)

3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除

Original: https://blog.csdn.net/TIQCmatlab/article/details/125510700
Author: 海神之光
Title: 【温度检测】基于matlab GUI热红外图像温度检测系统【含Matlab源码 1920期】

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/642030/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球