上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 79 下一页
摘要: 这个是为上一篇文章做结尾用的。 这里我只把基本的数据提取出来了,没有进行下一步处理,数据提取出来,后面怎么应用就看具体情况了。 #include <iostream> #include <fstream> using namespace std; struct wav_struct { unsign 阅读全文
posted @ 2012-10-18 19:41 Dsp Tian 阅读(9830) 评论(1) 推荐(0)
摘要: 把要显示的图片复制到 /boot/grub/执行命令:sudo update-grub 阅读全文
posted @ 2012-10-18 18:45 Dsp Tian 阅读(752) 评论(0) 推荐(0)
摘要: 虽然自己是搞视频图像的,不过偶尔看看音频方面的资料也是可以调节一下的。 下面就来分析一下wav波形文件的格式。 我们先随便找一个wav文件,查看其属性,就能得到下面的结果。 上面主要注意文件大小,声音长度与比特率。 文件占用空间就不用关心了,如果有人想知道为什么文件占用空间比文件大小要大,我在这里也 阅读全文
posted @ 2012-10-17 21:52 Dsp Tian 阅读(45200) 评论(0) 推荐(1)
摘要: mov=aviread('out.avi'); %读入存在e盘的电影x.avi%movie(mov); %放映电影%将电影转成图片序列fnum=size(mov,2); %读取电影的祯数for i=1:fnum strtemp=strcat('C:\Users\tc\Desktop\test\',int2str(i),'.bmp');%将每祯转成jpg的图片 imwrite(mov(i).cdata,strtemp,'bmp');end 阅读全文
posted @ 2012-10-11 16:29 Dsp Tian 阅读(3439) 评论(0) 推荐(0)
摘要: for i=1:40 fname=strcat('C:\Users\tc\Desktop\test\1 (',int2str(i),').bmp'); im(:,:,i)=imread(fname); imshow(im(:,:,i)) M(i) = getframe; end movie2avi(M,'out.avi','FPS',8)%输出视频注:一下是2012.12.28增加:上面的程序虽然也能够输出视频,不过效果不好,用到的getframe是截屏用的,而且帧数自己设置的也不可能达到最理想状态,所以就有了以下的一段程序,功能 阅读全文
posted @ 2012-10-11 16:15 Dsp Tian 阅读(8757) 评论(1) 推荐(0)
摘要: #include <sys/types.h>#include <sys/wait.h>#include <unistd.h>#include <stdio.h>int main(){ pid_t pid; char *m; int n; pid=fork(); if(pid==0) { m="this is child"; n=5; } else { m="this is fath... 阅读全文
posted @ 2012-09-28 16:23 Dsp Tian 阅读(2130) 评论(0) 推荐(0)
摘要: #在宏中表示把参数变为字符串##在宏中表示连接两个参数#include <iostream>using namespace std;#define str(s) #s#define cons(a,b) a##bint main() { cout<<str(asfsd)<<endl; cout<<cons(1,2)<<endl; system("pause"); return 0; } 阅读全文
posted @ 2012-09-21 10:54 Dsp Tian 阅读(644) 评论(0) 推荐(0)
摘要: // overload_date.cpp// compile with: /EHsc#include <iostream>using namespace std;class Date{ int mo, da, yr;public: Date(int m, int d, int y) { mo = m; da = d; yr = y; } friend ostream& operator<<(ostream& os, const Date& dt);};ostream& operator<<(ostream& os, c 阅读全文
posted @ 2012-09-19 16:24 Dsp Tian 阅读(480) 评论(0) 推荐(0)
摘要: extern "C" {#include "lua.h" #include "lualib.h" #include "lauxlib.h"}; /* Lua解释器指针 */lua_State* L;int main ( int argc, char *argv[] ){ /* 初始化Lua */ L = lua_open(); /* 载入Lua基本库 */ luaL_openlibs(L); /* 运行脚本 */ luaL_dofile(L, "test.lua"); /* 清除Lu... 阅读全文
posted @ 2012-09-18 20:13 Dsp Tian 阅读(629) 评论(0) 推荐(0)
摘要: 解决方案:sudo rm /var/lib/apt/lists/* -vfsudo apt-get update 阅读全文
posted @ 2012-09-15 09:20 Dsp Tian 阅读(420) 评论(0) 推荐(0)
上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 79 下一页