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

 
 

bug #46745: [octave forge] (image) imresize default method (bicubic) Matlab incompatible for the border pixels

Submitted by:  None
Submitted on:  Tue 22 Dec 2015 08:18:55 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: NoneAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: OpenRelease: other
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 08 Feb 2016 12:35:59 AM UTC, comment #3:

Keeping this bug open for the Matlab incompatibility of padding before resize. I'm not sure what Matlab is doing and it is not documented.

Carnë Draug <carandraug>
Project Member
Thu 24 Dec 2015 06:36:31 PM UTC, comment #2:

With the report as it is, the function seems to behave as expected. Since the image has values outside the [0 1] range, it is even of an integer class, and the function is supposed to return a function of the same class as input, the output image should also have values outside the [0 1] range.

I then tested after converting the image to class double (with im2double):

However, this is an artifact of the resizing and only happens on the borders. I got it tested on Matlab and apparently Matlab also returns values outside [0 1]. They do return different values so I'm guessing they perform some special padding before interpolation.

Carnë Draug <carandraug>
Project Member
Thu 24 Dec 2015 04:50:42 AM UTC, comment #1:

imresize belongs to the image package from Octave-Forge. Re-classifying bug.

The original reporter might want to post what version of the image package you are using since that will make more of a difference then the Octave version.

Rik <rik5>
Project Administrator
Tue 22 Dec 2015 08:18:55 AM UTC, original submission:

I have noticed then while input image has black frame around it,
the resize function may return values out of the range of [0,1].

try on this image the code:

im=imread('example image.png');
imRes=imresizr(im,[512,512]);
min(imRes(:))
max(imRes(:))

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #35832:  Example image.png added by None (155KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated 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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Aug 2017 01:50:16 PM UTCjweSummaryimage package: imresize default method (bicubic) Matlab incompatible for the border pixels=>[octave forge] (image) imresize default method (bicubic) Matlab incompatible for the border pixels
    Thu 24 Dec 2015 06:36:36 PM UTCcarandraugItem GroupIncorrect Result=>Matlab Compatibility
    Thu 24 Dec 2015 06:36:31 PM UTCcarandraugRelease3.8.1=>other
      Summaryimresize default method (bicubic) return <0 and >1 values=>image package: imresize default method (bicubic) Matlab incompatible for the border pixels
    Thu 24 Dec 2015 04:50:50 AM UTCrik5Carbon-CopyRemoved 72865=>-
    Thu 24 Dec 2015 04:50:42 AM UTCrik5CategoryOctave Function=>Octave Forge Package
      Summaryimresize defoult method (bicubic) return <0 and >1 values=>imresize default method (bicubic) return <0 and >1 values
    Tue 22 Dec 2015 08:18:55 AM UTCNoneAttached File-=>Added Example image.png, #35832

    Back to the top


    Powered by Savane 3.1-cleanup1