Struct opencv::structured_light::GrayCodePattern
source · pub struct GrayCodePattern { /* private fields */ }Expand description
Class implementing the Gray-code pattern, based on UNDERWORLD.
The generation of the pattern images is performed with Gray encoding using the traditional white and black colors.
The information about the two image axes x, y is encoded separately into two different pattern sequences. A projector P with resolution (P_res_x, P_res_y) will result in Ncols = log 2 (P_res_x) encoded pattern images representing the columns, and in Nrows = log 2 (P_res_y) encoded pattern images representing the rows. For example a projector with resolution 1024x768 will result in Ncols = 10 and Nrows = 10.
However, the generated pattern sequence consists of both regular color and color-inverted images: inverted pattern images are images with the same structure as the original but with inverted colors. This provides an effective method for easily determining the intensity value of each pixel when it is lit (highest value) and when it is not lit (lowest value). So for a a projector with resolution 1024x768, the number of pattern images will be Ncols * 2 + Nrows * 2 = 40.
Implementations§
source§impl GrayCodePattern
impl GrayCodePattern
sourcepub fn create(
parameters: &GrayCodePattern_Params
) -> Result<Ptr<GrayCodePattern>>
pub fn create( parameters: &GrayCodePattern_Params ) -> Result<Ptr<GrayCodePattern>>
Constructor
Parameters
- parameters: GrayCodePattern parameters GrayCodePattern::Params: the width and the height of the projector.
C++ default parameters
- parameters: GrayCodePattern::Params()