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

WIP - converting to OpenCL - 1 test #3

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Source/ARX/OCVT/PlanarTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,11 @@ class PlanarTracker::PlanarTrackerImpl
std::cout << "Add Marker EM" << std::endl;
cv::Mat colorImage(height, width, CV_8UC4, buff);
std::cout << "colorImage ok!" << std::endl;
cv::UMat grayImage(_frameSizeY, _frameSizeX, CV_8UC1);
cv::Mat grayImage(_frameSizeY, _frameSizeX, CV_8UC1);
std::cout << "grayImage ok!" << std::endl;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the problem seems located here i don't recieve this message: grayImage ok!

Copy link
Owner

Choose a reason for hiding this comment

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

The image should be coming in as luma image from the API directly as the conversion happens inside the API in JS for the video stream.

Not sure if the code refers to the JPG image used as trackable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It refers to 'newTrackable' i think the jpg image. It seems strange to me that fails at this point. Unlucky i will not have time to try other changes...

cv::cvtColor(colorImage.getUMat(cv::ACCESS_RW), grayImage, cv::COLOR_RGBA2GRAY);
newTrackable._image = grayImage;
cv::cvtColor(colorImage, grayImage, cv::COLOR_RGBA2GRAY);
std::cout << "grayImage ok 2!" << std::endl;
newTrackable._image = grayImage.getUMat(cv::ACCESS_RW);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now it stops at this point: Issue while converting to UMat.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

or the step before...

#else
newTrackable._image = cv::Mat(height, width, CV_8UC1, buff).getUMat();
#endif
Expand Down