2 Replies Latest reply on May 3, 2018 10:02 PM by GloriousTan

    Realsense D435 infrared image


      I want to get the infrared image of D435, so I write as followed:


           rs2::pipeline pipe;


           rs2::frameset data=pipe.wait_for_frames();

           rs2::frame infrared=data.get_infrared_frame();

           const int w_i=infrared.as<rs2::video_frame>().get_width();

           const int h_i=infrared.as<rs2::video_frame>().get_height();

           cout<<w_i<<"  "<<h_i<<endl;


      But there is an error called "RealSense error calling rs2_get_frame_width(frame_ref:nullptr): null pointer passed for argument ".

      Can someone give me an advice on how to get the infrared image?