Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
37f77e73
Commit
37f77e73
authored
Apr 18, 2015
by
Deanna Hood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change condition on parallel ellipse case so can only calculate t if necessary
parent
5a552b6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
shapedescr.cpp
modules/imgproc/src/shapedescr.cpp
+2
-3
No files found.
modules/imgproc/src/shapedescr.cpp
View file @
37f77e73
...
...
@@ -446,9 +446,8 @@ cv::RotatedRect cv::fitEllipse( InputArray _points )
// store angle and radii
rp
[
4
]
=
-
0.5
*
atan2
(
gfp
[
2
],
gfp
[
1
]
-
gfp
[
0
]);
// convert from APP angle usage
t
=
sin
(
-
2.0
*
rp
[
4
]);
if
(
fabs
(
t
)
>
min_eps
)
t
=
gfp
[
2
]
/
t
;
if
(
fabs
(
gfp
[
2
])
>
min_eps
)
t
=
gfp
[
2
]
/
sin
(
-
2.0
*
rp
[
4
]);
else
// ellipse is rotated by an integer multiple of pi/2
t
=
gfp
[
1
]
-
gfp
[
0
];
rp
[
2
]
=
fabs
(
gfp
[
0
]
+
gfp
[
1
]
-
t
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment