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

 
 

bug #54640: [octave forge] (image) maketform of transforming triangles is wrong

Submitter:  None
Submitted:  Mon 10 Sep 2018 10:34:06 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Tis Veugen Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.1
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Sep 2018 04:37:06 PM UTC, comment #2: 

The top corner is at [197 1] not [1 197] ([x y], y axis is reversed and thus starts at the top, also see the coordinates at the bottom of the figure window when you hover it with your mouse cursor).

Simply use

triangle_corners = fliplr ([ 1 197 ; 313 1 ; 311 389 ]);
corners = fliplr ([ 1 197 ; 313 1 ; 311 389 ]);
...


And you'll obtain the expected result which is that the image is stretched.

Closing report as invalid.

Pantxo Diribarne <pantxo>
Group Member
Mon 10 Sep 2018 12:31:43 PM UTC, comment #1: 

I replaced the line
trafo = maketform ("affine", triangle_corners, corners);

with my own computed matrix 'mtrafo'

trafo = maketform ("affine", mtrafo);

However, the result is the same and still wrong. So, I guess that the problem is not in maketform, but in: imtransform( imageMask, trafo );

Tis Veugen <tis>
Mon 10 Sep 2018 10:34:06 AM UTC, original submission:  

I use function:
trafo = maketform ("affine", triangle_corners, corners);

for transforming triangles. Applying the transform shows wrong result.

In the attached example script I move the top corner slightly to the right. The result is that the right bottom corner is moved slightly upwards.
Again I move the top corner more to the right. The result is that the right bottom corner is moved more upwards.

Please, take a look at the transform construction.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44962:  nose.png added by None (85KiB - image/png)
file #44963:  btf.m added by None (611B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-10 pantxo StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2018-09-10 rik5 Carbon-CopyRemoved 72865 -
    2018-09-10 rik5 CategoryOctave Function Octave Package
    2018-09-10 jwe Summarymaketform of transforming triangles is wrong [octave forge] (image) maketform of transforming triangles is wrong
    2018-09-10 None Attached File- Added nose.png, #44962
        Attached File- Added btf.m, #44963

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code