bugGNU Octave - Bugs: bug #45131, rgb2hsv is not compatible to Matlab

 
 

bug #45131: rgb2hsv is not compatible to Matlab

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Mon 18 May 2015 02:26:23 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: AvinoamOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 19 Jul 2015 04:54:03 PM UTC, comment #5:

This has been fixed as part of fixing bug #45456.

However, I would caution against having floating point values outside the range [0 1] in functions that convert between color spaces since such things are not defined.

Instead of "rgb2hsv (double(I))" I would recommend using "rgb2hsv (im2double (I))".

Carnë Draug <carandraug>
Project Member
Wed 01 Jul 2015 08:08:21 PM UTC, comment #4:

I do not know what Matlab does with floating points with values below zero.

I have Matlab program with the line
J = rgb2hsv(double(I)) which works fine in Matlab, but
stops with error in Octave.

Avinoam Kalma <avinoam>
Project Member
Sun 14 Jun 2015 11:12:47 PM UTC, comment #3:

What about floating points with values below zero? What does Matlab do about them? Historically, Matlab only handled double precision images with values in the range [0 1]. Any handling of values outside of that range was due to Matlab lack of input checking and therefore not defined. I believe you may find many similar issue sin Octave functions.

Carnë Draug <carandraug>
Project Member
Mon 01 Jun 2015 08:47:08 PM UTC, comment #2:

... "will solve"....

Avinoam Kalma <avinoam>
Project Member
Mon 01 Jun 2015 08:46:20 PM UTC, comment #1:

Removing
|| any (rgb(:) > 1)

from the line
while solve this problem. What do you think?

Avinoam Kalma <avinoam>
Project Member
Mon 18 May 2015 02:26:23 PM UTC, original submission:

In Matlab 2010A

In Octave

double(B) is in the range [0:255] and not in [0:1]

Avinoam Kalma <avinoam>
Project Member

 

(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 (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 19 Jul 2015 04:54:03 PM UTCcarandraugStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 14 Jun 2015 11:08:30 PM UTCcarandraugCategoryOctave Forge Package=>Octave Function
      Summaryimage package: rgb2hsv is not compatible to Matlab=>rgb2hsv is not compatible to Matlab

    Back to the top


    Powered by Savane 3.1-cleanup1