注册 登录
编程论坛 Matlab

[求助]指点,如何把这幅图导入matlabb

nuoya1129 发布于 2006-04-09 13:03, 3367 次点击
只有本站会员才能查看附件,请 登录

有哪位高手指点一下,刚用matlab
23 回复
#2
linellie2006-04-09 13:17

怎么像指纹??
#3
nuoya11292006-04-09 13:28
就是要用这幅指纹图像进行分析,谁能给点帮助
#4
abingchem2006-04-10 16:51

用figure(1)命名,显示图像窗口,然后用File->Open,打开你的bmp图像,会得到一个矩阵:)目前我就知道这样的办法了。。。。。。。。

#5
Genial2006-04-11 09:00
help imread
#6
nuoya11292006-04-11 18:47
谢谢了,导入进去了,是一堆数字!
如果用imread能不能讲讲怎么导啊,谢谢!
如果再把第二幅图像导进去,然后进行比较该怎么比呢,能否指点一下!!
#7
xiaofuxijin2006-04-11 20:31

你是不是在做什么识别系统吧!

#8
l331522162006-04-11 23:53
so easy
用imread('图片地址.格式')
要在显示一张的话
再figure
然后再用imread
就可以了
#9
nuoya11292006-04-12 12:56
确实是在做指纹识别系统,而且刚开始学习matlab没办法,毕业设计!
按照楼上的方法导入进去了,但是换成jpeg格式的话就说这个文件不存在,或者说是文件太大,那些也就是十几K大,也不是很大,这样就不行了,换成照片就更导不进去了,这是怎么回事呢?
有没有人做过识别系统啊,相应的程序有吗?谢了啊!
#10
tinghai2006-04-12 19:47
请教各位高人:(借宝地一用)
我在制作GUI的时候遇到了一个问题:就是无法将从图形界面上获得的数据和SIMULINK联系起来.也就是从制作的GUI上输入数据(用的是可编辑的文本框),然后运行sim('amb'),amb为mdl文件的名字,但是就是出错,说参数没有导进去.
Kp=str2double(get(handles.Kp_input,'String');
Ki=str2double(get(handles.Ki_input,'String');
Kd=str2double(get(handles.Kd_input,'String');

[t,x,y]=sim('amb');
figure(1)
plot(t,y)
不知道什么地方出了问题,特求教各位高人,先谢过了!
#11
wangjunying2006-04-17 16:28

我现用M文本编辑器写了以下程序,用于图像的增强
clear,close all;
I=imread('1.gif');
I2=histeq(I);
subplot(1,2,1),imshow(I);
subplot(1,2,2),imshow(I2);
figure,subplot(1,2,1),imhist(I);
subplot(1,2,2),imhist(I2);
其中:1.gif 是所要处理的指纹图片,所在地址为:安装Matlab软件的所在位置的work 文件夹里即:C:\Matlab6.5\work 文件夹里
不过运行之后,所得处理图片为一小孩的头像,我试着去改变指纹图片名,我发现尽管我用的图片名在work文件夹里没有,也能进行处理,并且结果是一样的。
如果我把以上程序在monmand window 在一一运行时,就可得到相应的结果。

请朋友们赐教!

#12
wangjunying2006-04-17 16:35
以上程序问题出现在什么地方?我应该如何用M文本编辑器中的程序进行处理,并能得到相应的结果?

请朋友们赐教!
#13
wangjunying2006-04-17 17:05
[分享]

我也是做指纹识别系统的,不过只是做图像的增强和特征提取两全部分,也是才开始学,边学边做。希望以后多交流!
我在做的时候也遇到过同样的情况,我这有个图像格式转换软件,你可试用一下,把图片转化为能进行处理的格式。

只有本站会员才能查看附件,请 登录

#14
wangjunying2006-04-17 21:20
上面问题已经解决,主要是因为我保存M文件时,用的文件名是:image.m应该是与系统自带的文件名重名了吧,我换了别的文件名,就可以了。
#15
liping8271562006-04-19 09:38

我也是做指纹识别方面的毕业论文的,我现在做到提取指纹中心点那一步了,在这里遇到了困难了,你的我的邮箱是liping827156@163.com .希望各位同胞有什么好的方法的话给我介绍一下。

#16
nuoya11292006-04-20 10:42
那个压缩文件不能解压缩,应该怎么改文件名呢,谢了!!大家都是做指纹识别的,应该创个群共同讨论一下!!
#17
nuoya11292006-04-20 11:03

楼上图像增强的那个程序,格式换成bmp的就出错了啊,难道bmp格式的不能进行灰度处理吗?出现如下的错误是什么意思
??? Function IMHIST expected its first input, I or X, to be two-dimensional.

Error in ==> imhist>parse_inputs at 216
iptcheckinput(a, {'double','uint8','logical','uint16','int16','single'}, ...

Error in ==> imhist at 57
[a, n, isScaled, top, map] = parse_inputs(varargin{:});

Error in ==> histeq at 137
nn = imhist(a,n)';

#18
xiaoyuer2006-04-20 14:55
to wangjunying
找不到文件多数是当前文件路径不对,你可以用dir看一下当前路径下是否有你需要的图像文件
#19
wangjunying2006-04-21 14:01
nargin是何意?有什么做用呢?
望朋友们赐教!
#20
wangjunying2006-04-21 14:07

nargin是什么意思?有什么作用呢?
请朋友们赐教!

#21
wangjunying2006-04-21 14:39

函数histeq好像是只可完成对灰度图像和索引图像的直方图的均衡化,对于灰度图像,它的调用格式如下:J=histeq(I,n)其中,n表示输出图像的灰度级数目,是一个可选的参数,缺省值为64。对于牵引图像,其调用格式如下:newmap=histeq(X,map)其中newmap将是输出图像的调色板。
BMP格式的图像应该不属于以上两种图像吧,个人意见,仅供参考!

#22
wangjunying2006-04-21 14:43
不能解压缩,要将文件名改一下,变成.,part1.rar的形式,试一下
#23
nuoya11292006-04-21 20:30

谢谢啊,具体可怎么改,又是句号,又是逗号的,指点一下!!

#24
Genial2006-04-21 21:52
以下是引用wangjunying在2006-4-21 14:07:00的发言:

nargin是什么意思?有什么作用呢?
请朋友们赐教!

nargin, nargout Examples See Also

Number of function arguments

Syntax

    n = nargin
    n = nargin('fun')
    n = nargout
    n = nargout('fun')
    

Description

In the body of a function M-file, nargin and nargout indicate how many input or output arguments, respectively, a user has supplied. Outside the body of a function M-file, nargin and nargout indicate the number of input or output arguments, respectively, for a given function. The number of arguments is negative if the function has a variable number of arguments.

nargin returns the number of input arguments specified for a function.

nargin('fun') returns the number of declared inputs for the M-file function fun or -1 if the function has a variable of input arguments.

nargout returns the number of output arguments specified for a function.

nargout('fun') returns the number of declared outputs for the M-file function fun.

Examples

This example shows portions of the code for a function called myplot, which accepts an optional number of input and output arguments:

    function [x0,y0] = myplot(fname,lims,npts,angl,subdiv)
    % MYPLOT  Plot a function.
    % MYPLOT(fname,lims,npts,angl,subdiv)
    %     The first two input arguments are
    %     required; the other three have default values.
     ...
    if nargin < 5, subdiv = 20; end
    if nargin < 4, angl = 10; end
    if nargin < 3, npts = 25; end
     ...
    if nargout == 0
         plot(x,y)
    else
         x0 = x;
         y0 = y;
    end
    

See Also

inputname, nargchk

[此贴子已经被作者于2006-4-21 21:53:12编辑过]

1