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
Task_3DPreview::task() supports only input color RGB images.
Would be great to add support for input grayscale 8-bit images.
It just need to add a switch instruction, and handle the different images types.
for grayscale 8-bit: case:
replace line
cv::Vec3b pixel = merged.atcv::Vec3b(y, x);
by
uchar pixel = merged.at(y, x);
Task_3DPreview::task() supports only input color RGB images.
Would be great to add support for input grayscale 8-bit images.
It just need to add a switch instruction, and handle the different images types.
for grayscale 8-bit: case:
replace line
cv::Vec3b pixel = merged.atcv::Vec3b(y, x);
by
uchar pixel = merged.at(y, x);
and replace lines
m_result.atcv::Vec4b(cam_y_d, cam_x) = cv::Vec4b(pixel[0], pixel[1], pixel[2], 255);
m_result.atcv::Vec4b(cam_y_d, cam_x + 1) = cv::Vec4b(pixel[0], pixel[1], pixel[2], 255);
by
m_result.atcv::Vec4b(cam_y_d, cam_x) = cv::Vec4b(pixel, pixel, pixel, 255);
m_result.atcv::Vec4b(cam_y_d, cam_x + 1) = cv::Vec4b(pixel, pixel, pixel, 255);
The text was updated successfully, but these errors were encountered: