@@ -343,6 +343,15 @@ template <> struct RefTypeTraits <vx_lut>
343
343
static vx_status release (vxType& ref) { return vxReleaseLUT (&ref); }
344
344
};
345
345
346
+ class Pyramid ;
347
+ template <> struct RefTypeTraits <vx_pyramid>
348
+ {
349
+ typedef vx_pyramid vxType;
350
+ typedef Pyramid wrapperType;
351
+ static const vx_enum vxTypeEnum = VX_TYPE_PYRAMID;
352
+ static vx_status release (vxType& ref) { return vxReleasePyramid (&ref); }
353
+ };
354
+
346
355
class Distribution ;
347
356
template <> struct RefTypeTraits <vx_distribution>
348
357
{
@@ -2755,6 +2764,74 @@ class LUT : public RefWrapper<vx_lut>
2755
2764
#endif // IVX_USE_OPENCV
2756
2765
};
2757
2766
2767
+ /*
2768
+ * Pyramid
2769
+ */
2770
+ class Pyramid : public RefWrapper <vx_pyramid>
2771
+ {
2772
+ public:
2773
+ IVX_REF_STD_CTORS_AND_ASSIGNMENT (Pyramid)
2774
+
2775
+ static Pyramid create (vx_context context, vx_size levels, vx_float32 scale,
2776
+ vx_uint32 width, vx_uint32 height, vx_df_image format)
2777
+ {return Pyramid (vxCreatePyramid (context, levels, scale, width, height, format));}
2778
+
2779
+ static Pyramid createVirtual (vx_graph graph, vx_size levels, vx_float32 scale,
2780
+ vx_uint32 width, vx_uint32 height, vx_df_image format)
2781
+ {return Pyramid (vxCreateVirtualPyramid (graph, levels, scale, width, height, format));}
2782
+
2783
+ #ifndef VX_VERSION_1_1
2784
+ static const vx_enum
2785
+ VX_PYRAMID_LEVELS = VX_PYRAMID_ATTRIBUTE_LEVELS,
2786
+ VX_PYRAMID_SCALE = VX_PYRAMID_ATTRIBUTE_SCALE,
2787
+ VX_PYRAMID_WIDTH = VX_PYRAMID_ATTRIBUTE_WIDTH,
2788
+ VX_PYRAMID_HEIGHT = VX_PYRAMID_ATTRIBUTE_HEIGHT,
2789
+ VX_PYRAMID_FORMAT = VX_PYRAMID_ATTRIBUTE_FORMAT;
2790
+ #endif
2791
+
2792
+ template <typename T>
2793
+ void query (vx_enum att, T& value) const
2794
+ { IVX_CHECK_STATUS ( vxQueryPyramid (ref, att, &value, sizeof (value)) ); }
2795
+
2796
+ vx_size levels () const
2797
+ {
2798
+ vx_size l;
2799
+ query (VX_PYRAMID_LEVELS, l);
2800
+ return l;
2801
+ }
2802
+
2803
+ vx_float32 scale () const
2804
+ {
2805
+ vx_float32 s;
2806
+ query (VX_PYRAMID_SCALE, s);
2807
+ return s;
2808
+ }
2809
+
2810
+ vx_uint32 width () const
2811
+ {
2812
+ vx_uint32 v;
2813
+ query (VX_PYRAMID_WIDTH, v);
2814
+ return v;
2815
+ }
2816
+
2817
+ vx_uint32 height () const
2818
+ {
2819
+ vx_uint32 v;
2820
+ query (VX_PYRAMID_HEIGHT, v);
2821
+ return v;
2822
+ }
2823
+
2824
+ vx_df_image format () const
2825
+ {
2826
+ vx_df_image f;
2827
+ query (VX_PYRAMID_FORMAT, f);
2828
+ return f;
2829
+ }
2830
+
2831
+ Image getLevel (vx_uint32 index)
2832
+ { return Image (vxGetPyramidLevel (ref, index)); }
2833
+ };
2834
+
2758
2835
/*
2759
2836
* Distribution
2760
2837
*/
0 commit comments