Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xphoto Module causes OpenCV compilation failure #3582

Closed
polodroid74 opened this issue Oct 23, 2023 · 2 comments
Closed

Xphoto Module causes OpenCV compilation failure #3582

polodroid74 opened this issue Oct 23, 2023 · 2 comments
Labels
category: build/install invalid question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org/

Comments

@polodroid74
Copy link

System information
  • OpenCV => 4.8.1
  • Operating System / Platform => Ubuntu 22.04.3 LTS
  • Compiler => g++ 11.4.0
  • Cmake => 3.27.7
Detailed description

When trying to compile OpenCV 4.8.1 with opencv_contrib repository, the compilation fails due to the module Xphoto :

[ 32%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/graph_simplifier.cpp.o
/home/paul/Downloads/opencv/opencv_contrib/modules/xphoto/src/grayworld_white_balance.cpp: In function ‘void cv::xphoto::applyChannelGains(cv::InputArray, cv::OutputArray, float, float, float)’:
/home/paul/Downloads/opencv/opencv_contrib/modules/xphoto/src/grayworld_white_balance.cpp:285:26: error: no matching function for call to ‘v_shr(cv::hal_baseline::v_uint16x8, int)’
  285 |             v_sB1 = v_shr(v_mul_wrap(v_sB1, v_gainB), 8);
      |                     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/paul/Downloads/opencv/opencv-4.8.1/modules/core/include/opencv2/core/hal/intrin.hpp:217,
                 from /home/paul/Downloads/opencv/opencv_contrib/modules/xphoto/src/grayworld_white_balance.cpp:41:
/home/paul/Downloads/opencv/opencv-4.8.1/modules/core/include/opencv2/core/hal/intrin_sse.hpp:1427:16: note: candidate: ‘template<int imm> cv::hal_baseline::v_uint16x8 cv::hal_baseline::v_shr(const cv::hal_baseline::v_uint16x8&)’
 1427 | inline _Tpuvec v_shr(const _Tpuvec& a) \
      |                ^~~~~
/home/paul/Downloads/opencv/opencv-4.8.1/modules/core/include/opencv2/core/hal/intrin_sse.hpp:1437:1: note: in expansion of macro ‘OPENCV_HAL_IMPL_SSE_SHIFT_OP’
 1437 | OPENCV_HAL_IMPL_SSE_SHIFT_OP(v_uint16x8, v_int16x8, epi16, _mm_srai_epi16)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/paul/Downloads/opencv/opencv-4.8.1/modules/core/include/opencv2/core/hal/intrin_sse.hpp:1427:16: note:   template argument deduction/substitution failed:
 1427 | inline _Tpuvec v_shr(const _Tpuvec& a) \

Screenshot from 2023-10-23 10-17-29

Steps to reproduce
Inside OpenCV-4.8.1 repository directory : 
rm -rf build
mkdir build
cd build 
cmake .. -DOPENCV_EXTRA_MODULES_PATH=<path_to_opencv_contrib_dir>/modules
make -j <number_of_cores>
@polodroid74 polodroid74 changed the title Xphoto Module cause compilation failure Xphoto Module causes OpenCV compilation failure Oct 23, 2023
@opencv-alalek opencv-alalek added question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org/ invalid category: build/install labels Oct 23, 2023
@opencv-alalek
Copy link

You need to keep both opencv / opencv_contrib repositories synchronized (same tag / version / commit date).
Different versions may not work.


Build / usage questions should go to Users OpenCV Q/A forum: https://forum.opencv.org/

@polodroid74
Copy link
Author

Ok, I have checkout on the 4.8.1 tag in the contrib repo and it works. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: build/install invalid question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org/
Projects
None yet
Development

No branches or pull requests

2 participants