mirror of
https://github.com/opencv/opencv.git
synced 2024-11-30 14:29:49 +08:00
calib3d: fix masks for usac
This commit is contained in:
parent
b19f860384
commit
3386efddba
@ -408,10 +408,11 @@ int mergePoints (InputArray pts1_, InputArray pts2_, Mat &pts, bool ispnp) {
|
||||
void saveMask (OutputArray mask, const std::vector<bool> &inliers_mask) {
|
||||
if (mask.needed()) {
|
||||
const int points_size = (int) inliers_mask.size();
|
||||
mask.create(points_size, 1, CV_8U);
|
||||
auto * maskptr = mask.getMat().ptr<uchar>();
|
||||
Mat tmp_mask(points_size, 1, CV_8U);
|
||||
auto * maskptr = tmp_mask.ptr<uchar>();
|
||||
for (int i = 0; i < points_size; i++)
|
||||
maskptr[i] = (uchar) inliers_mask[i];
|
||||
tmp_mask.copyTo(mask);
|
||||
}
|
||||
}
|
||||
void setParameters (Ptr<Model> ¶ms, EstimationMethod estimator, const UsacParams &usac_params,
|
||||
|
Loading…
Reference in New Issue
Block a user