Functions | |
| cpl_mask * | cpl_mask_new (int nx, int ny) |
| Create a new cpl_mask. | |
| cpl_mask * | cpl_mask_duplicate (const cpl_mask *in) |
| Duplicates a cpl_mask. | |
| void | cpl_mask_delete (cpl_mask *m) |
| Delete a cpl_mask. | |
| cpl_binary * | cpl_mask_get_data (const cpl_mask *in) |
| Get a pointer to the data part of the mask. | |
| cpl_binary | cpl_mask_get (const cpl_mask *in, int xpos, int ypos) |
| Get the value of a mask at a given position. | |
| cpl_error_code | cpl_mask_set (cpl_mask *in, int xpos, int ypos, cpl_binary value) |
| Set a value in a mask at a given position. | |
| int | cpl_mask_get_size_x (const cpl_mask *in) |
| Get the x size of the mask. | |
| int | cpl_mask_get_size_y (const cpl_mask *in) |
| Get the y size of the mask. | |
| int | cpl_mask_count (const cpl_mask *in) |
| Get the number of occurences of CPL_BINARY_1. | |
| cpl_error_code | cpl_mask_and (cpl_mask *in1, const cpl_mask *in2) |
| Performs a logical AND between two masks. | |
| cpl_error_code | cpl_mask_or (cpl_mask *in1, const cpl_mask *in2) |
| Performs a logical OR between two masks. | |
| cpl_error_code | cpl_mask_xor (cpl_mask *in1, const cpl_mask *in2) |
| Performs a logical XOR between two masks. | |
| cpl_error_code | cpl_mask_not (cpl_mask *in) |
| Performs a logical NOT on a mask. | |
| cpl_mask * | cpl_mask_collapse_create (const cpl_mask *in, int dir) |
| Collapse a mask. | |
| cpl_mask * | cpl_mask_extract (const cpl_mask *in, int llx, int lly, int urx, int ury) |
| Extract a mask from an other one. | |
| cpl_error_code | cpl_mask_turn (cpl_mask *in, int rot) |
| Rotate a mask by a multiple of 90 deg clockwise. | |
| cpl_error_code | cpl_mask_shift (cpl_mask *in, int x_shift, int y_shift) |
| Shift a mask. | |
| cpl_error_code | cpl_mask_copy (cpl_mask *in1, const cpl_mask *in2, int x_pos, int y_pos) |
| Insert a mask in an other one. | |
| cpl_error_code | cpl_mask_flip (cpl_mask *in, int angle) |
| Flip a mask on a given miror line. | |
| cpl_error_code | cpl_mask_move (cpl_mask *in, int nb_cut, const int *new_pos) |
| Reorganize the pixels in a mask. | |
| cpl_mask * | cpl_mask_extract_subsample (const cpl_mask *in, int xstep, int ystep) |
| Subsample a mask. | |
| cpl_error_code | cpl_mask_opening (cpl_mask *in, const cpl_matrix *ker) |
| Compute a morphological opening. | |
| cpl_error_code | cpl_mask_closing (cpl_mask *in, const cpl_matrix *ker) |
| Compute a morphological closing. | |
| cpl_error_code | cpl_mask_erosion (cpl_mask *in, const cpl_matrix *ker) |
| Compute a morphological erosion. | |
| cpl_error_code | cpl_mask_dilation (cpl_mask *in, const cpl_matrix *ker) |
| Compute a morphological dilation. | |
| cpl_mask * | cpl_mask_threshold_image_create (const cpl_image *in, double lo_cut, double hi_cut) |
| Select parts of an image with provided thresholds. | |
These masks are useful for object detection routines or bad pixel map handling. Morphological routines (erosion, dilation, closing and opening) and logical operations are provided. A cpl_mask is a kind of binary array whose elements are of type cpl_binary and can take only two values: either CPL_BINARY_0 or CPL_BINARY_1.
#include "cpl_mask.h"
|
||||||||||||
|
Performs a logical AND between two masks.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Compute a morphological closing.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Collapse a mask.
Collapse along y:
1 0 1 Input mask.
0 1 1
0 0 1
-----
0 0 1 The third element is flagged as bad because all elements of the
column are bad.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||||||
|
Insert a mask in an other one.
|
|
|
Get the number of occurences of CPL_BINARY_1.
|
|
|
Delete a cpl_mask.
|
|
||||||||||||
|
Compute a morphological dilation.
Possible _cpl_error_code_ set in this function:
|
|
|
Duplicates a cpl_mask.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Compute a morphological erosion.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||||||||||
|
Extract a mask from an other one.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Subsample a mask.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Flip a mask on a given miror line.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Get the value of a mask at a given position.
Possible _cpl_error_code_ set in this function:
|
|
|
Get a pointer to the data part of the mask.
Possible _cpl_error_code_ set in this function:
|
|
|
Get the x size of the mask.
|
|
|
Get the y size of the mask.
|
|
||||||||||||||||
|
Reorganize the pixels in a mask.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Create a new cpl_mask.
The returned object must be deallocated using cpl_mask_delete(). Possible _cpl_error_code_ set in this function:
|
|
|
Performs a logical NOT on a mask.
|
|
||||||||||||
|
Compute a morphological opening.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Performs a logical OR between two masks.
|
|
||||||||||||||||||||
|
Set a value in a mask at a given position.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Shift a mask.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Select parts of an image with provided thresholds.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Rotate a mask by a multiple of 90 deg clockwise.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Performs a logical XOR between two masks.
|
1.3.9.1