This file contains some useful wrappers over Yayi basic image processing functions.
Returns the absolute difference of the two input images
Returns the bitwise complement of the input image
Returns the bitwise union (or) of the two input images
Returns the difference of the two images
Warning
The underflow is not checked with this function. Consider ASubClip() instead.
See also
Returns the bounded difference of the two input images
Quick copy of an image into a new one.
| Parameters: | im – input image |
|---|---|
| Return type: | image |
| Returns: | a exact copy of the input image (same type, dimensions and content). |
Example:
imout = copy(imin)
Quick copy of a scalar image into a new 3 channels’ one. The scalar is duplicated on each channel.
Quick copy of an image into a new unsigned 16 bits one
Quick copy of an image into a new unsigned 32 bits one
Quick copy of an image into a new unsigned 8 bits one
Crops the input image to keep the specified hyperrectangle. If hyperrectangle is None, a copy of the input is returned (see copy()).
| Parameters: |
|
|---|---|
| Returns: | a cropped image |
| Return type: | image |
Note
the hyperrectangle parameter is a pair of two coordinate elements, which are respectively the starting and ending point of the rectangle. The ending point is not included.
Warning
the input window is not checked directly in python.
See also
Example:
im = YACORE.ImageFactory(YAYI.COM.c_scalar, 2)
im.Size = (20, 30)
im.AllocateImage()
cropped_image = crop_window(im, ((10, 5), (15, 20)))
Creates a scalar black image of the same geometry than the input image.
Note
this function is mainly intended for drawing
Assigns to each pixel value of the input image one randomly chosen color image. This function is useful for viewing label images for instance.
| Parameters: |
|
|---|---|
| Returns: | the input image with randomized colors |
| Return type: | image |
Note
the input image format should be scalar integer (float/double images are not supported)