This class is an abstract class that defines methods to extract informatioon from an image (CvMat). More...
Public Member Functions | |
def | extract_information |
For a given image (as CvMat in RGB format) extract whatever kind of information. |
This class is an abstract class that defines methods to extract informatioon from an image (CvMat).
For this we suppose the image to be in RGB format were the blue component is the first componenent, green the second and red the third (as in OpenCv, whyever).
There is only one method required: extract_information(). See extract_information() for further explanation.
Extracting information from an image is done by calling the extract_information() method for this image. We assume the image to be "big enough". This means that there are more than two pixel in each image so that we can use values like where n is the number of pixel. Usually complete white pixels are ignored since we assume that they're white because this part of the image was not covered by the mask image.
Definition at line 19 of file image_information.py.
def face_contour_detector.image_information.image_information.ImageInformation.extract_information | ( | self, | |
img | |||
) |
For a given image (as CvMat in RGB format) extract whatever kind of information.
self | the object pointer |
img | the image as CvMat in RGB format |
Extract the information from the image. Return value is a list. This list contains three tuples. Such a tuple t has the form t = (name, value, type). Where name is the name of the property t represents for example MaxPixelValue. value is the value of this property for example 200 if 200 is the maximal pixel value in img. type is a string and is one of "int", "float", "string". These tuples can be added to xml_image_information.
Reimplemented in face_contour_detector.image_information.image_information.AverageValueExtractor, face_contour_detector.image_information.image_information.MinMaxExtractor, and face_contour_detector.image_information.image_information.SizeExtractor.
Definition at line 25 of file image_information.py.