上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 79 下一页
摘要: 下面来分析bmp文件的格式。 我这里用的是8位256色的灰度图像。其他位深的图像在最后在做介绍。 首先也是点开属性得到下面信息: 图像是20像素宽40像素高的8位灰度图像,大小为1878字节。其中像素占20*40=800byte,文件结构头占1078字节,其实灰度图像的头结构都是占1078字节的。这 阅读全文
posted @ 2012-10-22 21:19 Dsp Tian 阅读(11439) 评论(0) 推荐(1)
摘要: 这两天用chrome默认google搜索引擎搜出的结果全都打不开,可能是因为通过.hk域名的原因,功夫网不知又在搞什么动作。添加新搜索引擎:http://www.google.com/search?q=%s把这个粘贴到第三栏里面。前面两栏随便写什么都行。 阅读全文
posted @ 2012-10-22 16:53 Dsp Tian 阅读(642) 评论(0) 推荐(0)
摘要: 方法一:使用hexedit。下载 sudo apt-get install hexedit。然后使用hexedit命令就行了。方法二:使用vim。先用vim -b file打开文件。然后输入:%!xxd命令转换为十六进制。输入:%!xxd -r返回原显示文件。 阅读全文
posted @ 2012-10-18 23:24 Dsp Tian 阅读(1075) 评论(0) 推荐(0)
摘要: 这个是为上一篇文章做结尾用的。 这里我只把基本的数据提取出来了,没有进行下一步处理,数据提取出来,后面怎么应用就看具体情况了。 #include <iostream> #include <fstream> using namespace std; struct wav_struct { unsign 阅读全文
posted @ 2012-10-18 19:41 Dsp Tian 阅读(9836) 评论(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 阅读(45228) 评论(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 阅读(8758) 评论(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 阅读(2132) 评论(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 阅读(647) 评论(0) 推荐(0)
上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 79 下一页