Home
last modified time | relevance | path

Searched refs:crop_height (Results 1 – 25 of 57) sorted by relevance

123

/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/image/
Drandom_crop_and_resize_op.cc66 int crop_height = 0; in Compute() local
73 RETURN_IF_NOT_OK(GetCropBox(h_in, w_in, &x, &y, &crop_height, &crop_width)); in Compute()
75 …RETURN_IF_NOT_OK(CropAndResize(input[i], &(*output)[i], x, y, crop_height, crop_width, target_heig… in Compute()
98 Status RandomCropAndResizeOp::GetCropBox(int h_in, int w_in, int *x, int *y, int *crop_height, int … in GetCropBox() argument
99 CHECK_FAIL_RETURN_UNEXPECTED(crop_height != nullptr, "crop_height is nullptr."); in GetCropBox()
102 *crop_height = h_in; in GetCropBox()
122 *crop_height = static_cast<int32_t>(std::round(*crop_width / sample_aspect)); in GetCropBox()
128 if (*crop_height <= 0) { in GetCropBox()
129 *crop_height = 1; in GetCropBox()
132 if (*crop_width <= w_in && *crop_height <= h_in) { in GetCropBox()
[all …]
Drandom_crop_and_resize_with_bbox_op.cc39 int crop_height = 0; in Compute() local
42 …RETURN_IF_NOT_OK(RandomCropAndResizeOp::GetCropBox(h_in, w_in, &x, &y, &crop_height, &crop_width)); in Compute()
45 int maxY = y + crop_height; in Compute()
48 …RETURN_IF_NOT_OK(CropAndResize(input[0], &(*output)[0], x, y, crop_height, crop_width, target_heig… in Compute()
52 crop_width, crop_height)); in Compute()
Dcutmix_batch_op.cc43 …::GetCropBox(int height, int width, float lam, int *x, int *y, int *crop_width, int *crop_height) { in GetCropBox() argument
58 *crop_height = std::clamp(y2 - *y, 1, height - 1); in GetCropBox()
108 int x, y, crop_width, crop_height; in ComputeImage() local
123 &x, &y, &crop_width, &crop_height); in ComputeImage()
125 RETURN_IF_NOT_OK(Crop(rand_image, &cropped, x, y, crop_width, crop_height)); in ComputeImage()
126 …RETURN_IF_NOT_OK(MaskWithTensor(cropped, image_i, x, y, crop_width, crop_height, ImageFormat::HWC)… in ComputeImage()
127 *label_lam = kValueOne - (crop_width * crop_height / in ComputeImage()
132 lam, &x, &y, &crop_width, &crop_height); in ComputeImage()
139 RETURN_IF_NOT_OK(Crop(channel, &cropped_channel, x, y, crop_width, crop_height)); in ComputeImage()
146 …RETURN_IF_NOT_OK(MaskWithTensor(cropped, image_i, x, y, crop_width, crop_height, ImageFormat::CHW)… in ComputeImage()
[all …]
Drandom_crop_decode_resize_op.cc36 int crop_height = 0; in Compute() local
53 RETURN_IF_NOT_OK(GetCropBox(h_in, w_in, &x, &y, &crop_height, &crop_width)); in Compute()
56 RETURN_IF_NOT_OK(JpegCropAndDecode(input[i], &decoded_tensor, x, y, crop_width, crop_height)); in Compute()
Drandom_crop_with_bbox_op.h30 RandomCropWithBBoxOp(int32_t crop_height, int32_t crop_width, int32_t pad_top = kDefPadTop,
35 …: RandomCropOp(crop_height, crop_width, pad_top, pad_bottom, pad_left, pad_right, pad_if_needed, p… in RandomCropOp() argument
/third_party/mindspore/tests/ut/cpp/dataset/
Dcrop_op_test.cc36 int crop_height = 18; in TEST_F() local
38 std::unique_ptr<CropOp> op(new CropOp(0, 0, crop_height, crop_width)); in TEST_F()
45 EXPECT_EQ(crop_height, output_tensor_->shape()[0]); in TEST_F()
46 EXPECT_EQ(actual, crop_height * crop_width * 3); in TEST_F()
53 unsigned int crop_height = 10; in TEST_F() local
56 std::unique_ptr<CropOp> op(new CropOp(-10, -10, crop_height, crop_width)); in TEST_F()
66 unsigned int crop_height = 1200000; in TEST_F() local
69 std::unique_ptr<CropOp> op(new CropOp(0, 0, crop_height, crop_width)); in TEST_F()
Drandom_crop_with_bbox_op_test.cc41 unsigned int crop_height = 128; in TEST_F() local
47 new RandomCropWithBBoxOp(crop_height, crop_width, 0, 0, 0, 0, false, BorderType::kConstant)); in TEST_F()
56 EXPECT_EQ(actual, crop_height * crop_width * 3); in TEST_F()
75 unsigned int crop_height = 1280; in TEST_F() local
82 …new RandomCropWithBBoxOp(crop_height, crop_width, 513, 513, 513, 513, false, BorderType::kConstant… in TEST_F()
91 EXPECT_EQ(actual, crop_height * crop_width * 3); in TEST_F()
102 unsigned int crop_height = 1280; in TEST_F() local
108 …que_ptr<RandomCropWithBBoxOp> op(new RandomCropWithBBoxOp(crop_height, crop_width, crop_height * 3… in TEST_F()
109crop_height * 3 + 1, crop_width * 3 + 1, in TEST_F()
Drandom_crop_decode_resize_op_test.cc106 int crop_width, crop_height; in TEST_F() local
118 crop_height = std::round(crop_width * aspect); in TEST_F()
119 if (crop_width <= w && crop_height <= h) { in TEST_F()
128 crop_height = std::round(crop_width * aspect); in TEST_F()
129 crop_height = (crop_height > h) ? h : crop_height; in TEST_F()
133 std::uniform_int_distribution<> rd_y(0, h - crop_height); in TEST_F()
138 crop_and_decode_status = Crop(decoded, &decoded_and_cropped, x, y, crop_width, crop_height); in TEST_F()
139 …status = JpegCropAndDecode(raw_input_tensor_, &cropped_and_decoded, x, y, crop_width, crop_height); in TEST_F()
143 for (int i = 0; i < crop_height; ++i) { in TEST_F()
Drandom_crop_op_test.cc36 unsigned int crop_height = 128; in TEST_F() local
38 …std::unique_ptr<RandomCropOp> op(new RandomCropOp(crop_height, crop_width, 0, 0, 0, 0, false, Bord… in TEST_F()
48 EXPECT_EQ(actual, crop_height * crop_width * 3); in TEST_F()
56 unsigned int crop_height = 1280; in TEST_F() local
62 new RandomCropOp(crop_height, crop_width, 513, 513, 513, 513, false, BorderType::kConstant)); in TEST_F()
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/utils/
Dsoft_vpc.cc99 uint32_t crop_height = down_ - up_ + 1; in CheckParamter() local
105 VPC_CHECK_COND_FAIL_PRINT_RETURN((crop_height >= 6), dpFail, // mini height is 6 in CheckParamter()
106 … "down(%u) - up(%u) + 1 = crop_height(%u) should be >= 6.", down_, up_, crop_height); in CheckParamter()
120 flag = (out_height * 32 >= crop_height); // A maximum of 32x zoom-out in CheckParamter()
124 flag = (crop_height * 16 >= out_height); // Up to 16x magnification in CheckParamter()
340 uint32_t crop_height = (down_ - up_ + 1); in ChipPreProcess() local
343 while ((out_width_ * scalerTap4 < crop_width) || (out_height_ * scalerTap4 < crop_height)) { in ChipPreProcess()
347 crop_height /= yuvCoeffiNum2; in ChipPreProcess()
348 crop_height = AlignDown(crop_height, yuvCoeffiNum2); in ChipPreProcess()
358 crop_height = (down_ - up_ + 1); in ChipPreProcess()
[all …]
/third_party/skia/third_party/externals/libjpeg-turbo/
Ddjpeg.c103 JDIMENSION crop_x, crop_y, crop_width, crop_height; variable
425 if (sscanf(argv[argn], "%u%c%u+%u+%u", &crop_width, &c, &crop_height, in parse_switches()
427 (c != 'X' && c != 'x') || crop_width < 1 || crop_height < 1) in parse_switches()
767 crop_y + crop_height > cinfo.output_height) { in djpeg()
783 cinfo.output_height = crop_height; in djpeg()
793 while (cinfo.output_scanline < crop_y + crop_height) { in djpeg()
800 cinfo.output_height - crop_y - crop_height)) != in djpeg()
801 cinfo.output_height - crop_y - crop_height) { in djpeg()
803 progname, tmp, cinfo.output_height - crop_y - crop_height); in djpeg()
Dtransupp.c1414 if (!jt_read_integer(&spec, &info->crop_height)) in jtransform_parse_crop_spec()
1607 info->crop_height = info->output_height - info->crop_yoffset; in jtransform_request_workspace()
1610 if (info->crop_height > info->output_height) { in jtransform_request_workspace()
1613 info->crop_yoffset >= info->crop_height || in jtransform_request_workspace()
1614 info->crop_yoffset > info->crop_height - info->output_height) in jtransform_request_workspace()
1618 info->crop_height <= 0 || in jtransform_request_workspace()
1619 info->crop_yoffset > info->output_height - info->crop_height) in jtransform_request_workspace()
1632 else if (info->crop_height > info->output_height) /* crop extension */ in jtransform_request_workspace()
1633 yoffset = info->crop_height - info->output_height - info->crop_yoffset; in jtransform_request_workspace()
1635 yoffset = info->output_height - info->crop_height - info->crop_yoffset; in jtransform_request_workspace()
[all …]
/third_party/mindspore/mindspore/ops/operations/
Dimage_ops.py138 crop_height = crop_size_value[0]
141 out_shape = (num_boxes, crop_height, crop_width, depth)
143 out_shape = (num_boxes, x_shape[1], crop_height, crop_width)
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/image/dvpp/
Ddvpp_crop_jpeg_op.h40 …DvppCropJpegOp(int32_t crop_height, int32_t crop_width) : crop_height_(crop_height), crop_width_(c… in DvppCropJpegOp() argument
Ddvpp_decode_resize_crop_jpeg_op.h39 …DvppDecodeResizeCropJpegOp(int32_t crop_height, int32_t crop_width, int32_t resized_height, int32_… in DvppDecodeResizeCropJpegOp() argument
40 : crop_height_(crop_height), in DvppDecodeResizeCropJpegOp()
Ddvpp_crop_jpeg_op.cc115 uint32_t crop_height = CropOut->height; in Compute() local
121 …RETURN_IF_NOT_OK((*output)->SetYuvShape(crop_width, crop_widthStride, crop_height, crop_heightStri… in Compute()
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/
Dcenter_crop_ir.cc37 int32_t crop_height = size_[0]; in Build() local
46 std::shared_ptr<CenterCropOp> tensor_op = std::make_shared<CenterCropOp>(crop_height, crop_width); in Build()
Drandom_crop_decode_resize_ir.cc46 int32_t crop_height = size_[dimension_zero]; in Build() local
61 …std::make_shared<RandomCropDecodeResizeOp>(crop_height, crop_width, scale_lower_bound, scale_upper… in Build()
Drandom_crop_with_bbox_ir.cc72 int32_t crop_height = size_[dimension_zero]; in Build() local
113 …std::make_shared<RandomCropWithBBoxOp>(crop_height, crop_width, pad_top, pad_bottom, pad_left, pad… in Build()
Drandom_crop_ir.cc72 int32_t crop_height = size_[dimension_zero]; in Build() local
112 …auto tensor_op = std::make_shared<RandomCropOp>(crop_height, crop_width, pad_top, pad_bottom, pad_… in Build()
/third_party/libjpeg-turbo/
Ddjpeg.c101 JDIMENSION crop_x, crop_y, crop_width, crop_height; variable
410 if (sscanf(argv[argn], "%u%c%u+%u+%u", &crop_width, &c, &crop_height, in parse_switches()
412 (c != 'X' && c != 'x') || crop_width < 1 || crop_height < 1) in parse_switches()
726 crop_y + crop_height > cinfo.output_height) { in main()
742 cinfo.output_height = crop_height; in main()
748 while (cinfo.output_scanline < crop_y + crop_height) { in main()
753 jpeg_skip_scanlines(&cinfo, cinfo.output_height - crop_y - crop_height); in main()
/third_party/flutter/skia/third_party/externals/libjpeg-turbo/
Ddjpeg.c101 JDIMENSION crop_x, crop_y, crop_width, crop_height; variable
410 if (sscanf(argv[argn], "%u%c%u+%u+%u", &crop_width, &c, &crop_height, in parse_switches()
412 (c != 'X' && c != 'x') || crop_width < 1 || crop_height < 1) in parse_switches()
724 crop_y + crop_height > cinfo.output_height) { in main()
740 cinfo.output_height = crop_height; in main()
746 while (cinfo.output_scanline < crop_y + crop_height) { in main()
751 jpeg_skip_scanlines(&cinfo, cinfo.output_height - crop_y - crop_height); in main()
/third_party/skia/third_party/externals/libwebp/tests/fuzzer/
Dadvanced_api_fuzzer.c42 config.options.crop_height = (int)(config.input.height * (1 - factor)); in LLVMFuzzerTestOneInput()
44 config.options.crop_top = config.input.height - config.options.crop_height; in LLVMFuzzerTestOneInput()
/third_party/mindspore/mindspore/dataset/vision/
Dpy_transforms_util.py324 crop_height, crop_width = size
325 crop_top = int(round((img_height - crop_height) / 2.))
327 return crop(img, crop_top, crop_left, crop_height, crop_width)
752 crop_height, crop_width = size
753 if crop_height > img_height or crop_width > img_width:
755 center = center_crop(img, (crop_height, crop_width))
756 top_left = img.crop((0, 0, crop_width, crop_height))
757 top_right = img.crop((img_width - crop_width, 0, img_width, crop_height))
758 bottom_left = img.crop((0, img_height - crop_height, crop_width, img_height))
759 … bottom_right = img.crop((img_width - crop_width, img_height - crop_height, img_width, img_height))
/third_party/gstreamer/gstplugins_bad/sys/nvcodec/
Dgstnvh264dec.c360 gint crop_width, crop_height; in gst_nv_h264_dec_new_sequence() local
368 crop_height = sps->crop_rect_height; in gst_nv_h264_dec_new_sequence()
371 crop_height = sps->height; in gst_nv_h264_dec_new_sequence()
374 if (self->width != crop_width || self->height != crop_height || in gst_nv_h264_dec_new_sequence()
377 crop_width, crop_height, sps->width, sps->height); in gst_nv_h264_dec_new_sequence()
379 self->height = crop_height; in gst_nv_h264_dec_new_sequence()

123