Skip to content

Crosscorr cleanup#14936

Merged
alalek merged 2 commits intoopencv:3.4from
StefanBruens:crosscorr_cleanup
Jun 30, 2019
Merged

Crosscorr cleanup#14936
alalek merged 2 commits intoopencv:3.4from
StefanBruens:crosscorr_cleanup

Conversation

@StefanBruens
Copy link
Copy Markdown
Contributor

Remove redundant parameters from non-exported cv::crossCorr method

The first commit cleans up the crossCorr call from dftFilter2D.
The second commit does the actual removal.

For the 2d filter code, destination size equals source size, and the
crossCorr function even (re-)creates the output matrix with the given size.

The number of channels also have to match. The destination type() is the
one used to create the output matrix, so we can use its type() here.

This is a preparatory patch.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
All calling sites of crossCorr already use (...,
mat, mat.size(), mat.type(), ...), so the parameters are redundant.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@alalek alalek merged commit 3e4a195 into opencv:3.4 Jun 30, 2019
@StefanBruens StefanBruens deleted the crosscorr_cleanup branch July 2, 2019 10:50
@alalek alalek mentioned this pull request Jul 2, 2019
AhiyaHiya added a commit to AhiyaHiya/opencv that referenced this pull request Jul 7, 2019
* master: (74 commits)
  Merge pull request opencv#14917 from rgarnov:gapi_planar_kernels
  Fixed initUndistortRectifyMap AVX2 implementation
  Merge pull request opencv#14959 from dvd42:onnx_clip
  videoio: eliminate build warnings (clang)
  ts: runtime check for misused 'optional' test data files
  3rdparty(itt): support AARCH64
  tensroflow support maxpoolgrad
  Fix blob detector insertion sort
  Fix crash, add assert and test
  Merge pull request opencv#14946 from andrey-golubev:obj_not_ref
  re-enable CPU_BASELINE=FP16 on Armv7 platform
  Merge pull request opencv#14828 from armenpoghosov:parmen_RANSACPointSetRegistrator_getSubset_disaster_cleanup
  Merge pull request opencv#14916 from terfendail:wsignmask_deprecated
  core: evaluate CV_Error() parameters during static scans
  dnn: fix build with Vulkan
  Merge pull request opencv#14936 from StefanBruens:crosscorr_cleanup
  Explicitly default operator= for Vec<T, n>
  Fix JS sample of dnn
  3rdparty: TBB version 2018u1 => 2019u8
  cmake: support rpath-link linker option
  ...
arnaudbrejeon pushed a commit to arnaudbrejeon/opencv that referenced this pull request Jan 23, 2020
Crosscorr cleanup (opencv#14936)

* Simplify code for convolution destination type/size

For the 2d filter code, destination size equals source size, and the
crossCorr function even (re-)creates the output matrix with the given size.

The number of channels also have to match. The destination type() is the
one used to create the output matrix, so we can use its type() here.

This is a preparatory patch.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

* Remove redundant destination size and type parameters from crossCorr

All calling sites of crossCorr already use (...,
mat, mat.size(), mat.type(), ...), so the parameters are redundant.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants