Home
last modified time | relevance | path

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

123

/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/pymodules/its/
Dimage.py104 img = numpy.ndarray(shape=(2*h*w*4,), dtype='<f', buffer=cap["data"])
105 analysis_image = img.reshape(2,h,w,4)
132 def unpack_raw10_image(img): argument
144 if img.shape[1] % 5 != 0:
146 w = img.shape[1]*4/5
147 h = img.shape[0]
149 msbs = numpy.delete(img, numpy.s_[4::5], 1)
154 lsbs = img[::, 4::5].reshape(h,w/4)
186 def unpack_raw12_image(img): argument
198 if img.shape[1] % 3 != 0:
[all …]
Dcv2image.py60 def scale_img(img, scale=1.0): argument
62 dim = (int(img.shape[1]*scale), int(img.shape[0]*scale))
63 return cv2.resize(img.copy(), dim, interpolation=cv2.INTER_AREA)
66 def gray_scale_img(img): argument
68 if len(img.shape) == 2:
69 img_gray = img.copy()
70 elif len(img.shape) == 3:
71 if img.shape[2] == 1:
72 img_gray = img[:, :, 0].copy()
74 img_gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
[all …]
/cts/apps/CameraITS/tests/scene1/
Dtest_crop_region_raw.py89 img = its.image.convert_capture_to_rgb_image(cap, props=props)
90 its.image.write_image(img, "%s_%s.jpg" % (NAME, s))
91 imgs[s] = img
117 for s,img in imgs.iteritems():
118 h,w,ch = img.shape
120 img = img.reshape(h/2,2,w/2,2,3).mean(3).mean(1)
121 img = img.reshape(h/2,w/2,3)
122 imgs2[s] = img
134 for s,img in imgs2.iteritems():
135 its.image.write_image(img, "%s_comp_%s.jpg" % (NAME, s))
Dtest_yuv_jpeg_all.py54 img = its.image.convert_capture_to_rgb_image(cap)
55 its.image.write_image(img, "%s_yuv_w%d_h%d.jpg"%(
57 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
68 img = its.image.decompress_jpeg_to_rgb_image(cap["data"])
69 its.image.write_image(img, "%s_jpg_w%d_h%d.jpg"%(
71 assert img.shape[0] == size[1]
72 assert img.shape[1] == size[0]
73 assert img.shape[2] == 3
75 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_yuv_plus_jpeg.py50 img = its.image.convert_capture_to_rgb_image(cap_yuv, True)
51 its.image.write_image(img, "%s_yuv.jpg" % (NAME))
52 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
55 img = its.image.convert_capture_to_rgb_image(cap_jpeg, True)
56 its.image.write_image(img, "%s_jpeg.jpg" % (NAME))
57 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_yuv_plus_raw10.py53 img = its.image.convert_capture_to_rgb_image(cap_yuv)
54 its.image.write_image(img, "%s_shading=%d_yuv.jpg" % (NAME, mode), True)
55 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
60 img = its.image.convert_capture_to_rgb_image(cap_raw, props=props)
61 its.image.write_image(img, "%s_shading=%d_raw.jpg" % (NAME, mode), True)
62 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_yuv_plus_raw12.py52 img = its.image.convert_capture_to_rgb_image(cap_yuv)
53 its.image.write_image(img, "%s_yuv.jpg" % (NAME), True)
54 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
59 img = its.image.convert_capture_to_rgb_image(cap_raw, props=props)
60 its.image.write_image(img, "%s_raw.jpg" % (NAME), True)
61 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_yuv_plus_raw.py52 img = its.image.convert_capture_to_rgb_image(cap_yuv)
53 its.image.write_image(img, "%s_shading=%d_yuv.jpg" % (NAME, mode), True)
54 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
59 img = its.image.convert_capture_to_rgb_image(cap_raw, props=props)
60 its.image.write_image(img, "%s_shading=%d_raw.jpg" % (NAME, mode), True)
61 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_jpeg.py45 img = its.image.convert_capture_to_rgb_image(cap)
46 its.image.write_image(img, "%s_fmt=yuv.jpg" % (NAME))
47 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
55 img = its.image.decompress_jpeg_to_rgb_image(cap["data"])
56 its.image.write_image(img, "%s_fmt=jpg.jpg" % (NAME))
57 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_tonemap_sequence.py58 img = its.image.convert_capture_to_rgb_image(cap)
59 its.image.write_image(img, "%s_i=%d.jpg" % (NAME, i))
60 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
67 img = its.image.convert_capture_to_rgb_image(cap)
68 its.image.write_image(img, "%s_i=%d.jpg" % (NAME, i))
69 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_black_white.py54 img = its.image.convert_capture_to_rgb_image(cap)
55 its.image.write_image(img, "%s_black.jpg" % NAME)
56 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
73 img = its.image.convert_capture_to_rgb_image(cap)
74 its.image.write_image(img, "%s_white.jpg" % NAME)
75 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_param_tonemap_mode.py73 img = its.image.convert_capture_to_rgb_image(cap)
75 img, "%s_n=%d.jpg" %(NAME, n))
76 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
97 img = its.image.convert_capture_to_rgb_image(cap)
99 img, "%s_size=%02d.jpg" %(NAME, size))
100 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_linearity.py83 img = its.image.convert_capture_to_rgb_image(cap)
85 img, '%s_sens=%04d.jpg' % (NAME, sens))
86 img = its.image.apply_lut_to_image(img, inv_gamma_lut[1::2] * LM1)
87 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_reprocess_noise_reduction.py79 img = its.image.decompress_jpeg_to_rgb_image(cap["data"])
80 its.image.write_image(img, "%s_low_gain_fmt=jpg.jpg" % NAME)
81 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
102 img = its.image.decompress_jpeg_to_rgb_image(
106 img, "%s_high_gain_nr=%d_fmt=jpg.jpg" % (
111 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_channel_saturation.py51 img = its.image.convert_capture_to_rgb_image(cap)
52 its.image.write_image(img, '%s.jpg' % NAME)
53 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
Dtest_locked_burst.py63 img = its.image.convert_capture_to_rgb_image(cap)
64 its.image.write_image(img, '%s_frame%d.jpg'%(NAME, i))
65 tile = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
/cts/apps/CameraITS/tests/scene4/
Dtest_aspect_ratio_and_crop.py146 img = its.image.convert_capture_to_rgb_image(cap, props=props)
149 _, _, circle_size = measure_aspect_ratio(img, False, img_name, True)
361 img = its.image.convert_capture_to_rgb_image(frm_iter)
370 img = cv2.undistort(img, k_scale, opencv_dist)
375 img, raw_avlb, img_name, debug)
394 its.image.write_image(img/255, img_name, True)
412 its.image.write_image(img/255, img_name, True)
450 its.image.write_image(img/255, img_name, True)
495 def measure_aspect_ratio(img, raw_avlb, img_name, debug): argument
509 size = img.shape
[all …]
Dtest_multi_camera_alignment.py326 img = its.image.convert_capture_to_rgb_image(
332 its.image.write_image(img, '%s_%s_%s.jpg' % (NAME, fmt, i))
335 img *= 255
339 img = cv2.resize(img.astype(np.uint8), None, fx=2, fy=2)
341 img = img.astype(np.uint8)
389 its.image.write_image(img/255.0, '%s_%s_%s.jpg' % (
391 img = cv2.undistort(img, k[i], cv2_distort)
392 its.image.write_image(img/255.0, '%s_%s_correct_%s.jpg' % (
396 circle[i] = find_circle(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY),
/cts/apps/CameraITS/tests/scene0/
Dtest_test_patterns.py75 img = its.image.convert_capture_to_rgb_image(cap, props=props)
78 img = np.fliplr(img)
80 tile = its.image.get_image_patch(img, float(i)/num_bars+delta,
138 img = its.image.convert_capture_to_rgb_image(cap, props=props)
141 its.image.write_image(img, '%s_%d.jpg' % (NAME, pattern), True)
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DSplashscreenTests.java52 private void assertColors(Bitmap img, Rect bounds, int primaryColor, in assertColors() argument
60 assertThat(x, lessThan(img.getWidth())); in assertColors()
61 assertThat(y, lessThan(img.getHeight())); in assertColors()
62 final int color = img.getPixel(x, y); in assertColors()
/cts/apps/CameraITS/tests/inprog/
Dtest_blc_lsc.py74 img = its.image.convert_capture_to_rgb_image(cap)
75 its.image.write_image(img, "%s_i=%d.jpg"%(NAME, i))
77 tile_center = its.image.get_image_patch(img, 0.45, 0.45, 0.1, 0.1)
83 tile_corner = its.image.get_image_patch(img, 0.0, 0.0, 0.1, 0.1)
/cts/apps/CameraITS/tests/scene3/
Dtest_lens_position.py75 chart.img = its.image.normalize_img(its.image.get_image_patch(
77 its.image.write_image(chart.img, '%s_stat_i=%d_chart.jpg' % (NAME, i))
79 chart.img)
102 chart.img = its.image.normalize_img(its.image.get_image_patch(
104 its.image.write_image(chart.img, '%s_move_i=%d_chart.jpg' % (NAME, i))
106 chart.img)
/cts/tests/camera/src/android/hardware/camera2/cts/
DImageReaderTest.java939 Image img = null; in invalidAccessTestAfterClose() local
950 img = mReader.acquireNextImage(); in invalidAccessTestAfterClose()
951 Plane firstPlane = img.getPlanes()[0]; in invalidAccessTestAfterClose()
953 img.close(); in invalidAccessTestAfterClose()
955 imageInvalidAccessTestAfterClose(img, firstPlane, buffer); in invalidAccessTestAfterClose()
967 Image img = null; in discardFreeBuffersTestByCamera() local
1103 Image img = mReader.acquireNextImage(); in bufferFormatLongProcessingTimeTestByCamera() local
1104 assertNotNull("Unable to acquire next image", img); in bufferFormatLongProcessingTimeTestByCamera()
1105 CameraTestUtils.validateImage(img, sz.getWidth(), sz.getHeight(), format, in bufferFormatLongProcessingTimeTestByCamera()
1134 img.close(); in bufferFormatLongProcessingTimeTestByCamera()
[all …]
/cts/apps/CameraITS/tools/
Dconvert_yuv_to_jpg.py32 img = its.image.load_yuv420_to_rgb_image(fname, w,h, layout=layout)
33 its.image.write_image(img, fname.replace(".yuv",".jpg"), False)

123