Skip to content

fitEllipse sometimes computes wrong angles #200

Open
@dlegland

Description

@dlegland

When the data to fit correspond to nearly vertical ellipses, the resulting angle is sometimes around zero (corresponding to the wrong axis).

A quick workaround is to change line 124 into:

if (par(2)>0)
    theta = 0.5 * atan2(par(2), par(1) - par(3));
else
    theta = 0.5 * atan2(-par(2), -par(1) + par(3));
end

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions