The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: A slow Matlab code for kapur comuting
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 12
Registered: 3/28/12
A slow Matlab code for kapur comuting
Posted: Mar 16, 2013 1:31 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello everyone

Could anyone please tell me how to make the following function code faster, I have to run it thousands of times in my code, which makes the execution of the whole program very time consuming.

Where: I is an input gray level Image, vect is a vector of gray levels

Thank you in advance


function [fit] = fitSeg(im, vect)


vect=[0 vect 255];

for i=1:k+1
p=im(im>vect(i) & im<=vect(i+1));
if s(1)==0

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.