bugGNU Octave - Bugs: bug #48942, Process image take long time

 
 

bug #48942: Process image take long time

Submitted by:  Sasitha Iresh <sasithairesh>
Submitted on:  Mon 29 Aug 2016 05:49:55 PM UTC  
 
Category: PerformanceSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Performance
Status: InvalidAssigned to: None
Originator Name: Sasitha IreshOpen/Closed: Closed
Release: 4.0.3Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 20 Sep 2016 08:38:13 AM UTC, comment #2:

No response from sasithairesh for more than three weeks, closing as invalid.

Andreas Weber <andy1978>
Project Member
Mon 29 Aug 2016 06:28:06 PM UTC, comment #1:

It is known that for loops are slow in Octave. You should vectorize your code (which is easy, there is no reason to use for loops here) or just use imadd from the image package:

Closing as invalid because this isn't a bug.

Andreas Weber <andy1978>
Project Member
Mon 29 Aug 2016 05:49:55 PM UTC, original submission:

Processing image function .m files take minutes and full process in OS
while matlab do it in few seconds and lower processing power .

image processing function:

function img1= add_my(img1,img2)
[m1,n1] = size(img1);
[m2,n2] = size(img2);

if m1==m2
if n1==n2
for i = 1:m1
for j = 1:n1
img1(i,j) = img1(i,j)+img2(i,j);
if img1(i,j)>255
img1(i,j) = 255;
end
end
end
end
end

Sasitha Iresh <sasithairesh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by sasithairesh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 20 Sep 2016 08:38:13 AM UTCandy1978StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1