@Namespace(value="cv::structured_light") public static class opencv_structured_light.GrayCodePattern extends opencv_structured_light.StructuredLightPattern
/** \brief Class implementing the Gray-code pattern, based on \cite 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.
| Modifier and Type | Class and Description |
|---|---|
static class |
opencv_structured_light.GrayCodePattern.Params
\brief Parameters of StructuredLightPattern constructor.
|
| Constructor and Description |
|---|
GrayCodePattern(org.bytedeco.javacpp.Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static opencv_structured_light.GrayCodePattern |
create() |
static opencv_structured_light.GrayCodePattern |
create(int width,
int height) |
static opencv_structured_light.GrayCodePattern |
create(opencv_structured_light.GrayCodePattern.Params parameters)
\brief Constructor
|
void |
getImagesForShadowMasks(opencv_core.GpuMat blackImage,
opencv_core.GpuMat whiteImage) |
void |
getImagesForShadowMasks(opencv_core.Mat blackImage,
opencv_core.Mat whiteImage)
\brief Generates the all-black and all-white images needed for shadowMasks computation.
|
void |
getImagesForShadowMasks(opencv_core.UMat blackImage,
opencv_core.UMat whiteImage) |
long |
getNumberOfPatternImages()
\brief Get the number of pattern images needed for the graycode pattern.
|
boolean |
getProjPixel(opencv_core.GpuMatVector patternImages,
int x,
int y,
opencv_core.Point projPix) |
boolean |
getProjPixel(opencv_core.MatVector patternImages,
int x,
int y,
opencv_core.Point projPix)
\brief For a (x,y) pixel of a camera returns the corresponding projector pixel.
|
boolean |
getProjPixel(opencv_core.UMatVector patternImages,
int x,
int y,
opencv_core.Point projPix) |
void |
setBlackThreshold(long value)
\brief Sets the value for black threshold, needed for decoding (shadowsmasks computation).
|
void |
setWhiteThreshold(long value)
\brief Sets the value for white threshold, needed for decoding.
|
decode, decode, decode, decode, decode, decode, decode, decode, decode, decode, decode, decode, generate, generate, generateclear, empty, getDefaultName, position, read, save, save, write, write, writeaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic GrayCodePattern(org.bytedeco.javacpp.Pointer p)
Pointer.Pointer(Pointer).@opencv_core.Ptr public static opencv_structured_light.GrayCodePattern create(@Const @ByRef(nullValue="cv::structured_light::GrayCodePattern::Params()") opencv_structured_light.GrayCodePattern.Params parameters)
parameters - GrayCodePattern parameters GrayCodePattern::Params: the width and the height of the projector.@opencv_core.Ptr public static opencv_structured_light.GrayCodePattern create()
@opencv_core.Ptr public static opencv_structured_light.GrayCodePattern create(int width, int height)
@Cast(value="size_t") public long getNumberOfPatternImages()
public void setWhiteThreshold(@Cast(value="size_t")
long value)
value - The desired white threshold value.public void setBlackThreshold(@Cast(value="size_t")
long value)
value - The desired black threshold value.public void getImagesForShadowMasks(@ByVal
opencv_core.Mat blackImage,
@ByVal
opencv_core.Mat whiteImage)
blackImage - The generated all-black CV_8U image, at projector's resolution.whiteImage - The generated all-white CV_8U image, at projector's resolution.public void getImagesForShadowMasks(@ByVal
opencv_core.UMat blackImage,
@ByVal
opencv_core.UMat whiteImage)
public void getImagesForShadowMasks(@ByVal
opencv_core.GpuMat blackImage,
@ByVal
opencv_core.GpuMat whiteImage)
@Cast(value="bool")
public boolean getProjPixel(@ByVal
opencv_core.MatVector patternImages,
int x,
int y,
@ByRef
opencv_core.Point projPix)
patternImages - The pattern images acquired by the camera, stored in a grayscale vector < Mat >.x - x coordinate of the image pixel.y - y coordinate of the image pixel.projPix - Projector's pixel corresponding to the camera's pixel: projPix.x and projPix.y are the image coordinates of the projector's pixel corresponding to the pixel being decoded in a camera.@Cast(value="bool")
public boolean getProjPixel(@ByVal
opencv_core.UMatVector patternImages,
int x,
int y,
@ByRef
opencv_core.Point projPix)
@Cast(value="bool")
public boolean getProjPixel(@ByVal
opencv_core.GpuMatVector patternImages,
int x,
int y,
@ByRef
opencv_core.Point projPix)
Copyright © 2018. All rights reserved.