小编Ale*_*sil的帖子

在R中执行与fft的相位相关

我正在尝试使用来自维基百科(http://en.wikipedia.org/wiki/Phase_correlation)的配方在R中实现二维相位相关算法,以便跟踪两幅图像之间的移动.这些图像(帧)是在风中摇动的相机拍摄的,最终目标是去除这些和后续帧中的抖动.下面是两个示例图像和R代码:

第1帧 第2帧

## we will need the tiff library 
library(tiff)

## read in the tiff files 
f1=as.matrix(readTIFF('f1.tiff',native=TRUE))
f2=as.matrix(readTIFF('f2.tiff',native=TRUE))

## take the fft of the first  frame
F1 <- fft(f1)
## take the Conjugate fft of the second frame
F2.c <- Conj(fft(f2))

## calculate the cross power spectrum according to the wiki article
R <- (F1*F2.c)/abs(F1*F2.c)
## take the inverse fft of R
r <- fft(R,inv=TRUE)/length(R)
## because the zero valued imaginary numbers are not needed
r <- Re(r)

## …
Run Code Online (Sandbox Code Playgroud)

r fft image-processing cross-correlation

3
推荐指数
1
解决办法
3558
查看次数

如何将输出从 find 传送到 pdf 查看器

你好 Bash 超级英雄,

我正在尝试创建一个简单的 bash 函数,该函数将输出从find传送到 aa pdf 查看器,类似于但仅限于evince

function findpapers {
    find ~/papers/ -name *$1* | evince 
}
Run Code Online (Sandbox Code Playgroud)

上述功能打开查看器但不显示任何所需的文件/路径。最终,我想显示从find输出的所有pdf 。一个简单的查找命令,例如:

$ find /home/alex/papers/ -name *erebus*
Run Code Online (Sandbox Code Playgroud)

创建一个输出,如:

/home/alex/papers/2000/rowe/seismic_and_acoustic_observations_at_mount_erebus_volcano_ross_island_antarctica.pdf

/home/alex/papers/2008/Jones/infrasonic_tracking_of_large_bubble_bursts_and_ash_venting_at_erebus_volcano_antarctica.pdf
Run Code Online (Sandbox Code Playgroud)

然后的想法是在查看器中显示这两个 pdf 文件。

有什么想法或建议吗?如果有帮助,我正在使用 Linux Mint。提前致谢!

linux pdf bash find bash-function

2
推荐指数
1
解决办法
1615
查看次数

标签 统计

bash ×1

bash-function ×1

cross-correlation ×1

fft ×1

find ×1

image-processing ×1

linux ×1

pdf ×1

r ×1