Home | History | Annotate | Download | only in tests

Lines Matching refs:image

23 # > pydoc its.image
25 import its.image
36 # the image processing code, and images are represented as numpy arrays.
73 print "Captured image width:", cap["width"]
74 print "Captured image height:", cap["height"]
77 # The captured image is YUV420. Convert to RGB, and save as a file.
78 rgbimg = its.image.convert_capture_to_rgb_image(cap)
79 its.image.write_image(rgbimg, "%s_rgb_1.jpg" % (NAME))
83 yimg,uimg,vimg = its.image.convert_capture_to_yuv_planes(cap)
84 its.image.write_image(yimg, "%s_y_plane_1.jpg" % (NAME))
85 its.image.write_image(uimg, "%s_u_plane_1.jpg" % (NAME))
86 its.image.write_image(vimg, "%s_v_plane_1.jpg" % (NAME))
88 # Run 3A on the device. In this case, just use the entire image as the
122 rgbimg = its.image.convert_capture_to_rgb_image(cap)
123 its.image.write_image(rgbimg, "%s_rgb_2.jpg" % (NAME))
131 # helper functions in its.image deal with the packed YUV420 and other
134 # Print the dimensions of the image, and the top-left pixel value,
136 print "RGB image dimensions:", rgbimg.shape
137 print "RGB image top-left pixel:", rgbimg[0,0]
139 # Grab a center tile from the image; this returns a new image. Save
140 # this tile image. In this case, the tile is the middle 10% x 10%
142 tile = its.image.get_image_patch(rgbimg, 0.45, 0.45, 0.1, 0.1)
143 its.image.write_image(tile, "%s_rgb_2_tile.jpg" % (NAME))
145 # Compute the mean values of the center tile image.
146 rgb_means = its.image.compute_image_means(tile)
149 # Apply a lookup table to the image, and save the new version. The LUT
153 rgbimg_lut = its.image.apply_lut_to_image(rgbimg, lut)
154 its.image.write_image(rgbimg_lut, "%s_rgb_2_lut.jpg" % (NAME))
156 # Apply a 3x3 matrix to the image, and save the new version. The matrix
163 rgbimg_mat = its.image.apply_matrix_to_image(rgbimg, mat)
164 its.image.write_image(rgbimg_mat, "%s_rgb_2_mat.jpg" % (NAME))
166 # Compute a histogram of the luma image, in 256 buckeits.
167 yimg,_,_ = its.image.convert_capture_to_yuv_planes(cap)
170 # Plot the histogram using matplotlib, and save as a PNG image.
174 pylab.title("Histogram of luma channel of captured image")