296 Reference.__init__(self, Type.NODE,
"default")
300 self.
target = Target.DEFAULT
314 assert (len(param_type_args) == (self.
num_in + self.
num_out)),
'Expected %d arguments but %d provided' % (len(param_type_args), (self.
num_in + self.
num_out))
315 for i
in range(0, len(param_type_args)) :
316 assert (self.
ref[i].type == param_type_args[i]),
'Parameter %d: Expected %s but %s is provided' % (i, param_type_args[i], self.
ref[i].type)
327 def setParams(self, num_in, num_out, *param_type_args) :
330 for i
in range(0, self.
num_in) :
332 for i
in range(0, self.
num_out) :
343 print_str = Reference.__str__(self) +
' [ ' + self.
kernel +
' ] ' 345 for ref
in self.
ref :
346 print_str = print_str +
'\n' + str(idx) +
': ' + str(ref)
357 def get_vx_kernel_enum(self) :
376 def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT) :
377 Node.__init__(self,
"org.khronos.openvx.absdiff", image_in1, image_in2, image_out3)
378 self.
setParams(2, 1, Type.IMAGE, Type.IMAGE, Type.IMAGE)
382 def checkParams(self, *param_type_args) :
383 Node.checkParams(self, *param_type_args)
385 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Inputs MUST have same image data format" 386 assert ( self.
ref[1].df_image == self.
ref[2].df_image ),
"Inputs and Output MUST have same image data format" 387 assert ( self.
ref[0].df_image == DfImage.U8
or self.
ref[0].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 403 def __init__(self, image_in1, image_inout2, name="default", target=Target.DEFAULT) :
404 Node.__init__(self,
"org.khronos.openvx.accumulate", image_in1, image_inout2, image_inout2)
405 self.
setParams(2, 1, Type.IMAGE, Type.IMAGE, Type.IMAGE)
409 def checkParams(self, *param_type_args) :
410 Node.checkParams(self, *param_type_args)
412 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 413 assert ( self.
ref[1].df_image == DfImage.S16 ),
"In/out image data format must be S16" 430 def __init__(self, image_in1, shift_in2, image_inout3, name="default", target=Target.DEFAULT) :
431 Node.__init__(self,
"org.khronos.openvx.accumulate_square", image_in1, shift_in2, image_inout3, image_inout3)
432 self.
setParams(3, 1, Type.IMAGE, Type.SCALAR, Type.IMAGE, Type.IMAGE)
436 def checkParams(self, *param_type_args) :
437 Node.checkParams(self, *param_type_args)
439 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 440 assert ( self.
ref[2].df_image == DfImage.S16 ),
"In/out image data format must be S16" 457 def __init__(self, image_in1, alpha_in2, image_inout3, name="default", target=Target.DEFAULT) :
458 Node.__init__(self,
"org.khronos.openvx.accumulate_weighted", image_in1, alpha_in2, image_inout3, image_inout3)
459 self.
setParams(3, 1, Type.IMAGE, Type.SCALAR, Type.IMAGE, Type.IMAGE)
463 def checkParams(self, *param_type_args) :
464 Node.checkParams(self, *param_type_args)
466 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 467 assert ( self.
ref[2].df_image == DfImage.U8 ),
"In/out image data format must be U8" 486 def __init__(self, image_in1, image_in2, policy3, image_out4, name="default", target=Target.DEFAULT) :
487 scalar =
Scalar(Type.ENUM, policy3)
488 Node.__init__(self,
"org.khronos.openvx.add", image_in1, image_in2, scalar, image_out4)
489 self.
setParams(3, 1, Type.IMAGE, Type.IMAGE, Type.SCALAR, Type.IMAGE)
493 def checkParams(self, *param_type_args) :
494 Node.checkParams(self, *param_type_args)
496 assert ( self.
ref[0].df_image == DfImage.U8
or self.
ref[0].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 497 assert ( self.
ref[1].df_image == DfImage.U8
or self.
ref[1].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 498 assert ( self.
ref[3].df_image == DfImage.U8
or self.
ref[3].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 499 assert ( not((self.
ref[0].df_image == DfImage.S16
or self.
ref[1].df_image == DfImage.S16)
and self.
ref[3].df_image == DfImage.U8) ),
"Output must be S16 if either input is S16" 518 def __init__(self, image_in1, image_in2, policy, image_out3, name="default", target=Target.DEFAULT) :
519 scalar =
Scalar(Type.ENUM, policy)
520 Node.__init__(self,
"org.khronos.openvx.subtract", image_in1, image_in2, scalar, image_out3)
521 self.
setParams(3, 1, Type.IMAGE, Type.IMAGE, Type.SCALAR, Type.IMAGE)
525 def checkParams(self, *param_type_args) :
526 Node.checkParams(self, *param_type_args)
528 assert ( self.
ref[0].df_image == DfImage.U8
or self.
ref[0].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 529 assert ( self.
ref[1].df_image == DfImage.U8
or self.
ref[1].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 530 assert ( self.
ref[3].df_image == DfImage.U8
or self.
ref[3].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 531 assert ( not((self.
ref[0].df_image == DfImage.S16
or self.
ref[1].df_image == DfImage.S16)
and self.
ref[3].df_image == DfImage.U8) ),
"Output must be S16 if either input is S16" 549 def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT) :
550 Node.__init__(self,
"org.khronos.openvx.and", image_in1, image_in2, image_out3)
551 self.
setParams(2, 1, Type.IMAGE, Type.IMAGE, Type.IMAGE)
555 def checkParams(self, *param_type_args) :
556 Node.checkParams(self, *param_type_args)
558 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Inputs MUST have same image data format" 559 assert ( self.
ref[1].df_image == self.
ref[2].df_image ),
"Inputs and Output MUST have same image data format" 560 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 578 def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT) :
579 Node.__init__(self,
"org.khronos.openvx.xor", image_in1, image_in2, image_out3)
580 self.
setParams(2, 1, Type.IMAGE, Type.IMAGE, Type.IMAGE)
584 def checkParams(self, *param_type_args) :
585 Node.checkParams(self, *param_type_args)
587 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Inputs MUST have same image data format" 588 assert ( self.
ref[1].df_image == self.
ref[2].df_image ),
"Inputs and Output MUST have same image data format" 589 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 607 def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT) :
608 Node.__init__(self,
"org.khronos.openvx.or", image_in1, image_in2, image_out3)
609 self.
setParams(2, 1, Type.IMAGE, Type.IMAGE, Type.IMAGE)
613 def checkParams(self, *param_type_args) :
614 Node.checkParams(self, *param_type_args)
616 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Inputs MUST have same image data format" 617 assert ( self.
ref[1].df_image == self.
ref[2].df_image ),
"Inputs and Output MUST have same image data format" 618 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 635 def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT) :
636 Node.__init__(self,
"org.khronos.openvx.not", image_in1, image_out2)
637 self.
setParams(1, 1, Type.IMAGE, Type.IMAGE)
641 def checkParams(self, *param_type_args) :
642 Node.checkParams(self, *param_type_args)
644 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Inputs and Output MUST have same image data format" 645 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 662 def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT) :
663 Node.__init__(self,
"org.khronos.openvx.box_3x3", image_in1, image_out2)
664 self.
setParams(1, 1, Type.IMAGE, Type.IMAGE)
668 def checkParams(self, *param_type_args) :
669 Node.checkParams(self, *param_type_args)
671 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Inputs and Output MUST have same image data format" 672 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 692 def __init__(self, image_in1, hyst_in2, grad_size_in3, norm_type_in4, image_out5, name="default", target=Target.DEFAULT) :
693 scalar3 =
Scalar(Type.INT32, grad_size_in3)
694 scalar4 =
Scalar(Type.ENUM, norm_type_in4)
695 Node.__init__(self,
"org.khronos.openvx.canny_edge_detector", image_in1, hyst_in2, scalar3, scalar4, image_out5)
696 self.
setParams(4, 1, Type.IMAGE, Type.THRESHOLD, Type.SCALAR, Type.SCALAR, Type.IMAGE)
700 def checkParams(self, *param_type_args) :
701 Node.checkParams(self, *param_type_args)
703 assert ( self.
ref[0].df_image == self.
ref[4].df_image ),
"Input and Output MUST have same image data format" 704 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 724 def __init__(self, image_in1, image_in2, image_in3, image_in4, image_out5, name="default", target=Target.DEFAULT) :
725 Node.__init__(self,
"org.khronos.openvx.channel_combine", image_in1, image_in2, image_in3, image_in4, image_out5)
727 if image_in4.type == Type.NULL :
728 if image_in3.type == Type.NULL :
729 self.
setParams(4, 1, Type.IMAGE, Type.IMAGE, Type.NULL, Type.NULL, Type.IMAGE)
731 self.
setParams(4, 1, Type.IMAGE, Type.IMAGE, Type.IMAGE, Type.NULL, Type.IMAGE)
733 self.
setParams(4, 1, Type.IMAGE, Type.IMAGE, Type.IMAGE, Type.IMAGE, Type.IMAGE)
737 def checkParams(self, *param_type_args) :
738 Node.checkParams(self, *param_type_args)
740 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 741 assert ( self.
ref[1].df_image == DfImage.U8 ),
"Image data format must be U8" 742 if param_type_args[2] == Type.IMAGE :
743 assert ( self.
ref[2].df_image == DfImage.U8 ),
"Image data format must be U8" 744 if param_type_args[3] == Type.IMAGE :
745 assert ( self.
ref[3].df_image == DfImage.U8 ),
"Image data format must be U8" 746 assert ( self.
ref[4].df_image != DfImage.U8 ),
"Image data format must not be U8" 764 def __init__(self, image_in1, channel2, image_out3, name="default", target=Target.DEFAULT) :
765 scalar =
Scalar(Type.ENUM, channel2)
766 Node.__init__(self,
"org.khronos.openvx.channel_extract", image_in1, scalar, image_out3)
767 self.
setParams(2, 1, Type.IMAGE, Type.SCALAR, Type.IMAGE)
771 def checkParams(self, *param_type_args) :
772 Node.checkParams(self, *param_type_args)
774 assert ( self.
ref[2].df_image == DfImage.U8 ),
"Output format must be U8" 791 def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT) :
792 Node.__init__(self,
"org.khronos.openvx.color_convert", image_in1, image_out2)
793 self.
setParams(1, 1, Type.IMAGE, Type.IMAGE)
797 def checkParams(self, *param_type_args) :
798 Node.checkParams(self, *param_type_args)
819 def __init__(self, image_in1, image_out2, policy3, shift4, name="default", target=Target.DEFAULT) :
820 scalar3 =
Scalar(Type.ENUM, policy3)
821 Node.__init__(self,
"org.khronos.openvx.convertdepth", image_in1, image_out2, scalar3, shift4)
822 self.
setParams(3, 1, Type.IMAGE, Type.IMAGE, Type.SCALAR, Type.SCALAR)
830 def checkParams(self, *param_type_args) :
831 Node.checkParams(self, *param_type_args)
850 def __init__(self, image_in1, conv2, image_out3, name="default", target=Target.DEFAULT) :
851 Node.__init__(self,
"org.khronos.openvx.custom_convolution", image_in1, conv2, image_out3)
852 self.
setParams(2, 1, Type.IMAGE, Type.CONVOLUTION, Type.IMAGE)
856 def checkParams(self, *param_type_args) :
857 Node.checkParams(self, *param_type_args)
859 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input format must be U8" 860 assert ( self.
ref[2].df_image == DfImage.U8
or self.
ref[2].df_image == DfImage.S16 ),
"Output format must be either U8 or S16" 877 def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT) :
878 Node.__init__(self,
"org.khronos.openvx.dilate_3x3", image_in1, image_out2)
879 self.
setParams(1, 1, Type.IMAGE, Type.IMAGE)
883 def checkParams(self, *param_type_args) :
884 Node.checkParams(self, *param_type_args)
886 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Input and Output MUST have same image data format" 887 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 904 def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT) :
905 Node.__init__(self,
"org.khronos.openvx.equalize_histogram", image_in1, image_out2)
906 self.
setParams(1, 1, Type.IMAGE, Type.IMAGE)
910 def checkParams(self, *param_type_args) :
911 Node.checkParams(self, *param_type_args)
913 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Input and Output MUST have same image data format" 914 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 931 def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT) :
932 Node.__init__(self,
"org.khronos.openvx.erode_3x3", image_in1, image_out2)
933 self.
setParams(1, 1, Type.IMAGE, Type.IMAGE)
937 def checkParams(self, *param_type_args) :
938 Node.checkParams(self, *param_type_args)
940 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Input and Output MUST have same image data format" 941 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 961 def __init__(self, image_in1, strength_thresh2, nonmax3, arr_out4, corners5, name="default", target=Target.DEFAULT) :
962 Node.__init__(self,
"org.khronos.openvx.fast_corners", image_in1, strength_thresh2, nonmax3, arr_out4, corners5)
963 if corners5.type == Type.NULL :
964 self.
setParams(3, 2, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.NULL)
966 self.
setParams(3, 2, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.SCALAR)
970 def checkParams(self, *param_type_args) :
971 Node.checkParams(self, *param_type_args)
973 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 974 assert ( self.
ref[1].data_type == Type.FLOAT32 ),
"Strength scalar format must be F32" 991 def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT) :
992 Node.__init__(self,
"org.khronos.openvx.gaussian_3x3", image_in1, image_out2)
993 self.
setParams(1, 1, Type.IMAGE, Type.IMAGE)
997 def checkParams(self, *param_type_args) :
998 Node.checkParams(self, *param_type_args)
1000 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Input and Output MUST have same image data format" 1001 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 1020 def __init__(self, function1, image_in2, matrix_in3, image_out4, name="default", target=Target.DEFAULT) :
1021 scalar1 =
Scalar(Type.ENUM, function1)
1022 Node.__init__(self,
"org.khronos.openvx.non_linear_filter", scalar1, image_in2, matrix_in3, image_out4)
1023 self.
setParams(3, 1, Type.SCALAR, Type.IMAGE, Type.MATRIX, Type.IMAGE)
1027 def checkParams(self, *param_type_args) :
1028 Node.checkParams(self, *param_type_args)
1030 assert ( self.
ref[1].df_image == DfImage.U8 ),
"Image data format must be U8" 1031 assert ( self.
ref[3].df_image == DfImage.U8 ),
"Image data format must be U8" 1054 def __init__(self, image_in1, strength_thresh2, dist3, sensitivity4, gradient_size5, block_size6, arr_out7, num_corners8, name="default", target=Target.DEFAULT) :
1055 scalar5 =
Scalar(Type.INT32, gradient_size5)
1056 scalar6 =
Scalar(Type.INT32, block_size6)
1057 Node.__init__(self,
"org.khronos.openvx.harris_corners", image_in1, strength_thresh2, dist3, sensitivity4, scalar5, scalar6, arr_out7, num_corners8)
1058 if num_corners8.type == Type.NULL :
1059 self.
setParams(6, 2, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.SCALAR, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.NULL)
1061 self.
setParams(6, 2, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.SCALAR, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.SCALAR)
1065 def checkParams(self, *param_type_args) :
1066 Node.checkParams(self, *param_type_args)
1068 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 1069 assert ( self.
ref[1].data_type == Type.FLOAT32 ),
"Strength scalar format must be F32" 1070 assert ( self.
ref[2].data_type == Type.FLOAT32 ),
"Distance scalar format must be F32" 1071 assert ( self.
ref[3].data_type == Type.FLOAT32 ),
"Sensitivity scalar format must be F32" 1088 def __init__(self, image_in1, dist2, name="default", target=Target.DEFAULT) :
1089 Node.__init__(self,
"org.khronos.openvx.histogram", image_in1, dist2)
1090 self.
setParams(1, 1, Type.IMAGE, Type.DISTRIBUTION)
1094 def checkParams(self, *param_type_args) :
1095 Node.checkParams(self, *param_type_args)
1097 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 1114 def __init__(self, image_in1, pyr_out2, name="default", target=Target.DEFAULT) :
1115 Node.__init__(self,
"org.khronos.openvx.gaussian_pyramid", image_in1, pyr_out2)
1116 self.
setParams(1, 1, Type.IMAGE, Type.PYRAMID)
1120 def checkParams(self, *param_type_args) :
1121 Node.checkParams(self, *param_type_args)
1123 assert ( self.
ref[0].df_image == self.
ref[1].format ),
"Input and Output MUST have same image data format" 1124 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 1142 def __init__(self, image_in1, pyr_out2, image_out3, name="default", target=Target.DEFAULT) :
1143 Node.__init__(self,
"org.khronos.openvx.laplacian_pyramid", image_in1, pyr_out2, image_out3)
1144 self.
setParams(1, 2, Type.IMAGE, Type.PYRAMID, Type.IMAGE)
1148 def checkParams(self, *param_type_args) :
1149 Node.checkParams(self, *param_type_args)
1151 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 1152 assert ( self.
ref[1].format == DfImage.S16 ),
"Output pyramid image data format must be S16" 1153 assert ( self.
ref[2].df_image == DfImage.S16
or self.
ref[2].df_image == DfImage.U8 ),
"Output image data format must be either U8 or S16" 1171 def __init__(self, pyr_in1, image_in2, image_out3, name="default", target=Target.DEFAULT) :
1172 Node.__init__(self,
"org.khronos.openvx.laplacian_reconstruct", pyr_in1, image_in2, image_out3)
1173 self.
setParams(2, 1, Type.PYRAMID, Type.IMAGE, Type.IMAGE)
1177 def checkParams(self, *param_type_args) :
1178 Node.checkParams(self, *param_type_args)
1180 assert ( self.
ref[0].format == DfImage.S16 ),
"Input pyramid image data format must be S16" 1181 assert ( self.
ref[1].df_image == DfImage.S16
or self.
ref[1].df_image == DfImage.U8),
"Input image data format must be either U8 or S16" 1182 assert ( self.
ref[2].df_image == DfImage.U8 ),
"Output image data format must be U8" 1199 def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT) :
1200 Node.__init__(self,
"org.khronos.openvx.integral_image", image_in1, image_out2)
1201 self.
setParams(1, 1, Type.IMAGE, Type.IMAGE)
1205 def checkParams(self, *param_type_args) :
1206 Node.checkParams(self, *param_type_args)
1208 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 1209 assert ( self.
ref[1].df_image == DfImage.U32 ),
"Output image data format must be U32" 1227 def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT) :
1228 Node.__init__(self,
"org.khronos.openvx.magnitude", image_in1, image_in2, image_out3)
1229 self.
setParams(2, 1, Type.IMAGE, Type.IMAGE, Type.IMAGE)
1233 def checkParams(self, *param_type_args) :
1234 Node.checkParams(self, *param_type_args)
1236 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Inputs MUST have same image data format" 1237 assert ( self.
ref[1].df_image == self.
ref[2].df_image ),
"Inputs and Output MUST have same image data format" 1238 assert ( self.
ref[0].df_image == DfImage.S16 ),
"Image data format must be S16" 1256 def __init__(self, image_in1, mean2, stddev3, name="default", target=Target.DEFAULT) :
1257 Node.__init__(self,
"org.khronos.openvx.mean_stddev", image_in1, mean2, stddev3)
1258 self.
setParams(1, 2, Type.IMAGE, Type.SCALAR, Type.SCALAR)
1262 def checkParams(self, *param_type_args) :
1263 Node.checkParams(self, *param_type_args)
1265 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 1266 assert ( self.
ref[1].data_type == Type.FLOAT32 ),
"Mean scalar format must be F32" 1267 assert ( self.
ref[2].data_type == Type.FLOAT32 ),
"Standard Deviation scalar format must be F32" 1284 def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT) :
1285 Node.__init__(self,
"org.khronos.openvx.median_3x3", image_in1, image_out2)
1286 self.
setParams(1, 1, Type.IMAGE, Type.IMAGE)
1290 def checkParams(self, *param_type_args) :
1291 Node.checkParams(self, *param_type_args)
1293 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Input and Output MUST have same image data format" 1294 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 1316 def __init__(self, image_in1, min2, max3, array_out4, array_out5, minCnt6, maxCnt7, name="default", target=Target.DEFAULT) :
1317 Node.__init__(self,
"org.khronos.openvx.minmaxloc", image_in1, min2, max3, array_out4, array_out5, minCnt6, maxCnt7)
1320 if array_out4.type == Type.NULL
and array_out5.type == Type.NULL
and \
1321 minCnt6.type == Type.NULL
and maxCnt7.type == Type.NULL :
1322 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.NULL, Type.NULL, Type.NULL, Type.NULL)
1324 elif array_out4.type == Type.ARRAY
and array_out5.type == Type.NULL
and \
1325 minCnt6.type == Type.NULL
and maxCnt7.type == Type.NULL :
1326 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.NULL, Type.NULL, Type.NULL)
1328 elif array_out4.type == Type.NULL
and array_out5.type == Type.ARRAY
and \
1329 minCnt6.type == Type.NULL
and maxCnt7.type == Type.NULL :
1330 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.NULL, Type.ARRAY, Type.NULL, Type.NULL)
1332 elif array_out4.type == Type.ARRAY
and array_out5.type == Type.ARRAY
and \
1333 minCnt6.type == Type.NULL
and maxCnt7.type == Type.NULL :
1334 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.ARRAY, Type.NULL, Type.NULL)
1336 elif array_out4.type == Type.NULL
and array_out5.type == Type.NULL
and \
1337 minCnt6.type == Type.SCALAR
and maxCnt7.type == Type.NULL :
1338 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.NULL, Type.NULL, Type.SCALAR, Type.NULL)
1340 elif array_out4.type == Type.ARRAY
and array_out5.type == Type.NULL
and \
1341 minCnt6.type == Type.SCALAR
and maxCnt7.type == Type.NULL :
1342 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.ARRAY, Type.NULL, Type.NULL, Type.SCALAR, Type.NULL)
1344 elif array_out4.type == Type.NULL
and array_out5.type == Type.ARRAY
and \
1345 minCnt6.type == Type.SCALAR
and maxCnt7.type == Type.NULL :
1346 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.NULL, Type.ARRAY, Type.NULL, Type.SCALAR, Type.NULL)
1348 elif array_out4.type == Type.ARRAY
and array_out5.type == Type.ARRAY
and \
1349 minCnt6.type == Type.SCALAR
and maxCnt7.type == Type.NULL :
1350 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.ARRAY, Type.ARRAY, Type.NULL, Type.SCALAR, Type.NULL)
1352 elif array_out4.type == Type.NULL
and array_out5.type == Type.NULL
and \
1353 minCnt6.type == Type.NULL
and maxCnt7.type == Type.SCALAR :
1354 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.NULL, Type.NULL, Type.NULL, Type.SCALAR)
1356 elif array_out4.type == Type.ARRAY
and array_out5.type == Type.NULL
and \
1357 minCnt6.type == Type.NULL
and maxCnt7.type == Type.SCALAR :
1358 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.NULL, Type.NULL, Type.SCALAR)
1360 elif array_out4.type == Type.NULL
and array_out5.type == Type.ARRAY
and \
1361 minCnt6.type == Type.NULL
and maxCnt7.type == Type.SCALAR :
1362 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.NULL, Type.ARRAY, Type.NULL, Type.SCALAR)
1364 elif array_out4.type == Type.ARRAY
and array_out5.type == Type.ARRAY
and \
1365 minCnt6.type == Type.NULL
and maxCnt7.type == Type.SCALAR :
1366 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.ARRAY, Type.NULL, Type.SCALAR)
1368 elif array_out4.type == Type.NULL
and array_out5.type == Type.NULL
and \
1369 minCnt6.type == Type.SCALAR
and maxCnt7.type == Type.SCALAR :
1370 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.NULL, Type.NULL, Type.SCALAR, Type.SCALAR)
1372 elif array_out4.type == Type.ARRAY
and array_out5.type == Type.NULL
and \
1373 minCnt6.type == Type.SCALAR
and maxCnt7.type == Type.SCALAR :
1374 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.NULL, Type.SCALAR, Type.SCALAR)
1376 elif array_out4.type == Type.NULL
and array_out5.type == Type.ARRAY
and \
1377 minCnt6.type == Type.SCALAR
and maxCnt7.type == Type.SCALAR :
1378 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.NULL, Type.ARRAY, Type.SCALAR, Type.SCALAR)
1381 self.
setParams(1, 6, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.ARRAY, Type.ARRAY, Type.SCALAR, Type.SCALAR)
1385 def checkParams(self, *param_type_args) :
1386 Node.checkParams(self, *param_type_args)
1388 assert ( self.
ref[0].df_image == DfImage.U8
or self.
ref[0].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 1414 def __init__(self, pyr_in1, pyr_in2, array_in3, array_in4, array_out5, termination6, epsilon7, num_iters8, use_initial_estimate9, window_dim10, name="default", target=Target.DEFAULT) :
1415 scalar6 =
Scalar(Type.ENUM, termination6)
1416 epsilon7 =
Scalar(Type.FLOAT32, epsilon7)
1417 num_iters8 =
Scalar(Type.UINT32, num_iters8)
1418 use_initial_estimate9 =
Scalar(Type.BOOL, use_initial_estimate9)
1419 scalar10 =
Scalar(Type.SIZE, window_dim10)
1420 Node.__init__(self,
"org.khronos.openvx.optical_flow_pyr_lk", pyr_in1, pyr_in2, array_in3, array_in4, array_out5, scalar6, epsilon7, num_iters8, use_initial_estimate9, scalar10)
1421 self.
setParams(9, 1, Type.PYRAMID, Type.PYRAMID, Type.ARRAY, Type.ARRAY, Type.ARRAY, Type.SCALAR, Type.SCALAR, Type.SCALAR, Type.SCALAR, Type.SCALAR)
1425 def checkParams(self, *param_type_args) :
1426 Node.checkParams(self, *param_type_args)
1428 assert ( self.
ref[0].format == DfImage.U8 ),
"Input pyramid image data format must be U8" 1429 assert ( self.
ref[1].format == DfImage.U8 ),
"Input pyramid image data format must be U8" 1430 assert ( self.
ref[6].data_type == Type.FLOAT32 ),
"Epsilon scalar format must be F32" 1448 def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT) :
1449 Node.__init__(self,
"org.khronos.openvx.phase", image_in1, image_in2, image_out3)
1450 self.
setParams(2, 1, Type.IMAGE, Type.IMAGE, Type.IMAGE)
1454 def checkParams(self, *param_type_args) :
1455 Node.checkParams(self, *param_type_args)
1457 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Inputs MUST have same image data format" 1458 assert ( self.
ref[0].df_image == DfImage.S16 ),
"Input image data format must be S16" 1459 assert ( self.
ref[2].df_image == DfImage.U8 ),
"Output image data format must be U8" 1480 def __init__(self, image_in1, image_in2, scale3, overflow4, rounding5, image_out6, name="default", target=Target.DEFAULT) :
1481 scalar4 =
Scalar(Type.ENUM, overflow4)
1482 scalar5 =
Scalar(Type.ENUM, rounding5)
1483 Node.__init__(self,
"org.khronos.openvx.multiply", image_in1, image_in2, scale3, scalar4, scalar5, image_out6)
1484 self.
setParams(5, 1, Type.IMAGE, Type.IMAGE, Type.SCALAR, Type.SCALAR, Type.SCALAR, Type.IMAGE)
1488 def checkParams(self, *param_type_args) :
1489 Node.checkParams(self, *param_type_args)
1491 assert ( self.
ref[0].df_image == DfImage.U8
or self.
ref[0].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 1492 assert ( self.
ref[1].df_image == DfImage.U8
or self.
ref[1].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 1493 assert ( self.
ref[5].df_image == DfImage.U8
or self.
ref[5].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 1494 assert ( not((self.
ref[0].df_image == DfImage.S16
or self.
ref[1].df_image == DfImage.S16)
and self.
ref[5].df_image == DfImage.U8) ),
"Output must be S16 if either input is S16" 1513 def __init__(self, image_in1, table_in2, policy3, image_out4, name="default", target=Target.DEFAULT) :
1514 scalar3 =
Scalar(Type.ENUM, policy3)
1515 Node.__init__(self,
"org.khronos.openvx.remap", image_in1, table_in2, scalar3, image_out4)
1516 self.
setParams(3, 1, Type.IMAGE, Type.REMAP, Type.SCALAR, Type.IMAGE)
1520 def checkParams(self, *param_type_args) :
1521 Node.checkParams(self, *param_type_args)
1523 assert ( self.
ref[0].df_image == self.
ref[3].df_image ),
"Input and Output MUST have same image data format" 1524 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 1543 def __init__(self, image_in1, image_out2, interp3, name="default", target=Target.DEFAULT) :
1544 scalar =
Scalar(Type.ENUM, interp3)
1545 Node.__init__(self,
"org.khronos.openvx.scale_image", image_in1, image_out2, scalar)
1546 self.
setParams(2, 1, Type.IMAGE, Type.IMAGE, Type.SCALAR)
1550 def checkParams(self, *param_type_args) :
1551 Node.checkParams(self, *param_type_args)
1553 assert ( self.
ref[0].df_image == self.
ref[1].df_image ),
"Input and Output MUST have same image data format" 1554 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 1573 def __init__(self, image_in1, image_out2, kernel_size, name="default", target=Target.DEFAULT) :
1574 scalar =
Scalar(Type.ENUM, kernel_size)
1575 Node.__init__(self,
"org.khronos.openvx.halfscale_gaussian", image_in1, scalar, image_out2)
1576 self.
setParams(2, 1, Type.IMAGE, Type.SCALAR, Type.IMAGE)
1580 def checkParams(self, *param_type_args) :
1581 Node.checkParams(self, *param_type_args)
1583 assert ( self.
ref[0].df_image == self.
ref[2].df_image ),
"Input and Output MUST have same image data format" 1584 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 1602 def __init__(self, image_in1, image_out2, image_out3, name="default", target=Target.DEFAULT) :
1603 Node.__init__(self,
"org.khronos.openvx.sobel_3x3", image_in1, image_out2, image_out3)
1604 self.
setParams(1, 2, Type.IMAGE, Type.IMAGE, Type.IMAGE)
1608 def checkParams(self, *param_type_args) :
1609 Node.checkParams(self, *param_type_args)
1611 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 1612 assert ( self.
ref[1].df_image == self.
ref[2].df_image ),
"Output images MUST have same image data format" 1613 assert ( self.
ref[1].df_image == DfImage.S16 ),
"Output image data format must be S16" 1631 def __init__(self, image_in1, lut_in2, image_out3, name="default", target=Target.DEFAULT) :
1632 Node.__init__(self,
"org.khronos.openvx.table_lookup", image_in1, lut_in2, image_out3)
1633 self.
setParams(2, 1, Type.IMAGE, Type.LUT, Type.IMAGE)
1637 def checkParams(self, *param_type_args) :
1638 Node.checkParams(self, *param_type_args)
1640 assert ( self.
ref[0].df_image == self.
ref[2].df_image ),
"Input and Output MUST have same image data format" 1641 assert ( self.
ref[0].df_image == DfImage.U8
or self.
ref[0].df_image == DfImage.S16 ),
"Image data format must be either U8 or S16" 1659 def __init__(self, image_in1, thresh_in2, image_out3, name="default", target=Target.DEFAULT) :
1660 Node.__init__(self,
"org.khronos.openvx.threshold", image_in1, thresh_in2, image_out3)
1661 self.
setParams(2, 1, Type.IMAGE, Type.THRESHOLD, Type.IMAGE)
1665 def checkParams(self, *param_type_args) :
1666 Node.checkParams(self, *param_type_args)
1668 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Input image data format must be U8" 1687 def __init__(self, image_in1, matrix_in2, interp3, image_out4, name="default", target=Target.DEFAULT) :
1688 scalar =
Scalar(Type.ENUM, interp3)
1689 Node.__init__(self,
"org.khronos.openvx.warp_affine", image_in1, matrix_in2, scalar, image_out4)
1690 self.
setParams(3, 1, Type.IMAGE, Type.MATRIX, Type.SCALAR, Type.IMAGE)
1694 def checkParams(self, *param_type_args) :
1695 Node.checkParams(self, *param_type_args)
1697 assert ( self.
ref[0].df_image == self.
ref[3].df_image ),
"Input and Output MUST have same image data format" 1698 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 1699 assert ( self.
ref[1].data_type == Type.FLOAT32 ),
"Matrix data format must be F32" 1718 def __init__(self, image_in1, matrix_in2, interp3, image_out4, name="default", target=Target.DEFAULT) :
1719 scalar =
Scalar(Type.ENUM, interp3)
1720 Node.__init__(self,
"org.khronos.openvx.warp_perspective", image_in1, matrix_in2, scalar, image_out4)
1721 self.
setParams(3, 1, Type.IMAGE, Type.MATRIX, Type.SCALAR, Type.IMAGE)
1725 def checkParams(self, *param_type_args) :
1726 Node.checkParams(self, *param_type_args)
1728 assert ( self.
ref[0].df_image == self.
ref[3].df_image ),
"Input and Output MUST have same image data format" 1729 assert ( self.
ref[0].df_image == DfImage.U8 ),
"Image data format must be U8" 1730 assert ( self.
ref[1].data_type == Type.FLOAT32 ),
"Matrix data format must be F32" def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate an Integral Image node.
def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, alpha_in2, image_inout3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a subtract node.
def __init__(self, image_in1, lut_in2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_out2, interp3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Laplacian Pyramid node.
def __init__(self, image_in1, mean2, stddev3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Mean Standard Deviation node.
def __init__(self, image_in1, pyr_out2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, conv2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def checkParams(self, param_type_args)
Parameter checking function.
def setTarget(self, target)
Specify target on which to run this node.
Node object used to generate an accumulate weighted node.
Node object used to generate an Equalize Histogram node.
Node object used to generate a Gaussian3x3 node.
Node object used to generate a Nonlinear Filter node.
def __init__(self, image_in1, strength_thresh2, dist3, sensitivity4, gradient_size5, block_size6, arr_out7, num_corners8, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate an AND node.
def __init__(self, image_in1, image_in2, image_in3, image_in4, image_out5, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_out2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_in2, policy, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_in2, policy3, image_out4, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Harris Corners node.
def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, strength_thresh2, nonmax3, arr_out4, corners5, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a NOT node.
def __init__(self, function1, image_in2, matrix_in3, image_out4, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate an accumulate square node.
Node object used to generate a Channel Combine node.
def __init__(self, image_in1, matrix_in2, interp3, image_out4, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Warp Affine node.
Node object used to generate a Scale node.
def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate an accumulate node.
Node object used to generate a Sobel3x3 node.
def __init__(self, image_in1, table_in2, policy3, image_out4, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate an XOR node.
def __init__(self, image_in1, matrix_in2, interp3, image_out4, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_in2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_inout2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def setKernelEnumName(self, kernel_enum_name)
Specify kernel enum name to use.
def __init__(self, image_in1, image_out2, policy3, shift4, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Color Convert node.
Node object used to generate a Fast Corners node.
Node object used to generate an Erode3x3 node.
Node object used to generate a Convert Depth node.
Node object used to generate a Gaussian Pyramid node.
Node object used to generate a Laplacian Reconstruct node.
Node object used to generate a Threshold node.
Node object used to generate an absdiff node.
Node object used to generate a Half Scale Gaussian node.
Node object used to generate an OR node.
Node object used to generate a Table Lookup node.
Scalar object (OpenVX equivalent = vx_scalar)
def __init__(self, image_in1, shift_in2, image_inout3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Custom Convolution node.
def __init__(self, kernel, args)
Constructor for base class.
def __init__(self, image_in1, dist2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, image_in2, scale3, overflow4, rounding5, image_out6, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def setParams(self, num_in, num_out, param_type_args)
Specify number of input/output parameters and data object type for each.
def __init__(self, pyr_in1, pyr_in2, array_in3, array_in4, array_out5, termination6, epsilon7, num_iters8, use_initial_estimate9, window_dim10, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, thresh_in2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate an add node.
Node object used to generate a Remap node.
Node object used to generate a Warp Perspective node.
Node object used to generate a Phase node.
def __init__(self, pyr_in1, image_in2, image_out3, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Magnitude node.
Node object used to generate an Optical Flow node.
Node object used to generate a Histogram node.
def __init__(self, image_in1, image_out2, kernel_size, name="default", target=Target.DEFAULT)
Constructor used to create this object.
def __init__(self, image_in1, hyst_in2, grad_size_in3, norm_type_in4, image_out5, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Canny Edge Detector node.
Node object used to generate a Dilate3x3 node.
def __init__(self, image_in1, image_out2, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Multiply node.
def __init__(self, image_in1, min2, max3, array_out4, array_out5, minCnt6, maxCnt7, name="default", target=Target.DEFAULT)
Constructor used to create this object.
Node object used to generate a Box3x3 node.
Node object (OpenVX equivalent = vx_node)
Node object used to generate a Min Max Location node.
def __init__(self, image_in1, pyr_out2, name="default", target=Target.DEFAULT)
Constructor used to create this object.