oevislib_net  0.14.3.0
Loading...
Searching...
No Matches
Basics

Functions

 oevislib_net.Image.Image ()
 Construct an empty Image object, with pixel type set to UInt8 and 1 channel.
 oevislib_net.Image.Image (int inWidth, int inHeight, PixelType inPixelType, int inChannels)
 Construct an Image object, setting size, pixel type and number of channels.
 oevislib_net.Image.Image (int inWidth, int inHeight, PixelType inPixelType, int inChannels, IntPtr inData, bool inDeepCopy=true)
 Construct a new Image object by wrapping existing data.
 oevislib_net.Image.Image (int inWidth, int inHeight, PixelType inPixelType, int inChannels, Box inBox)
 Construct a new Image object, using a box to identify the non-zero pixels.
 oevislib_net.Image.Image (int inWidth, int inHeight, PixelType inPixelType, int inChannels, Region inRoi)
 Construct a new Image object from a Region of interest.
 oevislib_net.Image.Image (int inWidth, int inHeight, PixelType inPixelType, int inChannels, Pixel inPixel)
 Construct an Image object with all the pixels set to a specific value.
 oevislib_net.Image.Image (int inWidth, int inHeight, PixelType inPixelType, int inChannels, Array< Pixel > inPixels)
 Construct an Image object from an array of pixels.
 oevislib_net.Image.Image (Array< Profile > inProfiles)
 Construct a new Image object by joining an array of profiles together as consecutive image rows.
Image oevislib_net.Image.Copy (Box inRoi)
 Returns a copy of the image with black pixels outside the box.
Image oevislib_net.Image.Copy (Region inRoi)
 Returns a copy of the image with black pixels outside the region.
ByteBuffer oevislib_net.Image.Serialize ()
 Serialize the Image object using flatbuffers.
static Image oevislib_net.Image.Deserialize (ByteBuffer inBuffer)
 De-serialize an Image buffer.
IntPtr oevislib_net.Image.GetData ()
 Returns the pointer to the image's data.
int oevislib_net.Image.GetDataSize ()
 Returns the size of a single image pixel in bytes.
Size oevislib_net.Image.GetFrame ()
 Returns a Size object containing the image's width and height.
int oevislib_net.Image.GetWidth ()
 Returns the width of the image.
int oevislib_net.Image.GetHeight ()
 Returns the height of the image.
int oevislib_net.Image.GetArea ()
 Returns the area of the image.
int oevislib_net.Image.GetChannels ()
 Returns the number of channels of the image.
ImageFormat oevislib_net.Image.GetImageFormat ()
 Returns an ImageFormat object associated with the image object.
PixelType oevislib_net.Image.GetPixelType ()
 Returns the image's pixel type.
float oevislib_net.Image.GetMaxValue ()
 Returns the maximum pixel's value for the current pixel type.
float oevislib_net.Image.GetMinValue ()
 Returns the minimum pixel's value for the current pixel type.
int oevislib_net.Image.GetPitch ()
 Returns the pitch (bytes in a row) of the image.
PixelFormat oevislib_net.Image.GetPixelFormat ()
 Returns the image's pixel format.
int oevislib_net.Image.GetPixelSize ()
 Returns the size of a single pixel in bytes.
bool oevislib_net.Image.IsEmpty ()
 Returns whether the image is empty.
void oevislib_net.Image.SetValue (float inValue, int inX, int inY, int inChannel=0)
 Set the pixel's value in a specific spot.
void oevislib_net.Image.SetPixel (Pixel inPixel, Point2Di inPosition)
 Sets a pixel of the image to the selected value.
void oevislib_net.Image.SetPixels (Pixel inPixel)
 Sets all pixels of the image to one value.
void oevislib_net.Image.SetPixels (Pixel inPixel, Array< Point2Di > inPositions)
 Sets a selection of pixels to a new value.
void oevislib_net.Image.SetPixels (Array< Pixel > inPixels, Array< Point2Di > inPositions)
 Sets a selection of pixels, each one to a specific new value.
void oevislib_net.Image.SetPixelsInRegion (Pixel inPixel, Region inRoi)
 Sets the pixels inside the specified region to a new value.
void oevislib_net.Image.SetPixelsInBox (Pixel inPixel, Box inRoi)
 Sets the pixels inside the specified box to a new value.
void oevislib_net.Image.SetColumn (int inColIndex, Pixel inPixel)
 Sets pixel values on an entire column of the image.
void oevislib_net.Image.SetRow (int inRowIndex, Pixel inPixel)
 Sets pixel values in an entire row of the image.
float oevislib_net.Image.GetValue (int inX, int inY, int inChannel=0)
 Returns the pixel's value given a specific spot.
float oevislib_net.Image.GetGrayValue (int inX, int inY)
 Returns the grayscale pixel's value given a specific spot.
Pixel oevislib_net.Image.GetPixel (Point2Di inPosition)
 Returns a single pixel of the image.
Pixel oevislib_net.Image.GetInterpolatedPixel (Point2D inPosition, InterpolationMethod2D inInterpolation=InterpolationMethod2D.Bilinear)
 Returns an interpolated pixel on the image.
Array< Pixeloevislib_net.Image.GetInterpolatedPixels (Array< Point2D > inPositions, InterpolationMethod2D inInterpolation=InterpolationMethod2D.Bilinear)
 Returns an array of pixel values at specified positions.
Array< Pixeloevislib_net.Image.GetPixels (Array< Point2Di > inPositions)
 Returns an array of pixels at specified positions.
Array< Pixeloevislib_net.Image.GetPixelsFromRegion (Region inRoi, Optional< Array< Point2Di > > outPositions=null)
 Returns an array of pixels (and their relative positions) inside a specified region.
Array< Pixeloevislib_net.Image.GetPixelsFromBox (Box inRoi, Optional< Array< Point2Di > > outPositions=null)
 Returns an array of pixels (and their relative positions) inside a box.
Array< Pixeloevislib_net.Image.GetColumn (int inColIndex)
 Extracts the array of pixel values from a single column of the image.
Image oevislib_net.Image.GetColumnImage (int inColIndex)
 Creates a new image using a single column of the current one.
Array< Pixeloevislib_net.Image.GetRow (int inRowIndex)
 Extracts the array of pixel values from a single row of the image.
Image oevislib_net.Image.GetRowImage (int inRowIndex)
 Creates a new image using a single row of the current one.
void oevislib_net.Image.ConvertToType (PixelType inNewType)
 Changes the pixel type (in-place).
Image oevislib_net.Image.ConvertToType (PixelType inNewType, int inDepthDelta)
 Changes the pixel type.
Region oevislib_net.Image.ToRegion ()
 Convert every non-zero pixel of the 1-channel image to a point in the output region.
override object oevislib_net.Image.Clone ()
 Returns a clone of the image.

ImageFormat Basics

See also
Basics
 oevislib_net.ImageFormat.ImageFormat ()
 Creates a new ImageFormat object with default values.
 oevislib_net.ImageFormat.ImageFormat (int inWidth, int inHeight, PixelType inType, int inDepth)
 Creates a new ImageFormat object.
int oevislib_net.ImageFormat.GetArea ()
 Returns the area of the image (width * height).

Pixel Basics

See also
Basics
static Pixel oevislib_net.Pixel.operator+ (Pixel inPixel1, Pixel inPixel2)
 
Parameters
inPixel1
inPixel2

static Pixel oevislib_net.Pixel.operator- (Pixel inPixel1, Pixel inPixel2)
 
Parameters
inPixel1
inPixel2

static Pixel oevislib_net.Pixel.operator* (Pixel inPixel, float inValue)
 
Parameters
inPixel
inValue

static Pixel oevislib_net.Pixel.operator/ (Pixel inPixel, float inValue)
 
Parameters
inPixel
inValue

 oevislib_net.Pixel.Pixel ()
 Constructs a new Pixel object using the default value.
 oevislib_net.Pixel.Pixel (float inX, float inY=0.0f, float inZ=0.0f, float inA=0.0f)
 Constructs a new Pixel object.
ByteBuffer oevislib_net.Pixel.Serialize ()
 Serialize the Pixel object using flatbuffers.
static Pixel oevislib_net.Pixel.Deserialize (ByteBuffer inBuffer)
 De-serialize a Pixel buffer.

PixelFormat Basics

See also
Basics
 oevislib_net.PixelFormat.PixelFormat ()
 Constructs a new PixelFormat object with default values.
 oevislib_net.PixelFormat.PixelFormat (PixelType inPixelType, int inChannels)
 Constructs a new Pixel Format object.

Detailed Description

Function Documentation

◆ Clone()

override object oevislib_net.Image.Clone ( )
inline

Returns a clone of the image.

Returns
Image's clone.

◆ ConvertToType() [1/2]

void oevislib_net.Image.ConvertToType ( PixelType inNewType)
inline

Changes the pixel type (in-place).

If the value of pixel component doesn't fit in the range of the new type, it is clipped to the nearest proper value (maximum or minimum for the new type).

Parameters
inNewTypeNew pixel type of the image.

◆ ConvertToType() [2/2]

Image oevislib_net.Image.ConvertToType ( PixelType inNewType,
int inDepthDelta )
inline

Changes the pixel type.

If the value of pixel component doesn't fit in the range of the new type, it is clipped to the nearest proper value (maximum or minimum for the new type).

Parameters
inNewTypeNew pixel type of the image.
inDepthDeltaPixel values are multiplied by 2^inDepthDelta. Range: [-30, 30].
Returns
Converted image.

◆ Copy() [1/2]

Image oevislib_net.Image.Copy ( Box inRoi)
inline

Returns a copy of the image with black pixels outside the box.

Parameters
inRoiRectangle of pixels to maintain.
Returns
Output image.

◆ Copy() [2/2]

Image oevislib_net.Image.Copy ( Region inRoi)
inline

Returns a copy of the image with black pixels outside the region.

Parameters
inRoiRegion of pixels to maintain.
Returns
Output image.

◆ Deserialize() [1/2]

Image oevislib_net.Image.Deserialize ( ByteBuffer inBuffer)
inlinestatic

De-serialize an Image buffer.

Parameters
inBufferBuffer containing the object.
Returns
Deserialized object.

◆ Deserialize() [2/2]

Pixel oevislib_net.Pixel.Deserialize ( ByteBuffer inBuffer)
inlinestatic

De-serialize a Pixel buffer.

Parameters
inBufferBuffer containing the object.
Returns
Deserialized object.

◆ GetArea() [1/2]

int oevislib_net.Image.GetArea ( )
inline

Returns the area of the image.

Returns
Area.

◆ GetArea() [2/2]

int oevislib_net.ImageFormat.GetArea ( )
inline

Returns the area of the image (width * height).

Returns
Area of the image.

◆ GetChannels()

int oevislib_net.Image.GetChannels ( )
inline

Returns the number of channels of the image.

Returns
Number of channels.

◆ GetColumn()

Array< Pixel > oevislib_net.Image.GetColumn ( int inColIndex)
inline

Extracts the array of pixel values from a single column of the image.

Parameters
inColIndexImage's column. Range: [0, +inf).
Returns
Pixel values of the column.

◆ GetColumnImage()

Image oevislib_net.Image.GetColumnImage ( int inColIndex)
inline

Creates a new image using a single column of the current one.

Parameters
inColIndexImage's column. Range: [0, +inf).
Returns
Output image.

◆ GetData()

IntPtr oevislib_net.Image.GetData ( )
inline

Returns the pointer to the image's data.

Returns
Data pointer.

◆ GetDataSize()

int oevislib_net.Image.GetDataSize ( )
inline

Returns the size of a single image pixel in bytes.

Returns
Data size.

◆ GetFrame()

Size oevislib_net.Image.GetFrame ( )
inline

Returns a Size object containing the image's width and height.

Returns
Image frame.

◆ GetGrayValue()

float oevislib_net.Image.GetGrayValue ( int inX,
int inY )
inline

Returns the grayscale pixel's value given a specific spot.

Parameters
inXX coordinate. Range: [0, +inf).
inYY coordinate. Range: [0, +inf).
Returns
Pixel value.

◆ GetHeight()

int oevislib_net.Image.GetHeight ( )
inline

Returns the height of the image.

Returns
Height.

◆ GetImageFormat()

ImageFormat oevislib_net.Image.GetImageFormat ( )
inline

Returns an ImageFormat object associated with the image object.

Returns
Image format.

◆ GetInterpolatedPixel()

Pixel oevislib_net.Image.GetInterpolatedPixel ( Point2D inPosition,
InterpolationMethod2D inInterpolation = InterpolationMethod2D::Bilinear )
inline

Returns an interpolated pixel on the image.

The position must be inside the image frame.

Parameters
inPositionPoint on the image to be accessed.
inInterpolationInterpolation method.
Returns
Output pixel.

◆ GetInterpolatedPixels()

Array< Pixel > oevislib_net.Image.GetInterpolatedPixels ( Array< Point2D > inPositions,
InterpolationMethod2D inInterpolation = InterpolationMethod2D::Bilinear )
inline

Returns an array of pixel values at specified positions.

All positions must be inside the image frame.

Parameters
inPositionsPoints on the image to be accessed.
inInterpolationInterpolation method.
Returns
Output pixels.

◆ GetMaxValue()

float oevislib_net.Image.GetMaxValue ( )
inline

Returns the maximum pixel's value for the current pixel type.

Returns
Maximum value.

◆ GetMinValue()

float oevislib_net.Image.GetMinValue ( )
inline

Returns the minimum pixel's value for the current pixel type.

Returns
Minimum value.

◆ GetPitch()

int oevislib_net.Image.GetPitch ( )
inline

Returns the pitch (bytes in a row) of the image.

Returns
Pitch.

◆ GetPixel()

Pixel oevislib_net.Image.GetPixel ( Point2Di inPosition)
inline

Returns a single pixel of the image.

Parameters
inPositionPixel's position.
Returns
Output pixel.

◆ GetPixelFormat()

PixelFormat oevislib_net.Image.GetPixelFormat ( )
inline

Returns the image's pixel format.

Returns
Pixel format.

◆ GetPixels()

Array< Pixel > oevislib_net.Image.GetPixels ( Array< Point2Di > inPositions)
inline

Returns an array of pixels at specified positions.

Parameters
inPositionsPixels' positions.
Returns
Output pixels.

◆ GetPixelsFromBox()

Array< Pixel > oevislib_net.Image.GetPixelsFromBox ( Box inRoi,
Optional< Array< Point2Di > > outPositions = null )
inline

Returns an array of pixels (and their relative positions) inside a box.

Parameters
inRoiBox where pixels have to be extracted.
outPositionsPixels' positions.
Returns
Output pixels.

◆ GetPixelsFromRegion()

Array< Pixel > oevislib_net.Image.GetPixelsFromRegion ( Region inRoi,
Optional< Array< Point2Di > > outPositions = null )
inline

Returns an array of pixels (and their relative positions) inside a specified region.

Parameters
inRoiRegion of interest.
outPositionsPixels' positions.
Returns
Output pixels.

◆ GetPixelSize()

int oevislib_net.Image.GetPixelSize ( )
inline

Returns the size of a single pixel in bytes.

Returns
Pixel's size.

◆ GetPixelType()

PixelType oevislib_net.Image.GetPixelType ( )
inline

Returns the image's pixel type.

Returns
Pixel type.

◆ GetRow()

Array< Pixel > oevislib_net.Image.GetRow ( int inRowIndex)
inline

Extracts the array of pixel values from a single row of the image.

Parameters
inRowIndexImage's row. Range: [0, +inf).
Returns
Pixel values of the row.

◆ GetRowImage()

Image oevislib_net.Image.GetRowImage ( int inRowIndex)
inline

Creates a new image using a single row of the current one.

Parameters
inRowIndexImage's row. Range: [0, +inf).
Returns
Output image.

◆ GetValue()

float oevislib_net.Image.GetValue ( int inX,
int inY,
int inChannel = 0 )
inline

Returns the pixel's value given a specific spot.

Parameters
inXX coordinate. Range: [0, +inf).
inYY coordinate. Range: [0, +inf).
inChannelChannel. Range: [0, 3].
Returns
Pixel value.

◆ GetWidth()

int oevislib_net.Image.GetWidth ( )
inline

Returns the width of the image.

Returns
Width.

◆ Image() [1/8]

oevislib_net.Image.Image ( )
inline

Construct an empty Image object, with pixel type set to UInt8 and 1 channel.

◆ Image() [2/8]

oevislib_net.Image.Image ( Array< Profile > inProfiles)
inline

Construct a new Image object by joining an array of profiles together as consecutive image rows.

Parameters
inProfilesArray of profiles.

◆ Image() [3/8]

oevislib_net.Image.Image ( int inWidth,
int inHeight,
PixelType inPixelType,
int inChannels )
inline

Construct an Image object, setting size, pixel type and number of channels.

Parameters
inWidthWidth of the image. Range: [0, +inf).
inHeightHeight of the image. Range: [0, +inf).
inPixelTypePixel type.
inChannelsNumber of inChannels. Range: [1, 4].

◆ Image() [4/8]

oevislib_net.Image.Image ( int inWidth,
int inHeight,
PixelType inPixelType,
int inChannels,
Array< Pixel > inPixels )
inline

Construct an Image object from an array of pixels.

If the pixels are not enough for all the image, only a part (starting from the top-left corner) will be covered.

Parameters
inWidthWidth of the image. Range: [1, +inf).
inHeightHeight of the image. Range: [1, +inf).
inPixelTypePixel type.
inChannelsNumber of inChannels. Range: [1, 4].
inPixelsPixel values.

◆ Image() [5/8]

oevislib_net.Image.Image ( int inWidth,
int inHeight,
PixelType inPixelType,
int inChannels,
Box inBox )
inline

Construct a new Image object, using a box to identify the non-zero pixels.

Parameters
inWidthWidth of the image. Range: [0, +inf).
inHeightHeight of the image. Range: [0, +inf).
inPixelTypePixel type.
inChannelsNumber of inChannels. Range: [1, 4].
inBoxBox to define where the pixels will not be set to zero.

◆ Image() [6/8]

oevislib_net.Image.Image ( int inWidth,
int inHeight,
PixelType inPixelType,
int inChannels,
IntPtr inData,
bool inDeepCopy = true )
inline

Construct a new Image object by wrapping existing data.

Parameters
inWidthWidth of the image. Range: [0, +inf).
inHeightHeight of the image. Range: [0, +inf).
inPixelTypePixel type.
inChannelsNumber of inChannels. Range: [1, 4].
inDataExisting image data.
inDeepCopyWhether to perform a deep copy.

◆ Image() [7/8]

oevislib_net.Image.Image ( int inWidth,
int inHeight,
PixelType inPixelType,
int inChannels,
Pixel inPixel )
inline

Construct an Image object with all the pixels set to a specific value.

Parameters
inWidthWidth of the image. Range: [1, +inf).
inHeightHeight of the image. Range: [1, +inf).
inPixelTypePixel type.
inChannelsNumber of inChannels. Range: [1, 4].
inPixelPixel value.

◆ Image() [8/8]

oevislib_net.Image.Image ( int inWidth,
int inHeight,
PixelType inPixelType,
int inChannels,
Region inRoi )
inline

Construct a new Image object from a Region of interest.

Parameters
inWidthWidth of the image. Range: [0, +inf).
inHeightHeight of the image. Range: [0, +inf).
inPixelTypePixel type.
inChannelsNumber of inChannels. Range: [1, 4].
inRoiRegion where the pixels will not be set to zero.

◆ ImageFormat() [1/2]

oevislib_net.ImageFormat.ImageFormat ( )
inline

Creates a new ImageFormat object with default values.

◆ ImageFormat() [2/2]

oevislib_net.ImageFormat.ImageFormat ( int inWidth,
int inHeight,
PixelType inType,
int inDepth )
inline

Creates a new ImageFormat object.

Parameters
inWidthImage width.
inHeightImage height.
inTypeType of pixel components.
inDepthNumber of pixel components.

◆ IsEmpty()

bool oevislib_net.Image.IsEmpty ( )
inline

Returns whether the image is empty.

Returns
true if the image is empty.

◆ operator*()

Pixel oevislib_net.Pixel.operator* ( Pixel inPixel,
float inValue )
inlinestatic

Parameters
inPixel
inValue

◆ operator+()

Pixel oevislib_net.Pixel.operator+ ( Pixel inPixel1,
Pixel inPixel2 )
inlinestatic

Parameters
inPixel1
inPixel2

◆ operator-()

Pixel oevislib_net.Pixel.operator- ( Pixel inPixel1,
Pixel inPixel2 )
inlinestatic

Parameters
inPixel1
inPixel2

◆ operator/()

Pixel oevislib_net.Pixel.operator/ ( Pixel inPixel,
float inValue )
inlinestatic

Parameters
inPixel
inValue

◆ Pixel() [1/2]

oevislib_net.Pixel.Pixel ( )
inline

Constructs a new Pixel object using the default value.

◆ Pixel() [2/2]

oevislib_net.Pixel.Pixel ( float inX,
float inY = 0::0f,
float inZ = 0::0f,
float inA = 0::0f )
inline

Constructs a new Pixel object.

Parameters
inXFirst pixel component (usually red).
inYSecond pixel component (usually green).
inZThird pixel component (usually blue).
inAFourth pixel component.

◆ PixelFormat() [1/2]

oevislib_net.PixelFormat.PixelFormat ( )
inline

Constructs a new PixelFormat object with default values.

◆ PixelFormat() [2/2]

oevislib_net.PixelFormat.PixelFormat ( PixelType inPixelType,
int inChannels )
inline

Constructs a new Pixel Format object.

Parameters
inPixelTypePixel type.
inChannelsNumber of inChannels. Range: [1, 4].

◆ Serialize() [1/2]

ByteBuffer oevislib_net.Image.Serialize ( )
inline

Serialize the Image object using flatbuffers.

Returns
Where the image data are stored.

◆ Serialize() [2/2]

ByteBuffer oevislib_net.Pixel.Serialize ( )
inline

Serialize the Pixel object using flatbuffers.

Returns
Buffer where the object is stored.

◆ SetColumn()

void oevislib_net.Image.SetColumn ( int inColIndex,
Pixel inPixel )
inline

Sets pixel values on an entire column of the image.

Parameters
inColIndexImage's column. Range: [0, +inf).
inPixelNew pixel value.

◆ SetPixel()

void oevislib_net.Image.SetPixel ( Pixel inPixel,
Point2Di inPosition )
inline

Sets a pixel of the image to the selected value.

Parameters
inPixelNew pixel value.
inPositionPixel's position.

◆ SetPixels() [1/3]

void oevislib_net.Image.SetPixels ( Array< Pixel > inPixels,
Array< Point2Di > inPositions )
inline

Sets a selection of pixels, each one to a specific new value.

Parameters
inPixelsNew pixel values.
inPositionsPixels to set.

◆ SetPixels() [2/3]

void oevislib_net.Image.SetPixels ( Pixel inPixel)
inline

Sets all pixels of the image to one value.

Parameters
inPixelPixel value.

◆ SetPixels() [3/3]

void oevislib_net.Image.SetPixels ( Pixel inPixel,
Array< Point2Di > inPositions )
inline

Sets a selection of pixels to a new value.

Parameters
inPixelNew pixel value.
inPositionsPixels to select.

◆ SetPixelsInBox()

void oevislib_net.Image.SetPixelsInBox ( Pixel inPixel,
Box inRoi )
inline

Sets the pixels inside the specified box to a new value.

Parameters
inPixelNew pixel value.
inRoiBox of pixels to be set.

◆ SetPixelsInRegion()

void oevislib_net.Image.SetPixelsInRegion ( Pixel inPixel,
Region inRoi )
inline

Sets the pixels inside the specified region to a new value.

If the region is partially outside the image, only the pixels that are inside the image will be set (no exception will be thrown for the out-of-bounds pixels).

Parameters
inPixelNew pixel value.
inRoiRegion of pixels to be set.

◆ SetRow()

void oevislib_net.Image.SetRow ( int inRowIndex,
Pixel inPixel )
inline

Sets pixel values in an entire row of the image.

Parameters
inRowIndexImage's row. Range: [0, +inf).
inPixelNew pixel value.

◆ SetValue()

void oevislib_net.Image.SetValue ( float inValue,
int inX,
int inY,
int inChannel = 0 )
inline

Set the pixel's value in a specific spot.

Parameters
inValuePixel value to set.
inXX coordinate. Range: [0, +inf).
inYY coordinate. Range: [0, +inf).
inChannelChannel. Range: [0, 3].

◆ ToRegion()

Region oevislib_net.Image.ToRegion ( )
inline

Convert every non-zero pixel of the 1-channel image to a point in the output region.

Returns
Output region.