当前位置:网站首页>MLX90640 红外热成像仪测温传感器模块开发笔记(五)
MLX90640 红外热成像仪测温传感器模块开发笔记(五)
2022-07-25 12:41:00 【51CTO】
MLX90640 红外热成像仪测温模块开发笔记(五)阵列插值-由 32*24 像素到 512*384 像素

MLX90640 的 32*24=768 像素虽然比以往的 8*8 或者 16*8 像素提高了很多,但若直接用这些像素还是不能很好的形成热像图,为了使用这些像素点平滑成像就需要对其进行插值,使用更多的像素来绘制图像。
看了一些别人的算法,感觉主要就是多项式插值,仅是插值方法的组合方式不同。
算法依据
比较有代表性的是杭州电子科技大学杨风健等《基于 MLX90620 的低成本红外热成像系统设计》,使用三次多项式+双线性插值,将原 16*4 像素扩展为 256*64 像素。双线性插值的本质就是一次函数(一次多项式)。该文章得到的结论是:
(1) 双线性插值法计算量小、速度快,但对比度低、细节模糊。
(2) 三次多项式插值,图像效果较清晰,对比度较高,但计算量较大。
(3) 先双线性插值再三次多项式插值,效果优于上两种单一插值方法。
(4) 先三次多项式插值再双线性插值,高低温分布更加明显,图像效果更接趋于真实。同时,该文章还使用了一种对图像质量的评估方法---熵&平均梯度
熵,热力学中表征物质状态的参量之一,用符号 S 表示,其物理意义是体系混乱程度的度量。用于图像评价表示图像表达信息量的多少。图像熵越高信息量越大。
平均梯度,指图像的边界或影线两侧附近灰度有明显差异,即灰度变化率大,这种变化率的大小可用来表示图像清晰度。它反映了图像微小细节反差变化的速率,即图像多维方向上密度变化的速率,表征图像的相对清晰程度。值越大表示图像越清晰。
插值实现
每行或者列的首个像素在前面插值 2 个点
1~n-1 像素,每个像素后面插值 3 个点最后一个像素,在后面插值 1 个点
n+2+(n-1)*3+1=n+2+n*3-1*3+1=4n+2-3+1=4n,即:像素变为原来的 4 倍
上面的处理方法,首个像素之前插入 2 个点,最后一个像素之后插入 1 个点,下次插值
时,应首个之前插值 1 个点,末个像素之后插值 2 个点,以达到图像平衡。
每次插值后像素为插值前的 4 倍,经过两次插值,即可将 32*24 改变为 512*384 像素。下面是已经实际使用的插值算法,不过是用 Pascal(Delphi)写的,有兴趣的可以改为
C 语言的,语句对应直接改就行,语言本来就是相通的嘛。

//这是一维数组插值算法
//SourceDatas:TDoubles;插值前的一维数组
//Dir:Integer;在哪个方向和末尾插入 2 个值(0:前面;1:末尾)
//times:Integer 多项式的项数,一次多项式是 2 项,二次多项式是 3 项
//返回值:插值后的一维数组(数量是插值前*4) function PolynomialInterpolationArr(
SourceDatas:TDoubles; Dir:Integer;
times:Integer):TDoubles;//一维数组插值
var
i,j,k:Integer;
arrCount:Integer;
边栏推荐
- Zero basic learning canoe panel (13) -- trackbar
- Moving Chinese figure liushenglan
- LeetCode 1184. 公交站间的距离
- Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network
- "Autobiography of Franklin" cultivation
- Make a general cascade dictionary selection control based on jeecg -dictcascadeuniversal
- Mid 2022 review | latest progress of large model technology Lanzhou Technology
- 感动中国人物刘盛兰
- Clickhouse notes 03-- grafana accesses Clickhouse
- [problem solving] ibatis.binding BindingException: Type interface xxDao is not known to the MapperRegistry.
猜你喜欢

Moving Chinese figure liushenglan

跌荡的人生

Clickhouse notes 03-- grafana accesses Clickhouse

Leetcode 1184. distance between bus stops

More accurate and efficient segmentation of organs-at-risk in radiotherapy with Convolutional Neural

想要白嫖正则大全是吧?这一次给你个够!

Azure Devops(十四) 使用Azure的私有Nuget仓库

clickhouse笔记03-- Grafana 接入ClickHouse

Zero basic learning canoe panel (14) -- led control and LCD control
![[fluent -- example] case 1: comprehensive example of basic components and layout components](/img/d5/2392d9cb8550aa2692c8b41303d507.png)
[fluent -- example] case 1: comprehensive example of basic components and layout components
随机推荐
Ministry of Public Security: the international community generally believes that China is one of the safest countries in the world
SSTI template injection vulnerability summary [bjdctf2020]cookie is so stable
《富兰克林自传》修身
吕蒙正《破窑赋》
想要做好软件测试,可以先了解AST、SCA和渗透测试
【问题解决】ibatis.binding.BindingException: Type interface xxDao is not known to the MapperRegistry.
LeetCode 1184. 公交站间的距离
Requirements specification template
Deployment of Apache website services and implementation of access control
【历史上的今天】7 月 25 日:IBM 获得了第一项专利;Verizon 收购雅虎;亚马逊发布 Fire Phone
Use of Spirng @conditional conditional conditional annotation
2022.07.24 (lc_6124_the first letter that appears twice)
Plus SBOM: assembly line BOM pbom
conda常用命令:安装,更新,创建,激活,关闭,查看,卸载,删除,清理,重命名,换源,问题
I want to ask whether DMS has the function of regularly backing up a database?
AtCoder Beginner Contest 261E // 按位思考 + dp
Kyligence was selected into Gartner 2022 data management technology maturity curve report
2022 Henan Mengxin League game (3): Henan University I - Travel
卷积核越大性能越强?一文解读RepLKNet模型
Microsoft proposed CodeT: a new SOTA for code generation, with 20 points of performance improvement