|
I32 | set (image *a, I32 x) |
| Set Image Content to a Constant Value. More...
|
|
I32 | vset (image *a, I32 mag, I32 dir) |
| Set Vector Image Content to a Constant Value. More...
|
|
I32 | set_with_bitmask (image *a, I32 color, U32 mask) |
| Set Image Content to a Constant Value. More...
|
|
I32 | mask_frame (image *src, I32 sx0, I32 sx1, I32 sy0, I32 sy1, I32 color) |
| Mask a Frame with programmable Frame Width. More...
|
|
I32 | mask_polygon (image *psImgIn, image *psImgOut, U8 color, U32 u32CornerCount, I32 *pi32PxLst, U8 u8OutputSizeToSelectionIff1) |
| Masks All but a Polygon Shaped Image Region. More...
|
|
I32 | cset (image *rgb, I32 cc0, I32 cc1, I32 cc2) |
| Set Color Image Content to a Constant Value. More...
|
|
Functions in this group use a few values to calculate image pixel data, for example functions which set all pixel to the same value, or generate test patterns.
Functions drawing geometrical shapes can be found at Drawing Pixels.
◆ set()
Sets all pixels of the st
channel of an image variable to the constant value color
.
- Parameters
-
a | Target Image. |
color | Value to set. |
- Memory Consumption
- None.
- Return values
-
ERR_TYPE | if Image Type is wrong. |
ERR_NONE | on Success. |
◆ vset()
Sets all pixels of the st
channel (the magnitude) and the ccmp1
channel (the direction) of an image variable to the constant values mag
respective dir
.
- Parameters
-
a | Target Image. |
mag | Magnitude Value to set (st ). |
dir | Direction Value to set (ccmp1 ). |
- Memory Consumption
- None.
- Return values
-
ERR_TYPE | if Image is not of Class 2 or Pixel Bit Count is not 8, or Image Type is wrong. |
ERR_NONE | on Success. |
◆ cset()
The function sets all pixels of a color image variable to the constant values cc0
(first color component), cc1
(second color component) and cc2
(third color component). The function may be used for the following color image types:
- Memory Consumption
- None.
- See also
- set(), vset().
- Return values
-
◆ set_with_bitmask()
Sets all pixels of the st
channel of an image variable to the constant value color
. The mask
bits define the bits which are overwritten (1) at the destination, others remain untouched (0).
- Parameters
-
a | Target Image. |
color | Value to set. |
- Note
- only 8 bit images are supported so far.
- Memory Consumption
- None.
- Return values
-
ERR_TYPE | if Image Type is wrong. |
ERR_NONE | on Success. |
◆ mask_frame()
This function sets a frame inside the image src
to the value color
. Hence only the image boundary is filled with the value color
.
- Parameters
-
- Memory Consumption
- None.
- Return values
-
ERR_TYPE | if Channel Type of Image differs from 8 Bit. |
◆ mask_polygon()
I32 mask_polygon |
( |
image * |
psImgIn, |
|
|
image * |
psImgOut, |
|
|
U8 |
color, |
|
|
U32 |
u32CornerCount, |
|
|
I32 * |
pi32PxLst, |
|
|
U8 |
u8OutputSizeToSelectionIff1 |
|
) |
| |
The function fills all but a polygon shaped image region. The polygon contour, especially the points provided, are not part of the mask being set to the given color color
, the inner of the polygon remains untouched. The function can be used to restrict one of the functions from the group 'Multiple Pixels to Values Mappings' to only a part of the image e.g., histogram of a polygon shaped area.
- Parameters
-
psImgIn | The Source Image of Type IMAGE_GREY. |
psImgOut | The Destination Image (may be equal to psImgIn ). |
color | The Fill Color. |
u32CornerCount | Count of Corners of the Polygon. |
pi32PxLst | List of u32CornerCount Point Coordinates as Pixel List [I32 p1x, I32 p1y, I32 p2x, ...]. |
u8OutputSizeToSelectionIff1 | recalculates psImgOut->dx, psImgOut->dy to fit the selection, use a psImgIn sized allocation for the psImgOut target! |
- Return values
-
ERR_PARAM | if (u32CornerCount < 3) |
ERR_NONE | on Success. |
ERR_RLCFMT | if Internal RLC Generation fails. |
ERR_SLC | if Internal SLC Generation fails. |
ERR_PARAM | if given Polygon is not OK, e.g., Self Overlapping, Crossing Image Border. |
ERR_INCONS | if rlc_mask_image() fails. |
ERR_RLCFMT | if rl_ftr2() fails. |
ERR_BOUNDS | if a Point lies Outside of an Image. |
ERR_SINGULAR | if Singular or Self Intersecting. |
ERR_MEMORY | if Memory Allocation fails. |