You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want get a ray from pv frame pixel coordinats, first I use as follow to get a ray in pv camera space :
pvFrame->SensorStreamingCameraIntrinsics->MapImagePointToCameraUnitPlane(uv, &xy);
but it not work, when I deploy app to hololen, the app crashes directly(I only add one line, as bold code)
DepthPvMapper::DepthPvMapper(HoloLensForCV::SensorFrame^ depthFrame, HoloLensForCV::SensorFrame^ pvFrame)
{
_imageToCameraMapping = createImageToCamMapping(depthFrame);
**_pvImageToCameraMapping = createImageToCamMapping(pvFrame);**
}
cv::Mat DepthPvMapper::createImageToCamMapping(HoloLensForCV::SensorFrame^ sensorFrame)
{
cv::Mat imageToCameraMapping = cv::Mat(
sensorFrame->SoftwareBitmap->PixelHeight,
sensorFrame->SoftwareBitmap->PixelWidth,
CV_32FC2,
cv::Scalar::all(0));
for (int x = 0; x < sensorFrame->SoftwareBitmap->PixelWidth; ++x) {
for (int y = 0; y < sensorFrame->SoftwareBitmap->PixelHeight; ++y) {
Windows::Foundation::Point uv = { float(x), float(y) };
Windows::Foundation::Point xy(0, 0);
if (sensorFrame->SensorStreamingCameraIntrinsics->MapImagePointToCameraUnitPlane(uv, &xy)) {
imageToCameraMapping.at<cv::Vec2f>(y, x) = cv::Vec2f(xy.X, xy.Y);
}
}
}
return imageToCameraMapping;
}
I also try to get the inverse of the projection matrix of pv frame,this will also crash the program.
Can someone help me ? Thanks in advance!
The text was updated successfully, but these errors were encountered:
I want get a ray from pv frame pixel coordinats, first I use as follow to get a ray in pv camera space :
pvFrame->SensorStreamingCameraIntrinsics->MapImagePointToCameraUnitPlane(uv, &xy);
but it not work, when I deploy app to hololen, the app crashes directly(I only add one line, as bold code)
I also try to get the inverse of the projection matrix of pv frame,this will also crash the program.
Can someone help me ? Thanks in advance!
The text was updated successfully, but these errors were encountered: