Skip to content

Update README.md #115

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Update README.md #115

wants to merge 3 commits into from

Conversation

srisailasyap
Copy link

No description provided.

Copy link
Author

@srisailasyap srisailasyap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-review

scp $QNX_TARGET/aarch64le/lib/libcam.so.2 qnxuser@$TARGET_HOST:/data/home/qnxuser/opencv/libs
scp $QNX_TARGET/aarch64le/usr/lib/libpng16.so.16 qnxuser@$TARGET_HOST:/data/home/qnxuser/opencv/libs
scp $QNX_TARGET/aarch64le/usr/lib/libtiff.so.5 qnxuser@$TARGET_HOST:/data/home/qnxuser/opencv/libs
scp $QNX_TARGET/aarch64le/usr/lib/liblzma.so.5 qnxuser@$TARGET_HOST:/data/home/qnxuser/opencv/libs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of our test instructions assume you have system files like these installed already. It might be helpful to add a note at the project level README.md pointing to existing documentation for how to create a QNX system.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the ldd command on cv2.cpython-311.so to check for missing dependencies. The output showed that libraries like libjpeg.so, libstdc++.so, libcam.so, and others were not found on the system. Because of this, I had to manually copy them to /data/home/qnxuser/opencv/libs to get OpenCV working. This happened to me both on QEMU and on a BSP, where I had to include them twice

scp $QNX_TARGET/aarch64le/usr/lib/libpng16.so.16 qnxuser@$TARGET_HOST:/data/home/qnxuser/opencv/libs
scp $QNX_TARGET/aarch64le/usr/lib/libtiff.so.5 qnxuser@$TARGET_HOST:/data/home/qnxuser/opencv/libs
scp $QNX_TARGET/aarch64le/usr/lib/liblzma.so.5 qnxuser@$TARGET_HOST:/data/home/qnxuser/opencv/libs
scp $QNX_TARGET/usr/local/include/opencv4 qnxuser@$TARGET_HOST:/data/home/qnxuser/opencv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opencv header files are not needed unless you are compiling on the target, which we don't support.

# Copy the numpy dependencies to the target
scp -r $QNX_TARGET/aarch64le/usr/local/lib/python3.11/site-packages/numpy* qnxuser@$TARGET_HOST:/data/home/qnxuser/opencv
```

To verify the installation on the target,
```bash
# Must point to opencv libs
export PYTHONPATH=/data/home/qnxuser/opencv/cv2/python-3.11:$PYTHONPATH
export OPENCV_LIBDIR=/data/home/qnxuser/opencv/libs
export OPENCV_CONFIG_PATH=/data/home/qnxuser/opencv/cv2/config.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPENCV_LIBDIR is already set (on line 213). As far as I can tell OpenCV_CONFIG_PATH is an internal build variable, and will be overridden by the build.

The PYTHONPATH change will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants