参考例程get_operator_info。
get_opencl_operators这里可以查看到所有支持gpu加速的算子。
支持的算子列表:
crop_rectangle1,deviation_image,mean_image,points_harris,gray_opening_shape,
gray_dilation_shape,gray_closing_rect,gray_erosion_rect,convol_image,sobel_amp,
edges_image,rgb1_to_gray,trans_to_rgb,sub_image,add_image,
invert_image,affine_trans_image_size,zoom_image_factor,mirror_image, rotate_image,polar_trans_image_ext,
gray_histo,change_radial_distortion_image,crop_part,median_rect,binomial_filter,linear_trans_color,
convert_image_type,sobel_dir,highpass_image,derivate_gauss,rgb3_to_gray,
abs_diff_image,scale_image,div_image,abs_image,min_image,
projective_trans_image_size,rotate_image,map_image,crop_domain,texture_laws,
median_image,gauss_image,gray_closing_shape,gray_erosion_shape,gray_range_rect,
gray_opening_rect,gray_dilation_rect,lines_gauss,edges_sub_pix,cfa_to_rgb,
trans_from_rgb,sqrt_image,mult_image,max_image,projective_trans_image,
affine_trans_image,zoom_image_size,polar_trans_image_inv,polar_trans_image,image_to_world_plane
要查询具体的某个算子是否支持GPU加速,可以使用get_operator_info查询,
如下图所示:'surface_normals_object_model_3d'是none,不支持,'affine_trans_image'是opencl,代表支持。
测试算子使用gpu的加速效果可以参考例程:compute_devices。
另外,get_operator_name可以获得halcon所有的算子名称。