3 #include <opencv2/opencv.hpp> 10 cv::RotateFlags
angle(cv::RotateFlags::ROTATE_90_CLOCKWISE);
31 angle = cv::RotateFlags::ROTATE_90_CLOCKWISE;
38 angle = cv::RotateFlags::ROTATE_180;
45 angle = cv::RotateFlags::ROTATE_90_COUNTERCLOCKWISE;
53 int main(
int argc,
char * argv[])
try 63 float threshold_min = 0.3f;
64 float threshold_max = 1.5f;
80 cv::Mat
image(cv::Size(origWidth, origHeight), CV_16UC1, (
void*)f.
get_data(), cv::Mat::AUTO_STEP);
87 int rotWidth(static_cast<int>(threshold_max * 1000));
89 rotated = cv::Mat::zeros(cv::Size(rotWidth,
image.size().height), CV_16UC1 );
91 for(
int h = 0;
h < rotated.size().height;
h++) {
92 for(
int w = 0;
w < rotated.size().width;
w++) {
94 if ( (
h >=
image.size().height ) || (
w >=
image.size().width ) )
102 rotated.at<
unsigned short>(
h,
value ) =
w;
112 memcpy((
void*)
res.get_data(), rotated.data, rotated.size().width * rotated.size().height * 2);
118 procBlock.start(frame_queue);
126 frames = depthToColorAlignment.
process(frames);
132 depthFrame = threshold.
process(depthFrame);
135 procBlock.invoke( depthFrame );
136 depthFrame = frame_queue.wait_for_frame();
146 if ( (
image.size().width > 1000 ) || (
image.size().height > 1000) )
150 imshow(
"window_name",
image);
167 catch (
const std::exception& e)
frame apply_filter(filter_interface &filter)
frameset wait_for_frames(unsigned int timeout_ms=RS2_DEFAULT_TIMEOUT) const
stream_profile get_profile() const
cv::RotateFlags angle(cv::RotateFlags::ROTATE_90_CLOCKWISE)
const void * get_data() const
GLdouble GLdouble GLdouble w
GLfloat GLfloat GLfloat GLfloat h
void frame_ready(frame result) const
GLenum GLenum GLsizei void * image
depth_frame get_depth_frame() const
frame allocate_video_frame(const stream_profile &profile, const frame &original, int new_bpp=0, int new_width=0, int new_height=0, int new_stride=0, rs2_extension frame_type=RS2_EXTENSION_VIDEO_FRAME) const
const std::string & get_failed_args() const
int main(int argc, char *argv[])
rs2::frame process(rs2::frame frame) const override
frameset process(frameset frames)
void set_option(rs2_option option, float value) const
const std::string & get_failed_function() const