Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
96b38d4a
Commit
96b38d4a
authored
Mar 27, 2020
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
03730e1e
5d2cf95a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
ccalib.cpp
modules/ccalib/src/ccalib.cpp
+11
-2
regtree.cpp
modules/face/src/regtree.cpp
+1
-1
No files found.
modules/ccalib/src/ccalib.cpp
View file @
96b38d4a
...
...
@@ -445,8 +445,13 @@ bool CustomPattern::findRtRANSAC(InputArray objectPoints, InputArray imagePoints
InputOutputArray
rvec
,
InputOutputArray
tvec
,
bool
useExtrinsicGuess
,
int
iterationsCount
,
float
reprojectionError
,
int
minInliersCount
,
OutputArray
inliers
,
int
flags
)
{
int
npoints
=
imagePoints
.
getMat
().
checkVector
(
2
);
CV_Assert
(
npoints
>
0
);
double
confidence_factor
=
(
double
)
minInliersCount
/
(
double
)
npoints
;
double
confidence
=
confidence_factor
<
0.001
?
0.001
:
confidence_factor
>
0.999
?
0.999
:
confidence_factor
;
solvePnPRansac
(
objectPoints
,
imagePoints
,
cameraMatrix
,
distCoeffs
,
rvec
,
tvec
,
useExtrinsicGuess
,
iterationsCount
,
reprojectionError
,
minInliersCount
,
inliers
,
flags
);
iterationsCount
,
reprojectionError
,
confidence
,
inliers
,
flags
);
return
true
;
// for consistency with the other methods
}
...
...
@@ -459,8 +464,12 @@ bool CustomPattern::findRtRANSAC(InputArray image, InputArray cameraMatrix, Inpu
if
(
!
findPattern
(
image
,
imagePoints
,
objectPoints
))
return
false
;
double
confidence_factor
=
(
double
)
minInliersCount
/
(
double
)
imagePoints
.
size
();
double
confidence
=
confidence_factor
<
0.001
?
0.001
:
confidence_factor
>
0.999
?
0.999
:
confidence_factor
;
solvePnPRansac
(
objectPoints
,
imagePoints
,
cameraMatrix
,
distCoeffs
,
rvec
,
tvec
,
useExtrinsicGuess
,
iterationsCount
,
reprojectionError
,
minInliersCount
,
inliers
,
flags
);
iterationsCount
,
reprojectionError
,
confidence
,
inliers
,
flags
);
return
true
;
}
...
...
modules/face/src/regtree.cpp
View file @
96b38d4a
...
...
@@ -245,7 +245,7 @@ bool FacemarkKazemiImpl :: buildRegtree(regtree& tree,vector<training_sample>& s
while
(
!
curr
.
empty
()){
pair
<
long
,
long
>
range
=
make_pair
(
curr
.
front
().
index1
,
curr
.
front
().
index2
);
long
node_no
=
curr
.
front
().
node_no
;
splitr
split
;
splitr
split
=
{
0
,
0
,
0
}
;
//generate a split
if
(
node_no
<=
numSplitNodes
){
if
(
generateSplit
(
curr
,
pixel_coordinates
,
samples
,
split
,
sum
)){
...
...
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