|
Returns the image as an uint8Mat defined in the arr module.
Syntax:
im = GetImageMatr(name)
im = GetImageMatr("Image") # return color or 8bit intensity image
im = GetImageMatr("Image.H") # returns hue on an color image
im = GetImageMatr("Image.S") # return saturation on an color image
im = GetImageMatr("Image.I") # return intensity of a color image
Example 1: Access Image and process the image from python
# used to provide access to image from python
img=GetImageMatr('Image') #get the image
blob=GetTool('Blob')
status = blob.execute(img)
cx=blob.getValue('CenterOfGravity_x') #get result x
cy=blob.getValue('CenterOfGravity_y') #get result y
Example 2: Get the size of a 2D Image
import arr
img = GetImageMatr('Image')
ROWS,COLS = img.dim()
print 'image size ',ROWS,COLS
Note: The name of an image is defined under
Service.Camera.Image
|