Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

??? Maximum recursion limit of 500 reached & decodeCompression

427 views
Skip to first unread message

Krisedho

unread,
Sep 6, 2010, 3:35:08 AM9/6/10
to
Hi,
I am a new user of Matlab and have a problem,
The message I have received is:

??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.

Error in ==> imagesci\private\imbmpinfo>decodeCompression at 245
[info.CompressionType, msg] = decodeCompression(info.CompressionType, ...

My program file is:

function [right_x,right_y,left_x,left_y]=irisfinder(imagename)
F=imread('001_1_1.bmp');
%find pupil center and radius
[cx,cy,rx,ry]=pupilfinder('001_1_1.bmp');
% Apply linear contrast filter
D=double(F);
G=uint8(D*1.4-20);
%obtain the horizontal line that passes through the iris center
l=G(cy,:);
margin = 10;
% Right side of the pupil
R=l(cx+rx+margin:size(l,2));
[right_x,avgs]=findirisedge(R);
right_x=cx+rx+margin+right_x;
right_y=cy;
% Left side of the pupil
L=l(1:cx-rx-margin);
L=fliplr(L);
[left_x,avgs]=findirisedge(L);
left_x=cx-rx-margin-left_x;
left_y=cy;

Please help Me & Thanks to your help,

Jan Simon

unread,
Sep 6, 2010, 4:49:04 AM9/6/10
to
Dear Krisedho,

> I am a new user of Matlab and have a problem,
> The message I have received is:
>
> ??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
> to change the limit. Be aware that exceeding your available stack space can
> crash MATLAB and/or your computer.
>
> Error in ==> imagesci\private\imbmpinfo>decodeCompression at 245
> [info.CompressionType, msg] = decodeCompression(info.CompressionType, ...

This message means, that a function is calling itself recursively. This *can* be wanted and valid, but it the recursion depth reaches 500 it is most likely an error.
If you look at the complete error message, the corresponding line in your main program is mentioned also.
Otherwise you can use the debugger to go through your program line by line. Do this to see, where the misleading command calls IMBMPINFO. I assume it is the 2nd line already:
F = imread('001_1_1.bmp');
If so, the rest of the code is not a problem - and not helpful for the newsgroup.

If the reading of the BMP fails even if you try it from the command line, your BMP or your Matlab toolbox functions might be damaged. You can try to open the BMP with another tool to check the first case. If you assume, that Matlab cannot read a valid BMP, please mention the Matlab version you are using.

Kind regards, Jan

Krisedho

unread,
Sep 8, 2010, 3:49:04 AM9/8/10
to
"Jan Simon" <matlab.T...@nMINUSsimon.de> wrote in message <i629u0$8du$1...@fred.mathworks.com>...
> Dear Jan,

thanks to your help, my Matlab version is 7.1.0.246 (R14) Service Pack 3,,

please explain to me how to use the debugger & try to open the BMP with another tool ?

BTW, i try to set recursionlimit with this statement:

>> get(0,'RecursionLimit')

ans =

500

>> set(0,'RecursionLimit',1500)
>> get(0,'RecursionLimit')

ans =

1500

and this is the result:

??? Out of memory. Type HELP MEMORY for your options.

Error in ==> bwlabel at 102
L = bwlabel2(sr, er, sc, labels, M, N);

Error in ==> pupilfinder at 39
bw_pupil=bwlabel(bw_labeled,8);

Error in ==> pupilfinder at 86
[cx,cy,rx,ry]=pupilfinder(fname);

Error in ==> <a href="error:C:\latihan\pupilfinder.m,86,1">pupilfinder at 86</a>
[cx,cy,rx,ry]=pupilfinder(fname);

Error in ==> pupilfinder at 86
[cx,cy,rx,ry]=pupilfinder(fname);

Error in ==> irisfinder at 29
[cx,cy,rx,ry]=pupilfinder('001_1_1.bmp');


My previous program is one of four courses that I am studying right now, If you allow it, I'd like to send it's all in your e-mail program and source files, help me,
my email is <email...@yahoo.com>
Thank you very much,

John

unread,
Sep 8, 2010, 4:27:25 AM9/8/10
to
Hitting F12 will set a breakpoint.
You're probably calling one function from the other, that calls the first function again?
A calls B, B calls A... this goes on until the recursion depth is reached.

You can just open the BMP file in another program (e.g. MS paint) to see if it opens correctly.

"Krisedho " <email...@yahoo.com> wrote in message <i625jc$ojn$1...@fred.mathworks.com>...

Jan Simon

unread,
Sep 8, 2010, 7:38:04 AM9/8/10
to
Dear Krisedho,

> BTW, i try to set recursionlimit with this statement:

> >> set(0,'RecursionLimit',1500)

This does not help usually. Did you understand what "recursion" is? A program is calling itself repeatedly. Because any instance needs its own workspace, the memory is exhausted if this loop is performed too often.

In your first post it seemed to be a problem of imagesci\private\imbmpinfo:


> Error in ==> imagesci\private\imbmpinfo>decodeCompression at 245
> [info.CompressionType, msg] =
> decodeCompression(info.CompressionType, ...

But this is another problem:


> ??? Out of memory. Type HELP MEMORY for your options.
> Error in ==> bwlabel at 102
> L = bwlabel2(sr, er, sc, labels, M, N);

Did this work:


F = imread('001_1_1.bmp');

??

If you do not know the debugger, look in the documentation and learn how to use it. It is really essential that a programer knows how to debug.
doc dbstop
doc dbclear
doc dbstep
etc.
To let Matlab stop in the line, which causes an error, type:
dbstop if all error
before starting the program. Then you can inspect the caller tree, the current variables etc.

Kind regards, Jan

Krisedho

unread,
Sep 8, 2010, 10:43:05 AM9/8/10
to
Dear John,
thanks to your help, i will try that,

Krisedho

unread,
Sep 8, 2010, 10:51:20 AM9/8/10
to
> Dear Jan,
thanks to your help & i will try that,
in my previous program, i have output is eye iris,
This is the link source file that I am studying:
http://merlotti.s465.sureserver.com/EngHome/Computing/iris_rec_nn.pdf

please see this file & explain to me what should I do,
I'm sorry because i don't understand

Jan Simon

unread,
Sep 9, 2010, 7:51:04 AM9/9/10
to
Dear Krisedho,

> http://merlotti.s465.sureserver.com/EngHome/Computing/iris_rec_nn.pdf
>
> please see this file & explain to me what should I do,
> I'm sorry because i don't understand

Sorry, I cannot explain what you should do. It is your job to find out, what you want and are able to do.

Personally, I do not like iris-recognition. Equivalently to finger print sensors, it produces a false feeling of security.
We can download the finger print of the German minister of the interior together with instructions to copy it with glue on a rubber glove. There will be no problem to copy his eyes also.

So if you really ask me, what you should do: something else.
Perhaps something, which is useful for children, or for people who are injured or have disabilities. Reduce the CO2 production or the polution of the environment and the living entities. Care for clean water to reduce the risk of wars. Or an interface to import SVG grafics to Matlab.

Kind regards and good luck, Jan

Krisedho

unread,
Sep 9, 2010, 12:47:05 PM9/9/10
to
Dear Jan,
Ok, thanks to your help ^^

Krisedho

unread,
Sep 11, 2010, 9:45:08 AM9/11/10
to
Dear Jan,
How to download the eye iris of the German minister of the interior with instructions to copy it with glue on a rubber glove ? whether the eye iris is a eye iris recognition system using backpropagation neural networks ? and whether it is legitimate/formal and it's free ? because i interested,
Thanks,

Jan Simon

unread,
Sep 12, 2010, 6:30:27 PM9/12/10
to
Dear Krisedho,

> How to download the eye iris of the German minister of the interior with instructions to copy it with glue on a rubber glove ?

Of course the rubber glove method works for finger prints only. To fake an iris a photograph is more useful. Therefore an iris scanner needs to measure the temprature also to check if it is faced with the original eye or photography. But you can warm up the paper to 37 C also.
It does not matter how many security checks you will include - there is always a simple trick to get around them.

> whether the eye iris is a eye iris recognition system using backpropagation neural networks ? and whether it is legitimate/formal and it's free ?

I cannot follow you.
The German minister of the interior tried to collect the finger prints of all Germans in a big database to support the war against terror. But this conflicted with the constitution. However, it is the main job of a minister of the interior to protect the constitution. But obviously it was more important to him to save his fears.
Do you ask if it is legal to download his finger print? Downloading is not a problem. It would be illegal to leave his finger prints at the site of a crime.

Kind regards, Jan

Message has been deleted

Mehryar

unread,
Apr 4, 2013, 11:31:14 AM4/4/13
to
Try this in Matlab's workspace:

set(0, 'RecursionLimit', 100000)

Then run your code again.

"Krisedho" wrote in message <i625jc$ojn$1...@fred.mathworks.com>...

YASHWANTH J

unread,
Jun 26, 2013, 2:41:18 AM6/26/13
to
"Mehryar" wrote in message <kjk6c2$s38$1...@newscl01ah.mathworks.com>...
clear
clc
try

k=1;
for rp=0.02:0.05:0.3

netw=[1 4 2
2 4 2
3 4 2
4 5 5
4 7 5
4 6 5
6 8 15
6 7 5
5 9 10
5 6 5
7 11 10
8 9 5
8 10 5
8 11 5
9 10 5
11 10 5
10 12 5
10 13 5
10 14 5 ];



thr=rp;


fd=0;
for i=1:13
rm=rand;
if rm<thr
netw(3+i,:)=[];
fd=fd+1;
end
end

mnv=relfunction(netw);

fres(k,:)=[thr,fd,mnv];

k=k+1;
clear netw
end

% tres(:,:,j)=fres;
% end
msgbox('PREOCESS COMPLETED,GO FOR PERFORMANCE')
catch
clear
frelibt
msgbox('PREOCESS COMPLETED,GO FOR PERFORMANCE')
end


i am getting this error

Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.

Error in frelibt

i searched in net but there they told increase the recursion limit size..i tried with 1000 then also coming same error..then i tried with 1500 then matlab itself closes..

Steven_Lord

unread,
Jun 26, 2013, 10:56:31 AM6/26/13
to


"YASHWANTH J" <yashwant...@yahoo.com> wrote in message
news:kqe2ee$585$1...@newscl01ah.mathworks.com...
> "Mehryar" wrote in message <kjk6c2$s38$1...@newscl01ah.mathworks.com>...

*snip*

> % tres(:,:,j)=fres;
> % end
> msgbox('PREOCESS COMPLETED,GO FOR PERFORMANCE')
> catch
> clear
> frelibt
> msgbox('PREOCESS COMPLETED,GO FOR PERFORMANCE')
> end
>
>
> i am getting this error
> Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
> to change the limit. Be aware that exceeding your available stack space
> can
> crash MATLAB and/or your computer.
>
> Error in frelibt
>
> i searched in net but there they told increase the recursion limit size..i
> tried with 1000 then also coming same error..then i tried with 1500 then
> matlab itself closes..

As the error message says, setting the limit too high (in your particular
situation, 1500 was too high) can crash MATLAB or your computer. That's why
MATLAB itself closed.

My guess is that your script is called frelibt. If that's the case, then an
error in the script will cause the script to try to run itself again, and if
that new run causes an error it will cause the script to try to run itself
again ... infinite recursion.

To solve this, get rid of your "clear" command at the top of the script.
Before running frelibt again after an error, check if a variable named
hasRunBefore EXISTs; if it does, DON'T run frelibt again. If it doesn't,
create the variable then run the script again. That's a workaround. The real
solution is to identify and fix the error in frelibt so you NEVER have to
call it a second time.

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

0 new messages