To use these functions, the ImageJCV Feature is required.
Converts the input image to another pixel format.
output = MAP({expressions=[['convertCV(image, 28)', 'converted']]}, input) |
Returns the width of the given image
output = MAP({expressions=[['getWidth(image)', 'width']]}, input) |
Returns the height of the given image
output = MAP({expressions=[['getHeight(image)', 'height']]}, input) |
Returns the depth of the given image
output = MAP({expressions=[['getDepth(image)', 'depth']]}, input) |
Returns the number of channels of the given image
output = MAP({expressions=[['getNumChannels(image)', 'numChannels']]}, input) |
Returns the pixel format of the given image
output = MAP({expressions=[['getPixelFormat(image)', 'pixelFormat']]}, input) |
Resizes the image to the given width and height
output = MAP({expressions=[['resizeCV(image, 100, 100)', 'smallImage']]}, input) |
Converts an 16-bit 1-channel image (f.ex. a temperature map) to an 24-bit RGB grayscale image. The contrast of the new image is calculated with this formula for each pixel:
newValue = (oldValue - oldMin) / (oldMax - oldMin) * (newMax - newMin) + newMin
The example converts a temperature map to a grayscale image such that input 1000 maps to black and input 5000 maps to white.
output = MAP({expressions=[['stretchContrastCV(image, 1000, 5000, 0, 255)', 'grayscale']]}, input) |
Creates a new 32-bpp RGBA image with the given width and height
output = MAP({expressions=[['toImageCV(512, 512)', 'image']]}, input) |
Creates a new image with the given width, height, depth, channel count and pixel format.
output = MAP({expressions=[['toImageCV(512, 512, 8, 4, 28)', 'image']]}, input) /// 32bpp RGBA image |
Copies the contents of the input image (from the Image feature) into a new ImageJCV image.
output = MAP({expressions=[['toImageCV(inputImage)', 'image']]}, input) |
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, getWidth(image)/2, -1, 8, 4, 28)', 'image']]}, input) |
Parameter explanation: