您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vxQueryParameter函数代码示例

51自学网 2021-06-03 09:49:55
  C++
这篇教程C++ vxQueryParameter函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中vxQueryParameter函数的典型用法代码示例。如果您正苦于以下问题:C++ vxQueryParameter函数的具体用法?C++ vxQueryParameter怎么用?C++ vxQueryParameter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了vxQueryParameter函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: example_explore_parameters

void example_explore_parameters(vx_context context, vx_kernel kernel){    vx_uint32 p, numParams = 0;    vx_graph graph = vxCreateGraph(context);    vx_node node = vxCreateGenericNode(graph, kernel);    vxQueryKernel(kernel, VX_KERNEL_PARAMETERS, &numParams, sizeof(numParams));    for (p = 0; p < numParams; p++)    {        //! [Getting the ref]        vx_parameter param = vxGetParameterByIndex(node, p);        vx_reference ref;        vxQueryParameter(param, VX_PARAMETER_REF, &ref, sizeof(ref));        //! [Getting the ref]        if (ref)        {            //! [Getting the type]            vx_enum type;            vxQueryParameter(param, VX_PARAMETER_TYPE, &type, sizeof(type));            /* cast the ref to the correct vx_<type>. Atomics are now vx_scalar */            //! [Getting the type]        }        vxReleaseParameter(&param);    }    vxReleaseNode(&node);    vxReleaseGraph(&graph);}
开发者ID:eric100lin,项目名称:My-OpenVX-1.1,代码行数:26,


示例2: vxHistogramOutputValidator

static vx_status vxHistogramOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 1)    {        vx_image src = 0;        vx_parameter src_param = vxGetParameterByIndex(node, 0);        vx_parameter dst_param = vxGetParameterByIndex(node, 1);        vx_distribution dist;        vxQueryParameter(src_param, VX_PARAMETER_ATTRIBUTE_REF, &src, sizeof(src));        vxQueryParameter(dst_param, VX_PARAMETER_ATTRIBUTE_REF, &dist, sizeof(dist));        if ((src) && (dist))        {            vx_uint32 width = 0, height = 0;            vx_df_image format;            vx_size numBins = 0;            vxQueryDistribution(dist, VX_DISTRIBUTION_ATTRIBUTE_BINS, &numBins, sizeof(numBins));            vxQueryImage(src, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(height));            vxQueryImage(src, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));            vxQueryImage(src, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));            /* fill in the meta data with the attributes so that the checker will pass */            ptr->type = VX_TYPE_DISTRIBUTION;            status = VX_SUCCESS;            vxReleaseDistribution(&dist);            vxReleaseImage(&src);        }        vxReleaseParameter(&dst_param);        vxReleaseParameter(&src_param);    }    return status;}
开发者ID:eric100lin,项目名称:My-OpenVX-1.0.1,代码行数:32,


示例3: CV_transpose_InputValidator

/************************************************************************************************************input parameter validator.param [in] node The handle to the node.param [in] index The index of the parameter to validate.*************************************************************************************************************/static vx_status VX_CALLBACK CV_transpose_InputValidator(vx_node node, vx_uint32 index){	vx_status status = VX_SUCCESS;	vx_parameter param = vxGetParameterByIndex(node, index);	if (index == 0)	{		vx_image image;		vx_df_image df_image = VX_DF_IMAGE_VIRT;		STATUS_ERROR_CHECK(vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &image, sizeof(vx_image)));		STATUS_ERROR_CHECK(vxQueryImage(image, VX_IMAGE_ATTRIBUTE_FORMAT, &df_image, sizeof(df_image)));		if (df_image != VX_DF_IMAGE_U8 && df_image != VX_DF_IMAGE_S16)			status = VX_ERROR_INVALID_VALUE;		vxReleaseImage(&image);	}	else if (index == 1)	{		vx_image image;		vx_df_image df_image = VX_DF_IMAGE_VIRT;		STATUS_ERROR_CHECK(vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &image, sizeof(vx_image)));		STATUS_ERROR_CHECK(vxQueryImage(image, VX_IMAGE_ATTRIBUTE_FORMAT, &df_image, sizeof(df_image)));		if (df_image != VX_DF_IMAGE_U8 && df_image != VX_DF_IMAGE_S16)			status = VX_ERROR_INVALID_VALUE;		vxReleaseImage(&image);	}	vxReleaseParameter(&param);	return status;}
开发者ID:GPUOpen-ProfessionalCompute-Libraries,项目名称:amdovx-modules,代码行数:35,


示例4: vxMagnitudeOutputValidator

static vx_status vxMagnitudeOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 2)    {        vx_parameter param  = vxGetParameterByIndex(node, 0);        vx_parameter param2 = vxGetParameterByIndex(node, 2);        if ((param) && (param2))        {            vx_image input = 0, output = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(input));            vxQueryParameter(param2, VX_PARAMETER_ATTRIBUTE_REF, &output, sizeof(output));            if ((input) && (output))            {                vx_uint32 width = 0, height = 0;                vx_fourcc format = 0;                vxQueryImage(input, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width));                vxQueryImage(input, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                vxQueryImage(output, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                ptr->type = VX_TYPE_IMAGE;                if (format == FOURCC_U8)                    ptr->dim.image.format = FOURCC_U8;                else                    ptr->dim.image.format = FOURCC_S16; /* virtual images, too */                ptr->dim.image.width = width;                ptr->dim.image.height = height;                status = VX_SUCCESS;            }            vxReleaseParameter(&param2);            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:ofleischmann,项目名称:vision,代码行数:35,


示例5: vxNonMaxSuppressionInputValidator

static vx_status VX_CALLBACK vxNonMaxSuppressionInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 0) /* magnitude */    {        vx_parameter param = vxGetParameterByIndex(node, index);        if (param)        {            vx_image img = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &img, sizeof(img));            if (img)            {                vx_df_image format = VX_DF_IMAGE_VIRT;                vxQueryImage(img, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                if (format == VX_DF_IMAGE_U8 || format == VX_DF_IMAGE_S16 || format == VX_DF_IMAGE_U16)                {                    status = VX_SUCCESS;                }                vxReleaseImage(&img);            }            vxReleaseParameter(&param);        }    }    if (index == 1)    {        vx_parameter params[] = {            vxGetParameterByIndex(node, 0),            vxGetParameterByIndex(node, 1),        };        if (params[0] && params[1])        {            vx_image images[] = {0, 0};            vxQueryParameter(params[0], VX_PARAMETER_ATTRIBUTE_REF, &images[0], sizeof(images[0]));            vxQueryParameter(params[1], VX_PARAMETER_ATTRIBUTE_REF, &images[1], sizeof(images[1]));            if (images[0] && images[1])            {                vx_uint32 width[2], height[2];                vx_df_image format = VX_DF_IMAGE_VIRT;                vxQueryImage(images[0], VX_IMAGE_ATTRIBUTE_WIDTH, &width[0], sizeof(width[0]));                vxQueryImage(images[0], VX_IMAGE_ATTRIBUTE_HEIGHT, &height[0], sizeof(height[0]));                vxQueryImage(images[1], VX_IMAGE_ATTRIBUTE_WIDTH, &width[1], sizeof(width[1]));                vxQueryImage(images[1], VX_IMAGE_ATTRIBUTE_HEIGHT, &height[1], sizeof(height[1]));                vxQueryImage(images[1], VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                if ((format == VX_DF_IMAGE_U8) &&                    (width[0] == width[1]) &&                    (height[0] == height[1]))                {                    status = VX_SUCCESS;                }                vxReleaseImage(&images[0]);                vxReleaseImage(&images[1]);            }            vxReleaseParameter(&params[0]);            vxReleaseParameter(&params[1]);        }    }    return status;}
开发者ID:ChiahungTai,项目名称:clairvoyance,代码行数:59,


示例6: vxChannelExtractOutputValidator

static vx_status VX_CALLBACK vxChannelExtractOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 2)    {        vx_parameter param0 = vxGetParameterByIndex(node, 0);        vx_parameter param1 = vxGetParameterByIndex(node, 1);        if ((param0) && (param1))        {            vx_image input = 0;            vx_scalar chan = 0;            vx_enum channel = 0;            vxQueryParameter(param0, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(input));            vxQueryParameter(param1, VX_PARAMETER_ATTRIBUTE_REF, &chan, sizeof(chan));            vxReadScalarValue(chan, &channel);            if ((input) && (chan))            {                vx_uint32 width = 0, height = 0;                vx_df_image format = VX_DF_IMAGE_VIRT;                vxQueryImage(input, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width));                vxQueryImage(input, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                vxQueryImage(input, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                if (channel != VX_CHANNEL_Y)                    switch (format) {                    case VX_DF_IMAGE_IYUV:                    case VX_DF_IMAGE_NV12:                    case VX_DF_IMAGE_NV21:                        width /= 2;                        height /= 2;                        break;                    case VX_DF_IMAGE_YUYV:                    case VX_DF_IMAGE_UYVY:                        width /= 2;                        break;                    }                ptr->type = VX_TYPE_IMAGE;                ptr->dim.image.format = VX_DF_IMAGE_U8;                ptr->dim.image.width = width;                ptr->dim.image.height = height;                status = VX_SUCCESS;                vxReleaseImage(&input);                vxReleaseScalar(&chan);            }            vxReleaseParameter(&param0);            vxReleaseParameter(&param1);        }    }    else    {        status = VX_ERROR_INVALID_PARAMETERS;    }    VX_PRINT(VX_ZONE_API, "%s:%u returned %d/n", __FUNCTION__, index, status);    return status;}
开发者ID:ChiahungTai,项目名称:clairvoyance,代码行数:59,


示例7: vxScaleImageInputValidator

static vx_status VX_CALLBACK vxScaleImageInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 0)    {        vx_image input = 0;        vx_parameter param = vxGetParameterByIndex(node, index);        vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(input));        if (input)        {            vx_df_image format = 0;            vxQueryImage(input, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));            if (format == VX_DF_IMAGE_U8)            {                status = VX_SUCCESS;            }            vxReleaseImage(&input);        }        vxReleaseParameter(&param);    }    else if (index == 2)    {        vx_parameter param = vxGetParameterByIndex(node, index);        if (param)        {            vx_scalar scalar = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &scalar, sizeof(scalar));            if (scalar)            {                vx_enum stype = 0;                vxQueryScalar(scalar, VX_SCALAR_ATTRIBUTE_TYPE, &stype, sizeof(stype));                if (stype == VX_TYPE_ENUM)                {                    vx_enum interp = 0;                    vxReadScalarValue(scalar, &interp);                    if ((interp == VX_INTERPOLATION_TYPE_NEAREST_NEIGHBOR) ||                        (interp == VX_INTERPOLATION_TYPE_BILINEAR) ||                        (interp == VX_INTERPOLATION_TYPE_AREA))                    {                        status = VX_SUCCESS;                    }                    else                    {                        status = VX_ERROR_INVALID_VALUE;                    }                }                else                {                    status = VX_ERROR_INVALID_TYPE;                }                vxReleaseScalar(&scalar);            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:ChiahungTai,项目名称:clairvoyance,代码行数:58,


示例8: vxHalfscaleGaussianInputValidator

static vx_status VX_CALLBACK vxHalfscaleGaussianInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 0)    {        vx_image input = 0;        vx_parameter param = vxGetParameterByIndex(node, index);        vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(input));        if (input)        {            vx_df_image format = 0;            vxQueryImage(input, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));            if (format == VX_DF_IMAGE_U8)            {                status = VX_SUCCESS;            }            vxReleaseImage(&input);        }        vxReleaseParameter(&param);    }    else if (index == 2)    {        vx_parameter param = vxGetParameterByIndex(node, index);        if (param)        {            vx_scalar scalar = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &scalar, sizeof(scalar));            if (scalar)            {                vx_enum stype = 0;                vxQueryScalar(scalar, VX_SCALAR_ATTRIBUTE_TYPE, &stype, sizeof(stype));                if (stype == VX_TYPE_INT32)                {                    vx_int32 ksize = 0;                    vxReadScalarValue(scalar, &ksize);                    if ((ksize == 3) || (ksize == 5))                    {                        status = VX_SUCCESS;                    }                    else                    {                        status = VX_ERROR_INVALID_VALUE;                    }                }                else                {                    status = VX_ERROR_INVALID_TYPE;                }                vxReleaseScalar(&scalar);            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:ChiahungTai,项目名称:clairvoyance,代码行数:56,


示例9: vxThresholdInputValidator

static vx_status VX_CALLBACK vxThresholdInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 0)    {        vx_parameter param = vxGetParameterByIndex(node, index);        if (param)        {            vx_image input = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(input));            if (input)            {                vx_df_image format = 0;                vxQueryImage(input, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                if (format == VX_DF_IMAGE_U8)                {                    status = VX_SUCCESS;                }                else                {                    status = VX_ERROR_INVALID_FORMAT;                }                vxReleaseImage(&input);            }            vxReleaseParameter(&param);        }    }    else if (index == 1)    {        vx_parameter param = vxGetParameterByIndex(node, index);        if (param)        {            vx_threshold threshold = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &threshold, sizeof(threshold));            if (threshold)            {                vx_enum type = 0;                vxQueryThreshold(threshold, VX_THRESHOLD_ATTRIBUTE_TYPE, &type, sizeof(type));                if ((type == VX_THRESHOLD_TYPE_BINARY) ||                     (type == VX_THRESHOLD_TYPE_RANGE))                {                    status = VX_SUCCESS;                }                else                {                    status = VX_ERROR_INVALID_TYPE;                }                vxReleaseThreshold(&threshold);            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:ChiahungTai,项目名称:clairvoyance,代码行数:54,


示例10: vxAccumulateInputValidator

static vx_status VX_CALLBACK vxAccumulateInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 0 )    {        vx_image input = 0;        vx_parameter param = vxGetParameterByIndex(node, index);        vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(input));        if (input)        {            vx_df_image format = 0;            vxQueryImage(input, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));            if (format == VX_DF_IMAGE_U8)                status = VX_SUCCESS;            vxReleaseImage(&input);        }        vxReleaseParameter(&param);    }    else if (index == 1)    {        vx_image images[2];        vx_parameter param[2] = {            vxGetParameterByIndex(node, 0),            vxGetParameterByIndex(node, 1),        };        vxQueryParameter(param[0], VX_PARAMETER_ATTRIBUTE_REF, &images[0], sizeof(images[0]));        vxQueryParameter(param[1], VX_PARAMETER_ATTRIBUTE_REF, &images[1], sizeof(images[1]));        if (images[0] && images[1])        {            vx_uint32 width[2], height[2];            vx_df_image format[2];            vxQueryImage(images[0], VX_IMAGE_ATTRIBUTE_WIDTH, &width[0], sizeof(width[0]));            vxQueryImage(images[1], VX_IMAGE_ATTRIBUTE_WIDTH, &width[1], sizeof(width[1]));            vxQueryImage(images[0], VX_IMAGE_ATTRIBUTE_HEIGHT, &height[0], sizeof(height[0]));            vxQueryImage(images[1], VX_IMAGE_ATTRIBUTE_HEIGHT, &height[1], sizeof(height[1]));            vxQueryImage(images[0], VX_IMAGE_ATTRIBUTE_FORMAT, &format[0], sizeof(format[0]));            vxQueryImage(images[1], VX_IMAGE_ATTRIBUTE_FORMAT, &format[1], sizeof(format[1]));            if (width[0] == width[1] &&               height[0] == height[1] &&               format[0] == VX_DF_IMAGE_U8 &&               format[1] == VX_DF_IMAGE_S16)            {                status = VX_SUCCESS;            }            vxReleaseImage(&images[0]);            vxReleaseImage(&images[1]);        }        vxReleaseParameter(&param[0]);        vxReleaseParameter(&param[1]);    }    return status;}
开发者ID:flowyard,项目名称:FlowVX,代码行数:54,


示例11: vxChannelCombineInputValidator

static vx_status VX_CALLBACK vxChannelCombineInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index < 4)    {        vx_parameter param = vxGetParameterByIndex(node, index);        if (param)        {            vx_image image = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &image, sizeof(image));            if (image)            {                vx_df_image format = 0;                vxQueryImage(image, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                if (format == VX_DF_IMAGE_U8)                {                    status = VX_SUCCESS;                }                vxReleaseImage(&image);            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:m-ric,项目名称:openvx_sample,代码行数:25,


示例12: vxTableLookupOutputValidator

static vx_status VX_CALLBACK vxTableLookupOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 2)    {        vx_parameter src_param = vxGetParameterByIndex(node, 0);        if (src_param)        {            vx_image src = 0;            vxQueryParameter(src_param, VX_PARAMETER_ATTRIBUTE_REF, &src, sizeof(src));            if (src)            {                vx_uint32 width = 0, height = 0;                vxQueryImage(src, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(height));                vxQueryImage(src, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                /* output is equal type and size */                ptr->type = VX_TYPE_IMAGE;                ptr->dim.image.format = VX_DF_IMAGE_U8;                ptr->dim.image.width = width;                ptr->dim.image.height = height;                status = VX_SUCCESS;                vxReleaseImage(&src);            }            vxReleaseParameter(&src_param);        }    }    return status;}
开发者ID:flowyard,项目名称:FlowVX,代码行数:29,


示例13: CV_transpose_OutputValidator

/************************************************************************************************************output parameter validator.*************************************************************************************************************/static vx_status VX_CALLBACK CV_transpose_OutputValidator(vx_node node, vx_uint32 index, vx_meta_format meta){	vx_status status = VX_SUCCESS;	if (index == 1)	{		vx_parameter output_param = vxGetParameterByIndex(node, 1);		vx_image output; vx_uint32 width = 0, height = 0; vx_df_image format = VX_DF_IMAGE_VIRT;		STATUS_ERROR_CHECK(vxQueryParameter(output_param, VX_PARAMETER_ATTRIBUTE_REF, &output, sizeof(vx_image)));		STATUS_ERROR_CHECK(vxQueryImage(output, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format)));		STATUS_ERROR_CHECK(vxQueryImage(output, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width)));		STATUS_ERROR_CHECK(vxQueryImage(output, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height)));		if (format != VX_DF_IMAGE_U8 && format != VX_DF_IMAGE_S16)			status = VX_ERROR_INVALID_VALUE;		STATUS_ERROR_CHECK(vxSetMetaFormatAttribute(meta, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width)));		STATUS_ERROR_CHECK(vxSetMetaFormatAttribute(meta, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height)));		STATUS_ERROR_CHECK(vxSetMetaFormatAttribute(meta, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format)));		vxReleaseImage(&output);		vxReleaseParameter(&output_param);	}	return status;}
开发者ID:GPUOpen-ProfessionalCompute-Libraries,项目名称:amdovx-modules,代码行数:28,


示例14: vxCheckBufferInputValidator

static vx_status vxCheckBufferInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 0)    {        status = VX_SUCCESS;    }    else if (index == 1)    {        vx_parameter param = vxGetParameterByIndex(node, index);        if (param)        {            vx_scalar scalar = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &scalar, sizeof(scalar));            if (scalar)            {                vx_enum stype = 0;                vxQueryScalar(scalar, VX_SCALAR_ATTRIBUTE_TYPE, &stype, sizeof(stype));                if (stype == VX_TYPE_UINT8)                {                    status = VX_SUCCESS;                }                else                {                    status = VX_ERROR_INVALID_TYPE;                }            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:arunarunmeister,项目名称:vision,代码行数:32,


示例15: vxCheckOutputValidator

static vx_status vxCheckOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 2)    {        vx_parameter param = vxGetParameterByIndex(node, index);        ptr->dim.scalar.type = VX_TYPE_UINT32;        if (param)        {            vx_scalar serr = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &serr, sizeof(serr));            if (serr)            {                vx_enum stype = 0;                vxQueryScalar(serr, VX_SCALAR_ATTRIBUTE_TYPE, &stype, sizeof(stype));                if (stype == VX_TYPE_UINT32)                {                    ptr->dim.scalar.type = stype;                    status = VX_SUCCESS;                }            }            vxReleaseParameter(&param);        }    }    return VX_SUCCESS;}
开发者ID:arunarunmeister,项目名称:vision,代码行数:26,


示例16: vxBinaryBitwiseOutputValidator

static vx_status vxBinaryBitwiseOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 2)    {        vx_parameter param0 = vxGetParameterByIndex(node, 0);        if (param0)        {            vx_image image0 = 0;            vxQueryParameter(param0, VX_PARAMETER_ATTRIBUTE_REF, &image0, sizeof(image0));            /*             * When passing on the geometry to the output image, we only look at image 0, as             * both input images are verified to match, at input validation.             */            if (image0)            {                vx_uint32 width = 0, height = 0;                vxQueryImage(image0, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width));                vxQueryImage(image0, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                ptr->type = VX_TYPE_IMAGE;                ptr->dim.image.format = VX_DF_IMAGE_U8;                ptr->dim.image.width = width;                ptr->dim.image.height = height;                status = VX_SUCCESS;                vxReleaseImage(&image0);            }            vxReleaseParameter(&param0);        }    }    return status;}
开发者ID:eric100lin,项目名称:My-OpenVX-1.0.1,代码行数:31,


示例17: vxFindWarpOutputValidator

static vx_status VX_CALLBACK vxFindWarpOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 2)    {        vx_parameter param = vxGetParameterByIndex(node, index);        if (param)        {            vx_matrix matrix;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &matrix, sizeof(matrix));            if (matrix)            {                vx_enum data_type = 0;                vx_size rows = 0ul, columns = 0ul;                vxQueryMatrix(matrix, VX_MATRIX_ATTRIBUTE_TYPE, &data_type, sizeof(data_type));                vxQueryMatrix(matrix, VX_MATRIX_ATTRIBUTE_ROWS, &rows, sizeof(rows));                vxQueryMatrix(matrix, VX_MATRIX_ATTRIBUTE_COLUMNS, &columns, sizeof(columns));                if ((data_type == VX_TYPE_FLOAT32) && (columns == 3) && (rows == 3))                {                    status = VX_SUCCESS;                }                vxReleaseMatrix(&matrix);            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:kangdazhi,项目名称:openvx-videostab,代码行数:28,


示例18: vxMinMaxLocInputValidator

static vx_status VX_CALLBACK vxMinMaxLocInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 0)    {        vx_image input = 0;        vx_parameter param = vxGetParameterByIndex(node, index);        vxQueryParameter(param, VX_PARAMETER_REF, &input, sizeof(input));        if (input)        {            vx_df_image format = 0;            vxQueryImage(input, VX_IMAGE_FORMAT, &format, sizeof(format));            if ((format == VX_DF_IMAGE_U8)                || (format == VX_DF_IMAGE_S16)#if defined(EXPERIMENTAL_USE_S16)                || (format == VX_DF_IMAGE_U16)                || (format == VX_DF_IMAGE_U32)                || (format == VX_DF_IMAGE_S32)#endif                )            {                status = VX_SUCCESS;            }            vxReleaseImage(&input);        }        vxReleaseParameter(&param);    }    return status;}
开发者ID:eric100lin,项目名称:My-OpenVX-1.1,代码行数:30,


示例19: vxCopyArrayOutputValidator

static vx_status VX_CALLBACK vxCopyArrayOutputValidator(vx_node node, vx_uint32 index, vx_meta_format meta){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index > 0)    {        vx_parameter param = vxGetParameterByIndex(node, 0);        if (param)        {            vx_array input;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(vx_array));            if (input)            {                vx_enum item_type = VX_TYPE_INVALID;                vx_size capacity = 0ul;                status = VX_SUCCESS;                status |= vxQueryArray(input, VX_ARRAY_ATTRIBUTE_ITEMTYPE, &item_type, sizeof(item_type));                status |= vxQueryArray(input, VX_ARRAY_ATTRIBUTE_CAPACITY, &capacity, sizeof(capacity));                status |= vxSetMetaFormatAttribute(meta, VX_ARRAY_ATTRIBUTE_ITEMTYPE, &item_type, sizeof(item_type));                status |= vxSetMetaFormatAttribute(meta, VX_ARRAY_ATTRIBUTE_CAPACITY, &capacity, sizeof(capacity));                vxReleaseArray(&input);            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:ChiahungTai,项目名称:clairvoyance,代码行数:26,


示例20: vxThresholdOutputValidator

static vx_status VX_CALLBACK vxThresholdOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 2)    {        vx_parameter src_param = vxGetParameterByIndex(node, 0);        if (src_param)        {            vx_image src = 0;            vxQueryParameter(src_param, VX_PARAMETER_ATTRIBUTE_REF, &src, sizeof(src));            if (src)            {                vx_uint32 width = 0, height = 0;                vxQueryImage(src, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(height));                vxQueryImage(src, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                /* fill in the meta data with the attributes so that the checker will pass */                ptr->type = VX_TYPE_IMAGE;                ptr->dim.image.format = VX_DF_IMAGE_U8;                ptr->dim.image.width = width;                ptr->dim.image.height = height;                status = VX_SUCCESS;                vxReleaseImage(&src);            }            vxReleaseParameter(&src_param);        }    }    return status;}
开发者ID:ChiahungTai,项目名称:clairvoyance,代码行数:30,


示例21: vxMagnitudeOutputValidator

static vx_status VX_CALLBACK vxMagnitudeOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 2)    {        vx_parameter param  = vxGetParameterByIndex(node, 0);        if (vxGetStatus((vx_reference)param) == VX_SUCCESS)        {            vx_image input = 0;            vxQueryParameter(param, VX_PARAMETER_REF, &input, sizeof(input));            if (input)            {                vx_uint32 width = 0, height = 0;                vxQueryImage(input, VX_IMAGE_WIDTH, &width, sizeof(width));                vxQueryImage(input, VX_IMAGE_HEIGHT, &height, sizeof(height));                ptr->type = VX_TYPE_IMAGE;                ptr->dim.image.format = VX_DF_IMAGE_S16;                ptr->dim.image.width = width;                ptr->dim.image.height = height;                status = VX_SUCCESS;                vxReleaseImage(&input);            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:eric100lin,项目名称:My-OpenVX-1.1,代码行数:28,


示例22: vxCopyImageOutputValidator

static vx_status VX_CALLBACK vxCopyImageOutputValidator(vx_node node, vx_uint32 index, vx_meta_format meta){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 1)    {        vx_parameter param = vxGetParameterByIndex(node, 0); /* input image */        if (param)        {            vx_image input = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(vx_image));            if (input)            {                vx_uint32 width = 0, height = 0;                vx_df_image format = VX_DF_IMAGE_VIRT;                status = VX_SUCCESS;                status |= vxQueryImage(input, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width));                status |= vxQueryImage(input, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                status |= vxQueryImage(input, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                status |= vxSetMetaFormatAttribute(meta, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width));                status |= vxSetMetaFormatAttribute(meta, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                status |= vxSetMetaFormatAttribute(meta, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                vxReleaseImage(&input);            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:ChiahungTai,项目名称:clairvoyance,代码行数:30,


示例23: vxEqualizeHistOutputValidator

static vx_status vxEqualizeHistOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 1)    {        vx_parameter param = vxGetParameterByIndex(node, 0); /* we reference the input image */        if (param)        {            vx_image input = 0;            vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(input));            if (input)            {                vx_uint32 width = 0, height = 0;                vxQueryImage(input, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width));                vxQueryImage(input, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                ptr->type = VX_TYPE_IMAGE;                ptr->dim.image.format = VX_DF_IMAGE_U8;                ptr->dim.image.width = width;                ptr->dim.image.height = height;                status = VX_SUCCESS;                vxReleaseImage(&input);            }            vxReleaseParameter(&param);        }    }    return status;}
开发者ID:eric100lin,项目名称:My-OpenVX-1.0.1,代码行数:28,


示例24: vxEdgeTraceOutputValidator

static vx_status VX_CALLBACK vxEdgeTraceOutputValidator(vx_node node, vx_uint32 index, vx_meta_format meta){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 2)    {        vx_parameter src_param = vxGetParameterByIndex(node, 0);        if (src_param)        {            vx_image src = 0;            vxQueryParameter(src_param, VX_PARAMETER_ATTRIBUTE_REF, &src, sizeof(src));            if (src)            {                vx_uint32 width = 0, height = 0;                vx_df_image format = VX_DF_IMAGE_U8;                vxQueryImage(src, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(height));                vxQueryImage(src, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                //vxQueryImage(src, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                vxSetMetaFormatAttribute(meta, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));                vxSetMetaFormatAttribute(meta, VX_IMAGE_ATTRIBUTE_WIDTH, &width, sizeof(width));                vxSetMetaFormatAttribute(meta, VX_IMAGE_ATTRIBUTE_HEIGHT, &height, sizeof(height));                status = VX_SUCCESS;                vxReleaseImage(&src);            }            vxReleaseParameter(&src_param);        }    }    return status;}
开发者ID:flowyard,项目名称:FlowVX,代码行数:30,


示例25: vxMagnitudeInputValidator

static vx_status VX_CALLBACK vxMagnitudeInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 0 || index == 1)    {        vx_image input = 0;        vx_parameter param = vxGetParameterByIndex(node, index);        vxQueryParameter(param, VX_PARAMETER_REF, &input, sizeof(input));        if (input)        {            vx_df_image format = 0;            vxQueryImage(input, VX_IMAGE_FORMAT, &format, sizeof(format));            if (format == VX_DF_IMAGE_S16)            {                if (index == 0)                {                    status = VX_SUCCESS;                }                else                {                    vx_parameter param0 = vxGetParameterByIndex(node, index);                    vx_image input0 = 0;                    vxQueryParameter(param0, VX_PARAMETER_REF, &input0, sizeof(input0));                    if (input0)                    {                        vx_uint32 width0 = 0, height0 = 0, width1 = 0, height1 = 0;                        vxQueryImage(input0, VX_IMAGE_WIDTH, &width0, sizeof(width0));                        vxQueryImage(input0, VX_IMAGE_HEIGHT, &height0, sizeof(height0));                        vxQueryImage(input, VX_IMAGE_WIDTH, &width1, sizeof(width1));                        vxQueryImage(input, VX_IMAGE_HEIGHT, &height1, sizeof(height1));                        if (width0 == width1 && height0 == height1)                            status = VX_SUCCESS;                        vxReleaseImage(&input0);                    }                    vxReleaseParameter(&param0);                }            }            vxReleaseImage(&input);        }        vxReleaseParameter(&param);    }    return status;}
开发者ID:eric100lin,项目名称:My-OpenVX-1.1,代码行数:46,


示例26: vxTableLookupInputValidator

static vx_status VX_CALLBACK vxTableLookupInputValidator(vx_node node, vx_uint32 index){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 0)    {        vx_image input = 0;        vx_parameter param = vxGetParameterByIndex(node, index);        vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &input, sizeof(input));        if (input)        {            vx_df_image format = 0;            vxQueryImage(input, VX_IMAGE_ATTRIBUTE_FORMAT, &format, sizeof(format));            if (format == VX_DF_IMAGE_U8#if defined(EXPERIMENTAL_USE_S16)                || format == VX_DF_IMAGE_S16#endif                )            {                status = VX_SUCCESS;            }            vxReleaseImage(&input);        }        vxReleaseParameter(&param);    }    else if (index == 1)    {        vx_parameter param = vxGetParameterByIndex(node, index);        vx_lut lut = 0;        vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &lut, sizeof(lut));        if (lut)        {            vx_enum type = 0;            vxQueryLUT(lut, VX_LUT_ATTRIBUTE_TYPE, &type, sizeof(type));            if (type == VX_TYPE_UINT8 || type == VX_TYPE_INT16)            {                status = VX_SUCCESS;            }            vxReleaseLUT(&lut);        }        vxReleaseParameter(&param);    }    return status;}
开发者ID:flowyard,项目名称:FlowVX,代码行数:44,


示例27: vxScaleImageOutputValidator

static vx_status VX_CALLBACK vxScaleImageOutputValidator(vx_node node, vx_uint32 index, vx_meta_format_t *ptr){    vx_status status = VX_ERROR_INVALID_PARAMETERS;    if (index == 1)    {        vx_parameter src_param = vxGetParameterByIndex(node, 0);        vx_parameter dst_param = vxGetParameterByIndex(node, index);        if (src_param && dst_param)        {            vx_image src = 0;            vx_image dst = 0;            vxQueryParameter(src_param, VX_PARAMETER_ATTRIBUTE_REF, &src, sizeof(src));            vxQueryParameter(dst_param, VX_PARAMETER_ATTRIBUTE_REF, &dst, sizeof(dst));            if ((src) && (dst))            {                vx_uint32 w1 = 0, h1 = 0, w2 = 0, h2 = 0;                vx_df_image f1 = VX_DF_IMAGE_VIRT, f2 = VX_DF_IMAGE_VIRT;                vxQueryImage(src, VX_IMAGE_ATTRIBUTE_WIDTH, &w1, sizeof(w1));                vxQueryImage(src, VX_IMAGE_ATTRIBUTE_HEIGHT, &h1, sizeof(h1));                vxQueryImage(dst, VX_IMAGE_ATTRIBUTE_WIDTH, &w2, sizeof(w2));                vxQueryImage(dst, VX_IMAGE_ATTRIBUTE_HEIGHT, &h2, sizeof(h2));                vxQueryImage(src, VX_IMAGE_ATTRIBUTE_FORMAT, &f1, sizeof(f1));                vxQueryImage(dst, VX_IMAGE_ATTRIBUTE_FORMAT, &f2, sizeof(f2));                /* output can not be virtual */                if ((w2 != 0) && (h2 != 0) && (f2 != VX_DF_IMAGE_VIRT) && (f1 == f2))                {                    /* fill in the meta data with the attributes so that the checker will pass */                    ptr->type = VX_TYPE_IMAGE;                    ptr->dim.image.format = f2;                    ptr->dim.image.width = w2;                    ptr->dim.image.height = h2;                    status = VX_SUCCESS;                }                vxReleaseImage(&src);                vxReleaseImage(&dst);            }            vxReleaseParameter(&src_param);            vxReleaseParameter(&dst_param);        }    }    return status;}
开发者ID:ChiahungTai,项目名称:clairvoyance,代码行数:43,


示例28: Parameter_dir

static VALUE Parameter_dir(VALUE self){    Check_Type(self, T_DATA);    vx_enum dir;    vx_parameter param = (vx_parameter)DATA_PTR(self);    vx_status status = vxQueryParameter(param, VX_QUERY_PARAMETER_DIRECTION, &dir, sizeof(dir));    if (status == VX_SUCCESS)        return INT2FIX(dir);    else        return INT2FIX(0);}
开发者ID:ofleischmann,项目名称:vision,代码行数:11,


示例29: Parameter_value

static VALUE Parameter_value(VALUE self){    Check_Type(self, T_DATA);    vx_reference ref;    vx_parameter param = (vx_parameter)DATA_PTR(self);    vx_status status = vxQueryParameter(param, VX_QUERY_PARAMETER_REF, &ref, sizeof(ref));    if (status == VX_SUCCESS)        return INT2FIX(ref);    else        return INT2FIX(0);}
开发者ID:ofleischmann,项目名称:vision,代码行数:11,


示例30: CV_norm_InputValidator

/************************************************************************************************************input parameter validator.param [in] node The handle to the node.param [in] index The index of the parameter to validate.*************************************************************************************************************/static vx_status VX_CALLBACK CV_norm_InputValidator(vx_node node, vx_uint32 index){	vx_status status = VX_SUCCESS;	vx_parameter param = vxGetParameterByIndex(node, index);	if (index == 0)	{		vx_image image;		vx_df_image df_image = VX_DF_IMAGE_VIRT;		STATUS_ERROR_CHECK(vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &image, sizeof(vx_image)));		STATUS_ERROR_CHECK(vxQueryImage(image, VX_IMAGE_ATTRIBUTE_FORMAT, &df_image, sizeof(df_image)));		if (df_image != VX_DF_IMAGE_U8)			status = VX_ERROR_INVALID_VALUE;		vxReleaseImage(&image);	}	else if (index == 1)	{		vx_scalar scalar = 0; vx_enum type = 0;	vx_float32 value = 0;		STATUS_ERROR_CHECK(vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &scalar, sizeof(scalar)));		STATUS_ERROR_CHECK(vxQueryScalar(scalar, VX_SCALAR_ATTRIBUTE_TYPE, &type, sizeof(type)));		STATUS_ERROR_CHECK(vxReadScalarValue(scalar, &value));		if (value < 0 || type != VX_TYPE_FLOAT32)			status = VX_ERROR_INVALID_VALUE;		vxReleaseScalar(&scalar);	}	else if (index == 2)	{		vx_scalar scalar = 0; vx_enum type = 0;	vx_int32 value = 0;		STATUS_ERROR_CHECK(vxQueryParameter(param, VX_PARAMETER_ATTRIBUTE_REF, &scalar, sizeof(scalar)));		STATUS_ERROR_CHECK(vxQueryScalar(scalar, VX_SCALAR_ATTRIBUTE_TYPE, &type, sizeof(type)));		STATUS_ERROR_CHECK(vxReadScalarValue(scalar, &value));		if (value < 0 || type != VX_TYPE_INT32)			status = VX_ERROR_INVALID_VALUE;		vxReleaseScalar(&scalar);	}	vxReleaseParameter(&param);	return status;}
开发者ID:citrix123,项目名称:amdovx-modules,代码行数:46,



注:本文中的vxQueryParameter函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ vxReleaseParameter函数代码示例
C++ vxGetParameterByIndex函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。