Skip to content

Commit

Permalink
Merge pull request opencv#19685 from danbey:setting_stereoBMImpl_in_i…
Browse files Browse the repository at this point in the history
…nit_list

Init params (StereoBMParams) in StereoBMImpl constructor initialization list

* Init StereoBMImpl in initialization list

To improve preformence it is better to init the params (StereoBMImpl) in the
initialization list.

* coding style

* drop useless copy/move ctor

Co-authored-by: Alexander Alekhin <[email protected]>
  • Loading branch information
danbey and alalek authored Mar 7, 2021
1 parent 6016906 commit 31f6676
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/calib3d/src/stereobm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1148,13 +1148,15 @@ class StereoBMImpl CV_FINAL : public StereoBM
{
public:
StereoBMImpl()
: params()
{
params = StereoBMParams();
// nothing
}

StereoBMImpl( int _numDisparities, int _SADWindowSize )
: params(_numDisparities, _SADWindowSize)
{
params = StereoBMParams(_numDisparities, _SADWindowSize);
// nothing
}

void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr ) CV_OVERRIDE
Expand Down

0 comments on commit 31f6676

Please sign in to comment.