Lines Matching defs:Image
21 import Image
50 """Convert a captured image object to a RGB image.
60 RGB float-3 image array, with pixel values in [0.0, 1.0].
124 """Unpack a raw-10 image to a raw-16 image.
126 Output image will have the 10 LSBs filled in each 16b word, and the 6 MSBs
130 img: A raw-10 image, as a uint8 numpy array.
133 Image as a uint16 numpy array, with all row padding stripped.
174 """Unpack a raw-12 image to a raw-16 image.
176 Output image will have the 12 LSBs filled in each 16b word, and the 4 MSBs
180 img: A raw-12 image, as a uint8 numpy array.
183 Image as a uint16 numpy array, with all row padding stripped.
204 """Convert a captured image object to separate image planes.
206 Decompose an image into multiple images, corresponding to different planes.
254 # Crop the raw image to the active array region.
279 # No crop needed; image is already cropped to the active array.
282 raise its.error.Error('Invalid image size metadata')
283 # Separate the image planes.
345 """Convert a Bayer raw-16 image to an RGB image.
348 operations; the output of this function shouldn't be used for any image
353 in the Bayer image, with pixels in the [0.0, 1.0] range.
358 RGB float-3 image array, with pixel values in [0.0, 1.0]
376 # Need to scale the image back to the full [0,1] range after subtracting
397 """Convert a YUV420 8-bit planar image to an RGB image.
403 w: The width of the image.
404 h: The height of the image.
409 RGB float-3 image array, with pixel values in [0.0, 1.0].
425 """Load a standard image file (JPG, PNG, etc.).
431 RGB float-3 image array, with pixel values in [0.0, 1.0].
433 img = Image.open(fname)
444 raise its.error.Error('Unsupported image type')
451 """Load a YUV420 image file, and return as an RGB image.
459 w: The width of the image.
460 h: The height of the image.
466 RGB float-3 image array, with pixel values in [0.0, 1.0].
481 raise its.error.Error('Unsupported image layout')
486 """Load a YUV420 planar image file, and return Y, U, and V plane images.
490 w: The width of the image.
491 h: The height of the image.
508 """Decompress a JPEG-compressed image, returning as an RGB image.
514 A numpy array for the RGB image, with pixels in [0,1].
516 img = Image.open(cStringIO.StringIO(jpeg_buffer))
522 """Applies a LUT to every pixel in a float image array.
524 Internally converts to a 16b integer image, since the LUT can work with up
542 img: Numpy float image array, with pixel values in [0,1].
546 Float image array after applying LUT to each pixel.
555 """Multiplies a 3x3 matrix with each float-3 image pixel.
565 img: Numpy float image array, with pixel values in [0,1].
569 The numpy float-3 image array resulting from the matrix mult.
579 """Get a patch (tile) of an image.
582 img: Numpy float image array, with pixel values in [0,1].
586 Float image array of the patch.
597 """Calculate the mean of each color channel in the image.
600 img: Numpy float image array, with pixel values in [0,1].
603 A list of mean values, one per color channel in the image.
612 """Calculate the variance of each color channel in the image.
615 img: Numpy float image array, with pixel values in [0,1].
618 A list of mean values, one per color channel in the image.
627 """Calculate the SNR (db) of each color channel in the image.
630 img: Numpy float image array, with pixel values in [0,1].
633 A list of SNR value, one per color channel in the image.
642 """Save a float-3 numpy array image to a file.
646 Image can be 3-channel, which is interpreted as RGB, or can be 1-channel,
649 Can optionally specify that the image should be gamma-encoded prior to
650 writing it out; this should be done if the image contains linear pixel
651 values, to make the image look "normal".
654 img: Numpy image array data.
656 apply_gamma: (Optional) apply gamma to the image prior to writing it.
662 Image.fromarray((img * 255.0).astype(numpy.uint8), "RGB").save(fname)
665 Image.fromarray(img3, "RGB").save(fname)
667 raise its.error.Error('Unsupported image type')
670 """Shrink an image by a given integer factor.
673 regions of the input image; it doesn't skip or sample pixels, and all input
674 image pixels are evenly weighted.
681 img: The input image as an ndarray.
685 The new (downscaled) image, as an ndarray.
703 """Calculate the sharpness of input image.
706 img: Numpy float RGB/luma image array, with pixel values in [0,1].
710 Larger value means the image is sharper.
730 Test by using a canned set of values on a 1x1 pixel image.
747 Test by using a canned set of values on a 1x1 pixel image. The LUT will