-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fixing compatibility with OpenCV 4.9.0 and cvLoadImage not declared #28
Comments
I think I managed to fix the Here's the modified lines for SimpleShape: And the modified lines for ImageSeq: Taking ImageSeq changes as an example, I commented out the original lines, and added the cv::Mat with cvarrToMat conversion so that those
It's nothing too complicated, and by doing this I managed to compile Player with the latest OpenCV4 successfully. Pull Request #29 should fix this issue. |
I've been trying to compile the latest master branch for Player 3.1.1-dev, and I've been stumbling into a lot of issues regarding compatibility with some drivers and the current version of OpenCV. From what I could gather, the code for Player is currently using instances and functions from OpenCV 2, which has long been deprecated from what I know, and it currently sits at OpenCV 4.9 as the stable version.
However, OpenCV 4 does still offer the C API instructions and functions, so I managed to get the vast majority of the Player code to compile by changing some header names and directories to that of the current OpenCV 4 naming scheme as seen in this commit to my fork of Player:
ShadowOne333@6cc302e
The majority of the drivers compile just fine now, with the exception of two specific cases:
SimpleShape and ImageSeq.
These two rely on a very old OpenCV 2
cvLoadImage
function, which apparently is not available/declared anymore in OpenCV 4, and the compilation for these two fail with the following error:Here are the exact lines in which that function is called for both drivers:
I tried to fix it myself by declaring
cvLoadImage
manually inside those two .cc files as listed in the old OpenCV 2 documentation:But unfortunately, that breaks the compilation when trying to build the player executable:
I only need to fix this undeclared/undefined instance of
cvLoadImage
in order to properly make Player as a whole compile with OpenCV 4. If I disable both ImageSeq and SimpleShape from CMake, then Player finished compilation without issues, so it's only that function left to properly update Player for OpenCV 4.Anyone has any idea how to make this work?
As soon as a fix to that
cvLoadImage
function declaration is found, I will make the proper Pull Request of the changes so that Player can be used with Open CV 4.9.0, at least until OpenCV decides to remove the C API altogether, then the entire drivers relying on OpenCV would need to be updated to the current/new OpenCV 4 functions.The text was updated successfully, but these errors were encountered: