evm 代码分析(一)

处理时:

  • 为了放大运动,我们推荐我们新的基于相位的管道(SIGGRAPH 2013)。
  • 要放大颜色,请使用线性管道(SIGGRAPH 2012)。
  • 选择您想要放大的正确时间尺度。 例如,成年人的心跳往往每秒发生一次,对应于 1Hz,您可以将内容放大 0.5Hz 到 3Hz 以确保安全。 间隔越窄,放大越集中,噪声被放大的越少,但有遗漏物理现象的风险。
  • 在指定时间通带时不要忘记考虑视频帧速率! 有关示例,请参见我们的代码。

先介绍2012相位欧拉代码

reproduceResultsSiggraph12

% Generates all the results for the SIGGRAPH paper at:
% http://people.csail.mit.edu/mrub/vidmag
%
% Copyright (c) 2011-2012 Massachusetts Institute of Technology, 
% Quanta Research Cambridge, Inc.
%
% Authors: Hao-yu Wu, Michael Rubinstein, Eugene Shih
% License: Please refer to the LICENCE file
% Date: June 2012
%

clear;
dataDir = './data';
resultsDir = 'ResultsSIGGRAPH2012';

mkdir(resultsDir);

%% baby
% inFile = fullfile(dataDir,'baby.mp4'); % 路径拼接
% fprintf('Processing %s\n', inFile);
% amplify_spatial_lpyr_temporal_iir(inFile, resultsDir, 10, 16, 0.4, 0.05, 0.1);
% amplify_spatial_lpyr_temporal_iir 函数是一种放大算法,即空间滤波采用 拉普拉斯金字塔,时域滤波采用 IIR滤波器。

% Alternative processing using butterworth filter  使用巴特沃斯滤波器的替代处理
% amplify_spatial_lpyr_temporal_butter(inFile, resultsDir, 30, 16, 0.4, 3, 30, 0.1);
% 空间滤波采用 lpyr 拉普拉斯金字塔,时域滤波采用 butter 巴特沃斯滤波器

%% baby2
% inFile = fullfile(dataDir,'baby2.mp4');
% fprintf('Processing %s\n', inFile);
% amplify_spatial_Gdown_temporal_ideal(inFile,resultsDir,150,6, 140/60,160/60,30, 1);
% 空间滤波采用 Gaussian金字塔  时域滤波采用 Ideal bandpass

%% camera
% inFile = fullfile(dataDir,'camera.mp4');
% fprintf('Processing %s\n', inFile);
% amplify_spatial_lpyr_temporal_butter(inFile, resultsDir, 150, 20, 45, 100, 300, 0);
% 空间滤波采用 lpyr 拉普拉斯金字塔,时域滤波采用 butter 巴特沃斯滤波器


%% subway
% inFile = fullfile(dataDir,'subway.mp4');
% fprintf('Processing %s\n', inFile);
% amplify_spatial_lpyr_temporal_butter(inFile, resultsDir, 60, 90, 3.6, 6.2, 30, 0.3);
% 空间滤波采用 lpyr 拉普拉斯金字塔,时域滤波采用 butter 巴特沃斯滤波器

%% wrist
%% No mask is used here to generate the output video.
% inFile = fullfile(dataDir,'wrist.mp4');
% fprintf('Processing %s\n', inFile);
% amplify_spatial_lpyr_temporal_iir(inFile, resultsDir, 10, 16, 0.4, 0.05, 0.1);
% 空间滤波采用 lpyr 拉普拉斯金字塔,时域滤波采用 IIR滤波器

% Alternative processing using butterworth filter
% amplify_spatial_lpyr_temporal_butter(inFile, resultsDir, 30, 16, 0.4, 3, 30, 0.1);
% 空间滤波采用 lpyr 拉普拉斯金字塔,时域滤波采用 butter 巴特沃斯滤波器


%% shadow
% inFile = fullfile(dataDir,'shadow.mp4');
% fprintf('Processing %s\n', inFile);
% amplify_spatial_lpyr_temporal_butter(inFile, resultsDir, 5, 48, 0.5, 10, 30, 0);
% 空间滤波采用 lpyr 拉普拉斯金字塔,时域滤波采用 butter 巴特沃斯滤波器

%% guitar
% inFile = fullfile
  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论
EVM(以太坊虚拟机)是以太坊区块链中的核心组件,它负责执行智能合约的代码。然而,由于智能合约的代码可以由任何人编写并上传到区块链中执行,因此存在着各种安全漏洞。以下是一些常见的 EVM 执行层漏洞和详细分析: 1. 整数溢出漏洞:智能合约中的整数类型具有固定的长度,如果进行计算时超出了其长度,就会发生溢出。攻击者可以利用这个漏洞来执行不良操作,例如提取比应该更多的资金。 2. 重入攻击漏洞:重入攻击是指一个合约可以在另一个合约完成之前多次调用同一个合约。攻击者可以利用这个漏洞来重复执行某个操作,例如提取比应该更多的资金。 3. 拒绝服务攻击漏洞:智能合约中的代码可以执行无限循环,这可能会导致网络拥塞或导致节点崩溃。攻击者可以利用这个漏洞来瘫痪整个网络。 4. 访问控制漏洞:智能合约中的代码可能没有正确的访问控制机制,这可能导致攻击者可以访问应该受限制的数据和功能。 5. DOS攻击漏洞:攻击者可以利用智能合约中的递归调用来进行 DOS 攻击,这可能会导致网络拥塞或节点崩溃。 总之,EVM 执行层漏洞可能会导致资金损失、拒绝服务攻击、数据泄露等问题。为了确保以太坊的安全性,必须对智能合约进行细致的审查和测试,并采取必要的安全措施来防止这些漏洞被利用。
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

叶叶梓梓

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值