Melodic ROS <> OpenCV3

I have compiled version of OpenCV 4.1.1 works smooth without problems.
I have made installation of ROS Melodic, works fine.
I have problem with OpenCV when I’m installing repository which need OpenCV
Do I have to install recomended OpenCV3 for ROS Melodic or it is some good way to
use comiled OpenCV in other version than 3 ?


If OpenCV3 is a recommended version, I will say to install v3 is a better idea.
The API between v3 and v4 has several change and it may make the sample cannot be executed with OpenCV4.


@markopo did you end up downgrading to openCV 3.2. ?