Unibrain API-810 User Manual Page 66

  • Download
  • Add to my manuals
  • Print
  • Page
    / 95
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 65
66
FireiFrame
The FireiFrame object contains a single camera frame, allowing the programmer to read and write the
image data pixel by pixel. It also provides some useful methods that help manipulate the image, e.g., draw
lines, rectangles or print text on the image.
This object cannot be constructed directly; it is constructed and maintained internally by the SDK, and
passed through the FrameReceived event of FireiCamera. It can be considered valid throughout the
context of the event handlerbut it cannot be stored in memory for later use.
GetPixel method
Prototype
Color GetPixel(ushort x, ushort y)
Comments
This method returns the color value as a System.Drawing.Color object of a given by coordinates pixel of
the image buffer.
x and y must be within the boundaries of the image, starting from 0. The maximum width can be supplied
either by the camera (GetCurrentResolution method), or the FireiStreamFormat properties Width
and Height.
Visual Basic syntax
Dim Color As System.Drawing.Color
Color = Frame.GetPixel(0, 0)
C# syntax
System.Drawing.Color Color = Frame.GetPixel(0, 0);
SetPixel method
Prototype
SetPixel(ushort x, ushort y, System.Drawing.Color color)
Comments
This method sets the color value from a System.Drawing.Color object to a given by coordinates pixel of
the image buffer.
x and y must be within the boundaries of the image, starting from 0. The maximum width can be supplied
either by the camera (GetCurrentResolution method), or the FireiStreamFormat properties Width
and Height.
Visual Basic syntax
Frame.SetPixel(0, 0, Drawing.Color.Black)
C# syntax
Frame.SetPixel(0, 0, Drawing.Color.Black);
Page view 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 94 95

Comments to this Manuals

No comments