CN109669783B - Data processing method and device - Google Patents
Data processing method and device Download PDFInfo
- Publication number
- CN109669783B CN109669783B CN201710953537.3A CN201710953537A CN109669783B CN 109669783 B CN109669783 B CN 109669783B CN 201710953537 A CN201710953537 A CN 201710953537A CN 109669783 B CN109669783 B CN 109669783B
- Authority
- CN
- China
- Prior art keywords
- image data
- channel
- data
- processing method
- multiple channels
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/545—Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0007—Image acquisition
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/543—Local
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/28—Indexing scheme for image data processing or generation, in general involving image processing hardware
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Image Processing (AREA)
Abstract
本发明实施例提供一种数据处理方法和设备,该方法包括:接收硬件抽象层发送的多路图像数据;从多路图像数据中选出至少一路第一图像数据;根据设定的数据处理方式对选出的至少一路第一图像数据进行处理。在应用程序框架层中实现对多路图像数据的处理,降低了应用程序的开发难度,而且,在应用程序框架层中,针对某种数据处理方式,仅从多路图像数据中选择出一路最合适的图像数据进行该数据处理方式的处理,而并非对全部多路图像数据都进行该数据处理方式的处理,从而降低了数据处理成本,即降低了对处理资源的消耗。Embodiments of the present invention provide a data processing method and device. The method includes: receiving multiple channels of image data sent by the hardware abstraction layer; selecting at least one channel of first image data from the multiple channels of image data; and processing the data according to the set method. Process the selected at least one first image data. Implementing the processing of multi-channel image data in the application framework layer reduces the difficulty of application development. Moreover, in the application framework layer, for a certain data processing method, only the best channel is selected from the multi-channel image data. Appropriate image data is processed in this data processing method, rather than all multi-channel image data is processed in this data processing method, thereby reducing data processing costs, that is, reducing consumption of processing resources.
Description
技术领域Technical field
本发明涉及操作系统技术领域,尤其涉及一种数据处理方法和设备。The present invention relates to the technical field of operating systems, and in particular, to a data processing method and device.
背景技术Background technique
手机等终端设备中一般都提供了相机(camera)功能,并且,终端设备中也会存在一些应用程序会使用到相机采集的数据,比如视频通话应用、图像处理应用等。Terminal devices such as mobile phones generally provide a camera function, and there are also some applications in the terminal device that use the data collected by the camera, such as video call applications, image processing applications, etc.
一般来说,相机在被使用过程中,会同时输出多路数据,如预览、拍照、录像、回调等图像数据,而需要使用图像数据的应用程序往往需要同时对多路数据进行各种处理:如对预览、拍照、录像这三路图像数据都进行美颜、滤镜、特定物体识别等处理。比如在预览数据上增加美颜效果,同时希望该效果也同步到拍照数据中。Generally speaking, when a camera is used, it will output multiple channels of data at the same time, such as preview, photo, video, callback and other image data. Applications that need to use image data often need to perform various processing on multiple channels of data at the same time: For example, the three channels of image data including preview, photo taking, and video recording are processed such as beautification, filters, and specific object recognition. For example, adding a beauty effect to the preview data, and hoping that the effect will also be synchronized to the photo data.
目前,Android等操作系统中对图像数据的处理一般涉及到应用层(Application)、应用程序框架层(Application Framework)、硬件抽象层(HardwareAbstraction Layer)等。处理过程可以简单描述为:硬件抽象层将图像采集到的多路图像数据传输至应用程序框架层,从而,如图1所示,应用程序框架层通过各自独立的接口将多路图像数据分别发送至应用程序,应用程序分别重复地对各路图像数据进行处理,比如:假设应用程序需要对接收的图像数据进行美颜的处理,并且假设接收到两路图像数据,则应用程序需要对这两路图像数据分别进行美颜的处理,这会成倍增加资源消耗,比如会成倍增加CPU运算和带宽消耗,功耗也会大大增加。另外,为实现应用程序对多路图像数据的各种处理以及保证多路图像数据的处理同步性,应用程序需开发复杂的软件方案来保证多路图像数据的并行化处理,而且要保证处理图像数据时不能影响到诸如UI等重要线程的处理,这使得应用程序的开发难度较大。Currently, the processing of image data in operating systems such as Android generally involves the application layer (Application), application framework layer (Application Framework), hardware abstraction layer (HardwareAbstraction Layer), etc. The processing process can be simply described as: the hardware abstraction layer transmits the multi-channel image data collected by the image to the application framework layer. Therefore, as shown in Figure 1, the application framework layer sends the multi-channel image data separately through independent interfaces. To the application program, the application program repeatedly processes each channel of image data. For example: assuming that the application program needs to perform beautification processing on the received image data, and assuming that two channels of image data are received, the application program needs to process the two channels of image data. Each channel of image data is processed separately for beautification, which will exponentially increase resource consumption. For example, it will exponentially increase CPU operation and bandwidth consumption, and power consumption will also be greatly increased. In addition, in order to realize the application's various processing of multi-channel image data and ensure the synchronization of the processing of multi-channel image data, the application needs to develop complex software solutions to ensure the parallel processing of multi-channel image data, and to ensure the processing of images. Data cannot affect the processing of important threads such as UI, which makes application development more difficult.
发明内容Contents of the invention
有鉴于此,本发明实施例提供一种数据处理方法和设备,用以降低图像数据的处理成本以及应用程序的开发难度。In view of this, embodiments of the present invention provide a data processing method and device to reduce image data processing costs and application development difficulty.
第一方面,本发明实施例提供一种数据处理方法,应用于应用程序框架层中,包括:In a first aspect, embodiments of the present invention provide a data processing method, applied in the application framework layer, including:
接收硬件抽象层发送的多路图像数据;Receive multi-channel image data sent by the hardware abstraction layer;
从所述多路图像数据中选出至少一路第一图像数据;Select at least one channel of first image data from the multiple channels of image data;
根据设定的数据处理方式对选出的所述至少一路第一图像数据进行处理。The selected at least one channel of first image data is processed according to the set data processing method.
第二方面,本发明实施例提供一种数据处理装置,应用于应用程序框架层中,包括:In a second aspect, embodiments of the present invention provide a data processing device applied in an application framework layer, including:
接收模块,用于接收硬件抽象层发送的多路图像数据;The receiving module is used to receive multi-channel image data sent by the hardware abstraction layer;
选择模块,用于从所述多路图像数据中选出至少一路第一图像数据;A selection module configured to select at least one channel of first image data from the multiple channels of image data;
处理模块,用于根据设定的数据处理方式对选出的所述至少一路第一图像数据进行处理。A processing module, configured to process the selected at least one channel of first image data according to a set data processing method.
第三方面,本发明实施例提供一种电子设备,该电子设备可以实现为用户终端设备,包括处理器和存储器,所述存储器用于存储支持用户终端设备执行上述第一方面中数据处理方法的程序,所述处理器被配置为用于执行所述存储器中存储的程序。该电子设备中还可以包括通信接口,用于与其他设备或通信网络通信。In a third aspect, embodiments of the present invention provide an electronic device. The electronic device can be implemented as a user terminal device, including a processor and a memory. The memory is used to store information that supports the user terminal device in executing the data processing method in the first aspect. Program, the processor is configured to execute the program stored in the memory. The electronic device may also include a communication interface for communicating with other devices or communication networks.
另外,本发明实施例提供了一种计算机存储介质,用于储存该电子设备所用的计算机软件指令,其包含用于执行上述第一方面中数据处理方法所涉及的程序。In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the electronic device, which includes programs for executing the data processing method in the first aspect.
第四方面,本发明实施例提供一种数据处理方法,应用于应用程序中,包括:In the fourth aspect, embodiments of the present invention provide a data processing method applied in an application program, including:
将数据处理方式发送至应用程序框架层,以使所述应用程序框架层根据所述数据处理方式对接收自硬件抽象层的多路图像数据中的至少一路图像数据进行处理;Send the data processing method to the application framework layer, so that the application framework layer processes at least one channel of image data among the multiple channels of image data received from the hardware abstraction layer according to the data processing method;
接收所述应用程序框架层发送的处理后的图像数据。Receive processed image data sent by the application framework layer.
第五方面,本发明实施例提供一种数据处理装置,应用于应用程序中,包括:In a fifth aspect, embodiments of the present invention provide a data processing device applied in an application program, including:
发送模块,用于将数据处理方式发送至应用程序框架层,以使所述应用程序框架层根据所述数据处理方式对多路图像数据中的至少一路图像数据进行处理,所述多路图像数据由硬件抽象层发送至所述应用程序框架层;A sending module, configured to send the data processing method to the application framework layer, so that the application framework layer processes at least one of the multiple channels of image data according to the data processing method, and the multiple channels of image data are Sent by the hardware abstraction layer to the application framework layer;
接收模块,用于接收所述应用程序框架层发送的处理后的图像数据。A receiving module, configured to receive processed image data sent by the application framework layer.
第六方面,本发明实施例提供一种电子设备,该电子设备可以实现为用户终端设备,比如智能手机等,包括处理器和存储器,所述存储器用于存储支持该电子设备执行上述第四方面中数据处理方法的程序,所述处理器被配置为用于执行所述存储器中存储的程序。该电子设备中还可以包括通信接口,用于与其他设备或通信网络通信。In a sixth aspect, embodiments of the present invention provide an electronic device. The electronic device can be implemented as a user terminal device, such as a smartphone, and includes a processor and a memory. The memory is used to store and support the electronic device in executing the fourth aspect. The processor is configured to execute the program stored in the memory. The electronic device may also include a communication interface for communicating with other devices or communication networks.
另外,本发明实施例提供了一种计算机存储介质,用于储存该电子设备所用的计算机软件指令,其包含用于执行上述第四方面中数据处理方法所涉及的程序。In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the electronic device, which includes programs for executing the data processing method in the fourth aspect.
本发明实施例提供的数据处理方法和设备,对多路图像数据的处理在应用程序框架层实现。具体来说,可选地,位于应用层的应用程序可以将针对多路图像数据的数据处理方式发送至应用程序框架层,以使得应用程序框架层在接收到硬件抽象层发送的多路图像数据后,从多路图像数据中选出至少一路第一图像数据,进而对该至少一路第一图像数据进行该数据处理方式的处理。通过本方案,在应用程序框架层中实现对多路图像数据的处理,降低了应用程序的开发难度,而且,在应用程序框架层中,针对某种数据处理方式,并非对多路图像数据都进行该数据处理方式的处理,而比如仅从多路图像数据中选择出一路最合适的图像数据进行该数据处理方式的处理,从而降低了数据处理成本,即降低了对处理资源的消耗。In the data processing method and device provided by the embodiments of the present invention, the processing of multi-channel image data is implemented at the application framework layer. Specifically, optionally, the application program located at the application layer can send the data processing method for the multi-channel image data to the application framework layer, so that the application framework layer receives the multi-channel image data sent by the hardware abstraction layer. Finally, at least one channel of first image data is selected from the multiple channels of image data, and then the at least one channel of first image data is processed in the data processing method. Through this solution, the processing of multi-channel image data is realized in the application framework layer, which reduces the difficulty of application development. Moreover, in the application framework layer, for a certain data processing method, not all multi-channel image data can be processed. This data processing method is performed, and for example, only the most suitable image data is selected from multiple channels of image data to be processed in this data processing method, thereby reducing the data processing cost, that is, reducing the consumption of processing resources.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.
图1为现有技术提供的一种图像数据处理的原理示意图;Figure 1 is a schematic diagram of the principle of image data processing provided by the prior art;
图2为本发明实施例提供的一种数据处理方法的原理示意图;Figure 2 is a schematic diagram of the principle of a data processing method provided by an embodiment of the present invention;
图3为本发明实施例提供的一种数据处理方法的流程图;Figure 3 is a flow chart of a data processing method provided by an embodiment of the present invention;
图4为本发明实施例提供的另一种数据处理方法的流程图;Figure 4 is a flow chart of another data processing method provided by an embodiment of the present invention;
图5为本发明实施例提供的一种数据处理方法的交互图;Figure 5 is an interaction diagram of a data processing method provided by an embodiment of the present invention;
图6为与图3所示实施例对应的一种数据处理装置的结构示意图;Figure 6 is a schematic structural diagram of a data processing device corresponding to the embodiment shown in Figure 3;
图7为与图6所示数据处理装置对应的电子设备的结构示意图;Figure 7 is a schematic structural diagram of an electronic device corresponding to the data processing device shown in Figure 6;
图8为与图4所示实施例对应的一种数据处理装置的结构示意图;Figure 8 is a schematic structural diagram of a data processing device corresponding to the embodiment shown in Figure 4;
图9为与图8所示数据处理装置对应的电子设备的结构示意图。FIG. 9 is a schematic structural diagram of electronic equipment corresponding to the data processing device shown in FIG. 8 .
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present invention.
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种,但是不排除包含至少一种的情况。The terminology used in the embodiments of the present invention is only for the purpose of describing specific embodiments and is not intended to limit the present invention. As used in this embodiment and the appended claims, the singular forms "a," "the" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. Generally, at least two are included, but at least one is not excluded.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used in this article is only an association relationship describing related objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, and A and A exist simultaneously. B, there are three situations of B alone. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship.
应当理解,尽管在本发明实施例中可能采用术语第一、第二、第三等来描述XXX,但这些XXX不应限于这些术语。这些术语仅用来将XXX区分开。例如,在不脱离本发明实施例范围的情况下,第一XXX也可以被称为第二XXX,类似地,第二XXX也可以被称为第一XXX。It should be understood that although the terms first, second, third, etc. may be used to describe XXX in the embodiments of the present invention, these XXX should not be limited to these terms. These terms are only used to distinguish XXX. For example, without departing from the scope of the embodiments of the present invention, the first XXX may also be called the second XXX, and similarly, the second XXX may also be called the first XXX.
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if" or "if" as used herein may be interpreted as "when" or "when" or "in response to determination" or "in response to detection." Similarly, depending on the context, the phrase "if determined" or "if (stated condition or event) is detected" may be interpreted as "when determined" or "in response to determining" or "when (stated condition or event) is detected )" or "in response to detecting (a stated condition or event)".
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。It should also be noted that the terms "includes", "includes" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a good or system including a list of elements includes not only those elements but also those not expressly listed other elements, or elements inherent to the product or system. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the goods or systems that include the stated element.
另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。In addition, the sequence of steps in the following method embodiments is only an example and is not strictly limited.
图2为本发明实施例提供的一种数据处理方法的原理示意图,用于对多路图像数据进行相同的处理。如图2所示,Android等操作系统中对图像数据的处理一般涉及到应用程序(Application)层、应用程序框架(Application Framework)层、硬件抽象层(HardwareAbstraction Layer)等。本发明实施例提供的数据处理方法,是在应用程序框架层实现对多路图像数据的处理,以降低应用程序的开发难度,避免在应用程序中开发相关的处理逻辑;而且,可选地,在需要对多路图像数据进行某一种或多种处理时,针对每种处理,只需从多路图像数据中选择出最合适的一路图像数据进行该处理即可,将处理结果同步给或者说复用给其他路图像数据即完成了对多路图像数据的并行处理,从而克服对多路图像数据需要重复进行相同的处理导致处理成本增加的问题,降低了CPU计算成本、功耗、带宽等成本。FIG. 2 is a schematic diagram of the principle of a data processing method provided by an embodiment of the present invention, which is used to perform the same processing on multiple channels of image data. As shown in Figure 2, the processing of image data in operating systems such as Android generally involves the application layer, application framework layer, hardware abstraction layer, etc. The data processing method provided by the embodiment of the present invention implements the processing of multi-channel image data at the application framework layer to reduce the difficulty of application development and avoid developing relevant processing logic in the application; and, optionally, When it is necessary to perform one or more types of processing on multiple channels of image data, for each type of processing, you only need to select the most appropriate channel of image data from the multiple channels of image data to perform the processing, and the processing results are synchronized to or Multiplexing to other channels of image data completes the parallel processing of multiple channels of image data, thereby overcoming the problem of increasing processing costs due to the need to repeatedly perform the same processing on multiple channels of image data, and reducing CPU computing costs, power consumption, and bandwidth. and other costs.
值得说明的是,上述多路图像数据可以认为是同时产生的,差别主要在于每路图像数据的图像分辨率不同,比如,预览图像数据对应的图像分辨率小于拍照图像数据对应的图像分辨率。另外,以实际应用中较为常见的拍照场景为例来说,实际拍照过程中,并非仅产生一路拍照图像数据,而是会同时产生预览图像数据。同时产生的多路图像数据可以是直接由硬件产生的,也可以是由软件产生的。It is worth noting that the above-mentioned multiple channels of image data can be considered to be generated simultaneously. The difference mainly lies in the image resolution of each channel of image data. For example, the image resolution corresponding to the preview image data is smaller than the image resolution corresponding to the photographed image data. In addition, taking the more common photographing scenes in practical applications as an example, during the actual photographing process, not only the photographed image data is generated, but the preview image data is also generated at the same time. The multi-channel image data generated simultaneously can be generated directly by hardware or by software.
可选地,应用程序框架层中可以包括控制器、选择器、合成器三个组成部分,由这三个组成部分配合完成对接收自硬件抽象层的多路图像数据的处理,并可以将多路图像数据(例如:录像图像数据、拍照图像数据、预览图像数据)的处理结果反馈至应用程序。其中,这三个组成部分可以理解为是应用程序框架层中的三个功能模块,各自具有不同的处理逻辑,下面结合图3所示实施例,对应用程序框架层中的这三个组成部分如何相互配合完成对多路图像数据的处理进行说明。Optionally, the application framework layer can include three components: a controller, a selector, and a synthesizer. These three components work together to process the multi-channel image data received from the hardware abstraction layer, and can combine the multiple channels of image data. The processing results of the image data (for example: video image data, photographed image data, preview image data) are fed back to the application program. Among them, these three components can be understood as three functional modules in the application framework layer, each with different processing logic. The following is a description of these three components in the application framework layer in conjunction with the embodiment shown in Figure 3. How to cooperate with each other to complete the processing of multi-channel image data is explained.
值得说明的是,上述三个组成部分仅为人为划分的便于理解的一种示例,并非严格限定实际产品形态上一定会存在上述三个组成部分。It is worth noting that the above three components are only an example of artificial division for easy understanding, and are not strictly limited to the fact that the above three components must exist in the actual product form.
图3为本发明实施例提供的一种数据处理方法的流程图,本实施例提供的该数据处理方法在图2所示的应用程序框架层中实现。如图3所示,该方法包括如下步骤:FIG. 3 is a flow chart of a data processing method provided by an embodiment of the present invention. The data processing method provided by this embodiment is implemented in the application framework layer shown in FIG. 2 . As shown in Figure 3, the method includes the following steps:
101、接收硬件抽象层发送的多路图像数据。101. Receive multi-channel image data sent by the hardware abstraction layer.
102、从多路图像数据中选出至少一路第一图像数据。102. Select at least one channel of first image data from multiple channels of image data.
103、根据设定的数据处理方式对至少一路第一图像数据进行处理。103. Process at least one channel of first image data according to the set data processing method.
上述多路图像数据可以是由用户终端设备中的图像采集装置同时采集到的,经由硬件抽象层传输至应用程序框架层。The above-mentioned multi-channel image data may be collected simultaneously by the image acquisition device in the user terminal device, and transmitted to the application framework layer through the hardware abstraction layer.
在实际应用中,用户终端设备中往往会安装有需要使用摄像头的应用程序,比如一些图像处理应用程序、某些即时通信应用程序等。用户可以通过操作该应用程序以启动摄像头采集上述多路图像数据。In actual applications, user terminal devices are often installed with applications that require the use of cameras, such as some image processing applications, some instant messaging applications, etc. Users can operate the application to start the camera to collect the above-mentioned multi-channel image data.
另外,可选地,用户还可以在应用程序的相关界面中设置拍摄参数,比如设置需要摄像头采集哪些路图像数据,比如采集预览图像数据和拍照图像数据;比如采集预览图像数据和录像图像数据,等等,以控制摄像头采集相应的多路图像数据。另外,该界面中还可以提供数据处理方式的设置项,以供用户选择所需的数据处理方式,比如需要对多路图像数据进行滤镜、美颜、增强现实(AR)、人脸检测等一种或多种处理。In addition, optionally, the user can also set shooting parameters in the relevant interface of the application, such as setting which image data the camera needs to collect, such as collecting preview image data and photographed image data; such as collecting preview image data and video recording image data, And so on, to control the camera to collect corresponding multi-channel image data. In addition, the interface can also provide settings for data processing methods for users to select the required data processing methods, such as filtering, beautification, augmented reality (AR), face detection, etc. for multi-channel image data. One or more treatments.
当然,上述数据处理方式除了可以来自于用户在应用程序界面上的设置外,可选地,还可以为操作系统默认配置的数据处理方式等。Of course, in addition to the user's settings on the application program interface, the above data processing methods may also optionally be the data processing methods configured by default in the operating system.
从而,当用户在应用程序的界面中设定了数据处理方式时,应用程序会将用户设置的针对当前采集的多路图像数据的数据处理方式发送至应用程序框架层,由应用程序框架层中的控制器接收该数据处理方式,从而使得控制器触发选择器从多路图像数据中选出至少一路第一图像数据,以根据该数据处理方式对该至少一路第一图像数据进行处理。其中,选择出的至少一路第一图像数据的路数小于多路图像数据的路数。Therefore, when the user sets the data processing method in the application interface, the application will send the data processing method set by the user for the currently collected multi-channel image data to the application framework layer, and the application framework layer will The controller receives the data processing method, so that the controller triggers the selector to select at least one channel of first image data from the multiple channels of image data, so as to process the at least one channel of first image data according to the data processing method. Wherein, the number of channels of at least one channel of selected first image data is smaller than the number of channels of multiple channels of image data.
在一可选实施例中,从多路图像数据中选出至少一路第一图像数据可以实现为:从多路图像数据中选出与设定的数据处理方式对应的至少一路第一图像数据,此时,数据处理方式不仅指示了对图像数据需要进行什么样的数据处理,还可以作为图像数据选择的一种依据。In an optional embodiment, selecting at least one channel of first image data from multiple channels of image data can be implemented by: selecting at least one channel of first image data from multiple channels of image data that corresponds to the set data processing method, At this time, the data processing method not only indicates what kind of data processing needs to be performed on the image data, but can also be used as a basis for image data selection.
此时,可以根据预设的数据处理方式与图像数据的对应关系来进行针对任一种数据处理方式所对应的至少一种第一图像数据的选择,其中,一种数据处理方式可以对应有一种或几种图像数据。At this time, at least one kind of first image data corresponding to any data processing method can be selected according to the preset corresponding relationship between the data processing method and the image data, wherein one data processing method can correspond to one kind of first image data. or several image data.
由于针对当前同时采集的多路图像数据所设定的数据处理方式可能是一种也可能是多种,因此,需分别针对每种数据处理方式,从多路图像数据中选择出至少一路第一图像数据进行该数据处理方式的处理。不同数据处理方式对应的至少一路第一图像数据可能是不同的也可能是相同的。Since the data processing method set for the multi-channel image data currently collected at the same time may be one or multiple, it is necessary to select at least one first channel from the multi-channel image data for each data processing method. The image data is processed in this data processing method. At least one piece of first image data corresponding to different data processing methods may be different or the same.
在一种可选实施例中,应用程序框架层在根据设定的数据处理方式对选择出的至少一路第一图像数据进行处理后,可以将该至少一路第一图像数据的处理结果发送至应用程序,或者,也可以将该至少一路第一图像数据的处理结果以及多路图像数据中未处理的其他路图像数据发送至应用程序。In an optional embodiment, after the application framework layer processes the selected at least one channel of first image data according to the set data processing method, the application framework layer can send the processing result of the at least one channel of first image data to the application. program, or the processing result of the at least one channel of first image data and the unprocessed other channels of image data in the multiple channels of image data can also be sent to the application program.
举例来说,假设当前的多路图像数据包括预览图像数据和录像图像数据,设定的数据处理方式为美颜处理,假设从中选择出的至少一路第一图像数据为录像图像数据,则可以仅对该录像图像数据进行美颜处理,将美颜后的录像图像数据反馈至应用程序,而预览图像数据则可以不进行处理,直接反馈给应用程序供用户观看。For example, assuming that the current multi-channel image data includes preview image data and video recording image data, the set data processing method is beautification processing, and assuming that at least one first channel of image data selected therefrom is video recording image data, then only The video image data is beautified and the video image data after beautification is fed back to the application program. The preview image data does not need to be processed and is directly fed back to the application program for the user to watch.
在另一可选实施例中,在根据设定的数据处理方式对选择出的至少一路第一图像数据进行处理之后,还可以根据该至少一路第一图像数据的处理结果,处理多路图像数据中的至少一路第二图像数据,该至少一路第二图像数据是多路图像数据中除第一图像数据外剩余的全部或部分图像数据。从而,可选地,步骤103之后,还可以包括如下步骤:In another optional embodiment, after processing the selected at least one channel of first image data according to the set data processing method, multiple channels of image data can also be processed based on the processing results of the at least one channel of first image data. At least one channel of second image data in the at least one channel of second image data is all or part of the remaining image data in the multiple channels of image data except the first image data. Therefore, optionally, after step 103, the following steps may also be included:
104、根据至少一路第一图像数据的处理结果,处理多路图像数据中的至少一路第二图像数据。104. Process at least one channel of second image data among the multiple channels of image data according to the processing result of at least one channel of first image data.
105、将处理后的图像数据传输至应用程序;或者将处理后的图像数据以及多路图像数据中未被处理的图像数据传输至应用程序。105. Transmit the processed image data to the application program; or transmit the processed image data and the unprocessed image data in the multi-channel image data to the application program.
此时,处理后的图像数据包括处理后的第一图像数据以及处理后的第二图像数据。At this time, the processed image data includes processed first image data and processed second image data.
值得说明的是,本实施例中,是根据至少一路第一图像数据的处理结果,来对至少一路第二图像数据进行处理,而非直接采用上述设定的数据处理方式对该至少一路第二图像数据进行处理。其中,根据至少一路第一图像数据的处理结果对至少一路第二图像数据所进行的处理,可以简单理解为是将至少一路第一图像数据的处理结果复用或者说同步给该至少一路第二图像数据。It is worth noting that in this embodiment, at least one channel of second image data is processed based on the processing results of at least one channel of first image data, rather than directly using the above-set data processing method to process at least one channel of second image data. Image data is processed. The processing of at least one channel of second image data based on the processing results of at least one channel of first image data can be simply understood as multiplexing or synchronizing the processing results of at least one channel of first image data to the at least one channel of second image data. image data.
结合图2,可以由控制器对至少一路第一图像数据进行处理,进而由合成器将处理结果同步给该至少一路第二图像数据。With reference to FIG. 2 , at least one channel of first image data can be processed by the controller, and then the processing result can be synchronized by the synthesizer to the at least one channel of second image data.
举例来说,假设当前采集的多路图像数据包括预览图像数据以及录像图像数据,数据处理方式包括依次进行滤镜、美颜和某种预设物体检测这三种处理方式,再假设与滤镜和美颜处理方式对应的至少一路第一图像数据都为预览图像数据,与某种预设物体检测的处理方式对应的至少一路第一图像数据为录像图像数据,则可以先对预览图像数据进行滤镜和美颜处理,对录像图像数据进行某种预设物体检测处理,在检测出包含有预设物体的图像帧中添加与该预设物体对应的语义信息,之后,再将预览图像数据的处理结果同步给添加语义后的录像图像数据,以及将录像图像数据的处理结果同步给经滤镜和美颜处理后的预览图像数据,从而,预览图像数据和录像图像数据都具有滤镜、美颜和预设物体检测的处理效果。For example, assume that the currently collected multi-channel image data includes preview image data and video recording image data, and the data processing method includes three processing methods: filter, beautification, and some preset object detection, and then assume that with the filter At least one channel of first image data corresponding to the beautification processing method is preview image data, and at least one channel of first image data corresponding to a certain preset object detection processing method is video recording image data. Then the preview image data can be filtered first. Mirror and beauty processing, perform some kind of preset object detection processing on the video image data, add semantic information corresponding to the preset object in the image frame detected to contain the preset object, and then process the preview image data The results are synchronized to the recorded image data after adding semantics, and the processing results of the recorded image data are synchronized to the preview image data after filtering and beautification processing. Therefore, both the preview image data and the recorded image data have filters, beautification and beautification. Preset object detection processing effect.
结合上述举例,在一可选实施例中,针对每种数据处理方式,仅从多路图像数据中选择出一路图像数据进行该种数据处理方式的处理,并将该一路图像数据的处理结果复用给剩余的其他各路图像数据,从而实现对该多路图像数据的并行处理,使得多路图像数据具有相同的处理效果。Combined with the above example, in an optional embodiment, for each data processing method, only one channel of image data is selected from multiple channels of image data for processing in that data processing method, and the processing result of this channel of image data is complex. It is used for the remaining channels of image data, thereby realizing parallel processing of the multiple channels of image data, so that the multiple channels of image data have the same processing effect.
另外,结合上述举例,根据至少一路第一图像数据的处理结果,处理多路图像数据中的至少一路第二图像数据,可以包括如下两种方式的图像处理:尺寸变换以及添加图像语义。In addition, combined with the above example, processing at least one channel of second image data among multiple channels of image data based on the processing result of at least one channel of first image data may include the following two methods of image processing: size transformation and adding image semantics.
其中,尺寸变换具体为:根据至少一路第一图像数据对应的图像分辨率与至少一路第二图像数据对应的图像分辨率,对至少一路第一图像数据的处理结果进行尺寸变换处理,以尺寸变换后的结果替换至少一路第二图像数据。具体地,可以是根据至少一路第一图像数据对应的图像分辨率与至少一路第二图像数据对应的图像分辨率间的比例,对至少一路第一图像数据的处理结果进行尺寸变换处理。The size transformation specifically includes: performing size transformation processing on the processing results of at least one channel of first image data according to the image resolution corresponding to at least one channel of first image data and the image resolution corresponding to at least one channel of second image data, so as to achieve the size transformation. The result replaces at least one second image data. Specifically, the size transformation process may be performed on the processing result of at least one channel of first image data according to the ratio between the image resolution corresponding to at least one channel of first image data and the image resolution corresponding to at least one channel of second image data.
可选地,当至少一路第一图像数据的路数不为1时,可以从中随机选择出一个第一图像数据,或者从中选出具有最高或最低分辨率的第一图像数据,以基于该选出的第一图像数据与各第二图像数据间的分辨率比例,分别对选择出的该第一图像数据的处理结果进行尺寸变换处理,比如降采样或插值处理。Optionally, when the number of at least one channel of first image data is not 1, one first image data may be randomly selected, or the first image data with the highest or lowest resolution may be selected based on the selection. The resolution ratio between the selected first image data and each second image data is determined, and size transformation processing, such as downsampling or interpolation processing, is performed on the processing result of the selected first image data.
其中,上述添加图像语义具体为:假设设定的数据处理方式包括物体识别处理,则根据至少一路第一图像数据中的物体识别结果,在至少一路第二图像数据中添加与物体识别结果对应的图像语义信息。实际应用中,可选地,用户可以设定需要识别的物体,比如设定进行人脸识别。其中,与物体识别结果对应的图像语义信息可以是对识别出的物体的相关描述信息,或者,也可以简单地为一个标注框,用于标注出识别出的物体。The above-mentioned adding image semantics is specifically: assuming that the set data processing method includes object recognition processing, based on the object recognition results in at least one channel of first image data, adding corresponding to the object recognition results in at least one channel of second image data Image semantic information. In actual applications, optionally, users can set objects to be recognized, such as setting face recognition. The image semantic information corresponding to the object recognition result may be relevant description information of the recognized object, or may simply be an annotation box used to annotate the recognized object.
简单举例来说,假设有两路图像数据,其中作为第一图像数据的分辨率为640*480,另一路作为第二图像数据的分辨率为320*240,并且假设数据处理方式为美颜处理,则对第一图像数据进行美颜处理后,可以通过降采样的方式,将该美颜结果同步给第二图像数据,比如逐行将美颜处理后的第一图像数据中相邻两个像素的像素值进行平均计算合成一个像素点,从而得到320*240的一路具有美颜效果的图像数据,以此图像数据替换原来的第二图像数据。For a simple example, suppose there are two channels of image data, the resolution of which is the first image data is 640*480, and the resolution of the other channel which is the second image data is 320*240, and it is assumed that the data processing method is beauty processing. , then after beautification processing is performed on the first image data, the beautification result can be synchronized to the second image data through downsampling, for example, two adjacent pixels in the first image data after beautification processing are line by line. The pixel values are averaged and synthesized into one pixel, thereby obtaining 320*240 image data with a beauty effect, and this image data replaces the original second image data.
再比如,假设有两路图像数据,其中作为第一图像数据的分辨率为640*480,另一路作为第二图像数据的分辨率为320*240,并且假设数据处理方式为预设物体检测处理,则对第一图像数据进行预设物体检测处理以在包含预设物体的图像帧中标注出该预设物体,比如通过矩形框标注出检测到的预设物体。之后,基于分辨率320*240与640*480的比例关系,先对标注后的第一图像数据进行降采样处理,再对其中的矩形框缩小两倍,从而将物体检测结果同步给第二图像数据。当然,该举例中,也可以不进行降采样处理,而是直接将第一图像数据中标注出预设物体的处理结果复用即同步给第二图像数据,即直接以标注后的第一图像数据替换原来的第二图像数据。For another example, suppose there are two channels of image data, the resolution of which is the first image data is 640*480, and the resolution of the other channel which is the second image data is 320*240, and it is assumed that the data processing method is preset object detection processing. , then perform preset object detection processing on the first image data to mark the preset object in the image frame containing the preset object, such as marking the detected preset object through a rectangular frame. After that, based on the proportional relationship between the resolution of 320*240 and 640*480, the annotated first image data is first downsampled, and then the rectangular frame is reduced twice, thereby synchronizing the object detection results to the second image. data. Of course, in this example, it is also possible not to perform downsampling processing, but to directly multiplex and synchronize the processing results of the preset objects in the first image data to the second image data, that is, directly use the annotated first image to The data replaces the original second image data.
前述可选实施例中提到,可以根据一定的数据选择依据选出至少一路第一图像数据,而数据选择依据的获取方式可以通过如下两种可选的方式实现:As mentioned in the aforementioned optional embodiments, at least one first image data can be selected according to a certain data selection basis, and the acquisition method of the data selection basis can be achieved through the following two optional methods:
其一,用户自行设置的方式。此时,用户可以在应用程序的相关界面中选择一种数据选择依据。在一可选实施例中,应用程序中不仅可以提供数据处理方式的选择界面,还可以提供数据选择依据的设置界面。从而,用户可以在该数据处理方式选择界面中选择一种或几种数据处理方式,并且,当用户选择好某种数据处理方式后,可以弹出该数据选择依据设置界面,其中显示有多种数据选择依据的选项供用户选择。当用户设置了多种数据处理方式时,用户可以分别为每种设置的数据处理方式关联设置各自对应的数据选择依据,从而,可以根据用户设置的各数据处理方式分别对应的数据选择依据,从多路图像数据中选出分别与各数据处理方式对应的至少一路第一图像数据。First, the way users set it up by themselves. At this point, the user can select a data selection basis in the relevant interface of the application. In an optional embodiment, the application program can not only provide a data processing method selection interface, but also provide a data selection basis setting interface. Therefore, the user can select one or several data processing methods in the data processing method selection interface, and when the user selects a certain data processing method, the data selection basis setting interface can pop up, which displays a variety of data The selection basis options are for the user to choose from. When the user sets multiple data processing methods, the user can set the corresponding data selection basis for each set data processing method. Therefore, the data selection basis can be corresponding to each data processing method set by the user, from Select at least one channel of first image data corresponding to each data processing method from the multiple channels of image data.
该方式下,可选地,所述数据选择依据包括如下一种:性能满足设定条件、质量满足设定条件、设定的特定相机数据、预设的数据处理方式与图像数据的对应关系。In this method, optionally, the data selection basis includes one of the following: performance meets the set conditions, quality meets the set conditions, set specific camera data, and the corresponding relationship between the preset data processing method and the image data.
其二,应用程序框架层可以结合用户终端设备的资源使用状态来动态确定数据选择依据。即获取终端设备的资源使用状态,以根据终端设备的资源使用状态确定数据选择依据,从而根据确定出的数据选择依据从多路图像数据中选出至少一路第一图像数据。Second, the application framework layer can dynamically determine the basis for data selection based on the resource usage status of the user terminal device. That is, the resource usage status of the terminal device is obtained, the data selection basis is determined according to the resource usage status of the terminal device, and at least one channel of first image data is selected from the multiple channels of image data based on the determined data selection basis.
其中,终端设备的资源使用状态比如表现为CPU负载程度、剩余电量等一种或多种的组合。可选地,此时,数据选择依据可以为性能满足设定条件或质量满足设定条件。Among them, the resource usage status of the terminal device is, for example, represented by one or a combination of CPU load level, remaining power, etc. Optionally, at this time, the basis for data selection may be that performance meets set conditions or quality meets set conditions.
可选地,比如可以以一定阈值为基准,简单地将终端设备的资源使用状态划分为资源消耗大和资源消耗小两种情形;或者,将终端设备的资源使用状态根据资源消耗量超出或低于该阈值的程度预先划分为多个区间。从而,当终端设备的实际资源消耗量大于该阈值或者位于对应于资源消耗大的某个区间内时,确定此时的数据选择依据为性能满足设定条件,反之,如果终端设备的资源消耗量小于该阈值或者位于对应于资源消耗小的某个区间内时,则可以确定此时的数据选择依据为质量满足设定条件。Alternatively, for example, the resource usage status of the terminal device can be simply divided into two situations: high resource consumption and low resource consumption based on a certain threshold; or, the resource usage status of the terminal device can be divided according to whether the resource consumption exceeds or falls below The degree of the threshold is divided into multiple intervals in advance. Therefore, when the actual resource consumption of the terminal device is greater than the threshold or is within a certain interval corresponding to high resource consumption, it is determined that the data selection basis at this time is that the performance meets the set conditions. On the contrary, if the resource consumption of the terminal device When it is less than the threshold or within a certain interval corresponding to low resource consumption, it can be determined that the data selection basis at this time is that the quality meets the set conditions.
可选地,当资源使用状态的度量指标包括多种时,可以设置不同度量指标对资源使用状态的贡献权重,比如当资源使用状态以CPU负载程度和剩余电量为度量指标时,可以设置CPU负载程度的贡献权重为0.7,剩余电量的贡献程度为0.3,从而以两者的加权和来评价资源使用状态。Optionally, when the resource usage status includes multiple metrics, you can set the contribution weights of different metrics to the resource usage status. For example, when the resource usage status is measured by CPU load and remaining power, you can set the CPU load. The contribution weight of degree is 0.7, and the contribution degree of remaining power is 0.3, so the resource usage status is evaluated by the weighted sum of the two.
另外可选地,除了可以根据终端设备的资源使用状态进行数据选择依据的确定外,还可以进一步结合各数据处理方式各自对应的预设资源消耗量(也可以称为各数据处理方式对应的算法复杂度)进行数据选择依据的确定。其中,可以预先设定各种常用的数据处理方式分别对应的资源消耗量。可以预先通过测试的方式设定各数据处理方式对应的资源消耗量。可选地,该资源消耗量可以体现为具体数值;也可以体现为一种程度,如资源消耗大、资源消耗小,比如可以将资源消耗量大于一定阈值的数据处理方式设置为资源消耗大;将资源消耗量小于一定阈值的数据处理方式设置为资源消耗小。从而,可以根据终端设备的资源使用状态以及预先设定的数据处理方式所对应的资源消耗量,确定数据选择依据。Alternatively, in addition to determining the data selection basis based on the resource usage status of the terminal device, it can also be further combined with the preset resource consumption corresponding to each data processing method (which can also be called the algorithm corresponding to each data processing method). Complexity) to determine the basis for data selection. Among them, the resource consumption corresponding to various commonly used data processing methods can be preset. The resource consumption corresponding to each data processing method can be set in advance through testing. Optionally, the resource consumption can be reflected as a specific numerical value; it can also be reflected as a degree, such as high resource consumption and low resource consumption. For example, the data processing method for resource consumption greater than a certain threshold can be set to high resource consumption; Set the data processing method for data whose resource consumption is less than a certain threshold to low resource consumption. Therefore, the data selection basis can be determined based on the resource usage status of the terminal device and the resource consumption corresponding to the preset data processing method.
可选地,此时,数据选择依据的确定可以实现为:可以预先将终端设备的资源使用状态根据终端设备的资源消耗量超出或低于一定阈值的程度,预先划分为多个区间,比如按照资源消耗量的多少顺序依次划分为A,B,C三个区间。累计用户当前设置的各种数据处理方式对应的资源消耗量,以根据累计资源消耗量以及当前终端设备的资源使用状态所位于的区间来确定与当前用户设置的所有数据处理方式对应的数据选择依据。具体来说,可以根据该累计资源消耗量以及当前终端设备的资源使用状态所位于的区间是否会引起终端设备的资源使用状态所位于的区间发生改变来确定与数据选择依据。举例来说,假设当前用户设置的所有数据处理方式对应的累计资源消耗量为X,当前终端设备的资源消耗量使得终端设备的资源使用状态位于区间B,则如果在当前终端设备的资源消耗量的基础上加上该X后会超出区间B的范围而落入区间A的范围,则确定数据选择依据为性能满足设定条件,相反地,如果不会超出区间B的范围,则确定数据选择依据为质量满足设定条件。Optionally, at this time, the determination of the data selection basis can be implemented as follows: the resource usage status of the terminal device can be pre-divided into multiple intervals according to the degree to which the resource consumption of the terminal device exceeds or falls below a certain threshold, such as according to The order of resource consumption is divided into three intervals: A, B, and C. The resource consumption corresponding to the various data processing methods currently set by the user is accumulated, so as to determine the data selection basis corresponding to all the data processing methods currently set by the user based on the accumulated resource consumption and the interval in which the resource usage status of the current terminal device is located. . Specifically, the data selection basis may be determined based on the accumulated resource consumption and whether the interval in which the resource usage status of the current terminal device is located will cause a change in the interval in which the resource usage status of the terminal device is located. For example, assume that the cumulative resource consumption corresponding to all data processing methods set by the current user is On the basis of adding the Based on the quality meeting the set conditions.
也就是说,如果数据处理方式的累计资源消耗量会使得终端设备的资源消耗量变得很重,则以性能满足设定条件作为数据选择依据,相反地,可以以质量满足设定条件作为数据选择依据,以在图像数据处理后的图像质量和终端设备的资源消耗情况之间做出平衡。That is to say, if the cumulative resource consumption of the data processing method will make the resource consumption of the terminal device very heavy, then the performance meeting the set conditions will be used as the basis for data selection. On the contrary, the quality can be used as the basis for data selection. Based on this, a balance is made between the image quality after image data processing and the resource consumption of the terminal device.
可以理解的是,当以终端设备的资源使用状态或结合终端设备的资源使用状态和各数据处理方式的预设资源消耗量作为数据选择依据时,可以认为此时设定的各种数据处理方式对应相同的数据选择依据。It can be understood that when the resource usage status of the terminal device or a combination of the resource usage status of the terminal device and the preset resource consumption of each data processing method is used as the basis for data selection, the various data processing methods set at this time can be considered Correspond to the same data selection basis.
下面具体说明根据前述提及的几种数据选择依据选择至少一种第一图像数据的具体实现:The following is a detailed description of the specific implementation of selecting at least one first image data based on the several data selection criteria mentioned above:
性能满足设定条件:从多路图像数据中按照对应图像分辨率由低到高的顺序选择图像数据作为至少一路第一图像数据。一种简单的情形可以是:从多路图像数据中选择出对应于图像分辨率最低的图像数据作为第一图像数据。The performance satisfies the set conditions: image data is selected from multiple channels of image data in order from low to high corresponding image resolution as at least one channel of first image data. A simple situation may be: selecting the image data corresponding to the lowest image resolution from the multiple channels of image data as the first image data.
质量满足设定条件:从多路图像数据中按照对应图像分辨率由高到低的顺序选择图像数据作为至少一路第一图像数据。一种简单的情形可以是:从多路图像数据中选择出对应于图像分辨率最高的图像数据作为第一图像数据。The quality meets the set conditions: image data is selected from the multiple channels of image data in descending order of corresponding image resolution as at least one channel of first image data. A simple situation may be: selecting the image data corresponding to the highest image resolution from the multiple channels of image data as the first image data.
设定的特定图像数据。从多路图像数据中选择出该特定图像数据作为至少一路第一图像数据。Set specific image data. The specific image data is selected from multiple channels of image data as at least one channel of first image data.
预设的数据处理方式与图像数据的对应关系:该对应关系可以是用户在应用程序相关界面中自定义设定的。从而,可以根据该对应关系从多路图像数据中选择出至少一路第一图像数据。The correspondence between the preset data processing method and the image data: This correspondence can be customized by the user in the relevant interface of the application. Therefore, at least one channel of first image data can be selected from multiple channels of image data according to the corresponding relationship.
其中,性能或质量满足设定条件可以理解为对终端设备的处理性能影响最小或处理后图像数据的质量最佳。Among them, performance or quality that meets the set conditions can be understood as having the least impact on the processing performance of the terminal device or the best quality of the processed image data.
针对上述几种数据选择依据,假设选择出的是一路第一图像数据,并假设至少一路第二图像数据为多路图像数据中剩余的其他路图像数据,则仅以尺寸变换为例,根据将该第一图像数据的处理结果,处理其他路图像数据可以实现为:Regarding the above-mentioned data selection basis, assuming that one channel of first image data is selected, and assuming that at least one channel of second image data is the remaining other channels of image data in the multi-channel image data, only taking size transformation as an example, according to The processing result of the first image data and processing of other image data can be implemented as:
若数据选择依据为性能满足设定条件,则在对多路图像数据中对应于最低图像分辨率的第一图像数据进行数据处理后,可以根据其他路图像数据各自对应的图像分辨率与该第一图像数据的分辨率间的比例,分别对该第一图像数据的处理结果进行插值处理,分别以插值后的第一图像数据替换对应的其他路图像数据。If the data selection basis is that the performance meets the set conditions, after data processing is performed on the first image data corresponding to the lowest image resolution in the multi-channel image data, the corresponding image resolutions of the other channels of image data can be compared with the first image data. The ratio between the resolutions of an image data is to perform interpolation processing on the processing results of the first image data, respectively, and replace the corresponding other channels of image data with the interpolated first image data.
若数据选择依据为质量满足设定条件,则在对多路图像数据中对应于最高图像分辨率的第一图像数据进行数据处理后,可以根据其他路图像数据各自对应的图像分辨率与该第一图像数据的分辨率间的比例,分别对该第一图像数据的处理结果进行降采样处理,分别以降采样后的第一图像数据替换对应的其他路图像数据。If the data selection basis is that the quality meets the set conditions, after data processing is performed on the first image data corresponding to the highest image resolution in the multi-channel image data, the image resolution corresponding to the other channels of image data can be compared with the first image data. The ratio between the resolutions of the first image data is to perform downsampling processing on the processing results of the first image data, and replace the corresponding other channels of image data with the downsampled first image data.
若数据选择依据为设定的特定图像数据或预设的数据处理方式与图像数据的对应关系,则在对多路图像数据中选出的第一图像数据进行数据处理后,可以根据其他路图像数据各自对应的图像分辨率与该第一图像数据的分辨率间的比例,分别对该第一图像数据的处理结果进行降采样或差值处理,分别以降采样或差值处理的结果替换对应的其他路图像数据。If the data selection basis is the corresponding relationship between the set specific image data or the preset data processing method and the image data, then after performing data processing on the first image data selected from the multi-channel image data, the data can be processed according to the other channels of image data. The ratio between the respective image resolutions of the data and the resolution of the first image data, respectively perform downsampling or difference processing on the processing results of the first image data, and replace the corresponding results with the downsampling or difference processing results. Other image data.
综上,本发明实施例中,对多路图像数据的各种处理在应用程序框架层实现。具体地,位于应用层的应用程序将针对多路图像数据的数据处理方式发送至应用程序框架层,以使得应用程序框架层在接收到来自于硬件抽象层的多路图像数据后,从多路图像数据中选出与该数据处理方式对应的待处理图像数据,进而先对该待处理图像数据进行该数据处理方式的处理,之后将该待处理图像数据的处理结果同步到其他路图像数据,使得其他路图像数据也具有该数据处理方式对应的处理效果,最后将处理后的多路图像数据传输至应用程序。通过本方案,在应用程序框架层中实现对多路图像数据的处理,降低了应用程序的开发难度,而且,在应用程序框架层中,针对某种数据处理方式,仅从多路图像数据中选择出一路最合适的图像数据进行该数据处理方式的处理,而并非对多路图像数据都进行该数据处理方式的处理,从而降低了数据处理成本,即降低了对处理资源的消耗。In summary, in the embodiment of the present invention, various processing of multi-channel image data is implemented at the application framework layer. Specifically, the application program located at the application layer sends the data processing method for the multi-channel image data to the application framework layer, so that after receiving the multi-channel image data from the hardware abstraction layer, the application framework layer processes the multi-channel image data from the multi-channel image data. Select the image data to be processed corresponding to the data processing method from the image data, and then first process the image data to be processed in the data processing method, and then synchronize the processing results of the image data to be processed to other image data, So that other channels of image data also have processing effects corresponding to the data processing method, and finally the processed multi-channel image data is transmitted to the application program. Through this solution, the processing of multi-channel image data is realized in the application framework layer, which reduces the difficulty of application development. Moreover, in the application framework layer, for a certain data processing method, only from the multi-channel image data The most suitable image data is selected for processing in this data processing method, instead of processing multiple image data in this data processing method, thereby reducing the data processing cost, that is, reducing the consumption of processing resources.
图4为本发明实施例提供的另一种数据处理方法的流程图,本实施例提供的该数据处理方法可以由图2所示的应用程序层中的某个需要使用图像数据的应用程序来实现。如图4所示,该方法可以包括如下步骤:Figure 4 is a flow chart of another data processing method provided by an embodiment of the present invention. The data processing method provided by this embodiment can be performed by an application in the application layer shown in Figure 2 that needs to use image data. accomplish. As shown in Figure 4, the method may include the following steps:
201、将数据处理方式发送至应用程序框架层,以使应用程序框架层根据数据处理方式对接收自硬件抽象层的多路图像数据中的至少一路图像数据进行处理。201. Send the data processing method to the application framework layer, so that the application framework layer processes at least one channel of image data among the multiple channels of image data received from the hardware abstraction layer according to the data processing method.
202、接收应用程序框架层发送的处理后的图像数据。202. Receive processed image data sent by the application framework layer.
可选地,应用程序中可以包含有数据采集设置界面和数据处理方式选择界面。用户可以在数据采集设置界面中设置需要启动摄像头采集哪些路图像数据,比如:如果用户将摄像头置为拍照模式,则采集的是预览图像数据和拍照图像数据;如果用户将摄像头置为录像模式,则采集的是预览图像数据和录像图像数据。在用户进行完图像数据的采集设置后,可以显示数据处理方式选择界面,该选择界面中包含多种数据处理方式供用户选择。当用户从中选择出与多路图像数据对应的一种或多种数据处理方式后,应用程序将该一种或多种数据处理方式发送至应用程序框架层,以使应用程序框架层根据前述实施例中所介绍的方法从多路图像数据中选出至少一路第一图像数据,并根据设定的各数据处理方式对该至少一路第一图像数据进行处理。Optionally, the application may include a data collection setting interface and a data processing method selection interface. The user can set which channels of image data need to be started by starting the camera in the data collection setting interface. For example: if the user sets the camera to photo mode, preview image data and photo image data will be collected; if the user sets the camera to video mode, What is collected is preview image data and video recording image data. After the user completes the image data collection settings, the data processing method selection interface can be displayed. The selection interface contains a variety of data processing methods for the user to choose. After the user selects one or more data processing methods corresponding to the multi-channel image data, the application program sends the one or more data processing methods to the application framework layer, so that the application framework layer implements the The method introduced in the example selects at least one channel of first image data from multiple channels of image data, and processes the at least one channel of first image data according to each set data processing method.
另外,可选地,如前述实施例中所提及的,用户还可以在应用程序中设置与各数据处理方式对应的数据选择依据,以供应用程序框架层从多路图像数据中选择出与每种数据处理方式对应的第一图像数据。因此,可选地,还可以在用户选择出一种数据处理方式时,弹出数据选择依据设置界面,其中包含有多种数据选择依据供用户选择。In addition, optionally, as mentioned in the foregoing embodiments, the user can also set the data selection basis corresponding to each data processing method in the application program, so that the application framework layer can select the corresponding image data from the multi-channel image data. The first image data corresponding to each data processing method. Therefore, optionally, when the user selects a data processing method, a data selection basis setting interface may pop up, which contains a variety of data selection basis for the user to select.
由于对多路图像数据的处理逻辑都在应用程序框架层中实现,应用程序仅需要向应用程序框架层输入设置信息以及接收应用程序框架层的处理结果,降低了应用程序的开发难度。Since the processing logic for multi-channel image data is implemented in the application framework layer, the application only needs to input setting information to the application framework layer and receive the processing results of the application framework layer, which reduces the difficulty of application development.
下面结合图5所示实施例,以实际采集的多路图像数据包括预览图像数据和拍照图像数据,对多路图像数据的处理包括滤镜和美颜处理为例进行说明本发明实施例提供的数据处理方法。The following describes the data provided by the embodiment of the present invention with reference to the embodiment shown in Figure 5, taking the actual collected multi-channel image data including preview image data and photographed image data, and the processing of the multi-channel image data including filters and beautification processing as an example. Approach.
图5为本发明实施例提供的一种数据处理方法的交互图,如图5所示,可以包括如下步骤:Figure 5 is an interaction diagram of a data processing method provided by an embodiment of the present invention. As shown in Figure 5, it may include the following steps:
301、应用程序响应于用户的设置,触发摄像头开启以采集预览图像数据和拍照图像数据。301. The application responds to the user's settings and triggers the camera to open to collect preview image data and photographed image data.
302、应用程序将用户设置的滤镜和美颜方式发送至应用程序框架层。302. The application sends the filters and beauty methods set by the user to the application framework layer.
303、应用程序框架层接收来自于硬件抽象层的预览图像数据和拍照图像数据。303. The application framework layer receives preview image data and photographed image data from the hardware abstraction layer.
304、应用程序框架层选出拍照图像数据进行滤镜和美颜处理。304. The application framework layer selects the photographed image data for filtering and beautification processing.
305、应用程序框架层将拍照图像数据的滤镜和美颜结果同步到预览图像数据。305. The application framework layer synchronizes the filters and beauty results of the photographed image data to the preview image data.
比如根据预先图像数据与拍照图像数据的分辨率比例,对已经处理后的拍照图像数据进行插值或降采样处理,以插值或降采样的处理结果替换掉原来的预览图像数据即可。For example, based on the resolution ratio of the pre-image data and the photographed image data, interpolation or downsampling is performed on the processed photographed image data, and the original preview image data is replaced with the interpolation or downsampling processing result.
306、应用程序框架层将处理后的预览图像数据和拍照图像数据发送至应用程序。306. The application framework layer sends the processed preview image data and photographed image data to the application.
用户从而可以看到经过滤镜和美颜处理后的预览图像数据。Users can then see the preview image data after filtering and beautification processing.
以下将详细描述本发明的一个或多个实施例的数据处理装置。本领域技术人员可以理解,这些数据处理装置均可使用市售的硬件组件通过本方案所教导的步骤进行配置来构成。The data processing apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art can understand that these data processing devices can be configured using commercially available hardware components and configured through the steps taught in this solution.
图6为与图3所示实施例对应的一种数据处理装置的结构示意图,该数据处理装置对应于应用程序框架层,如图6所示,该装置包括:接收模块11、选择模块12、处理模块13、发送模块14。Figure 6 is a schematic structural diagram of a data processing device corresponding to the embodiment shown in Figure 3. The data processing device corresponds to the application framework layer. As shown in Figure 6, the device includes: a receiving module 11, a selection module 12, Processing module 13 and sending module 14.
接收模块11,用于接收硬件抽象层发送的多路图像数据。The receiving module 11 is used to receive multi-channel image data sent by the hardware abstraction layer.
选择模块12,用于从所述多路图像数据中选出至少一路第一图像数据。The selection module 12 is used to select at least one channel of first image data from the multiple channels of image data.
处理模块13,用于根据设定的数据处理方式对选出的所述至少一路第一图像数据进行处理。The processing module 13 is configured to process the selected at least one channel of first image data according to a set data processing method.
其中,所述至少一路第一图像数据的路数小于所述多路图像数据的路数。Wherein, the number of channels of the at least one channel of first image data is smaller than the number of channels of the multiple channels of image data.
可选地,该处理模块13,还用于根据所述至少一路第一图像数据的处理结果,处理所述多路图像数据中的至少一路第二图像数据。Optionally, the processing module 13 is also configured to process at least one channel of second image data among the multiple channels of image data according to the processing result of the at least one channel of first image data.
该装置还包括:发送模块14,用于将处理后的图像数据传输至应用程序;或者,将处理后的图像数据以及所述多路图像数据中未被处理的图像数据传输至应用程序。The device also includes: a sending module 14 for transmitting the processed image data to the application program; or, transmitting the processed image data and the unprocessed image data in the multi-channel image data to the application program.
可选地,所述处理模块13具体用于:Optionally, the processing module 13 is specifically used to:
根据所述至少一路第一图像数据对应的图像分辨率与所述至少一路第二图像数据对应的图像分辨率,对所述至少一路第一图像数据的处理结果进行尺寸变换处理,以尺寸变换后的结果替换所述至少一路第二图像数据。According to the image resolution corresponding to the at least one channel of first image data and the image resolution corresponding to the at least one channel of second image data, a size transformation process is performed on the processing result of the at least one channel of first image data. After size transformation, The result replaces the at least one second image data.
可选地,在设定的数据处理方式包括物体识别处理时,所述处理模块13具体用于:根据所述至少一路第一图像数据中的物体识别结果,在所述至少一路第二图像数据中添加与所述物体识别结果对应的图像语义信息。Optionally, when the set data processing method includes object recognition processing, the processing module 13 is specifically configured to: based on the object recognition results in the at least one channel of first image data, in the at least one channel of second image data Add image semantic information corresponding to the object recognition result.
可选地,所述接收模块11还用于:接收应用程序发送的数据选择依据。Optionally, the receiving module 11 is also configured to receive the data selection basis sent by the application program.
相应地,所述选择模块12具体用于:根据所述数据选择依据从所述多路图像数据中选出所述至少一路第一图像数据。Correspondingly, the selection module 12 is specifically configured to select the at least one channel of first image data from the multiple channels of image data according to the data selection basis.
其中,所述数据选择依据包括如下一种:性能满足设定条件、质量满足设定条件、设定的特定相机数据、预设的数据处理方式与图像数据的对应关系。The data selection basis includes the following: performance meets the set conditions, quality meets the set conditions, set specific camera data, and the corresponding relationship between the preset data processing method and the image data.
可选地,所述选择模块12还用于:Optionally, the selection module 12 is also used to:
获取终端设备的资源使用状态;根据所述终端设备的资源使用状态确定数据选择依据;根据所述数据选择依据从所述多路图像数据中选出所述至少一路第一图像数据。Obtain the resource usage status of the terminal device; determine the data selection basis according to the resource usage status of the terminal device; select the at least one channel of first image data from the multiple channels of image data based on the data selection basis.
其中,所述选择模块12具体用于:Among them, the selection module 12 is specifically used for:
根据所述终端设备的资源使用状态以及预先设定的所述数据处理方式对应的资源消耗量,确定数据选择依据。The data selection basis is determined according to the resource usage status of the terminal device and the resource consumption corresponding to the preset data processing method.
其中,所述数据选择依据为性能满足设定条件或质量满足设定条件。Wherein, the data selection basis is that the performance meets the set conditions or the quality meets the set conditions.
具体地,所述数据选择依据为性能满足设定条件,所述选择模块12具体用于:Specifically, the data selection basis is that the performance meets the set conditions, and the selection module 12 is specifically used to:
从所述多路图像数据中按照对应图像分辨率由低到高的顺序选择图像数据作为所述至少一路第一图像数据。Select image data from the multiple channels of image data as the at least one channel of first image data in order from low to high corresponding image resolutions.
具体地,所述数据选择依据为质量满足设定条件,所述选择模块12具体用于:Specifically, the data selection basis is that the quality meets the set conditions, and the selection module 12 is specifically used to:
从所述多路图像数据中按照对应图像分辨率由高到低的顺序选择图像数据作为所述至少一路第一图像数据。Select image data from the multiple channels of image data as the at least one channel of first image data in descending order of corresponding image resolutions.
图6所示装置可以执行图3的方法,本实施例未详细描述的部分,可参考对图3所示实施例的相关说明。该技术方案的执行过程和技术效果参见图3所示实施例中的描述,在此不再赘述。The device shown in Figure 6 can perform the method in Figure 3. For parts not described in detail in this embodiment, reference can be made to the relevant description of the embodiment shown in Figure 3. For the implementation process and technical effects of this technical solution, please refer to the description in the embodiment shown in Figure 3 and will not be described again here.
在一个可能的设计中,图6所示数据处理装置的结构可实现为一电子设备,该电子设备为用户终端设备,比如智能手机,如图7所示,该用户终端设备可以包括:处理器21和存储器22。其中,所述存储器22用于存储支持用户终端设备执行上述各所示实施例中提供的数据处理方法的程序,所述处理器21被配置为用于执行所述存储器22中存储的程序。In a possible design, the structure of the data processing device shown in Figure 6 can be implemented as an electronic device. The electronic device is a user terminal device, such as a smartphone. As shown in Figure 7, the user terminal device can include: a processor 21 and memory 22. The memory 22 is used to store programs that support the user terminal device to execute the data processing methods provided in the above-described embodiments, and the processor 21 is configured to execute the programs stored in the memory 22 .
所述程序包括一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器21执行时能够实现如下步骤:The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 21, the following steps can be implemented:
接收硬件抽象层发送的多路图像数据;Receive multi-channel image data sent by the hardware abstraction layer;
从所述多路图像数据中选出至少一路第一图像数据;Select at least one channel of first image data from the multiple channels of image data;
根据设定的数据处理方式对选出的所述至少一路第一图像数据进行处理。The selected at least one channel of first image data is processed according to the set data processing method.
可选地,所述处理器21还用于执行前述各所示方法步骤中的全部或部分步骤。Optionally, the processor 21 is also configured to execute all or part of the steps of the aforementioned methods.
其中,所述用户终端设备的结构中还可以包括通信接口23,用于用户终端设备与其他设备或通信网络通信。The structure of the user terminal device may also include a communication interface 23 for the user terminal device to communicate with other devices or communication networks.
另外,本发明实施例提供了一种计算机存储介质,用于储存用户终端设备所用的计算机软件指令,其包含用于执行上述各所示方法实施例中数据处理方法所涉及的程序。In addition, embodiments of the present invention provide a computer storage medium for storing computer software instructions used in user terminal equipment, which includes programs for executing the data processing methods in the above-described method embodiments.
图8为与图4所示实施例对应的一种数据处理装置的结构示意图,如图8所示,该装置包括:发送模块31、接收模块32。Figure 8 is a schematic structural diagram of a data processing device corresponding to the embodiment shown in Figure 4. As shown in Figure 8, the device includes: a sending module 31 and a receiving module 32.
发送模块31,用于将数据处理方式发送至应用程序框架层,以使所述应用程序框架层根据所述数据处理方式对多路图像数据中的至少一路图像数据进行处理,所述多路图像数据由硬件抽象层发送至所述应用程序框架层。The sending module 31 is used to send the data processing method to the application framework layer, so that the application framework layer processes at least one channel of image data in the multi-channel image data according to the data processing method. The multi-channel image data Data is sent from the hardware abstraction layer to the application framework layer.
接收模块32,用于接收所述应用程序框架层发送的处理后的图像数据。The receiving module 32 is configured to receive the processed image data sent by the application framework layer.
可选地,所述发送模块31还用于:Optionally, the sending module 31 is also used to:
将数据选择依据发送至所述应用程序框架层,以供所述应用程序框架层选出所述至少一路图像数据。The data selection basis is sent to the application framework layer, so that the application framework layer selects the at least one channel of image data.
图8所示装置可以执行图4所示实施例的方法,本实施例未详细描述的部分,可参考对图4所示实施例的相关说明。该技术方案的执行过程和技术效果参见图4所示实施例中的描述,在此不再赘述。The device shown in Figure 8 can perform the method of the embodiment shown in Figure 4. For parts that are not described in detail in this embodiment, reference can be made to the relevant description of the embodiment shown in Figure 4. For the implementation process and technical effects of this technical solution, please refer to the description in the embodiment shown in Figure 4 and will not be described again here.
在一个可能的设计中,图8所示数据处理装置的结构可实现为一电子设备,该电子设备为用户终端设备,比如智能手机,如图9所示,该用户终端设备可以包括:处理器41和存储器42。其中,所述存储器42用于存储支持用户终端设备执行上述各所示实施例中提供的数据处理方法的程序,所述处理器41被配置为用于执行所述存储器42中存储的程序。In a possible design, the structure of the data processing device shown in Figure 8 can be implemented as an electronic device. The electronic device is a user terminal device, such as a smartphone. As shown in Figure 9, the user terminal device can include: a processor 41 and memory 42. The memory 42 is used to store programs that support the user terminal device to execute the data processing methods provided in the above-described embodiments, and the processor 41 is configured to execute the programs stored in the memory 42 .
所述程序包括一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器41执行时能够实现如下步骤:The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 41, the following steps can be implemented:
将数据处理方式发送至应用程序框架层,以使所述应用程序框架层根据所述数据处理方式对多路图像数据中的至少一路图像数据进行处理,所述多路图像数据由硬件抽象层发送至所述应用程序框架层;Send the data processing method to the application framework layer, so that the application framework layer processes at least one of the multiple channels of image data according to the data processing method, and the multiple channels of image data are sent by the hardware abstraction layer to the application framework layer;
接收所述应用程序框架层发送的处理后的图像数据。Receive processed image data sent by the application framework layer.
可选地,所述处理器41还用于执行前述各所示方法步骤中的全部或部分步骤。Optionally, the processor 41 is also configured to execute all or part of the steps of the aforementioned methods.
其中,所述用户终端设备的结构中还可以包括通信接口43,用于用户终端设备与其他设备或通信网络通信。The structure of the user terminal device may also include a communication interface 43 for the user terminal device to communicate with other devices or communication networks.
另外,本发明实施例提供了一种计算机存储介质,用于储存用户终端设备所用的计算机软件指令,其包含用于执行上述各所示方法实施例中数据处理方法所涉及的程序。In addition, embodiments of the present invention provide a computer storage medium for storing computer software instructions used in user terminal equipment, which includes programs for executing the data processing methods in the above-described method embodiments.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in One location, or it can be distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Persons of ordinary skill in the art can understand and implement the method without any creative effort.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。From the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding the necessary general hardware platform, or of course, can also be implemented by combining hardware and software. Based on this understanding, the above technical solution can be embodied in the form of a computer product in nature or in other words, the part that contributes to the existing technology. The present invention can use one or more computer-usable storage devices containing computer-usable program codes. The form of a computer program product implemented on media (including but not limited to disk storage, CD-ROM, optical storage, etc.).
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a use A device for realizing the functions specified in one process or multiple processes of the flowchart and/or one block or multiple blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions The device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device. Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in computer-readable media, random access memory (RAM), and/or non-volatile memory in the form of read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both persistent and non-volatile, removable and non-removable media that can be implemented by any method or technology for storage of information. Information may be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), and read-only memory. (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be used Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent substitutions are made to some of the technical features; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710953537.3A CN109669783B (en) | 2017-10-13 | 2017-10-13 | Data processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710953537.3A CN109669783B (en) | 2017-10-13 | 2017-10-13 | Data processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109669783A CN109669783A (en) | 2019-04-23 |
CN109669783B true CN109669783B (en) | 2023-09-22 |
Family
ID=66138983
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710953537.3A Active CN109669783B (en) | 2017-10-13 | 2017-10-13 | Data processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109669783B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110290288B (en) * | 2019-06-03 | 2022-01-04 | Oppo广东移动通信有限公司 | Image processor, image processing method, photographing device, and electronic apparatus |
CN112437224B (en) * | 2019-08-26 | 2022-11-11 | 腾讯科技(深圳)有限公司 | Camera data processing method and device, computer equipment and storage medium |
CN114615423B (en) | 2019-09-12 | 2024-05-14 | 华为技术有限公司 | Callback flow processing method and device |
CN114443894A (en) * | 2022-01-05 | 2022-05-06 | 荣耀终端有限公司 | Data processing method and device, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101699868A (en) * | 2009-10-30 | 2010-04-28 | 深圳创维数字技术股份有限公司 | Method and equipment for providing and processing multi-path video of digital television programs |
CN104702909A (en) * | 2014-04-17 | 2015-06-10 | 杭州海康威视数字技术股份有限公司 | Video data processing method and video data processing device |
CN106165391A (en) * | 2014-05-21 | 2016-11-23 | 谷歌技术控股有限责任公司 | Enhanced Image Capture |
CN106454186A (en) * | 2016-11-02 | 2017-02-22 | 深圳瑞芯通智能科技有限公司 | Multi-channel video recording and platform interaction method and device based on Android system |
US20170199642A1 (en) * | 2014-05-30 | 2017-07-13 | Huawei Technologies Co., Ltd. | Display method of terminal device and terminal device |
-
2017
- 2017-10-13 CN CN201710953537.3A patent/CN109669783B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101699868A (en) * | 2009-10-30 | 2010-04-28 | 深圳创维数字技术股份有限公司 | Method and equipment for providing and processing multi-path video of digital television programs |
CN104702909A (en) * | 2014-04-17 | 2015-06-10 | 杭州海康威视数字技术股份有限公司 | Video data processing method and video data processing device |
CN106165391A (en) * | 2014-05-21 | 2016-11-23 | 谷歌技术控股有限责任公司 | Enhanced Image Capture |
US20170199642A1 (en) * | 2014-05-30 | 2017-07-13 | Huawei Technologies Co., Ltd. | Display method of terminal device and terminal device |
CN106454186A (en) * | 2016-11-02 | 2017-02-22 | 深圳瑞芯通智能科技有限公司 | Multi-channel video recording and platform interaction method and device based on Android system |
Also Published As
Publication number | Publication date |
---|---|
CN109669783A (en) | 2019-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109669783B (en) | Data processing method and device | |
EP2878121B1 (en) | Method and apparatus for dual camera shutter | |
CN105874776B (en) | Image processing device and method | |
EP4238305A1 (en) | Frame processing and/or capture instruction systems and techniques | |
US20180124307A1 (en) | Modifying image parameters using wearable device input | |
CN114640798B (en) | Image processing method, electronic device, and computer storage medium | |
EP4361805A1 (en) | Method for generating theme wallpaper, and electronic device | |
EP3158825B1 (en) | Media processing services on an access node | |
US20150294686A1 (en) | Technique for gathering and combining digital images from multiple sources as video | |
CN115514883B (en) | Cross-equipment collaborative shooting method, related device and system | |
CN110390641B (en) | Image desensitizing method, electronic device and storage medium | |
WO2017076000A1 (en) | Method and device for night photography and mobile terminal | |
CN116320727B (en) | An algorithm scheduling method and electronic device | |
CN110300240A (en) | Image processor, image processing method, photographing device and electronic equipment | |
WO2022127853A1 (en) | Photographing mode determination method and apparatus, and electronic device and storage medium | |
CN108234880A (en) | A kind of image enchancing method and device | |
CN113506298A (en) | Image detection and rendering method and device, equipment and storage medium | |
US20240242358A1 (en) | Local motion detection for improving image capture and/or processing operations | |
CN107360366A (en) | Photographing method, device, storage medium and electronic equipment | |
CN110225285B (en) | Audio and video communication method and device, computer device and readable storage medium | |
CN114666497A (en) | Imaging method, terminal device, storage medium, and program product | |
US8934025B2 (en) | Method and apparatus for processing image | |
CN117135470A (en) | Photography methods, electronic equipment and storage media | |
CN113542711B (en) | Image display method and terminal | |
US10313625B2 (en) | Method, apparatus, and storage medium for video file processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20201222 Address after: Room 603, 6 / F, Roche Plaza, 788 Cheung Sha Wan Road, Kowloon, China Applicant after: Zebra smart travel network (Hong Kong) Ltd. Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands Applicant before: Alibaba Group Holding Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |