bugGNU Octave - Bugs: bug #49456, imcrop not compatible with Matlab...

 
 

bug #49456: imcrop not compatible with Matlab when requested rectangle falls outside the image rectangle

Submitted by:  None
Submitted on:  Thu 27 Oct 2016 01:30:09 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Kustaa NyholmOriginator Email: -unavailable-
Open/Closed: ClosedRelease: other
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 13 Nov 2016 12:33:04 PM UTC, comment #4:

Thank you for the bug report and fix. I have pushed the suggestion and added a series of tests to prevent this from happening again.

http://hg.code.sf.net/p/octave/image/rev/6cd0d6b5cc1e

You said:

> I've seen: http://savannah.gnu.org/bugs/?42709 but I'm not convinced.


Do you mean you are not convinced that it was an invalid bug? Can you please comment there if you think so with an example showing it?

Carnë Draug <carandraug>
Project Member
Sat 12 Nov 2016 06:11:36 PM UTC, comment #3:

@Carnë:

Could you please fix imcrop in image repository?

Avinoam Kalma <avinoam>
Project Member
Thu 27 Oct 2016 02:01:02 PM UTC, comment #2:

After lines 179-180 of imcrop.m

there should be something like:

Anonymous
Thu 27 Oct 2016 01:33:04 PM UTC, comment #1:

Oops sorry about misleading/erroneous title, wrote it before I had fully investigated the issue and now I can't change it.

A better title would have been "imcrop not compatible with Matlab when requested rectangle falls outside the image rectangle"

Anonymous
Thu 27 Oct 2016 01:30:09 PM UTC, original submission:

function imcrop(image, [x_ini y_ini width height])

I've seen:
http://savannah.gnu.org/bugs/?42709
but I'm not convinced.

If I do in Octave:

M=magic(10);
S=imcrop(M,[1 1 10 10]);

I get:

error: imcrop: A(I,J,...): index to dimension 1 out of bounds; value 11 out of bound 10

If I do in Octave:

S=imcrop(M,[0 0 10 10]);

I get:

error: imcrop: subscript indices must be either positive integers less than 2^31 or logicals

In Matlab I get no error messages and I get back a matrix of elements from the intersection of the specified rectangle and the image bouding rectangle.

Anonymous

 

(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 avinoam
  • -unavailable- added by avinoam (Updated the item)
  • -unavailable- added by None (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Nov 2016 12:33:04 PM UTCcarandraugStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Release4.0.0=>other
    Sat 12 Nov 2016 06:11:36 PM UTCavinoamCarbon-Copy-=>Added -unavailable-
    Thu 27 Oct 2016 04:35:44 PM UTCavinoamStatusNone=>Confirmed
      Operating SystemMac OS=>Any
      Summaryimcrop width height are off by one=>imcrop not compatible with Matlab when requested rectangle falls outside the image rectangle

    Back to the top


    Powered by Savane 3.1-cleanup1