Commit 6dd416cd authored by dharezlak's avatar dharezlak

Merge pull request #1 from berak/structured_light_py_java

structured_light:  python / java bindings
parents eada2205 4889ec5c
set(the_description "Structured Light API")
ocv_define_module(structured_light opencv_core opencv_calib3d opencv_imgproc opencv_highgui opencv_features2d opencv_rgbd OPTIONAL opencv_viz)
ocv_define_module(structured_light opencv_core opencv_calib3d opencv_imgproc opencv_highgui opencv_features2d opencv_rgbd OPTIONAL opencv_viz WRAP python java)
......@@ -43,6 +43,7 @@
#define __OPENCV_GRAY_CODE_PATTERN_HPP__
#include "opencv2/core.hpp"
#include "opencv2/structured_light/structured_light.hpp"
namespace cv {
namespace structured_light {
......@@ -72,22 +73,22 @@ class CV_EXPORTS_W GrayCodePattern : public StructuredLightPattern
* @param width Projector's width. Default value is 1024.
* @param height Projector's height. Default value is 768.
*/
struct CV_EXPORTS_W_SIMPLE Params
struct CV_EXPORTS Params
{
CV_WRAP
Params();
CV_PROP_RW
int width;
CV_PROP_RW
int height;
};
/** @brief Constructor
@param parameters GrayCodePattern parameters GrayCodePattern::Params: the width and the height of the projector.
*/
CV_WRAP
static Ptr<GrayCodePattern> create( const GrayCodePattern::Params &parameters = GrayCodePattern::Params() );
// alias for scripting
CV_WRAP
static Ptr<GrayCodePattern> create( int width, int height );
/** @brief Get the number of pattern images needed for the graycode pattern.
*
* @return The number of pattern images needed for the graycode pattern.
......
......@@ -471,5 +471,15 @@ Ptr<GrayCodePattern> GrayCodePattern::create( const GrayCodePattern::Params& par
return makePtr<GrayCodePattern_Impl>( params );
}
// Creates the GrayCodePattern instance
// alias for scripting
Ptr<GrayCodePattern> GrayCodePattern::create( int width, int height )
{
Params params;
params.width = width;
params.height = height;
return makePtr<GrayCodePattern_Impl>( params );
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment