opencv_java recompilation / conflict with opencv

71 views
Skip to first unread message

Estelle Bremont

unread,
Jun 25, 2024, 3:17:57 AM (11 days ago) Jun 25
to dcm4che
Hello, 

I work on a software composed of many modules. One uses dcm4che-imageio-opencv 5.30.0 with opencv_java 4.8.0 (provided by weasis), and an other uses intel oneAPI 2019, simpleItk 1.1 and opencv Core 3.4. Everything works well.

We have to upgrade all the COTS. The decision is to use dcm4che 5.31.1, opencv* 4.8, intel 2023, simpleItk 2.3.1.
Unfortunately, since the upgrade, simpleItk algorithms at runtime crash when there is weasis opencv_java in the LD_LIBRARY_PATH. 

I suppose that there is a symbol or something conflicting between opencv_java and opencv_core. I tried to use opencv 4.9 / dcm4che 5.32, but it crashes too.

Can you give me all the options used to generate opencv_java, or tell me how opencv_java (and the additional classes) are generated so I can investigate further ?
There is no way for us to unload or to clusterize the native libraries.

Thanks !
Estelle


Platform : Linux RHEL 9
Versions : 
dcm4che-imageio-opencv 5.31.1
opencv_java 4.8.0-dcm
opencv 4.8.0
Intel ipp 2021.9.1
Intel tbb 2021.10.0
Intel mkl 2023.2.0
simpleITK 2.3.1

Nicolas Roduit

unread,
Jun 25, 2024, 10:42:34 AM (11 days ago) Jun 25
to dcm4che
The default library is statically compiled and may conflict with other libraries such as Opengl.

You can try using the version of the dynamic library under Linux that ends with the suffix "-dyn". This library requires at least libstdc++6 and libgcc1.

Estelle Bremont

unread,
Jun 26, 2024, 6:00:54 AM (10 days ago) Jun 26
to dcm4che
Hello, 

I realize that I don't reply to all. My bad.

Thanks for your response. I try to use the dyn library, but the execution still fails with an obscure itk error :
Message: /opt/sitkbld/Elastix/Core/Main/elxElastixFilter.hxx:ITK ERROR: ElastixFilter(
Type:    N3itk15ExceptionObjectE

We tried to run the same test against a locally-compiled opencv_java (with dicom,png,jpeg,tiff support), and we reproduced the same error.
There is no error when using a locally-compiled opencv_java with default options.

So, we supposed that the conflicting symbols are in opencv_* libs (between opencv_core and opencv_java), and surely dealing with dicom or images format support.
We would like to recompile opencv_* (not java) with the same compilation option than Weasis used to compile opencv_java.
Could you help, or give us some tips to solve our problem ? 

Thanks for help !
Estelle


Nicolas Roduit

unread,
Jun 27, 2024, 2:13:32 AM (9 days ago) Jun 27
to dcm4che
The opencv_java library contains the modules (core, imgcodecs with a specific dicom implementation, imgproc, java, and img_hash) and has been designed to work with dcm4che and weasis. Unfortunately, we can't support third-party requirements with applications that also contain OpenCV.
Reply all
Reply to author
Forward
0 new messages