public static extern ErrorType draw_fhog_object_detector_scan_fhog_pyramid(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj, uint weightIndex, int cellDrawSize, out IntPtr out_matrix);
public static extern ErrorType object_detector_scan_fhog_pyramid_serialize(byte[] fileName, int filepathLength, PyramidType pyramidType, uint pyramidRate, FHogFeatureExtractorType featureExtractorType, IntPtr obj, out IntPtr errorMessage);
public static extern ErrorType object_detector_scan_fhog_pyramid_operator(PyramidType pyramidType, uint pyramidRate, FHogFeatureExtractorType featureExtractorType, IntPtr detector, MatrixElementType elementType, IntPtr matrix, out IntPtr dets);
public void CreatePyramid(Player p, byte type, PyramidType pyramidType, ushort radius, ushort verticalExpansion) { List<Pos> buffer = new List<Pos>(); Level level = p.level; ushort cx = (ushort)(p.pos[0] / 32), cy = (ushort)((p.pos[1] / 32) - 1), cz = (ushort)(p.pos[2] / 32); ushort sx = (ushort)(cx - radius - 1), sy = cy, sz = (ushort)(cz - radius - 1), ex = (ushort)(cx + radius + 1), ey = (ushort)(cy + (radius * verticalExpansion)), ez = (ushort)(cz + radius + 1); Pos pos = new Pos(); pos.x = cx; pos.y = ey; pos.z = cz; for (ushort iy = 0; iy < verticalExpansion; iy++) for (ushort ix = cx; ix > (ushort)(cx - 2); ix--) for (ushort iz = cz; iz > (ushort)(cz - 2); iz--) if (level.GetTile(ix, (ushort)(ey + iy), iz) != type) { pos.x = ix; pos.y = (ushort)(ey + iy); pos.z = iz; buffer.Add(pos); } int temp = 0; if (pyramidType == PyramidType.Hollow) { for (ushort y = sy; y < ey; y++) { for (ushort x = sx; x < ex; x++) for (ushort z = sz; z < ez; z++) if (x == sx || x == (ushort)(ex - 1) || z == sz || z == (ushort)(ez - 1)) if (level.GetTile(x, y, z) != type) { pos.x = x; pos.y = y; pos.z = z; buffer.Add(pos); } temp++; if (temp == verticalExpansion) { temp = 0; sx += 1; ex -= 1; sz += 1; ez -= 1; } } } else if (pyramidType == PyramidType.Solid) { for (ushort y = sy; y < ey; y++) { for (ushort x = sx; x < ex; x++) for (ushort z = sz; z < ez; z++) if (level.GetTile(x, y, z) != type) { pos.x = x; pos.y = y; pos.z = z; buffer.Add(pos); } temp++; if (temp == verticalExpansion) { temp = 0; sx += 1; ex -= 1; sz += 1; ez -= 1; } } } Execute(p, buffer, type); }
public static extern ErrorType create_tiled_pyramid(MatrixElementType img_type, IntPtr img, PyramidType pyramidType, uint pyramidRate, uint padding, uint outer_padding, out IntPtr out_img, out IntPtr rects);
public static extern ErrorType input_rgb_image_pyramid_to_tensor(IntPtr input, PyramidType pyramidType, uint pyramidRate, MatrixElementType elementType, IntPtr matrix, int templateRows, int templateColumns, uint iteratorCount, IntPtr tensor);
public static extern ErrorType scan_fhog_pyramid_evaluate_detectors(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr[] objects, int objects_num, MatrixElementType elementType, IntPtr image, double adjust_threshold, out IntPtr ret);
public static extern ErrorType structural_object_detection_trainer_scan_fhog_pyramid_be_verbose(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj);
public static extern void object_detector_scan_fhog_pyramid_delete(PyramidType pyramidType, uint pyramidRate, FHogFeatureExtractorType featureExtractorType, IntPtr detector);
public static extern ErrorType object_detector_scan_fhog_pyramid_new(PyramidType pyramidType, uint pyramidRate, FHogFeatureExtractorType featureExtractorType, out IntPtr detector);
public static extern ErrorType cross_validate_object_detection_trainer_scan_fhog_pyramid_test_object_detection_function_rectangle(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj, MatrixElementType elementType, IntPtr images, IntPtr objects, out IntPtr matrix);
public Pyramid(PyramidType type, int firstVertex) { this.type = type; Top = firstVertex; Count = 1; }
public static extern ErrorType scan_fhog_pyramid_set_nuclear_norm_regularization_strength(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj, double strength);
public static extern ErrorType input_rgb_image_pyramid_image_space_to_tensor_space(IntPtr input, PyramidType pyramidType, uint pyramidRate, IntPtr data, double scale, IntPtr r, out IntPtr rect);
public static extern ErrorType input_rgb_image_pyramid_new(PyramidType pyramidType, uint pyramidRate, out IntPtr ret);
public static extern void structural_object_detection_trainer_scan_fhog_pyramid_delete(PyramidType pyramidType, uint pyramidRate, FHogFeatureExtractorType featureExtractorType, IntPtr pyramid);
public static extern ErrorType scan_fhog_pyramid_num_separable_filters(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj, uint weight_index, out uint ret);
public static extern ErrorType scan_fhog_pyramid_threshold_filter_singular_values(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj, double thresh, uint weight_index, out IntPtr ret);
public void CreatePyramid(Player p, byte type, PyramidType pyramidType, ushort radius, ushort verticalExpansion) { List <Pos> buffer = new List <Pos>(); Level level = p.level; ushort cx = (ushort)(p.pos[0] / 32), cy = (ushort)((p.pos[1] / 32) - 1), cz = (ushort)(p.pos[2] / 32); ushort sx = (ushort)(cx - radius - 1), sy = cy, sz = (ushort)(cz - radius - 1), ex = (ushort)(cx + radius + 1), ey = (ushort)(cy + (radius * verticalExpansion)), ez = (ushort)(cz + radius + 1); Pos pos = new Pos(); pos.x = cx; pos.y = ey; pos.z = cz; for (ushort iy = 0; iy < verticalExpansion; iy++) { for (ushort ix = cx; ix > (ushort)(cx - 2); ix--) { for (ushort iz = cz; iz > (ushort)(cz - 2); iz--) { if (level.GetTile(ix, (ushort)(ey + iy), iz) != type) { pos.x = ix; pos.y = (ushort)(ey + iy); pos.z = iz; buffer.Add(pos); } } } } int temp = 0; if (pyramidType == PyramidType.Hollow) { for (ushort y = sy; y < ey; y++) { for (ushort x = sx; x < ex; x++) { for (ushort z = sz; z < ez; z++) { if (x == sx || x == (ushort)(ex - 1) || z == sz || z == (ushort)(ez - 1)) { if (level.GetTile(x, y, z) != type) { pos.x = x; pos.y = y; pos.z = z; buffer.Add(pos); } } } } temp++; if (temp == verticalExpansion) { temp = 0; sx += 1; ex -= 1; sz += 1; ez -= 1; } } } else if (pyramidType == PyramidType.Solid) { for (ushort y = sy; y < ey; y++) { for (ushort x = sx; x < ex; x++) { for (ushort z = sz; z < ez; z++) { if (level.GetTile(x, y, z) != type) { pos.x = x; pos.y = y; pos.z = z; buffer.Add(pos); } } } temp++; if (temp == verticalExpansion) { temp = 0; sx += 1; ex -= 1; sz += 1; ez -= 1; } } } Execute(p, buffer, type); }
public static extern ErrorType scan_fhog_pyramid_new(PyramidType pyramidType, uint pyramidRate, FHogFeatureExtractorType featureExtractorType, out IntPtr pyramid);
public static extern ErrorType structural_object_detection_trainer_scan_fhog_pyramid_set_epsilon(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj, double epsilon);
public static extern ErrorType structural_object_detection_trainer_scan_fhog_pyramid_set_num_threads(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj, uint thread);
public static extern void input_rgb_image_pyramid_delete(IntPtr input, PyramidType pyramidType, uint pyramidRate);
public static extern ErrorType structural_object_detection_trainer_scan_fhog_pyramid_train_rectangle(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj, MatrixElementType elementType, IntPtr images, IntPtr objects, out IntPtr detector);
public static extern ErrorType input_rgb_image_pyramid_get_pyramid_outer_padding(IntPtr input, PyramidType pyramidType, uint pyramidRate, out uint pyramidOuterPadding);
public static extern ErrorType structural_object_detection_trainer_scan_fhog_pyramid_new(PyramidType pyramidType, uint pyramidRate, FHogFeatureExtractorType featureExtractorType, IntPtr scanner, out IntPtr pyramid);
public static extern ErrorType pyramid_up_pyramid_matrix(PyramidType pyramid_type, uint pyramid_rate, MatrixElementType elementType, IntPtr image);
public static extern ErrorType scan_fhog_pyramid_set_detection_window_size(PyramidType pyramid_type, uint pyramid_rate, FHogFeatureExtractorType extractor_type, IntPtr obj, uint width, uint height);