To use these functions, the ImageJCV Feature is required.
Reinterprets the content of an image (argument 0) as another image with different width, height, depth, number of channels or pixel format. Any parameter which is set to 1 will be replaced by the corresponding value of the original image. Buffer sizes of original and reinterpreted image must match!
Example: Convert a 16-bit grayscale image to a 32-bit RGBA image with half of the width:
output = MAP({expressions=[['reinterpret(image, /// Original image getWidth(image)/2, /// Half width -1, /// Original height 8, /// 8 bit per pixel channel 4, /// 4 channels per pixel 28 /// AV_PIX_FMT_RGBA (see JavaCV doc)','']]}, input) )', 'image']]}, input) |
Inverts the pixel values of the given image
SELECT inv(image) FROM Stream |
Return the value of the pixel at the given location
SELECT get(image, 100, 100) FROM Stream |
Set the pixel at the given location to the given value
SELECT set(image, 100, 100, 0.5) FROM Stream |
Rotates the image at the given angle in degree.
SELECT rotate(image, 90.0) FROM Stream |
Resize the image to the given width and height
SELECT resize(image, 500, 500) FROM Stream |
Returns a sub image at the given location and the given width and height.
SELECT sub(image, 5, 5, 200, 200) FROM Stream |
Creates a new image with the given width and height
SELECT toImage(500, 500) FROM Stream |
Return the pixel values of the given image as a matrix