Skip to content

Conversation

@jmackay2
Copy link
Contributor

Pull Request Readiness Checklist

Fix the build related to this PR. This inherits from CLAHE, so the setBitShift and getBitShift functions need to be defined.

Error this fixes:

error: invalid new-expression of abstract class type '{anonymous}::CLAHE_Impl'
opencv/contrib/modules/cudaimgproc/src/histogram.cpp:150:11: note: because the following virtual functions are pure within '{anonymous}::CLAHE_Impl':
    class CLAHE_Impl : public cv::cuda::CLAHE
In file included from opencv_contrib/modules/cudaimgproc/include/opencv2/cudaimgproc.hpp:51
opencv/modules/imgproc/include/opencv2/imgproc.hpp:1074:26: note: 'virtual void cv::CLAHE::setBitShift(int)'
    CV_WRAP virtual void setBitShift(int bitShift) = 0;
opencv/modules/imgproc/include/opencv2/imgproc.hpp:1080:25: note: 'virtual int cv::CLAHE::getBitShift() const'
    CV_WRAP virtual int getBitShift() const = 0;

This change was tested on Ubuntu 24.04 with the latest updates from the opencv and opencv_contrib repositories. This resulted in the build being successful.

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov asmorkalov merged commit 5556eec into opencv:4.x Nov 18, 2025
12 of 13 checks passed
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