# Path: pyvx/types.py
# SCALE_PYRAMID_HALF = 0.5
# SCALE_PYRAMID_ORB = 0.8408964
# FMT_REF = ffi.string(lib._get_FMT_REF())
# FMT_SIZE = ffi.string(lib._get_FMT_SIZE())
# def KERNEL_BASE(vendor, libid):
# def imagepatch_addressing_t(dim_x=0, dim_y=0, stride_x=0, stride_y=0, scale_x=0, scale_y=0, step_x=0, step_y=0):
# def perf_t(tmp=0, beg=0, end=0, sum=0, avg=0, min=0, num=0, max=0):
# def kernel_info_t(enumeration, name):
# def border_mode_t(mode, constant_value=0):
# def keypoint_t(x, y, strength, scale, orientation, tracking_status, error):
# def rectangle_t(start_x, start_y, end_x, end_y):
# def delta_rectangle_t(delta_start_x, delta_start_y, delta_end_x, delta_end_y):
# def coordinates2d_t(x, y):
# def coordinates3d_t(x, y, z):
# 
# Path: pyvx/types.py
# SCALE_PYRAMID_HALF = 0.5
# SCALE_PYRAMID_ORB = 0.8408964
# FMT_REF = ffi.string(lib._get_FMT_REF())
# FMT_SIZE = ffi.string(lib._get_FMT_SIZE())
# def KERNEL_BASE(vendor, libid):
# def imagepatch_addressing_t(dim_x=0, dim_y=0, stride_x=0, stride_y=0, scale_x=0, scale_y=0, step_x=0, step_y=0):
# def perf_t(tmp=0, beg=0, end=0, sum=0, avg=0, min=0, num=0, max=0):
# def kernel_info_t(enumeration, name):
# def border_mode_t(mode, constant_value=0):
# def keypoint_t(x, y, strength, scale, orientation, tracking_status, error):
# def rectangle_t(start_x, start_y, end_x, end_y):
# def delta_rectangle_t(delta_start_x, delta_start_y, delta_end_x, delta_end_y):
# def coordinates2d_t(x, y):
# def coordinates3d_t(x, y, z):


from pyvx.inc import vx
from pyvx.types import VxError
from pyvx import types
    from pyvx.optimized_backend import Context
    import traceback
@api('QueryConvolution', on_exception=return_errno_and_none, returns='status, value')
@api('QueryPyramid', on_exception=return_errno_and_none, returns='status, value')
@api('QueryRemap', on_exception=return_errno_and_none, returns='status, value')
@api('QueryArray', on_exception=return_errno_and_none, returns='status, value')
def query(ref, attribute):
    """ Returns status """
    return vx.SUCCESS, ref.query(attribute)


@capi('vx_status vxQueryContext(vx_context context, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryImage(vx_image image, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryKernel(vx_kernel kernel, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryGraph(vx_graph graph, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryNode(vx_node node, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryParameter(vx_parameter param, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryScalar(vx_scalar scalar, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryReference(vx_reference ref, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryDelay(vx_delay delay, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryLUT(vx_lut lut, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryDistribution(vx_distribution distribution, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryThreshold(vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryMatrix(vx_matrix mat, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryConvolution(vx_convolution conv, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryPyramid(vx_pyramid pyr, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryRemap(vx_remap r, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryArray(vx_array arr, vx_enum attribute, void *ptr, vx_size size)')
def c_query(ref, attribute, ptr, size):
    value = ref.query(attribute)
    a = ref._attributes.get(attribute)
    if size != vx.ffi.sizeof(a.ctype):

# Path: pyvx/types.py
# SCALE_PYRAMID_HALF = 0.5
# SCALE_PYRAMID_ORB = 0.8408964
# FMT_REF = ffi.string(lib._get_FMT_REF())
# FMT_SIZE = ffi.string(lib._get_FMT_SIZE())
# def KERNEL_BASE(vendor, libid):
# def imagepatch_addressing_t(dim_x=0, dim_y=0, stride_x=0, stride_y=0, scale_x=0, scale_y=0, step_x=0, step_y=0):
# def perf_t(tmp=0, beg=0, end=0, sum=0, avg=0, min=0, num=0, max=0):
# def kernel_info_t(enumeration, name):
# def border_mode_t(mode, constant_value=0):
# def keypoint_t(x, y, strength, scale, orientation, tracking_status, error):
# def rectangle_t(start_x, start_y, end_x, end_y):
# def delta_rectangle_t(delta_start_x, delta_start_y, delta_end_x, delta_end_y):
# def coordinates2d_t(x, y):
# def coordinates3d_t(x, y, z):
# 
# Path: pyvx/types.py
# SCALE_PYRAMID_HALF = 0.5
# SCALE_PYRAMID_ORB = 0.8408964
# FMT_REF = ffi.string(lib._get_FMT_REF())
# FMT_SIZE = ffi.string(lib._get_FMT_SIZE())
# def KERNEL_BASE(vendor, libid):
# def imagepatch_addressing_t(dim_x=0, dim_y=0, stride_x=0, stride_y=0, scale_x=0, scale_y=0, step_x=0, step_y=0):
# def perf_t(tmp=0, beg=0, end=0, sum=0, avg=0, min=0, num=0, max=0):
# def kernel_info_t(enumeration, name):
# def border_mode_t(mode, constant_value=0):
# def keypoint_t(x, y, strength, scale, orientation, tracking_status, error):
# def rectangle_t(start_x, start_y, end_x, end_y):
# def delta_rectangle_t(delta_start_x, delta_start_y, delta_end_x, delta_end_y):
# def coordinates2d_t(x, y):
# def coordinates3d_t(x, y, z):


# Path: old/pyvx/model.py
from pyvx.inc import vx
from pyvx.types import VxError
from pyvx import types
    from pyvx.optimized_backend import Context
    import traceback

@api('QueryConvolution', on_exception=return_errno_and_none, returns='status, value')
@api('QueryPyramid', on_exception=return_errno_and_none, returns='status, value')
@api('QueryRemap', on_exception=return_errno_and_none, returns='status, value')
@api('QueryArray', on_exception=return_errno_and_none, returns='status, value')
def query(ref, attribute):
    """ Returns status """
    return vx.SUCCESS, ref.query(attribute)


@capi('vx_status vxQueryContext(vx_context context, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryImage(vx_image image, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryKernel(vx_kernel kernel, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryGraph(vx_graph graph, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryNode(vx_node node, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryParameter(vx_parameter param, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryScalar(vx_scalar scalar, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryReference(vx_reference ref, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryDelay(vx_delay delay, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryLUT(vx_lut lut, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryDistribution(vx_distribution distribution, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryThreshold(vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryMatrix(vx_matrix mat, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryConvolution(vx_convolution conv, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryPyramid(vx_pyramid pyr, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryRemap(vx_remap r, vx_enum attribute, void *ptr, vx_size size)')
@capi('vx_status vxQueryArray(vx_array arr, vx_enum attribute, void *ptr, vx_size size)')
def c_query(ref, attribute, ptr, size):
    value = ref.query(attribute)
    a = ref._attributes.get(attribute)
    if size != vx.ffi.sizeof(a.ctype):

        raise VxError("Bad size %d in query, expected %d\n" % (