CVBpy 14.0
cvb.minos Namespace Reference

Common Vision Blox Minos module for Python. More...

Classes

class  Classifier
 Load a saved classifier from a file. More...
 
class  ClassifierFactory
 Learner object that creates a classifier from an image list. More...
 
class  ClassifierModelInfo
 Information about a Minos classifier model. More...
 
class  FilterOrder
 Order of the butterworth_low_pass() or butterworth_high_pass() filter to be applied. More...
 
class  KernelSize
 Available kernel sizes for the filter functions exported by the Minos library. More...
 
class  LearnParameters
 The set of parameters, which controls, how a classifier is being learned from a training set. More...
 
class  ReadMode
 Options for the read functions. More...
 
class  SearchMode
 Different modes for the search calls, that return a single result. More...
 
class  SearchResult
 Search result returned by Minos. More...
 
class  TrainingSet
 Load a saved training set from a file or create an empty training set. More...
 

Functions

cvb.Image butterworth_high_pass (cvb.Image image, float gain, int offset, float cut_off, int order)
 Apply a Butterworth high pass filter to the image. More...
 
cvb.Image butterworth_low_pass (cvb.Image image, float cut_off, int order)
 Apply a Butterworth low pass filter to the image. More...
 
cvb.Image dilate (cvb.Image image)
 Apply a 3 x 3 dilation filter to the input image. More...
 
cvb.Image edge (cvb.Image image, int kernel_size)
 Apply an edge filter to the input image. More...
 
cvb.Image erode (cvb.Image image)
 Apply a 3 x 3 erosion filter to the input image. More...
 
cvb.Image laplace (cvb.Image image)
 Apply a 3 x 3 Laplace filter to the input image. More...
 
cvb.Image low_pass (cvb.Image image, int kernel_size)
 Apply a low pass filter to the input image. More...
 
cvb.Image pyramid (cvb.Image image, int kernel_size)
 Apply a pyramid filter to the input image. More...
 
List[cvb.minos.SearchResultsearch_all_correlations (cvb.ImagePlane image_plane, cvb.ImagePlane template_plane, float threshold, int radius, Optional[cvb.Area2D] aoi, Optional[float] density=1.0)
 Find all correlation matches of the template_plane in the image_plane aoi. More...
 
cvb.minos.SearchResult search_correlation (cvb.ImagePlane image_plane, cvb.ImagePlane template_plane, Optional[cvb.Area2D] aoi, Optional[float] density=1.0)
 Find the best correlation match of the template_plane in the image_plane aoi with sub-pixel accuracy. More...
 
cvb.Image sharpen (cvb.Image image)
 Apply a 3 x 3 sharpen filter to the input image. More...
 
cvb.Image user_filter (cvb.Image image, int kernel_size, List[float] kernel)
 Apply a user-defined filter to the input image. More...
 

Detailed Description

Common Vision Blox Minos module for Python.

Online Manual

Common Vision Blox-Tool Minos

Function Documentation

◆ butterworth_high_pass()

cvb.Image butterworth_high_pass ( cvb.Image  image,
float  gain,
int  offset,
float  cut_off,
int  order 
)

Apply a Butterworth high pass filter to the image.

Underflow and overflow gray values are truncated to 0 and 255 respectively.

Parameters

image : cvb.Image Image to be filtered.

gain : float Gain to be applied to the frequency response.

offset : int Offset to be applied to the frequency response.

cut_off : float Cut off parameter of the Butterworth algorithm.

order : int Order of the Butterworth filter to be used (see cvb.minos.FilterOrder).

Returns

cvb.Image The filtered image.

◆ butterworth_low_pass()

cvb.Image butterworth_low_pass ( cvb.Image  image,
float  cut_off,
int  order 
)

Apply a Butterworth low pass filter to the image.

Underflow and overflow gray values are truncated to 0 and 255 respectively.

Parameters

image : cvb.Image Image to be filtered.

cut_off : float Cut off parameter of the Butterworth algorithm.

order : int Order of the Butterworth filter to be used (see cvb.minos.FilterOrder).

Returns

cvb.Image The filtered image.

◆ dilate()

cvb.Image dilate ( cvb.Image  image)

Apply a 3 x 3 dilation filter to the input image.

Parameters

image : cvb.Image Image to be filtered.

Returns

cvb.Image The filtered image.

◆ edge()

cvb.Image edge ( cvb.Image  image,
int  kernel_size 
)

Apply an edge filter to the input image.

Edge filters are available with kernel sizes 2 x 2 and 3 x 3.

Parameters

image : cvb.Image Image to be filtered.

kernel_size : int Kernel size to be used (see cvb.minos.KernelSize).

Returns

cvb.Image The filtered image.

◆ erode()

cvb.Image erode ( cvb.Image  image)

Apply a 3 x 3 erosion filter to the input image.

Parameters

image : cvb.Image Image to be filtered.

Returns

cvb.Image The filtered image.

◆ laplace()

cvb.Image laplace ( cvb.Image  image)

Apply a 3 x 3 Laplace filter to the input image.

An offset gray value of 128 is added to the result to reduce loss of information. Underflow and overflow gray values are truncated to 0 and 255 respectively.

Parameters

image : cvb.Image Image to be filtered.

Returns

cvb.Image The filtered image.

◆ low_pass()

cvb.Image low_pass ( cvb.Image  image,
int  kernel_size 
)

Apply a low pass filter to the input image.

Low pass filters are available with kernel sizes 2 x 2, 3 x 3 and 5 x 5.

Parameters

image : cvb.Image Image to be filtered.

kernel_size : int Kernel size to be used (see cvb.minos.KernelSize).

Returns

cvb.Image The filtered image.

◆ pyramid()

cvb.Image pyramid ( cvb.Image  image,
int  kernel_size 
)

Apply a pyramid filter to the input image.

Pyramid filters are available with kernel sizes 3 x 3, 4 x 4 and 5 x 5.

Parameters

image : cvb.Image Image to be filtered.

kernel_size : int Kernel size to be used (see cvb.minos.KernelSize).

Returns

cvb.Image The filtered image.

◆ search_all_correlations()

List[cvb.minos.SearchResult] search_all_correlations ( cvb.ImagePlane  image_plane,
cvb.ImagePlane  template_plane,
float  threshold,
int  radius,
Optional[cvb.Area2D aoi,
Optional[float]   density = 1.0 
)

Find all correlation matches of the template_plane in the image_plane aoi.

If the number of results exceeds 32767, then the result list will be truncated at that number. The order of the results depends on the scan direction defined by the aoi (left/top to right/bottom without aoi).

Parameters

image_plane : cvb.ImagePlane Image plane in which to look for correlation matches.

template_plane : cvb.ImagePlane Template with which to look for correlation matches.

threshold : float Minimum correlation for the results to be reported.

radius : int Minimum distance between two positive results.

aoi : Optional[cvb.Area2D] Area in which to look for correlation matches (default entire image).

density : Optional[float] Scan density with which to look for correlation matches where 1.0 means scanning all pixels.

Returns

List[cvb.minos.SearchResult] Extracted matches.

◆ search_correlation()

cvb.minos.SearchResult search_correlation ( cvb.ImagePlane  image_plane,
cvb.ImagePlane  template_plane,
Optional[cvb.Area2D aoi,
Optional[float]   density = 1.0 
)

Find the best correlation match of the template_plane in the image_plane aoi with sub-pixel accuracy.

The amount of sub pixel accuracy that may be achieved depends on the size of the template.

Parameters

image_plane : cvb.ImagePlane Image plane in which to look for correlation matches.

template_plane : cvb.ImagePlane Template with which to look for correlation matches.

aoi : Optional[cvb.Area2D] Area in which to look for correlation matches (default entire image).

density : Optional[float] Scan density with which to look for correlation matches where 1.0 means scanning all pixels.

Returns

cvb.minos.SearchResult Best result that was detected (empty SearchResult if no match was found).

◆ sharpen()

cvb.Image sharpen ( cvb.Image  image)

Apply a 3 x 3 sharpen filter to the input image.

Underflow and overflow gray values are truncated to 0 and 255 respectively.

Parameters

image : cvb.Image Image to be filtered.

Returns

cvb.Image The filtered image.

◆ user_filter()

cvb.Image user_filter ( cvb.Image  image,
int  kernel_size,
List[float]  kernel 
)

Apply a user-defined filter to the input image.

The convolution kernel may have the size 2 x 2, 3 x 3 or 5 x 5. The filter coefficients need to be specified as a list of float values passed as the kernel argument. Please note that although the kernel elements are of type float, the filter will only work on and only create output data with 8 bits per pixel. Overflow and under-flow values will be truncated to 0 and 255 respectively. If too many kernel coefficients are given then any surplus coefficients will be ignored. The kernel coefficients should be passed as a 1D array with width * height elements starting in the top left corner of the filter mask and listing the elements line by line.

Parameters

image : cvb.Image Image to be filtered.

kernel_size : int Kernel size to be used (see cvb.minos.KernelSize).

kernel : List[float] Kernel coefficients; the number of coefficients, that are needed depending on the kernel_size.

Returns

cvb.Image The filtered image.