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

 
 

bug #66105: [octave forge] (image) conndef() function in image package has a misunderstanding error about data type conversion

Submitter:  Yu Hongbo <yuhongbo>
Submitted:  Mon 19 Aug 2024 02:21:41 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Invalid / Not an Octave Bug 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
   

Mon 09 Sep 2024 08:21:00 PM UTC, comment #2: 

I can also not see any misbehavior of Octave's conndef function, yet.

A typical usage of conndef would be the following:


pkg load image
C = conndef(2, "minimal")


The output is the connectivity matrix C, that can then be used by user image package functions.

@Yu Hongbo: Please read the help of this function (or of the Matlab equivalent function) and let us know in more details where you see a buggy behavior.

@Avinoam: If there is no further feedback of the OP, I think we could close this bug report then after some time.

Hartmut <hardy>
Sun 25 Aug 2024 06:02:14 AM UTC, comment #1: 


The first argument of conndef is ndims which should be an integer.
So this is not a bug.
Maybe the documentation should clarify this?

Avinoam Kalma <avinoam>
Group Member
Mon 19 Aug 2024 02:21:41 AM UTC, original submission:  

First, the "input" below is a grayscale image matrix:

>> input

input =

   0.1000   0.2000   0.3000
   0.2000   0.3000   0.4000
   0.3000   0.4000   0.5000

>> pkg load image
>> conndef(input, 2)

error: conversion of 0.1 to unsigned int value failed

But, double data can be converted to unsigned int, like this:

>> uint8(0.1)

ans = 0

So, I cannot get where the true problem is.

Yu Hongbo <yuhongbo>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by yuhongbo (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-08-25 avinoam StatusNone Invalid / Not an Octave Bug
        ReleaseNone other
        Operating SystemNone Any
        Carbon-Copy- Added hardy

    Back to the top

    Powered by Savane 3.13-8a8d.
    Corresponding source code