We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

TxtImageSuperResolution

Class Info

com.huawei.hiai.vision.image.sr.TxtImageSuperResolution

Upscales text in an image by three times and improves the definition of the text.

Public Constructor Summary

Constructor Name

TxtImageSuperResolution(Context context)

Constructs an object instance.

Public Method Summary

Qualifier and Type

Method Name

ImageResult

doSuperResolution(Frame frame, IVisionCallback cb)

Performs text super-resolution processing and returns ImageResult .

Public Constructors

TxtImageSuperResolution

Constructor

public TxtImageSuperResolution (Context context)

Constructs an object instance.

Parameters

Name

Description

context

Activity or application instance.

doSuperResolution

Method

public ImageResult doSuperResolution(Frame frame, IVisionCallback cb)

Performs text super-resolution processing and returns ImageResult .

Parameters

Name

Description

frame

Image data. Frame supports encapsulation of bitmap image data only, and will subsequently support image data in the form of file path or ByteBuffer. The resolution of the input image cannot be greater than 13.4 MP, and the width and height cannot be less than 506 pixels.

cb

Callback function object. Currently, asynchronous processing is not supported.

  • Null indicates synchronous processing.
  • A non-null input (callback object) indicates asynchronous processing, which returns results asynchronously.
Return

Type

Description

ImageResult

Processed image information, where the Bitmap object can be obtained by using the getBitmap method of the class of the returned result.

Search
Enter a keyword.