Skip to content
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

Processing blocks frameset support #2245

Merged

Conversation

matkatz
Copy link
Contributor

@matkatz matkatz commented Aug 15, 2018

All processing-blocks must work on framesets in addition to frames

Jira issue - DSO-10202

Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very profound rework.
Some minor remarks in code
You also need to record the new tests to add it to CI


rect calc_grid(float2 window, int streams)
{
float ratio = window.x / window.y;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls add sanity checks : streams=0, win=[0,0]

@@ -323,4 +405,4 @@ void register_glfw_callbacks(window& app, glfw_state& app_state)
app_state.yaw = app_state.pitch = 0; app_state.offset_x = app_state.offset_y = 0.0;
}
};
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls add empty EOL

@@ -276,6 +276,17 @@ int rs2_is_frame_extendable_to(const rs2_frame* frame, rs2_extension extension_t
rs2_frame* rs2_allocate_synthetic_video_frame(rs2_source* source, const rs2_stream_profile* new_stream, rs2_frame* original,
int new_bpp, int new_width, int new_height, int new_stride, rs2_extension frame_type, rs2_error** error);

/**
* Allocate new points frame using a frame-source provided form a processing block
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

form from


_block->start(_queue);
}
align(rs2_stream align_to) : processing_block(init(align_to), 1) {}

/**
* Run the alignment process on the given frames to get an aligned set of frames
*
* \param[in] frame A pair of images, where at least one of which is a depth frame
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

param[in] frames A pair the frameset may include more than two frames

pointcloud(rs2_stream stream, int index = 0) : processing_block(init(), 1)
{
set_option(RS2_OPTION_STREAM_FILTER, float(stream));
set_option(RS2_OPTION_STREAM_INDEX_FILTER, float(index));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check if specifying stream format is required (e.g. disparity)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we only need the intrinsic & extrinsic data of the "other stream" sensor, so the format has no effect here

//Find the depth frame
for (int i = 0; i < composite->get_embedded_frames_count(); i++)
auto curr_depth = depth_frame.get_profile().as<rs2::video_stream_profile>();
if (_prev_depth_res.first != curr_depth.width() || _prev_depth_res.second != curr_depth.height())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add TODO for future refactoring based on sensor/profile id.
This will handle the case that two different depth streams with similar resolution being proceesed by the same "align" object

}};

static color_map classic { {
static color_map jet{ {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert alignment

if (!sub.first(f.get_profile().stream_type(), f.get_profile().format()))
return false;
}
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case both "full" and "sub" are empty the function returns true. Is this the expected behavior?

return true;
}

bool is_equel(rs2::frameset org, rs2::frameset processed)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

equel equal

REQUIRE(org_depth.get_width() == from_disp_processed_frame.get_width());

pipe.stop();
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOL

@ev-mp ev-mp merged commit 22e81fe into IntelRealSense:development Aug 23, 2018
@matkatz matkatz deleted the processing_blocks_frameset_support branch December 23, 2018 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants