-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
How to change RGB stream to Grayscale? #1554
Comments
Hi @xzyxzy29 |
Well, the output of the depth. |
[Realsense Customer Engineering Team Comment] |
[Realsense Customer Engineering Team Comment] |
I am a freshman of realsense sdk 2.0 and I am learning it from the example capture. I need to change the output from RGB to Grayscale . I think it might have something to do with the class colorizer, but I don't know how to set about. Can you please give me some advice?
Below are the codes of the example:
#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API
#include "example.hpp" // Include short list of convenience functions for rendering
// Capture Example demonstrates how to
// capture depth and color video streams and render them to the screen
int main(int argc, char * argv[]) try
{
// Create a simple OpenGL window for rendering:
window app(1280, 720, "RealSense Capture Example");
// Declare two textures on the GPU, one for color and one for depth
texture depth_image, color_image;
}
catch (const rs2::error & e)
{
std::cerr << "RealSense error calling " << e.get_failed_function() << "(" << e.get_failed_args() << "):\n " << e.what() << std::endl;
return EXIT_FAILURE;
}
catch (const std::exception& e)
{
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}
The text was updated successfully, but these errors were encountered: