bugGNU Octave - Bugs: bug #44831, [octave forge] (image) imrotate -...

 
 

bug #44831: [octave forge] (image) imrotate - different dimensions of output matrix

Submitter:  Hartmut <hardy>
Submitted:  Tue 14 Apr 2015 11:29:04 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 24 Nov 2018 11:59:16 PM UTC, comment #3: 

Hi, here is a patch that fixes sizePost computation to be consistent with MATLAB output (tried online with R2018b). Unfortunately, it doesn't fix the function but hopefully might be a step closer. It seems to me the problem might be deeper in imperspectivewarp or even imremap (Octave-only functions).

(file #45520)

Martin Janda <tojtoj>
Fri 23 Dec 2016 10:48:32 PM UTC, comment #2: 

This issue is still the same with Octave 4.2.0 and image-2.6.1.

Hartmut <hardy>
Sun 07 Jun 2015 02:12:32 PM UTC, comment #1: 

Another simple example:

+verbatim+
-verbatim-

MATLAB 2010B
M = ones(3,3)
imrot = imrotate(M, -45, 'nearest' , 'loose')


imrot =

     0     0     1     0     0
     0     1     1     1     0
     1     1     1     1     1
     0     1     1     1     0
     0     0     1     0     0


Octave


imrot =

   0   0   0   0
   0   1   1   0
   0   1   1   0
   0   0   0   0




Anonymous
Tue 14 Apr 2015 11:29:04 AM UTC, original submission:  

Here is a simple script to show the behavior:


clear;
pkg load image;

M = [0 1 0; 0 1 0; 0 1 0];
imrot = imrotate(M, -45, 'nearest' , 'loose', 0)


The result of current Octave (3.8.2) and the imrotate function from the image package (2.2.2 or 2.4.0) gives the following result with matrix size 4-by-4:


   0   0   0   0
   0   0   1   0
   0   1   0   0
   0   0   0   0


Matlab gives the following result, which has a different size of the output of 5-by-5:


     0     0     0     0     0
     0     0     0     1     0
     0     0     1     0     0
     0     1     0     0     0
     0     0     0     0     0


Both do use the same (default) type of interpolation method (nearest) and the same extrapolation value (0). Those two values are only explicitly given in my example script to work around bug #44794 for image-2.2.2.

Nevertheless the resulting matrix differs in size :(

Hartmut <hardy>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45520:  imrotate_sizePost.patch added by tojtoj (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tojtoj (Updated the item)
  • -email is unavailable- added by tojtoj
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by avinoam (Updated the item)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by hardy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-24 tojtoj Attached File- Added imrotate_sizePost.patch, #45520
        Carbon-Copy- Added -email is unavailable-
    2018-05-01 mtmiller Release3.8.2 other
    2017-08-13 jwe Summaryimage package: imrotate - different dimensions of output matrix [octave forge] (image) imrotate - different dimensions of output matrix
    2017-03-06 avinoam StatusNone Confirmed
    2015-04-14 avinoam Carbon-Copy- Added avinoam

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code