Image data distribution method and device, as well as terminal and medium

JP2024519238A5Active Publication Date: 2025-03-18JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023536168
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-04-20
Filing Date
2022-04-08
Publication Date
2025-03-18
Estimated Expiration
2042-04-08

AI Technical Summary

Technical Problem

Intelligent hardware devices with multiple cameras face limitations as each camera can only support one application at a time, leading to conflicts and hardware inefficiencies.

Method used

An image data distribution method and apparatus that generates a surface texture instance to process camera-captured information, binds it with an image capture means instance, and distributes the image data to multiple applications and web page instances using interface callbacks.

Benefits of technology

Enables simultaneous support of multiple applications and functions, reducing hardware costs and enhancing user experience by distributing image data efficiently across multiple applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present disclosure provides an image data delivery method and device, a terminal and a storage medium, the method including the steps of: generating a surface texture instance for processing information captured by an image capture means, generating an image capture means instance corresponding to the image capture means, binding the image capture means instance with the surface texture instance, processing the information captured by the image capture means, and generating image data by the surface texture instance, capturing the image data in an interface callback manner by using the image capture means instance, and delivering the image data to an application and / or a page instance.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This disclosure claims priority based on Chinese Patent Application No. 202110424483.8, filed on April 20, 2021, the disclosure of which is hereby incorporated in its entirety into this disclosure.

[0002] The present invention relates to the field of computer technology, and in particular to an image data distribution method and device, a terminal and a storage medium. [Background technology]

[0003] The number of cameras of intelligent hardware (including intelligent entrance guard, intelligent sound box, etc.) may be one or more. The initiation of traditional camera function must have a surface carrier for preview, and one camera can only support one background application at the same time. Summary of the Invention [Means for solving the problem]

[0004] According to a first aspect of the present disclosure, there is provided an image data delivery method applicable to a terminal, comprising the steps of generating a surface texture instance for processing information captured by an image capture means, generating an image capture means instance corresponding to the image capture means, binding the image capture means instance with the surface texture instance, generating image data by the surface texture instance for processing the information captured by the image capture means, capturing the image data in an interface callback manner by using the image capture means instance, and delivering the image data to an application and / or a page instance.

[0005] In some embodiments, the step of capturing the image data in an interface callback manner by using the image capture means instance includes the steps of creating an image capture callback interface in the image capture means instance, the image capture callback interface being used to realize callback transmission of the image data and to provide an image data transmission method; providing the image capture callback interface to the surface texture instance; and receiving the image data sent by the surface texture instance by executing a callback in the image data transmission method by using the image capture means instance.

[0006] In some embodiments, the step of delivering the image data to an application and / or page instance includes a step of determining whether an image data delivery interface of the application and / or the page instance is registered with the image capture means instance, wherein the image data delivery interface is used to realize callback delivery of the image data and to provide an image delivery method, and a step of delivering the image data to the corresponding application and / or page instance by the image capture means instance performing a callback in the image delivery method if the image data delivery interface of the application and / or the page instance is registered with the image capture means instance.

[0007] In some embodiments, the application and / or the page instance receives the image data delivered by the image capture means instance by executing a callback in the image delivery method, and processing is performed based on the image data.

[0008] In some embodiments, the applications include a video preview application, a facial recognition application, a recording application, and a quick response (QR) code (registered trademark) scanning application, and the step of performing processing based on the image data includes a step in which the video preview application performs video interface rendering based on the image data, a step in which the facial recognition application inputs the image data into a facial recognition software development kit (SDK) for processing, and a step in which the facial recognition application performs facial recognition processing based on the processing result, a step in which the recording application performs recording based on the image data, and a step in which the QR code (registered trademark, same as below) scanning application performs a QR code identification processing based on the image data.

[0009] In some embodiments, the step of generating a surface texture instance for processing information captured by the image capture means includes the steps of creating a texture instance by using OpenGL ES and generating the surface texture instance by using the texture instance.

[0010] In some embodiments, the step of generating an image capture means instance corresponding to the image capture means includes the steps of determining whether the image capture means is activated and generating the image capture means instance if it is determined that the image capture means is activated.

[0011] In some embodiments, the step of binding the image capture means instance with the surface texture instance includes a step of determining whether the surface texture instance is to be generated, and if it is determined that the surface texture instance is to be generated, a step of providing the surface texture instance to the image capture means instance, wherein the image capture means instance realizes the step of binding with the surface texture instance by adopting the surface texture instance as a call parameter.

[0012] In some embodiments, said image capture means comprises a camera and said image data comprises video streaming data.

[0013] According to a second aspect of the present disclosure, an image data distribution device applicable to a terminal is provided, comprising: a texture instance generation module configured to generate a surface texture instance for processing information captured by an image capture means; a means instance generation module configured to generate an image capture means instance corresponding to the image capture means; an instance binding processing module configured to bind the image capture means instance with the surface texture instance; an image data generation module configured to generate image data using the surface texture instance for processing the information captured by the image capture means; and an image data distribution module configured to capture the image data in an interface callback manner by using the image capture means instance and to deliver the image data to an application and / or page instance.

[0014] In some embodiments, the image data delivery module comprises an interface callback unit configured to create an image capture callback interface in the image capture means instance, the image capture callback interface being used to realize callback transmission of the image data and to provide an image data transmission method, the interface callback unit configured to provide the image capture callback interface to the surface texture instance, and configured to receive the image data sent by the surface texture instance by executing a callback in the image data transmission method by using the image capture means instance.

[0015] In some embodiments, the image data delivery module comprises a callback delivery unit configured to determine whether an image data delivery interface of the application and / or the page instance is registered with the image capture means instance, wherein the image data delivery interface is used to realize callback delivery of the image data and to provide an image delivery method, and configured to deliver the image data to the corresponding application and / or the page instance by the image capture means instance performing a callback in the image delivery method if the image data delivery interface of the application and / or the page instance is registered with the image capture means instance.

[0016] In some embodiments, the texture instance generation module is specifically configured to create a texture instance by using OpenGL ES, and to generate the surface texture instance by using the texture instance.

[0017] In some embodiments, the means instance generation module is specifically configured to determine whether the image capture means is activated, and is specifically configured to generate the image capture means instance if it is determined that the image capture means is activated.

[0018] In some embodiments, the instance binding processing module is specifically configured to determine whether the surface texture instance is to be generated, and if it is determined that the surface texture instance is to be generated, is specifically configured to provide the surface texture instance to the image capture means instance, and the image capture means instance realizes the binding with the surface texture instance by adopting the surface texture instance as a call parameter.

[0019] According to a third aspect of the present disclosure, there is provided an image data distribution device applicable to a terminal, comprising: a memory; and a processor coupled to the memory, the processor configured to execute the method as described above based on instructions stored in the memory.

[0020] According to a fourth aspect of the present disclosure, a terminal is provided, comprising the image data distribution device as described above.

[0021] According to a fifth aspect of the present disclosure, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, perform a method as described above.

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure or related art, the drawings that need to be used in the description of the embodiments or related art will be briefly described below. The drawings in the following description are merely some embodiments of the present disclosure, and it is obvious to those skilled in the art that other drawings can also be obtained according to the drawings without creative efforts. [Brief description of the drawings]

[0023] [Figure 1] 1 is a schematic flow diagram of some embodiments according to an image data distribution method of the present disclosure. [Diagram 2] 1 is a schematic flow diagram of capturing image data of some embodiments according to the image data distribution method of the present disclosure. [Diagram 3] 1 is a schematic flow diagram of image data distribution of some embodiments according to the image data distribution method of the present disclosure. [Figure 4] 11 is a schematic flow chart of another embodiment of the image data distribution method of the present disclosure. [Diagram 5] FIG. 1 is a schematic block diagram of some embodiments of an image data distribution device of the present disclosure. [Figure 6] FIG. 2 is a schematic block diagram of an image data distribution module in some embodiments of an image data distribution device of the present disclosure. [Figure 7] FIG. 13 is a schematic block diagram of another embodiment of the image data distribution device of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0024] A more comprehensive description of the present disclosure is given below with reference to the accompanying drawings, in which exemplary embodiments of the present disclosure are illustrated. The technical solutions in the embodiments of the present disclosure will be clearly and completely described with reference to the drawings of the embodiments of the present disclosure, and it is obvious that the described embodiments are merely some embodiments of the present disclosure, rather than all embodiments. All other embodiments that can be obtained by those skilled in the art without creative efforts based on the embodiments in the present disclosure should be within the scope of protection of the present disclosure. The technical solutions of the present disclosure are described in various aspects below together with the drawings and embodiments.

[0025] In the related art known by the present inventors, in the actual application of intelligent hardware, there may be multiple applications running simultaneously in the background, all of which need to use the camera. One camera cannot support multiple applications at the same time, and then the collision and abnormality of multiple applications will probably occur. Since the number of cameras of the intelligent hardware is uncertain, and the applications working simultaneously are also uncertain, multiple applications may not be supported due to insufficient cameras, on the other hand, if an intelligent terminal is provided with too many cameras, it will also cause hardware waste.

[0026] In view of this, one technical problem to be solved by the present invention is to provide an image data distribution method and device, a terminal and a storage medium that can distribute image information captured by a camera to multiple web page instances and multiple applications, so that multiple functions are supported simultaneously. In addition, the present invention can overcome the shortcoming in the prior art that one camera can only support one function at the same time, and therefore can reduce hardware costs and improve the user's usage experience.

[0027] FIG. 1 is a schematic flow chart of one embodiment of the image data distribution method of the present disclosure, which is applied to a terminal as shown in FIG.

[0028] Step 101, generating a surface texture instance for processing information captured by an image capture means.

[0029] In one embodiment, the terminal may be an intelligent hardware such as an intelligent entrance guard, an intelligent sound box, and the terminal may also be a mobile phone, etc. The image capturing means may be a video camera, a camera, etc. mounted on the terminal, and image information is captured through the image capturing means. The surface texture instance can process the image information captured through the video camera, the camera, etc. to generate video streaming data, etc.

[0030] Step 102, creating an image capture device instance corresponding to the image capture device.

[0031] Step 103, binding an image capture means instance with a surface texture instance.

[0032] Step 104, generating image data according to the surface texture instances processing the information captured by the image capturing means, the image data including video streaming data, etc.

[0033] Step 105, capturing image data in an interface callback manner by using an image capturing means instance, and delivering the image data to an application and / or a page instance.

[0034] Based on the image data distribution method of the present disclosure, in the case where the video streaming data is captured by one or more cameras, the video streaming data is distributed to multiple web page instances, multiple applications, etc. For example, a terminal is equipped with one camera, and the image information captured by the camera is distributed to multiple web page instances and multiple applications to simultaneously support multiple functions, thus realizing "one camera for multiple applications", in addition, the above method can overcome the shortcoming of the prior art that one camera can only support one function at the same time, and as a result, the hardware cost can be reduced.

[0035] In some embodiments, various approaches may be adopted to generate surface texture instances for processing information captured by an image capture means. Texture instances are created using OpenGL ES (OpenGL for Embedded Systems), and surface texture instances are generated by using the texture instances. OpenGL ES (OpenGL for Embedded Systems) is a subset of the OpenGL three-dimensional graphics API, designed for embedded devices such as mobile phones, PDAs, and game consoles.

[0036] For example, a surface texture instance is / / Create an opgl texture int mInputTexture = OpenGlUtils.createOESTexture(); / / Create a surfaceTexture using the generated texture instance, i.e. set the surfaceTexture to receive the preview data for the camera. SurfaceTexture mSurfaceTexture = new SurfaceTexture (mInputTexture) is created as

[0037] The surface texture instance created by using the texture instance is mSurfaceTexture, which is bound to the camera instead of the SurfaceView, captures the data captured by the camera, and processes the data. The surface texture instance can process the data captured by the camera by using existing methods.

[0038] Various approaches may be adopted to generate an image capture mechanism instance corresponding to an image capture mechanism. It is determined whether the image capture mechanism is started, and if it is determined that the image capture mechanism is started, an image capture mechanism instance is generated. For example, an image capture mechanism instance is created based on a class corresponding to a camera, and the image capture mechanism instance is capable of capturing data information captured by a particular camera. Creating an image capture mechanism instance is: Camera camera = Camera.open(cameraId), where camera is the image capture mechanism instance.

[0039] There may be various approaches for binding the image capture means instance with the surface texture instance. It is determined whether the surface texture instance is generated, and if it is determined that the surface texture instance is generated, the surface texture instance is provided to the image capture means instance, and the image capture means instance is bound with the surface texture instance by taking the surface texture instance as a call parameter. For example, using camera.setPreviewTexture(mSurfaceTexture), the image capture means instance is bound with the surface texture instance, where the image capture means instance, camera, takes the surface texture instance mSurfaceTexture as a call parameter, so that binding of mSurfaceTexture with camera can be realized.

[0040] FIG. 2 is a schematic flow diagram of capturing image data in some embodiments according to the image data distribution method of the present disclosure. As shown in FIG. 2:

[0041] Step 201: creating an image capture callback interface in an image capture means instance, where the image capture callback interface is used to realize callback sending of image data and provide an image data sending method.

[0042] Step 202, providing an image capture callback interface to a surface texture instance.

[0043] Step 203, receiving the image data sent by the surface texture instance by executing a callback in the image data sending method by using the image capturer instance.

[0044] In some embodiments, an interface callback calls a method in which a reference to an object created by using a class of a certain interface can be assigned to an interface variable declared by that interface, so that the interface variable can invoke the interface implemented by the class. The purpose of the callback is to send data and keep the data updated synchronously. The interface callback method compatible with this disclosure may be any of the many existing interface callback methods, such as the JAVA interface callback method.

[0045] The image data send method may be a callback method, which is a method that is called by a method pointer. If a pointer (address, reference) of the image data send method is passed to a certain method of a surface texture instance through a formal parameter, the image data send method can be called when the surface texture instance calls the pointer passed to the method.

[0046] In some embodiments, a surface texture instance (SurfaceTexture) is created in the background through OpenGl ES, where SurfaceTexture may be an existing class or instance. After the camera is opened, the surface texture instance (SurfaceTexture) is bound to an image capturer instance (Camera) to begin previewing and processing the information captured by the camera. An image capture callback interface Camera.PreviewCallback is implemented and created in the image capturer instance, and an image data sending method is provided in Camera.PreviewCallback.

[0047] An image capture callback interface Camera.PreviewCallback is provided to the surface texture instance (SurfaceTexture) (this Camera.PreviewCallback is registered with the surface texture instance SurfaceTexture, an image data send method is provided in Camera.PreviewCallback, and a reference to the image data send method is sent to the surface texture instance).

[0048] When the surface texture instance (SurfaceTexture) determines that image data is available, it executes a callback in the image data sending method provided in Camera.PreviewCallback. The image capture means instance (Camera) receives the image data sent by the surface texture instance (SurfaceTexture) by executing a callback in the image data sending method provided in Camera.PreviewCallback.

[0049] FIG. 3 is a schematic flow diagram of image data distribution according to some embodiments of the image data distribution method of the present disclosure. As shown in FIG. 3:

[0050] Step 301, is to determine whether an image data delivery interface of an application and / or page instance is registered with an image capture means instance, where the image data delivery interface is used to realize callback delivery of image data and provide an image delivery method.

[0051] In some embodiments, an application and / or a page instance defines and creates an image data delivery interface that includes an image delivery method. To implement the image delivery method, the application and / or page instance registers the image data delivery interface and the image delivery method within the image capture instrument instance and sends a reference or address of the image data delivery interface and the image delivery method to the image capture instrument instance. Registering the image data delivery interface and sending the instance or address may be performed by using existing methods.

[0052] The image capturer instance calls back the registered image data delivery interface and image delivery method of the application and / or page instance under a trigger condition. The trigger condition may be that the image capturer instance receives image data sent by the surface texture instance by executing a callback in the image data send method.

[0053] Customized interface callback methods are registered for different functional pages or locations that require streaming data, and when the callback data is received by the Camera, it checks whether the registered interface exists, and if the registered interface exists, the data is fed back to the registered page via the interface.

[0054] Step 302, delivering image data to a corresponding application and / or page instance by an image capturer instance executing a callback on an image delivery method when an image data delivery interface of the application and / or page instance is registered with the image capturer instance.

[0055] In some embodiments, the applications include a video preview application, a face recognition application, a video recording application, a quick response (QR) code scanning application, etc., and the application and page instances receive image data delivered by the image capture means instance by performing a callback in the image data delivery method and perform processing based on the image data. For example, the video preview application performs video interface rendering based on the image data, the face recognition application inputs the image data to a face recognition software development kit (SDK) for processing and performs face recognition processing based on the processing result, the video recording application performs video recording based on the image data, and the QR code scanning application performs QR code recognition processing based on the image data.

[0056] FIG. 4 is a schematic flow chart of another embodiment of the image data distribution method of the present disclosure. As shown in FIG. 4:

[0057] Step 401: Initialize OpenGL ES settings.

[0058] Step 402, creating a texture instance.

[0059] Step 403, generating a surface texture instance by using the texture instance.

[0060] Step 404 , determining whether the camera is started, and if so, proceeding to step 407 , otherwise proceeding to step 405 .

[0061] Step 405, setting camera-related parameters and starting the camera.

[0062] Step 406 , determining whether a surface texture instance is to be generated, if so proceeding to step 407 , and if not proceeding to step 401 .

[0063] Step 407, binding an image capture mechanism instance with a surface texture instance.

[0064] Step 408, capturing image data in an interface callback manner by using an image capture means instance, and delivering the image data.

[0065] System background such as Android captures the video streaming data by binding SurfaceTexture with Camera, and the video streaming data is always present; when one or more functions of different pages need the video streaming data for certain functions, the video streaming data is returned through the registered interface by adapting the interface callback mechanism, so that multiple functions can be executed simultaneously.

[0066] For the video preview function, an Android system component surfaceView receives the video streaming data delivered by the image capture means instance and performs video interface rendering. For the face recognition function, the video streaming data delivered by the image capture means is sent to a different face recognition SDK, and after internal processing, the SDK compares the processing result with the face information already input to realize the face recognition function. For the recording function, by using an instance of the MediaCodec class provided by Android, the video streaming data delivered by the image capture means is received for recording.

[0067] In some embodiments, as shown in Fig. 5, the present disclosure provides an image data distribution device 50 applied to a terminal, which includes a texture instance generation module 51, a means instance generation module 52, an instance binding processing module 53, an image data generation module 54, and an image data distribution module 55. The texture instance generation module 51 generates a surface texture instance for processing information captured by an image capture means. The means instance generation module 52 generates an image capture means instance corresponding to the image capture means.

[0068] The instance binding processing module 53 binds the image capturer instance with the surface texture instance. The image data generation module 54 generates image data by the surface texture instance which processes the information input by the image capturer. The image data delivery module 55 retrieves the image data in an interface callback manner by using the image capturer instance, and delivers the image data to the application and / or page instance.

[0069] In some embodiments, the texture instance generation module 51 creates a texture instance by using OpenGL ES, and generates a surface texture instance by using the texture instance. The instrument instance generation module 52 determines whether an image capture instrument is initiated, and if it is determined that the image capture instrument is initiated, the instrument instance generation module 52 generates an image capture instrument instance.

[0070] The instance binding processing module 53 determines whether a surface texture instance is to be generated, and if it is determined that the surface texture instance is to be generated, the instance binding processing module 53 provides the surface texture instance to the image capture means instance, where the image capture means instance realizes binding with the surface texture instance by adopting the surface texture instance as a call parameter.

[0071] 6, the image data delivery module 55 includes an interface callback unit 551 and a callback delivery unit 552. The interface callback unit 551 creates an image capture callback interface in an image capture means instance, where the image capture callback interface is used to realize callback transmission of image data and provide an image data transmission method.

[0072] The interface callback unit 551 provides an image capture callback interface to the surface texture instance, and receives image data sent by the surface texture instance by executing a callback in the image data sending method by using the image capturer instance.

[0073] The callback delivery unit 552 determines whether the image data delivery interface of the application and / or page instance is registered with the image capture means instance, where the image data delivery interface is used to realize the callback delivery of image data and provide the image delivery method. If the image data delivery interface of the application and / or page instance is registered with the image capture means instance, the callback delivery unit 552 delivers the image data to the corresponding application and / or page instance by the image capture means instance that executes the callback in the image delivery method.

[0074] In some embodiments, the present disclosure provides an image data distribution device applied to a terminal. As shown in Fig. 7, the image data distribution device may include a memory 71, a processor 72, a communication interface 73, and a bus 74. The memory 71 is used to store instructions, and the processor 72 is connected to the memory 71, and the processor 72 is configured to perform the image data distribution method described above based on the instructions stored in the memory 71.

[0075] The memory 71 may be a high-speed RAM memory, a non-volatile memory (NVM), etc., or the memory 71 may also be a memory array. The memory 71 may also be partitioned into blocks, and the blocks may be aggregated into virtual volumes according to certain rules. The processor 72 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the image data distribution method of the present disclosure.

[0076] In some embodiments, the present disclosure provides a terminal, comprising an image data distribution device of any of the above embodiments.

[0077] In some embodiments, the present disclosure provides a computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, perform the method of any of the above embodiments.

[0078] The computer-readable storage medium can employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (not exhaustively listed) of the readable storage medium may include an electrical connection having one or more wires, a portable diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0079] According to the image data distribution method and apparatus, terminal, and storage medium of the above embodiments, a surface texture instance and an image capture means instance are generated and bound, the information captured by the image capture means is processed by the surface texture instance, the image data is captured in an interface callback manner by using the image capture means instance, and the image data is distributed to application and page instances, and the image information captured by the camera can be distributed to multiple web page instances and multiple applications to support multiple functions simultaneously, so that "one camera for multiple applications" is realized, and the disadvantage that one camera can only support one function at the same time in the prior art can be overcome, therefore the hardware cost can be reduced, and the user's usage experience can be improved.

[0080] Although the basic principles of the present disclosure have been described above in conjunction with specific embodiments, it should be noted that the advantages, benefits, effects, etc. described in the present disclosure are merely examples rather than limitations, and should not be considered essential to various embodiments of the present disclosure. It should be recognized by those skilled in the art that the embodiments of the present disclosure may be provided as a method, a system, or a computer program product. Thus, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied in one or more computer usable non-transitory storage media (including, but not limited to, disk memory, CD-ROM, optical memory, etc.) having computer usable program code embodied in the computer program product.

[0081] The present disclosure will be described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each flow and / or block of the flowcharts and / or block diagrams, and combinations of flows and / or blocks of the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to create a machine, such that the instructions executed by the processor of the computer or other programmable data processing device create means for implementing the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams.

[0082] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture that includes instruction means that implement the functions specified in one or more flows of the flowcharts and / or one or more blocks of the block diagrams.

[0083] The method and system of the present disclosure can be implemented in many ways. For example, the method and system of the present disclosure may be implemented via software, hardware, firmware, or any combination of the above. The above order of steps of the method is merely for illustration purposes, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless specifically stated otherwise. Furthermore, in some embodiments, the present disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for carrying out the method according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for carrying out the method according to the present disclosure.

[0084] The description of the present disclosure is presented for the purpose of illustration and explanation, and is not intended to be exhaustive or limiting to the disclosed form of the present disclosure. Many modifications and variations will be apparent to those skilled in the art. The selection and description of the embodiments will better explain the principles and practical applications of the present disclosure, and enable those skilled in the art to understand the present disclosure and design various embodiments with various modifications suitable for specific use. [Explanation of symbols]

[0085] 50 Image data distribution device 51 Texture instance generation module 52 Means instance generation module 53 Instance Binding Processing Module 54 Image data generation module 55 Image data distribution module 551 Interface Callback Unit 552 Callback Delivery Unit 71 Memory 72 processors 73 Communication Interface 74 Bus

Claims

1. An image data delivery method applied to a terminal, comprising: generating a surface texture instance for processing the information captured by the image capture means; creating an image capture mechanism instance corresponding to said image capture mechanism; binding said image capture means instance with said surface texture instance; generating image data from the surface texture instances processing the information captured by the image capture means; capturing the image data in an interface callback manner by using the image capture means instance, and delivering the image data to an application and / or page instance; An image data distribution method comprising:

2. The step of capturing the image data by using the image capture means instance in an interface callback manner includes: creating an image capture callback interface in the image capture means instance, the image capture callback interface being used to realize callback transmission of the image data and to provide an image data transmission method; providing the image capture callback interface to the surface texture instance; receiving, by using the image capturer instance, the image data sent by the surface texture instance by executing a callback in the image data sending method; The image data distribution method according to claim 1 , comprising:

3. The step of delivering the image data to an application and / or page instance comprises: determining whether an image data delivery interface of the application and / or the page instance is registered with the image capture mechanism instance, the image data delivery interface being used to realize callback delivery of the image data and to provide an image delivery method; delivering the image data to the corresponding application and / or page instance by the image capturer instance executing a callback in the image delivery method if the image data delivery interface of the application and / or the page instance is registered with the image capturer instance; The image data distribution method according to claim 1 , comprising:

4. said application and / or said page instance receiving said image data delivered by said image capture means instance by executing a callback in said image delivery method, and performing processing based on said image data. The image data delivery method according to claim 3 , further comprising:

5. The application includes a video preview application, a face recognition application, a video recording application, and a quick response (QR) code scanning application, and the step of performing a process based on the image data includes: the video preview application performing video interface rendering based on the image data; the face recognition application inputting the image data into a face recognition software development kit (SDK) for processing, and performing face recognition processing based on the processing result; the video recording application performing video recording based on the image data; and the QR code scanning application performing QR code identification processing based on the image data. The image data delivery method according to claim 4, further comprising:

6. said generating a surface texture instance for processing information captured by an image capture means, creating a texture instance by using OpenGL ES; generating the surface texture instance by using the texture instance; The image data distribution method according to claim 1 , comprising:

7. said step of generating an image capture means instance corresponding to said image capture means comprising: determining whether the image capture means is activated; creating an image capture means instance if it is determined that the image capture means is to be started; The image data distribution method according to claim 1 , comprising:

8. The step of binding the image capture means instance with the surface texture instance comprises: determining whether the surface texture instance is to be generated; if it is determined that the surface texture instance is to be generated, providing the surface texture instance to the image capture means instance, the image capture means instance realizing the binding step with the surface texture instance by taking the surface texture instance as a call parameter; The image data distribution method according to claim 1 , comprising:

9. the image capture means comprises a camera and the image data comprises video streaming data; The image data distribution method according to claim 1.

10. An image data distribution device applied to a terminal, a texture instance generation module configured to generate surface texture instances for processing the information captured by the image capture means; an instrument instance creation module configured to create an image capture instrument instance corresponding to the image capture instrument; an instance binding processing module configured to bind the image capture means instances with the surface texture instances; an image data generation module configured to process the information captured by the image capture means to generate image data according to the surface texture instances; an image data delivery module configured to capture the image data in an interface callback manner by using the image capture means instance and to deliver the image data to an application and / or page instance; An image data distribution device comprising:

11. The image data distribution module includes: an interface callback unit configured to create an image capture callback interface in the image capture means instance, the image capture callback interface being used to realize a callback transmission of the image data and to provide an image data transmission method; configured to create and provide the image capture callback interface to the surface texture instance; and configured to receive the image data sent by the surface texture instance by executing a callback in the image data transmission method by using the image capture means instance; Equipped with 11. The image data distribution device according to claim 10.

12. The image data distribution module includes: a callback delivery unit configured to determine whether an image data delivery interface of the application and / or the page instance is registered with the image capture means instance, the image data delivery interface being used to realize a callback delivery of the image data and to provide an image delivery method, and configured to deliver the image data to the corresponding application and / or the page instance by the image capture means instance executing a callback in the image delivery method if the image data delivery interface of the application and / or the page instance is registered with the image capture means instance. Equipped with 11. The image data distribution device according to claim 10.

13. The texture instance generation module is specifically configured to create a texture instance by using OpenGL ES, and to generate the surface texture instance by using the texture instance.

11. The image data distribution device according to claim 10.

14. the instrument instance generation module is specifically configured to determine whether the image capture instrument is activated, and is specifically configured to generate the image capture instrument instance if it is determined that the image capture instrument is activated.

11. The image data distribution device according to claim 10.

15. the instance binding processing module is specifically configured to determine whether the surface texture instance is to be generated, and if it is determined that the surface texture instance is to be generated, to provide the surface texture instance to the image capture means instance, and the image capture means instance realizes the binding with the surface texture instance by taking the surface texture instance as a call parameter; 11. The image data distribution device according to claim 10.

16. An image data distribution device applied to a terminal, A memory; and a processor coupled to the memory, the processor configured to execute the method of any one of claims 1 to 9 based on instructions stored in the memory. An image data distribution device comprising:

17. The image data distribution device according to any one of claims 10 to 16. A terminal comprising:

18. A computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, perform the method of any one of claims 1 to 9.