octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60946] bug in imresize implementation of Octa


From: Rick T
Subject: [Octave-bug-tracker] [bug #60946] bug in imresize implementation of Octave image package
Date: Mon, 19 Jul 2021 20:57:42 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?60946>

                 Summary: bug in imresize implementation of Octave image
package
                 Project: GNU Octave
            Submitted by: ratulloch
            Submitted on: Tue 20 Jul 2021 12:57:40 AM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Rick T
        Originator Email: 
             Open/Closed: Open
                 Release: 6.3.0
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

Imresize gives incorrect results.  Here's a link how it was found and how to
fix it / and a work around.

https://stackoverflow.com/questions/68445353/matrix-array-to-multidimensional-rgb-image-array-and-using-imresize-to-reshape-i
 

Test Code:  Should be a color swatch but gives black boxes,
pkg load image

f(:,:,1)=[255;0;0;0;0];
f(:,:,2)=[0;255;0;0;255];
f(:,:,3)=[0;0;255;0;2];

height_wanted=640;
width_wanted=480;

repmat_rgb=cat(2,f,f); %add another column to array to get imresize to work
reshaped_output = imresize(repmat_rgb, [height_wanted,
width_wanted],'nearest'); %reshape swatch to large output
imshow(reshaped_output);




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60946>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]