当前位置:网站首页>使用卷积对数据进行平滑处理
使用卷积对数据进行平滑处理
2022-06-26 14:48:00 【jk_101】
可以使用卷积对包含高频分量的二维数据进行平滑处理。使用 peaks 函数创建二维数据,并在各个等高线层级对数据绘图。
Z = peaks(100);
levels = -7:1:10;
contour(Z,levels)
如图所示:
向数据中插入随机噪声并绘制含噪等高线。
Znoise = Z + rand(100) - 0.5;
contour(Znoise,levels)
如图所示:
MATLAB 中的 conv2 函数使用指定的核求二维数据的卷积,该核的元素定义如何去除或增强原始数据的特征。核的大小不必与输入数据相同。小核足以对仅包含少数频率分量的数据进行平滑处理。较大的核可以更精确地对频率响应进行调整,从而得到更平滑的输出。
定义一个 3×3 核 K 并使用 conv2 对 Znoise 中的含噪数据进行平滑处理。绘制经过平滑处理的等高线。conv2 中的 'same' 选项使输出的大小与输入相同。
K = (1/9)*ones(3);
Zsmooth1 = conv2(Znoise,K,'same');
contour(Zsmooth1, levels)
如图所示:
用 5×5 核对含噪数据进行平滑处理,并绘制新等高线。
K = (1/25)*ones(5);
Zsmooth2 = conv2(Znoise,K,'same');
contour(Zsmooth2,levels)
如图所示:
边栏推荐
- Attention meets Geometry:几何引导的时空注意一致性自监督单目深度估计
- Use abp Zero builds a third-party login module (II): server development
- Informatics Olympiad 1405: sum and product of prime numbers (thinking problem)
- IP certificate application process of sectigo
- C语言刷题随记 —— 乒乓球比赛
- R语言使用epiDisplay包的aggregate函数将数值变量基于因子变量拆分为不同的子集,计算每个子集的汇总统计信息、使用aggregate.data.frame函数计算分组汇总统计信息
- 同花顺注册开户安全吗,有没有什么风险?
- Flex & bison start
- The R language cartools package divides data, the scale function scales data, and the KNN function of the class package constructs a k-nearest neighbor classifier
- Notes on writing questions in C language -- table tennis competition
猜你喜欢
使用 Abp.Zero 搭建第三方登录模块(一):原理篇
The annual salary of 500000 is one line, and the annual salary of 1million is another line
Where do people get their top energy?
View touch analysis
10分钟了解BIM+GIS融合,常见BIM数据格式及特性
feil_uVission4左侧工目录消失
Get the intersection union difference set of two dataframes
文献1
Attention meets Geometry:几何引导的时空注意一致性自监督单目深度估计
Mark: unity3d cannot select resources in the inspector, that is, project locking
随机推荐
Combat readiness mathematical modeling 32 correlation analysis 2
The engine "node" is inconsistent with this module
Common operation and Principle Exploration of stream
杜老师说网站更新图解
聊聊几位大厂清华同学的近况
feil_uVission4左侧工目录消失
R language dplyr package bind_ The rows function merges the rows of the two dataframes vertically. The final number of rows is the sum of the rows of the original two dataframes (combine data frames)
Talk about the RPA direction planning: stick to simple and valuable things for a long time
SAP 销售数据 实际发货数据导出 销量
Minister of investment of Indonesia: Hon Hai is considering establishing electric bus system and urban Internet of things in its new capital
同花顺注册开户安全吗,有没有什么风险?
Sharing ideas for a quick switch to an underlying implementation
Deploy the flask environment using the pagoda panel
One copy ten, CVPR oral was accused of plagiarizing a lot, and it was exposed on the last day of the conference!
Halcon C # sets the form font and adaptively displays pictures
Idea shortcut key
Declaration and assignment of go variables
15 bs对象.节点名称.节点名称.string 获取嵌套节点内容
信息学奥赛一本通 1405:质数的和与积 (思维题)
R语言dplyr包bind_rows函数把两个dataframe数据的行纵向(竖直)合并起来、最终行数为原来两个dataframe行数的加和(Combine Data Frames)