Home
last modified time | relevance | path

Searched refs:img (Results 1 – 25 of 79) sorted by relevance

1234

/cts/tests/tests/media/libmediandkjni/
Dcodec-utils-jni.cpp176 NativeImage *img = new NativeImage; in getNativeImage() local
177 img->format = env->CallIntMethod(image, gFields.methodFormat); in getNativeImage()
178 img->width = env->CallIntMethod(image, gFields.methodWidth); in getNativeImage()
179 img->height = env->CallIntMethod(image, gFields.methodHeight); in getNativeImage()
180 img->timestamp = env->CallLongMethod(image, gFields.methodTimestamp); in getNativeImage()
188 img->crop.left = env->GetIntField(area, gFields.fieldLeft); in getNativeImage()
189 img->crop.top = env->GetIntField(area, gFields.fieldTop); in getNativeImage()
190 img->crop.right = env->GetIntField(area, gFields.fieldRight); in getNativeImage()
191 img->crop.bottom = env->GetIntField(area, gFields.fieldBottom); in getNativeImage()
192 if (img->crop.right == 0 && img->crop.bottom == 0) { in getNativeImage()
[all …]
/cts/apps/CameraITS/utils/
Dimage_processing_utils.py116 def unpack_raw10_image(img): argument
128 if img.shape[1] % 5 != 0:
130 w = img.shape[1] * 4 // 5
131 h = img.shape[0]
133 msbs = numpy.delete(img, numpy.s_[4::5], 1)
138 lsbs = img[::, 4::5].reshape(h, w // 4)
169 def unpack_raw12_image(img): argument
181 if img.shape[1] % 3 != 0:
183 w = img.shape[1] * 2 // 3
184 h = img.shape[0]
[all …]
Dopencv_processing_utils.py72 def find_all_contours(img): argument
76 _, contours, _ = cv2.findContours(img, cv2.RETR_TREE,
79 contours, _ = cv2.findContours(img, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
113 def scale_img(img, scale=1.0): argument
115 dim = (int(img.shape[1] * scale), int(img.shape[0] * scale))
116 return cv2.resize(img.copy(), dim, interpolation=cv2.INTER_AREA)
119 def gray_scale_img(img): argument
121 if len(img.shape) == 2:
122 img_gray = img.copy()
123 elif len(img.shape) == 3:
[all …]
/cts/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/
DRedactUriDeviceTest.java127 final File img = stageImageFileWithMetadata(IMAGE_FILE_NAME); in testRedactedUri_single() local
130 final Uri uri = MediaStore.scanFile(getContentResolver(), img); in testRedactedUri_single()
134 img.delete(); in testRedactedUri_single()
165 final File img = stageImageFileWithMetadata(IMAGE_FILE_NAME); in testQueryOnRedactionUri() local
166 final Uri uri = MediaStore.scanFile(getContentResolver(), img); in testQueryOnRedactionUri()
234 img.delete(); in testQueryOnRedactionUri()
244 final File img = stageImageFileWithMetadata(IMAGE_FILE_NAME); in testSharedRedactedUri_openFdForWrite() local
246 Uri redactedUri = shareAndGetRedactedUri(img, APP_B_NO_PERMS); in testSharedRedactedUri_openFdForWrite()
250 img.delete(); in testSharedRedactedUri_openFdForWrite()
261 final File img = stageImageFileWithMetadata(IMAGE_FILE_NAME); in testSharedRedactedUri_openFdForRead() local
[all …]
/cts/apps/CameraITS/tests/scene1_1/
Dtest_crop_region_raw.py110 img = image_processing_utils.convert_capture_to_rgb_image(cap,
113 img, '%s_%s.jpg' % (os.path.join(log_path, NAME), s))
114 imgs[s] = img
147 for s, img in imgs.items():
148 h, w, _ = img.shape
150 img = img.reshape(h//2, 2, w//2, 2, 3).mean(3).mean(1)
151 img = img.reshape(h//2, w//2, 3)
152 imgs2[s] = img
168 for s, img in imgs2.items():
170 img, '%s_comp_%s.jpg' % (os.path.join(log_path, NAME), s))
Dtest_linearity.py97 img = image_processing_utils.convert_capture_to_rgb_image(cap)
100 image_processing_utils.write_image(img, img_name)
101 img = image_processing_utils.apply_lut_to_image(
102 img, INV_GAMMA_LUT[1::2] * L)
104 img, PATCH_X, PATCH_Y, PATCH_W, PATCH_H)
/cts/apps/CameraITS/tests/scene1_2/
Dtest_yuv_plus_raw12.py79 img = image_processing_utils.convert_capture_to_rgb_image(cap_yuv)
80 image_processing_utils.write_image(img, '%s_shading=%d_yuv.jpg' % (
83 img, PATCH_X, PATCH_Y, PATCH_W, PATCH_H)
88 img = image_processing_utils.convert_capture_to_rgb_image(
90 image_processing_utils.write_image(img, '%s_shading=%d_raw12.jpg' % (
93 img, PATCH_X, PATCH_Y, PATCH_W, PATCH_H)
Dtest_yuv_plus_raw.py79 img = image_processing_utils.convert_capture_to_rgb_image(cap_yuv)
80 image_processing_utils.write_image(img, '%s_shading=%d_yuv.jpg' % (
83 img, PATCH_X, PATCH_Y, PATCH_W, PATCH_H)
88 img = image_processing_utils.convert_capture_to_rgb_image(
90 image_processing_utils.write_image(img, '%s_shading=%d_raw.jpg' % (
93 img, PATCH_X, PATCH_Y, PATCH_W, PATCH_H)
Dtest_yuv_plus_raw10.py79 img = image_processing_utils.convert_capture_to_rgb_image(cap_yuv)
80 image_processing_utils.write_image(img, '%s_shading=%d_yuv.jpg' % (
83 img, PATCH_X, PATCH_Y, PATCH_W, PATCH_H)
88 img = image_processing_utils.convert_capture_to_rgb_image(
90 image_processing_utils.write_image(img, '%s_shading=%d_raw10.jpg' % (
93 img, PATCH_X, PATCH_Y, PATCH_W, PATCH_H)
Dtest_yuv_jpeg_all.py56 img = image_processing_utils.decompress_jpeg_to_rgb_image(cap['data'])
59 img = image_processing_utils.convert_capture_to_rgb_image(cap)
64 image_processing_utils.write_image(img, '%s_%s_w%d_h%d.jpg'%(
67 assert img.shape[0] == size[1]
68 assert img.shape[1] == size[0]
69 assert img.shape[2] == 3
71 img, PATCH_X, PATCH_Y, PATCH_W, PATCH_H)
Dtest_yuv_plus_jpeg.py47 img = image_processing_utils.convert_capture_to_rgb_image(cap, True)
49 img, '%s_%s.jpg' % (os.path.join(log_path, NAME), img_name))
51 img, PATCH_X, PATCH_Y, PATCH_W, PATCH_H)
/cts/apps/CameraITS/tests/scene2_c/
Dtest_num_faces.py37 def draw_face_rectangles(img, faces, aw, ah): argument
53 cv2.rectangle(img, top_left, bot_rght, (0, 1, 0), 2)
54 return img
103 img = image_processing_utils.convert_capture_to_rgb_image(
109 img = draw_face_rectangles(img, faces, aw, ah)
113 image_processing_utils.write_image(img, img_name)
/cts/apps/CameraITS/tests/scene2_d/
Dtest_num_faces.py37 def draw_face_rectangles(img, faces, aw, ah): argument
53 cv2.rectangle(img, top_left, bot_rght, (0, 1, 0), 2)
54 return img
103 img = image_processing_utils.convert_capture_to_rgb_image(
109 img = draw_face_rectangles(img, faces, aw, ah)
113 image_processing_utils.write_image(img, img_name)
/cts/apps/CameraITS/tests/scene2_e/
Dtest_num_faces.py37 def draw_face_rectangles(img, faces, aw, ah): argument
53 cv2.rectangle(img, top_left, bot_rght, (0, 1, 0), 2)
54 return img
103 img = image_processing_utils.convert_capture_to_rgb_image(
109 img = draw_face_rectangles(img, faces, aw, ah)
113 image_processing_utils.write_image(img, img_name)
/cts/apps/CameraITS/tests/scene2_b/
Dtest_num_faces.py37 def draw_face_rectangles(img, faces, aw, ah): argument
53 cv2.rectangle(img, top_left, bot_rght, (0, 1, 0), 2)
54 return img
103 img = image_processing_utils.convert_capture_to_rgb_image(
109 img = draw_face_rectangles(img, faces, aw, ah)
113 image_processing_utils.write_image(img, img_name)
/cts/apps/CameraITS/tests/scene2_a/
Dtest_num_faces.py37 def draw_face_rectangles(img, faces, aw, ah): argument
53 cv2.rectangle(img, top_left, bot_rght, (0, 1, 0), 2)
54 return img
103 img = image_processing_utils.convert_capture_to_rgb_image(
109 img = draw_face_rectangles(img, faces, aw, ah)
113 image_processing_utils.write_image(img, img_name)
/cts/apps/CameraITS/tests/scene6/
Dtest_zoom.py129 def find_center_circle(img, img_name, color, min_area, debug): argument
152 gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
190 cv2.drawMarker(img, (m_x, m_y), LINE_COLOR, markerType=cv2.MARKER_CROSS,
196 cv2.circle(img, center_i, radius_i, LINE_COLOR, LINE_THICKNESS)
197 image_processing_utils.write_image(img / 255.0, img_name)
250 img = image_processing_utils.convert_capture_to_rgb_image(
254 image_processing_utils.write_image(img, img_name)
261 img *= 255
262 img = img.astype(np.uint8)
266 img, img_name, CIRCLE_COLOR,
/cts/apps/CameraITS/tests/scene0/
Dtest_solid_color_test_pattern.py74 def check_solid_color(img, exp_values, color, fmt): argument
100 rgb_means = [m*255 for m in image_processing_utils.compute_image_means(img)]
103 image_processing_utils.compute_image_variances(img)]
230 img = image_processing_utils.convert_capture_to_rgb_image(
233 img = image_processing_utils.convert_capture_to_rgb_image(
237 img,
244 img, color['RGB'], color['color'], fmt['format'])
247 img, _BLACK['RGB'], _BLACK['color'], fmt['format'])
Dtest_test_patterns.py82 img = image_processing_utils.convert_capture_to_rgb_image(cap, props=props)
85 img = np.fliplr(img)
87 tile = image_processing_utils.get_image_patch(img,
149 img = image_processing_utils.convert_capture_to_rgb_image(
152 image_processing_utils.write_image(img, '%s_%d.jpg' % (name, pattern),
Dtest_burst_capture.py51 img = image_processing_utils.convert_capture_to_rgb_image(
56 image_processing_utils.write_image(img, img_name)
/cts/tests/camera/src/android/hardware/camera2/cts/
DMultiResolutionImageReaderTest.java470 Image img = imgAndStreamInfo.image; in validateImage() local
473 " the expected width %d", img.getWidth(), streamInfoForImage.getWidth()), in validateImage()
474 img.getWidth(), streamInfoForImage.getWidth()); in validateImage()
476 " the expected height %d", img.getHeight(), streamInfoForImage.getHeight()), in validateImage()
477 img.getHeight(), streamInfoForImage.getHeight()); in validateImage()
480 CameraTestUtils.validateImage(img, img.getWidth(), img.getHeight(), format, in validateImage()
484 "expected format %d", img.getFormat(), format), format, img.getFormat()); in validateImage()
493 WAIT_FOR_RESULT_TIMEOUT_MS, img.getTimestamp()); in validateImage()
510 && streamInfo.getWidth() == img.getWidth() in validateImage()
511 && streamInfo.getHeight() == img.getHeight()) { in validateImage()
[all …]
/cts/apps/CameraITS/tests/scene4/
Dtest_multi_camera_alignment.py62 img = image_processing_utils.convert_capture_to_rgb_image(cap, props=props)
66 image_processing_utils.write_image(img, img_name)
69 img *= 255
70 img = img.astype(np.uint8)
74 img = cv2.resize(img, None, fx=2, fy=2)
76 return img
222 img = image_processing_utils.convert_capture_to_rgb_image(
224 image_processing_utils.write_image(img, '%s_%s_%s.jpg' % (
473 img = convert_cap_and_prep_img(
511 image_processing_utils.write_image(img/255, '%s_%s_%s.jpg' % (
[all …]
Dtest_aspect_ratio_and_crop.py281 img = image_processing_utils.convert_capture_to_rgb_image(cap, props)
282 img *= 255 # cv2 works with [0,255] images.
286 img, img_name, _CIRCLE_MIN_AREA, _CIRCLE_COLOR)
287 opencv_processing_utils.append_circle_center_to_img(circle_jpg, img,
543 img = image_processing_utils.convert_capture_to_rgb_image(cap)
544 img *= 255 # cv2 uses [0, 255].
548 img, img_name, _CIRCLE_MIN_AREA, _CIRCLE_COLOR)
550 opencv_processing_utils.append_circle_center_to_img(circle, img,
554 img /= 255 # image_processing_utils uses [0, 1].
559 image_processing_utils.write_image(img, img_name, True)
[all …]
/cts/apps/CameraITS/tests/inprog/
Dtest_param_edge_mode.py43 img = its.image.convert_capture_to_rgb_image(cap)
44 its.image.write_image(img, "%s_mode=%d.jpg" % (NAME, e))
/cts/apps/CtsVerifier/jni/verifier/
Dcom_android_cts_verifier_camera_StatsImage.cpp30 jbyteArray img, in com_android_cts_verifier_camera_its_computeStatsImage() argument
37 int bufSize = (int)(env->GetArrayLength(img)); in com_android_cts_verifier_camera_its_computeStatsImage()
38 unsigned char *buf = (unsigned char*)env->GetByteArrayElements(img, /*is_copy*/NULL); in com_android_cts_verifier_camera_its_computeStatsImage()

1234