Jump to content

Recommended Posts

Posted

Hi,

I need to get camera frame buffer to implement my own barcode scanner that don't rely on Google Play Services an Vision libs.

Is there any way to get camera frame buffer in FGX Framework like FMX?

thanks.

  • Administrators
Posted

Hello,

We don't provide direct access to frame buffer for performance side. However, you can access the Android's native camera and connect your source, which will receive the frames like we did in Barcode scanner implementation. We have special abstractions for it.

You should implement FGX.Camera.Types.IFGXCameraClient interface. For the Android you can use FGX.Scanner.Barcode.Android.TfgAndroidImageReaderBuffer instance, which implements IFGXCameraClientInfo.

  /// <summary>Буфер на основе ImageReader.</summary>
  TfgAndroidImageReaderBuffer = class(TfgNaturalInterfacedObject, IFGXImageBuffer, IFGXCameraClientInfo)
  private
    FRawSize: TSize;
    FImageFormat: TfgImageFormat;
    FImageReader: JImageReader;
    FSurface: JSurface;
    { IFGXImageBuffer }
    function GetSurface: JSurface;
    { IFGXCameraClientInfo }
    function GetRawBufferSize: TSize;
  public
    constructor Create(const ARawSize: TSize; const AFormat: TfgImageFormat);
    destructor Destroy; override;
  public
    property RawSize: TSize read GetRawBufferSize;
    property ImageFormat: TfgImageFormat read FImageFormat;
    property ImageReader: JImageReader read FImageReader;
  end;

This class incapsulate ImageReader, which is receiver for camera frames.

Thank you

  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...