bugGNU Octave - Bugs: bug #35846, Imwrite inaccurate

 
 

bug #35846: Imwrite inaccurate

Submitter:  None
Submitted:  Thu 15 Mar 2012 08:12:22 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Works For Me Assigned to:  None
Originator Name:  Vladimir Vasiliev Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.1
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 14 Mar 2013 05:40:52 PM UTC, comment #2: 

Sorry, I accidently have missed your comment.

I have checked today on tip, nothing changed for me.

I attach copy of session; you can see configuration from it.

(file #27603)

Anonymous
Wed 11 Jul 2012 09:14:53 AM UTC, comment #1: 

You code works(sum(sum(img-img2)) is zero) for me on a current tip(f71108f20a18) build on 11.Jul.2012

libgraphicsmagick++1 version is 1.3.16-1, Debian GNU/Linux testing (wheezy)

I have also opened the saved test.pgm in gimp, picked a color and checked that the graylevel on the diagonal equals to 50.

Also gm identify -verbose shows:

  Channel Statistics:
    Gray:
      Minimum:                     0.00 (0.0000)
      Maximum:                    50.00 (0.1961)
      Mean:                        5.00 (0.0196)


Andreas Weber <andy1978>
Group Member
Thu 15 Mar 2012 08:12:22 AM UTC, original submission:  

Seems to be the same as bugs #29359 and #33317, but they point to MS Windows as os and old octave. Grayscale images are not saved well in such formats, as pgm, png or tiff.

I think the test in bug #33317 isn't very good because of one-dimension of img (it works well for me).

This code does not work in octave 3.6.1, GNU/Linux (graphicsmagick 1.3.14). Also tested in old octave 3.2.4 under windows - same result.


img = uint8(50*eye(10));
imwrite(img,'test.pgm');
img2 = imread('test.pgm');
sum(sum(img-img2))
ans = 10


After saving I viewed image 'test.pgm' in xnview, using "Display color information" option and noticed, that pixels on diagonal have intencity 49, not 50.

I have also tried testing graphicsmagick with various grayscale images and did not notice any inaccuracy (i used 'gm convert input.pgm input.png' and 'gm compare -metric mse input.pgm input.png').

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #27603:  octave-bug-imwrite.txt added by None (12KiB - text/plain - Log with configutation of my system.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by None (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-03-14 None Attached File- Added octave-bug-imwrite.txt, #27603
    2013-03-14 rik5 StatusNone Works For Me
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code