GENERATING MATRIX
Use the generate_matrix.m file to generate a random matrix of a specified size and a particular rank
Command-
`generate_matrix(25344, 200, 1);`
Here 25344 corresponds to the image size (144 x 176) and 200 corresponds to the number of frames in the video
Note that the first dimension should be greater than the second one in generate_matrix() for our algorithm to work. (25344 > 200)
This command will generate a 200A.dat file, which will serve as input to our RPCA algorithm
RUNNING RPCA USING ADMM USING MATLAB
From MATLAB, use the admm_example.m file to run ADMM for RPCA. Provide the matrix generated in the previous step as input.
Command-
`admm_example('200A.dat');`
This command will run admm and write the output matrices into three different files named like boyd_X1.dat etc..
RUNNING RPCA USING ADMM USING CUDA
For CUDA code, use the script compile_and_run.sh to compile the code and run the file. Provide the input matrix as an argument to this script.
Command-
`./compile_and_run.sh 200A.dat`
This command will run the CUDA code for RPCA and write output to files named like X1_out.dat, etc..
Other files include MATLAB files to convert output into videos.
没有合适的资源?快使用搜索试试~ 我知道了~
图像矩阵matlab代码-cuda-rpca-admm:使用ADMM进行优化以实现前景背景分离的鲁棒PCA的CUDA实现
共12个文件
m:5个
cu:2个
cuh:1个
需积分: 48 21 下载量 55 浏览量
2021-05-23
21:17:14
上传
评论 1
收藏 18.34MB ZIP 举报
温馨提示
图像矩阵matlab代码生成矩阵使用generate_matrix.m文件生成指定大小和特定等级的随机矩阵 命令- generate_matrix(25344, 200, 1); 在这里25344对应于图像大小(144 x 176),而200对应于视频中的帧数。请注意,第一个尺寸应大于generate_matrix()中的第二个尺寸,这样我们的算法才能起作用。 (25344> 200) 此命令将生成一个200A.dat文件,该文件将用作我们的RPCA算法的输入 使用MATLAB使用ADMM运行RPCA在MATLAB中,使用admm_example.m文件运行RPCA的ADMM。 提供在上一步中生成的矩阵作为输入。 命令- admm_example('200A.dat'); 该命令将运行admm并将输出矩阵写入三个不同的文件,例如boyd_X1.dat等。 使用ADMM使用CUDA运行RPCA对于CUDA代码,请使用脚本compile_and_run.sh编译代码并运行文件。 提供输入矩阵作为此脚本的参数。 命令- ./compile_and_run.sh 200A.dat 此命令将运行
资源详情
资源评论
资源推荐
收起资源包目录
cuda-rpca-admm-master.zip (12个子文件)
cuda-rpca-admm-master
generate_matrix.m 443B
rpca_admm_kernel.cu 1KB
convert_video2d_to_avi.m 782B
rpca_admm.cu 19KB
convertDat2Avi.m 364B
rpca_admm 1.68MB
rpca_admm_kernel.cuh 1KB
200A.dat 19.34MB
admm.m 2KB
README.md 1KB
compile_and_run.sh 101B
admm_example.m 633B
共 12 条
- 1
weixin_38500572
- 粉丝: 6
- 资源: 926
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0