[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN114529483A - Data processing method, device, terminal and readable storage medium - Google Patents

Data processing method, device, terminal and readable storage medium Download PDF

Info

Publication number
CN114529483A
CN114529483A CN202210126015.7A CN202210126015A CN114529483A CN 114529483 A CN114529483 A CN 114529483A CN 202210126015 A CN202210126015 A CN 202210126015A CN 114529483 A CN114529483 A CN 114529483A
Authority
CN
China
Prior art keywords
filtering
filter
layer
operator
radius
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.)
Granted
Application number
CN202210126015.7A
Other languages
Chinese (zh)
Other versions
CN114529483B (en
Inventor
李勇华
文明明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210126015.7A priority Critical patent/CN114529483B/en
Publication of CN114529483A publication Critical patent/CN114529483A/en
Priority to PCT/CN2022/139728 priority patent/WO2023151386A1/en
Application granted granted Critical
Publication of CN114529483B publication Critical patent/CN114529483B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a data processing method, which comprises the steps of obtaining the preset filtering radiuses of a plurality of filtering layers; determining a filtering area of data to be processed according to the filtering radiuses of the plurality of filtering layers; and acquiring the image data of the filtering area. The data processing method, the data processing device, the terminal and the nonvolatile computer readable storage medium can acquire all required filtering areas when data to be processed is filtered by a plurality of filtering layers, and compared with the data which are acquired in the filtering areas of each filtering layer respectively when each filtering layer is filtered, the data which are acquired in the filtering areas of different filtering layers have repeated parts, the data transmission quantity and the data transmission occupy more time, so that the power consumption of hardware is increased, the data processing efficiency is lower, the time occupied by the data transmission quantity and the data transmission is obviously reduced, the power consumption of the hardware is reduced, and the data processing efficiency is improved.

Description

数据处理方法、装置、终端和可读存储介质Data processing method, device, terminal and readable storage medium

技术领域technical field

本申请涉及图像技术领域,特别涉及一种数据处理方法、数据处理装置、终端和非易失性计算机可读存储介质。The present application relates to the field of image technology, and in particular, to a data processing method, a data processing device, a terminal, and a non-volatile computer-readable storage medium.

背景技术Background technique

目前,在对数据进行处理时,需要将数据在内存和存储器之间来回传输,不同的数据处理流程需要获取的数据存在差异,因此,每个数据处理流程都需要进行内存和存储器之间的数据传输,导致数据传输量和数据传输占用的时间均较多,导致硬件的功耗增加且数据处理效率较低。At present, when processing data, data needs to be transmitted back and forth between memory and storage, and the data that different data processing processes need to obtain are different. Therefore, each data processing process needs to perform data transfer between memory and storage. Transmission, resulting in a large amount of data transmission and time occupied by data transmission, resulting in increased hardware power consumption and low data processing efficiency.

发明内容SUMMARY OF THE INVENTION

本申请的实施方式提供了一种数据处理方法、数据处理装置、终端和非易失性计算机可读存储介质。Embodiments of the present application provide a data processing method, a data processing apparatus, a terminal, and a non-volatile computer-readable storage medium.

本申请实施方式的数据处理方法包括获取预设的多个滤波层的滤波半径;根据多个所述滤波层的所述滤波半径,确定待处理数据的滤波区域;及获取所述滤波区域的图像数据。The data processing method according to the embodiment of the present application includes acquiring the filter radii of a plurality of preset filter layers; determining a filter area of the data to be processed according to the filter radii of the multiple filter layers; and acquiring an image of the filter area data.

本申请实施方式的数据处理装置包括第一获取模块、第一确定模块和第二获取模块。所述第一获取模块用于获取预设的多个滤波层的滤波半径;所述第一确定模块用于根据多个所述滤波层的所述滤波半径,确定待处理数据的滤波区域;所述第二获取模块用于获取所述滤波区域的图像数据。The data processing apparatus of the embodiment of the present application includes a first acquisition module, a first determination module, and a second acquisition module. The first obtaining module is used to obtain the preset filter radii of multiple filter layers; the first determination module is used to determine the filter area of the data to be processed according to the filter radii of the multiple filter layers; The second acquiring module is used for acquiring image data of the filtering area.

本申请实施方式的终端包括处理器,所述处理器用于获取预设的多个滤波层的滤波半径;根据多个所述滤波层的所述滤波半径,确定待处理数据的滤波区域;及获取所述滤波区域的图像数据。The terminal according to the embodiment of the present application includes a processor, the processor is configured to obtain the filter radius of a plurality of preset filter layers; determine the filter area of the data to be processed according to the filter radius of the plurality of filter layers; and obtain image data of the filtered region.

本申请的一种包含计算机程序的非易失性计算机可读存储介质,当所述计算机程序被一个或多个处理器执行时,使得所述处理器执行数据处理方法。所述数据处理方法包括获取预设的多个滤波层的滤波半径;根据多个所述滤波层的所述滤波半径,确定待处理数据的滤波区域;及获取所述滤波区域的图像数据。A non-volatile computer-readable storage medium containing a computer program of the present application, when the computer program is executed by one or more processors, causes the processors to perform a data processing method. The data processing method includes acquiring filter radii of a plurality of preset filter layers; determining a filter region of data to be processed according to the filter radii of the filter layers; and acquiring image data of the filter region.

本申请实施方式的数据处理方法、数据处理装置、终端和非易失性计算机可读存储介质,通过获取待处理数据的多个滤波层的滤波半径,从而根据多个滤波层的滤波半径,确定并获取待处理数据进行多个滤波层的滤波时,所需的全部滤波区域,相较于在对每个滤波层进行滤波时,分别获取每个滤波层的滤波区域的数据,不同的滤波层的滤波区域存在重复部分,数据传输量和数据传输占用的时间均较多,导致硬件的功耗增加且数据处理效率较低而言,数据传输量和数据传输占用的时间明显减少,硬件的功耗降低且数据处理效率提高。In the data processing method, data processing device, terminal, and non-volatile computer-readable storage medium of the embodiments of the present application, by acquiring the filtering radii of multiple filtering layers of the data to be processed, according to the filtering radii of the multiple filtering layers, determine And when the data to be processed is filtered for multiple filter layers, all the required filter areas are compared to when each filter layer is filtered, and the data of the filter area of each filter layer is obtained separately. Different filter layers There are duplicate parts in the filtering area of the data transmission, and the amount of data transmission and the time occupied by data transmission are large, resulting in increased power consumption of the hardware and low data processing efficiency. The power consumption is reduced and the data processing efficiency is improved.

本申请的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of the present application will be set forth, in part, from the following description, and in part will become apparent from the following description, or may be learned by practice of the present application.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1是本申请某些实施方式的数据处理方法的流程示意图;1 is a schematic flowchart of a data processing method according to some embodiments of the present application;

图2是本申请某些实施方式的数据处理装置的模块示意图;2 is a schematic block diagram of a data processing apparatus according to some embodiments of the present application;

图3是本申请某些实施方式的终端平面示意图;3 is a schematic plan view of a terminal of some embodiments of the present application;

图4至图6是本申请某些实施方式的原理示意图;4 to 6 are schematic schematic diagrams of some embodiments of the present application;

图7是本申请某些实施方式的数据处理方法的流程示意图;7 is a schematic flowchart of a data processing method according to some embodiments of the present application;

图8是本申请某些实施方式的原理示意图;Fig. 8 is the principle schematic diagram of some embodiments of the present application;

图9是本申请某些实施方式的数据处理方法的流程示意图;9 is a schematic flowchart of a data processing method according to some embodiments of the present application;

图10是本申请某些实施方式的原理示意图;10 is a schematic diagram of some embodiments of the present application;

图11和图12是本申请某些实施方式的数据处理方法的流程示意图;11 and 12 are schematic flowcharts of data processing methods according to some embodiments of the present application;

图13本申请某些实施方式的处理器和计算机可读存储介质的连接示意图。FIG. 13 is a schematic diagram of connection between a processor and a computer-readable storage medium according to some embodiments of the present application.

具体实施方式Detailed ways

以下结合附图对本申请的实施方式作进一步说明。附图中相同或类似的标号自始至终表示相同或类似的元件或具有相同或类似功能的元件。另外,下面结合附图描述的本申请的实施方式是示例性的,仅用于解释本申请的实施方式,而不能理解为对本申请的限制。The embodiments of the present application will be further described below with reference to the accompanying drawings. The same or similar reference numbers refer to the same or similar elements or elements having the same or similar functions throughout the drawings. In addition, the embodiments of the present application described below in conjunction with the accompanying drawings are exemplary, only used to explain the embodiments of the present application, and should not be construed as limitations on the present application.

请参阅图1至图3,本申请实施方式的数据处理方法包括以下步骤:Please refer to FIG. 1 to FIG. 3, the data processing method of the embodiment of the present application includes the following steps:

011:获取预设的多个滤波层的滤波半径;011: Obtain the filter radius of the preset multiple filter layers;

012:根据多个滤波层的滤波半径,确定待处理数据的滤波区域;及012: Determine the filtering region of the data to be processed according to the filtering radii of the plurality of filtering layers; and

013:获取滤波区域的图像数据。013: Acquire image data of the filtered area.

本申请实施方式的数据处理装置10包括第一获取模块11、第一确定模块12和第二获取模块13。第一获取模块11、第一确定模块12和第二获取模块13分别用于执行步骤011、步骤012和步骤013。即,第一获取模块11用于获取预设的多个滤波层的滤波半径第一确定模块12用于根据多个滤波层的滤波半径,确定待处理数据的滤波区域;第二获取模块13用于获取滤波区域的图像数据。The data processing apparatus 10 in the embodiment of the present application includes a first acquisition module 11 , a first determination module 12 and a second acquisition module 13 . The first obtaining module 11 , the first determining module 12 and the second obtaining module 13 are used to execute step 011 , step 012 and step 013 respectively. That is, the first acquisition module 11 is used to acquire the preset filter radii of multiple filter layers. The first determination module 12 is used to determine the filter area of the data to be processed according to the filter radii of the multiple filter layers; the second acquisition module 13 uses to obtain image data of the filtered area.

本申请实施方式的终端100包括处理器30。处理器30用于获取预设的多个滤波层的滤波半径;根据多个滤波层的滤波半径,确定待处理数据的滤波区域;及获取滤波区域的图像数据。也即是说,步骤011、步骤012和步骤013可以由处理器30实现。The terminal 100 according to the embodiment of the present application includes the processor 30 . The processor 30 is configured to acquire the preset filter radii of the multiple filter layers; to determine the filter area of the data to be processed according to the filter radii of the multiple filter layers; and to acquire the image data of the filter area. That is, steps 011 , 012 and 013 may be implemented by the processor 30 .

具体地,终端100还包括壳体40。终端100可以是手机、平板电脑、显示设备、笔记本电脑、柜员机、闸机、智能手表、头显设备、游戏机等。如图3所示,本申请实施方式以终端100是手机为例进行说明,可以理解,终端100的具体形式并不限于手机。壳体40还可用于安装终端100的显示装置、成像装置、供电装置、通信装置等功能模块,以使壳体40为功能模块提供防尘、防摔、防水等保护。Specifically, the terminal 100 further includes a housing 40 . The terminal 100 may be a mobile phone, a tablet computer, a display device, a notebook computer, an ATM, a gate, a smart watch, a head-mounted display device, a game console, and the like. As shown in FIG. 3 , the embodiment of the present application is described by taking the terminal 100 as a mobile phone as an example. It can be understood that the specific form of the terminal 100 is not limited to the mobile phone. The housing 40 can also be used to install functional modules such as a display device, an imaging device, a power supply device, and a communication device of the terminal 100 , so that the housing 40 provides protection against dust, drop, and water for the functional modules.

待处理数据可以是终端100的相机20拍摄的图像,也可以是从网上下载的图像,在此不作限制。待处理数据还可以是相机20拍摄图像的一部分;或者,待处理数据可以是终端100获取的多帧姿态数据、加速度数据等。本申请实施方式以待处理数据为待处理图像为例进行说明。The data to be processed may be an image captured by the camera 20 of the terminal 100 or an image downloaded from the Internet, which is not limited herein. The data to be processed may also be a part of the image captured by the camera 20 ; or, the data to be processed may be multi-frame gesture data, acceleration data, etc. acquired by the terminal 100 . The embodiments of the present application are described by taking the data to be processed as an image to be processed as an example.

在对待处理图像进行滤波时,一般会基于预设的滤波算法进行。预设滤波算法确定了待处理图像的预设尺寸、滤波层的预设个数、以及每个滤波层的预设的滤波半径。When filtering the image to be processed, it is generally performed based on a preset filtering algorithm. The preset filtering algorithm determines the preset size of the image to be processed, the preset number of filter layers, and the preset filter radius of each filter layer.

在滤波时,若拍摄图像的尺寸大于预设尺寸,则可通过预设尺寸将拍摄图像分为多个待处理图像,从而使得处理器30可直接获取每个待处理图像的位置信息,如待处理图像的顶点坐标(以待处理图像为矩形为例)。同时,处理器30还能够直接获取到每个滤波层的滤波半径。During filtering, if the size of the captured image is larger than the preset size, the captured image can be divided into a plurality of images to be processed by the preset size, so that the processor 30 can directly obtain the position information of each image to be processed. The vertex coordinates of the processed image (take the image to be processed as a rectangle as an example). At the same time, the processor 30 can also directly obtain the filter radius of each filter layer.

然后,处理器30根据待处理图像的位置信息以及每个滤波层的滤波半径,即可确定出每个滤波层的滤波区域。例如,滤波半径为与待处理图像的边缘的距离,位置信息包括待处理图像的顶点坐标,根据待处理图像的顶点坐标,即可快速确定得到待处理图像的宽度和高度。处理器30可根据待处理图像的顶点坐标及滤波半径,确定滤波区域的顶点坐标Then, the processor 30 can determine the filtering area of each filtering layer according to the position information of the image to be processed and the filtering radius of each filtering layer. For example, the filter radius is the distance from the edge of the image to be processed, and the location information includes the vertex coordinates of the image to be processed. According to the vertex coordinates of the image to be processed, the width and height of the image to be processed can be quickly determined. The processor 30 can determine the vertex coordinates of the filtering area according to the vertex coordinates and the filtering radius of the image to be processed

在一个例子中,请参阅图4,以待处理图像A1的左上角为原点建立图像坐标系,待处理图像A1的宽度为8(沿W方向的像素数),高度为8(沿H方向的像素数),则待处理图像A1的顶点坐标分别为(0,0),(8,0),(0,8)和(8,8),如滤波半径为2个像素,在待处理图像A1的上边缘和下边缘分别增加两行像素,左边缘和右边缘分别增加两列像素,则待处理图像S1的顶点坐标分别为(-2,-2),(10,2),(-2,10)和(10,10)。如此,根据待处理图像A1的位置信息和每个滤波层的滤波半径,即可快速确定得到每个滤波层的滤波区域S1。In an example, referring to FIG. 4 , the image coordinate system is established with the upper left corner of the image A1 to be processed as the origin, the width of the image A1 to be processed is 8 (the number of pixels along the W direction), and the height is 8 (the number of pixels along the H direction) number of pixels), the vertex coordinates of the image A1 to be processed are (0,0), (8,0), (0,8) and (8,8) respectively. If the filter radius is 2 pixels, the Two rows of pixels are added to the upper and lower edges of A1, and two columns of pixels are added to the left and right edges, respectively. The vertex coordinates of the image S1 to be processed are (-2,-2), (10,2), (- 2,10) and (10,10). In this way, according to the position information of the image A1 to be processed and the filtering radius of each filtering layer, the filtering area S1 of each filtering layer can be quickly determined.

在其他实施方式中,滤波半径包括第一滤波半径(如对应图像的上边)、第二滤波半径(如对应图像的右边)、第三滤波半径(如对应图像的下边)和第四滤波半径(如对应图像的左边),第一滤波半径、第二滤波半径、第三滤波半径和第四滤波半径均相同(如图4所示的例子);或者第一滤波半径和第三滤波半径相同,第二滤波半径和第四滤波半径相同;或者,第一滤波半径、第二滤波半径、第三滤波半径和第四滤波半径互不相同。In other embodiments, the filter radius includes a first filter radius (eg, corresponding to the upper side of the image), a second filter radius (eg, corresponding to the right side of the image), a third filter radius (eg, corresponding to the lower side of the image), and a fourth filter radius ( As shown in the left side of the corresponding image), the first filter radius, the second filter radius, the third filter radius and the fourth filter radius are all the same (the example shown in Figure 4); or the first filter radius and the third filter radius are the same, The second filtering radius and the fourth filtering radius are the same; or, the first filtering radius, the second filtering radius, the third filtering radius and the fourth filtering radius are different from each other.

在另一个例子中,请参阅图5,以待处理图像A1的左上角为原点建立图像坐标系,则待处理图像A1的顶点坐标分别为(0,0),(8,0),(0,8)和(8,8),如第一滤波半径和第三滤波半径相同且均为2个像素,第二滤波半径和第四滤波半径相同且均为1个像素,则在待处理图像A1的上边缘和下边缘分别增加两行像素,左边缘和右边缘分别增加一列像素,则待处理图像S1的顶点坐标分别为(-1,-2),(9,-2),(-1,10)和(9,10)。如此,根据待处理图像A1的位置信息和每个滤波层的滤波半径,即可快速确定得到每个滤波层的滤波区域S1。In another example, referring to FIG. 5 , the image coordinate system is established with the upper left corner of the image A1 to be processed as the origin, and the coordinates of the vertices of the image A1 to be processed are (0,0), (8,0), (0 ,8) and (8,8), if the first filter radius and the third filter radius are the same and both are 2 pixels, the second filter radius and the fourth filter radius are the same and both are 1 pixel, then the image to be processed Two rows of pixels are added to the upper and lower edges of A1, and one column of pixels is added to the left and right edges, respectively. The vertex coordinates of the image S1 to be processed are (-1,-2), (9,-2), (- 1,10) and (9,10). In this way, according to the position information of the image A1 to be processed and the filtering radius of each filtering layer, the filtering area S1 of each filtering layer can be quickly determined.

在再一个例子中,请参阅图6,以待处理图像A1的左上角为原点建立图像坐标系,则待处理图像A1的顶点坐标分别为(0,0),(8,0),(0,8)和(8,8),如第一滤波半径、第二滤波半径、第三滤波半径和第四滤波半径分别为4个像素、3个像素、2个像素、1个像素,则在待处理图像A1的上边缘和下边缘分别增加4行像素和2行像素,左边缘和右边缘分别增加1列像素和3列像素,则待处理图像A1的顶点坐标分别为(-1,-4),(11,-4),(-1,10)和(11,10)。如此,根据待处理图像A1的位置信息和每个滤波层的滤波半径,即可快速确定得到每个滤波层的滤波区域S1。In yet another example, please refer to FIG. 6 , the image coordinate system is established with the upper left corner of the image A1 to be processed as the origin, then the coordinates of the vertices of the image A1 to be processed are (0,0), (8,0), (0 ,8) and (8,8), if the first filter radius, the second filter radius, the third filter radius and the fourth filter radius are 4 pixels, 3 pixels, 2 pixels, and 1 pixel respectively, then in The upper and lower edges of the image A1 to be processed are respectively increased by 4 rows of pixels and 2 rows of pixels, and the left and right edges are respectively increased by 1 column of pixels and 3 columns of pixels, then the vertex coordinates of the to-be-processed image A1 are (-1,- 4), (11,-4), (-1,10) and (11,10). In this way, according to the position information of the image A1 to be processed and the filtering radius of each filtering layer, the filtering area S1 of each filtering layer can be quickly determined.

可以理解,在进行滤波处理时,相邻两层滤波层一般是相互依赖的,例如,上一层滤波层输出图像会作为下一层滤波层的输入图像,而下一层滤波层的输入图像为下一层滤波层的输出图像和下一层滤波层的滤波半径确定。It can be understood that during the filtering process, two adjacent filter layers are generally dependent on each other. For example, the output image of the upper filter layer will be used as the input image of the next filter layer, and the input image of the next filter layer will be used as the input image of the next filter layer. Determined for the output image of the next filter layer and the filter radius of the next filter layer.

因此,可根据最后一层滤波层的输出图像和最后一层滤波层的滤波半径,确定最后一层滤波层的滤波区域,从而确定倒数第二层滤波层的输出图像(即,最后一层滤波层的滤波区域的图像数据,也是最后一层滤波层的输入图像)。然后根据倒数第二层滤波层的输出图像和倒数第二层滤波层的滤波半径,确定倒数第二层滤波层的滤波区域,从而确定倒数第三层滤波层的输出图像(即,倒数第二层滤波层的滤波区域的图像数据,也是倒数第二层滤波层的输入图像)。如此,从最后一层逐层依次进行确定到第一层,即可确定所有滤波层中,第一层滤波层的滤波区域,从而确定待处理图像的滤波区域(即,第一层滤波层的滤波区域的图像数据,也是第一层滤波层的输入图像)。Therefore, the filtering area of the last filtering layer can be determined according to the output image of the last filtering layer and the filtering radius of the last filtering layer, so as to determine the output image of the penultimate filtering layer (that is, the filtering layer of the last filtering layer) The image data of the filter region of the layer, and also the input image of the last filter layer). Then, according to the output image of the second-to-last filter layer and the filter radius of the second-to-last filter layer, the filtering area of the second-to-last filter layer is determined, thereby determining the output image of the third-to-last filter layer (that is, the second-to-last filter layer). The image data of the filter region of the layer filter layer is also the input image of the second-to-last filter layer). In this way, by sequentially determining from the last layer to the first layer, the filtering area of the first filtering layer in all the filtering layers can be determined, so as to determine the filtering area of the image to be processed (that is, the filtering area of the first filtering layer The image data of the filtering area is also the input image of the first filtering layer).

可以理解,滤波层的层数可以是1层、2层、3层、4层、5层等。上述实施方式以滤波层为3层及以上进行说明。若滤波层为两层,则只需确定得到上述实施方式中,倒数第二层滤波层的滤波区域,该滤波区域即为待处理图像的滤波区域。若滤波层为1层,则只需根据第一层滤波层的输出图像和第一层滤波层的滤波半径,确定第一层滤波层的滤波区域,该滤波区域即为待处理图像的滤波区域。It can be understood that the number of layers of the filtering layer may be 1 layer, 2 layers, 3 layers, 4 layers, 5 layers, etc. The above-described embodiment has been described with three or more filter layers. If there are two filter layers, it is only necessary to determine the filter area of the second-to-last filter layer in the above embodiment, and the filter area is the filter area of the image to be processed. If the filter layer is one layer, it is only necessary to determine the filter area of the first layer filter layer according to the output image of the first layer filter layer and the filter radius of the first layer filter layer, and the filter area is the filter area of the image to be processed. .

当然,也可仅获取多层滤波层中,任意相邻的2层,依次相邻的3层、4层等的滤波半径,从而得到任意相邻的2层、依次相邻的3层、4层等对应的滤波区域,实现一次滤波区域的数据的读取后即可供任意相邻的2层、依次相邻的3层、4层等使用,从而减少进行滤波时的数据读写量。Of course, it is also possible to obtain only the filter radii of any adjacent 2 layers, adjacent 3 layers, 4 layers, etc. in the multi-layer filter layers, so as to obtain any adjacent 2 layers, adjacent 3 layers, 4 layers in sequence, etc. The filtering area corresponding to the layer, etc., after the data in the filtering area is read once, it can be used by any adjacent layer 2, layer 3, layer 4, etc., which are adjacent to each other, thereby reducing the amount of data read and write during filtering.

例如,以滤波层为4层为例,在第1层完成滤波后,可根据第2层到第4层的滤波半径来计算第二层的输入图像对应的滤波区域,计算方式参考前述实施方式中,计算第1层的滤波区域的实施方式,在此不再赘述。如此,可使得依次相邻的第2层至第4层只需一次图像数据的读取即可,从而减少进行滤波时的数据读写量。For example, taking the filter layer as an example of 4 layers, after the first layer is filtered, the filter area corresponding to the input image of the second layer can be calculated according to the filter radius of the second layer to the fourth layer. , the implementation of calculating the filtering region of the first layer will not be repeated here. In this way, it is only necessary to read the image data once for the successively adjacent layers 2 to 4, thereby reducing the amount of data reading and writing during filtering.

另外,每层滤波层的输出的图像尺寸可以是固定的,如均与待处理图像的尺寸相同。例如,拍摄图像为100*100,待处理图像的尺寸为50*50,则拍摄图像被分为4个待处理图像。在对待处理图像进行滤波处理后,最终输出的滤波图像的尺寸也为50*50。In addition, the image size of the output of each filtering layer may be fixed, for example, the size of the image to be processed is the same. For example, if the captured image is 100*100 and the size of the image to be processed is 50*50, the captured image is divided into 4 images to be processed. After filtering the image to be processed, the size of the final output filtered image is also 50*50.

最后,处理器30直接获取待处理图像的滤波区域内的图像数据,即可得到后续要对待处理图像进行滤波处理时所需的全部图像数据。其中,对于滤波区域存在的图像数据可直接获取(如滤波区域与拍摄图像重合的部分),而对于滤波区域不存在图像数据的部分(滤波区域与拍摄图像不重合的部分),需要根据滤波区域内已存在的图像数据进行填充,从而获取到滤波区域内每个像素的图像数据。Finally, the processor 30 directly obtains the image data in the filtering region of the image to be processed, so as to obtain all the image data required for subsequent filtering processing of the image to be processed. Among them, the image data that exists in the filtering area can be obtained directly (such as the part where the filtering area overlaps with the captured image), while for the part where there is no image data in the filtering area (the part where the filtering area does not overlap the captured image), you need to use the filtering area according to the filter area. Fill in the existing image data in the filter area, so as to obtain the image data of each pixel in the filter area.

本申请实施方式的数据处理方法、数据处理装置10和终端100,通过获取待处理数据的多个滤波层的滤波半径,从而根据多个滤波层的滤波半径,确定并获取待处理数据进行多个滤波层的滤波时,所需的全部滤波区域,相较于在对每个滤波层进行滤波时,分别获取每个滤波层的滤波区域的数据,不同的滤波层的滤波区域存在重复部分,数据传输量和数据传输占用的时间均较多,导致硬件的功耗增加且数据处理效率较低而言,数据传输量和数据传输占用的时间明显减少,硬件的功耗降低且数据处理效率提高。The data processing method, the data processing device 10 and the terminal 100 according to the embodiments of the present application determine and obtain the data to be processed for multiple During the filtering of the filter layer, all the required filter areas are compared with the data of the filter area of each filter layer obtained separately when the filter layer is filtered. The filter areas of different filter layers have overlapping parts. The amount of transmission and the time occupied by data transmission are both, resulting in increased hardware power consumption and low data processing efficiency. In terms of data transmission amount and time occupied by data transmission, the power consumption of hardware is reduced and the data processing efficiency is improved.

请参阅图2、图3和图7,在某些实施方式中,滤波层包括M层,M为正整数,第M层的滤波区域根据第M层的滤波半径和待处理图像所在的图像区域确定,步骤012还包括:Please refer to FIG. 2, FIG. 3 and FIG. 7. In some embodiments, the filter layer includes M layers, where M is a positive integer, and the filter area of the Mth layer is based on the filter radius of the Mth layer and the image area where the image to be processed is located. OK, step 012 further includes:

0121:根据第N-1层的滤波半径及第N层的滤波区域,确定第N-1层的滤波区域,N为小于或等于M的正整数;0121: Determine the filtering area of the N-1 layer according to the filtering radius of the N-1 layer and the filtering area of the N-th layer, where N is a positive integer less than or equal to M;

0122:在确定得到第N-1层的滤波区域后,使N的值减少1,并再次执行步骤0121:根据第N-1层的滤波半径及第N层的滤波区域,确定第N-1层的滤波区域,直至确定第1层的滤波区域,以作为待处理图像的滤波区域。0122: After determining that the filter area of the N-1th layer is obtained, reduce the value of N by 1, and perform step 0121 again: Determine the N-1th layer according to the filter radius of the N-1th layer and the filter area of the Nth layer The filtering area of the layer is determined until the filtering area of the first layer is determined as the filtering area of the image to be processed.

在某些实施方式中,第一确定模块12还用于执行步骤0121和步骤0122。第一确定模块12还用于根据第N-1层的滤波半径及第N层的滤波区域,确定第N-1层的滤波区域,N为小于或等于M的正整数;在确定得到第N-1层的滤波区域后,使N的值减少1,并再次执行根据第N-1层的滤波半径及第N层的滤波区域,确定第N-1层的滤波区域的步骤,直至确定第1层的滤波区域,以作为待处理图像的滤波区域。In some embodiments, the first determination module 12 is further configured to perform steps 0121 and 0122. The first determining module 12 is further configured to determine the filtering region of the N-1th layer according to the filtering radius of the N-1th layer and the filtering region of the Nth layer, where N is a positive integer less than or equal to M; After the filtering area of the -1 layer, the value of N is reduced by 1, and the steps of determining the filtering area of the N-1 layer according to the filtering radius of the N-1 layer and the filtering area of the N layer are performed again until the first layer is determined. The filtering area of layer 1 is used as the filtering area of the image to be processed.

在某些实施方式中,处理器30还用于根据第N-1层的滤波半径及第N层的滤波区域,确定第N-1层的滤波区域,N为小于或等于M的正整数;在确定得到第N-1层的滤波区域后,使N的值减少1,并再次执行根据第N-1层的滤波半径及第N层的滤波区域,确定第N-1层的滤波区域的步骤,直至确定第1层的滤波区域,以作为待处理图像的滤波区域。也即是说,步骤0121和步骤0122可以由处理器30实现。In some embodiments, the processor 30 is further configured to determine the filtering region of the N-1 th layer according to the filtering radius of the N-1 th layer and the filtering region of the N-th layer, where N is a positive integer less than or equal to M; After it is determined that the filtering area of the N-1th layer is obtained, the value of N is reduced by 1, and the filter area of the N-1th layer is determined again according to the filtering radius of the N-1th layer and the filtering area of the Nth layer. Steps until the filtering area of the first layer is determined as the filtering area of the image to be processed. That is, steps 0121 and 0122 may be implemented by the processor 30 .

具体地,滤波层包括M层,如M为1、2、3、4、5等。第M层即为进行滤波处理的最后一层,待处理图像的滤波区域的图像数据经过M层滤波层依次处理后,即可完成滤波,以生成滤波图像。Specifically, the filtering layer includes M layers, for example, M is 1, 2, 3, 4, 5, and so on. The M-th layer is the last layer for filtering processing. After the image data of the filtering area of the image to be processed is sequentially processed by the M filtering layers, filtering can be completed to generate a filtered image.

在确定待处理图像的滤波区域时,处理器30可首先根据第M层的滤波半径和待处理图像所在的图像区域确定第M层的滤波区域。When determining the filtering area of the image to be processed, the processor 30 may first determine the filtering area of the M-th layer according to the filtering radius of the M-th layer and the image area where the image to be processed is located.

滤波图像可与待处理图像的尺寸相同,在对第M层的滤波区域进行滤波后,仅保留待处理图像所在的图像区域内的图像数据,以生成滤波区域。因此,可根据待处理图像所在的图像区域和第M层的滤波半径,确定第M层的滤波区域。例如,滤波半径为1个像素,则在待处理图像的所在的图像区域的上边缘和下边缘分别增加一行像素,左边缘和右边缘增加一列像素,以作为第M层的滤波区域。可以理解,每一层滤波层对滤波后,待处理图像所在的图像区域的图像数据均可能会发生改变。The size of the filtered image may be the same as that of the image to be processed. After filtering the filtering region of the Mth layer, only the image data in the image region where the image to be processed is located is retained to generate the filtering region. Therefore, the filter region of the Mth layer can be determined according to the image region where the image to be processed is located and the filter radius of the Mth layer. For example, if the filter radius is 1 pixel, then add one row of pixels to the upper and lower edges of the image area where the image to be processed is located, and add a column of pixels to the left and right edges to serve as the filtering area of the Mth layer. It can be understood that after each layer of filtering layer is filtered, the image data of the image region where the image to be processed is located may be changed.

然后,处理器30再根据第N-1层的滤波半径及第N层的滤波区域,确定第N-1层的滤波区域;请参阅图8,以M为4为例进行说明,分别为第1层L1至第4层L4。初始时,N的值等于M的值,即处理器30根据第3层的滤波半径及第4层的滤波区域,确定第3层的滤波区域;在确定第3层的滤波区域后,N的值减1变为3,处理器30根据第2层的滤波半径及第3层的滤波区域,确定第2层的滤波区域;在确定第2层的滤波区域后,N的值再次减1变为2,处理器30根据第1层的滤波半径及第2层的滤波区域,确定第1层的滤波区域,在确定第1层的滤波区域后即可作为待处理图像的滤波区域。Then, the processor 30 determines the filter area of the N-1th layer according to the filter radius of the N-1th layer and the filter area of the Nth layer; please refer to FIG. 1st floor L1 to 4th floor L4. Initially, the value of N is equal to the value of M, that is, the processor 30 determines the filtering area of the third layer according to the filtering radius of the third layer and the filtering area of the fourth layer; after determining the filtering area of the third layer, the value of N is The value is reduced by 1 to become 3, and the processor 30 determines the filter area of the second layer according to the filter radius of the second layer and the filter area of the third layer; after determining the filter area of the second layer, the value of N is reduced by 1 again to change. If it is 2, the processor 30 determines the filter area of the first layer according to the filter radius of the first layer and the filter area of the second layer, and after determining the filter area of the first layer, it can be used as the filter area of the image to be processed.

请再次参阅图2、图3和图9,在某些实施方式中,滤波层包括滤波算子,第M层的滤波算子的滤波区域根据第M层的滤波算子的滤波半径和待处理图像所在的图像区域确定,步骤0121还包括:Please refer to FIG. 2, FIG. 3 and FIG. 9 again, in some embodiments, the filter layer includes a filter operator, and the filter area of the filter operator of the Mth layer is based on the filter radius of the filter operator of the Mth layer and the to-be-processed The image area where the image is located is determined, and step 0121 further includes:

01211:根据第N-1层的滤波算子的滤波半径和第N层的滤波算子的滤波区域,确定第N-1层的每个滤波算子的滤波区域。01211: Determine the filter region of each filter operator of the N-1th layer according to the filter radius of the filter operator of the N-1th layer and the filter region of the N-th layer of filter operators.

在某些实施方式中,第一确定模块12还用于执行步骤01211。即第一确定模块12还用于根据第N-1层的滤波算子的滤波半径和第N层的滤波算子的滤波区域,确定第N-1层的每个滤波算子的滤波区域。In some embodiments, the first determination module 12 is further configured to perform step 01211. That is, the first determining module 12 is further configured to determine the filtering region of each filtering operator of the N-1 th layer according to the filtering radius of the filtering operator of the N-1 th layer and the filtering region of the filtering operator of the N-th layer.

在某些实施方式中,处理器30还用于根据第N-1层的滤波算子的滤波半径和第N层的滤波算子的滤波区域,确定第N-1层的每个滤波算子的滤波区域。即,步骤01211可以由处理器30实现。In some embodiments, the processor 30 is further configured to determine each filter operator of the N-1th layer according to the filter radius of the filter operator of the N-1th layer and the filter region of the N-th layer of filter operators filter area. That is, step 01211 may be implemented by the processor 30 .

具体地,每个滤波层可包括一个或多个滤波算子,每个滤波算子均可对上一滤波层输入的输出图像单独进行滤波,以生成中间滤波图像。请参阅图8,滤波层为4层,第1层L1包括1个滤波算子(即,OP1),第2层L2包括3个滤波算子(即OP2、OP3和OP4),第3层L3包括2个滤波算子(即OP5和OP6),第4层L4包括1个滤波算子(即,OP7)。109*109,107*107Specifically, each filter layer may include one or more filter operators, and each filter operator may independently filter the output image input by the previous filter layer to generate an intermediate filtered image. Please refer to Fig. 8, the filter layer is 4 layers, the first layer L1 includes 1 filter operator (ie, OP1), the second layer L2 includes 3 filter operators (ie OP2, OP3 and OP4), the third layer L3 It includes 2 filter operators (ie, OP5 and OP6), and the fourth layer L4 includes 1 filter operator (ie, OP7). 109*109, 107*107

第一层的滤波算子OP1对待处理图像的滤波区域的图像数据(即图8中的图像P0)进行滤波处理后,输出第一中间滤波图像P1;第一中间滤波图像P1分别输入到第二层的OP2、OP3和OP4,OP2、OP3和OP4可分别对第一中间滤波图像P1进行处理,即可输出3张第二中间滤波图像P2;3张第二中间滤波图像P2分别输入到第三层的OP5(处理OP2和OP3的第二中间滤波图像P2)和OP6(处理OP4的第二中间滤波图像P2),OP5和OP6可分别对第二中间滤波图像P2进行处理,即可输出2张第三中间滤波图像P3;2张第三中间滤波图像P3均输入到第四层的OP7,OP7对2张第三中间滤波图像P3进行处理,即可输出第四中间滤波图像P4,可将第四中间滤波图像P4作为最终的滤波图像进行输出。After the filtering operator OP1 of the first layer performs filtering processing on the image data of the filtering area of the image to be processed (ie, the image P0 in FIG. 8 ), the first intermediate filtering image P1 is output; the first intermediate filtering image P1 is respectively input to the second Layers OP2, OP3 and OP4, OP2, OP3 and OP4 can process the first intermediate filter image P1 respectively, so as to output three second intermediate filter images P2; Layer OP5 (processing the second intermediate filtering image P2 of OP2 and OP3) and OP6 (processing the second intermediate filtering image P2 of OP4), OP5 and OP6 can process the second intermediate filtering image P2 respectively, and can output 2 images The third intermediate filtering image P3; the two third intermediate filtering images P3 are both input to the OP7 of the fourth layer, and the OP7 processes the two third intermediate filtering images P3, and the fourth intermediate filtering image P4 can be output. Four intermediate filtered images P4 are output as final filtered images.

根据图8所示,不同的滤波算子之间存在关联,OP1和OP2、OP1和OP3、OP1和OP4、OP2和OP5、OP3和OP5、OP4和OP6、OP5和OP7、OP6和OP7关联,关联的滤波算子指的是上一层滤波算子的输出作为下一层滤波算子的输入。As shown in Figure 8, there are associations between different filter operators, OP1 and OP2, OP1 and OP3, OP1 and OP4, OP2 and OP5, OP3 and OP5, OP4 and OP6, OP5 and OP7, OP6 and OP7 are associated, The filter operator refers to the output of the filter operator of the previous layer as the input of the filter operator of the next layer.

在计算第N-1层的每个滤波算子的滤波区域时,首先根据第M层的滤波算子的滤波半径和待处理图像所在的图像区域确定第M层的滤波算子的滤波区域(即,OP7的滤波区域)。然后,在确定与第N-1层的每个滤波算子关联的第N层的滤波算子后,根据第N-1层的滤波算子的滤波半径和第N层的滤波算子的滤波区域,即可确定第N-1层的每个滤波算子的滤波区域。When calculating the filter area of each filter operator of the N-1th layer, first determine the filter area of the filter operator of the Mth layer according to the filter radius of the filter operator of the Mth layer and the image area where the image to be processed is located ( That is, the filter area of OP7). Then, after determining the filter operator of the Nth layer associated with each filter operator of the N-1th layer, according to the filter radius of the filter operator of the N-1th layer and the filtering of the filter operator of the Nth layer area, the filtering area of each filtering operator of the N-1th layer can be determined.

例如,N的值等于M的值为4,则根据OP7的滤波区域和OP5的滤波半径,确定OP5的滤波区域;根据OP7的滤波区域和OP6的滤波半径,确定OP6的滤波区域。如此,逐层计算每一层滤波层中的每个滤波算子的滤波区域,直至计算得到第一层的滤波算子OP1的滤波区域,即为待处理图像的滤波区域。For example, if the value of N is equal to the value of M, which is 4, the filtering area of OP5 is determined according to the filtering area of OP7 and the filtering radius of OP5; the filtering area of OP6 is determined according to the filtering area of OP7 and the filtering radius of OP6. In this way, the filtering area of each filtering operator in each filtering layer is calculated layer by layer until the filtering area of the filtering operator OP1 of the first layer is calculated, which is the filtering area of the image to be processed.

可以理解,第N-1层的一个滤波算子可能关联多个第N层的滤波算子。第N-1层的第一滤波算子与第N层的第二滤波算子关联包括第N-1层的滤波算子的输出数据为第N层的滤波算子的输入数据,第一滤波算子为第N-1层的滤波算子中的任一个,第二滤波算子为第N层的滤波算子中的任一个。It can be understood that one filter operator of the N-1th layer may be associated with multiple filter operators of the Nth layer. The first filter operator of the N-1th layer is associated with the second filter operator of the Nth layer. The output data of the filter operator of the N-1th layer is the input data of the filter operator of the Nth layer. The first filter The operator is any one of the filter operators of the N-1th layer, and the second filter operator is any one of the filter operators of the Nth layer.

例如,如图8所示,第N-1层(以第1层为例)的第一滤波算子(即OP1)与第N层(即,第2层)的多个第二滤波算子(即,OP2、OP3和OP4)关联。OP1输出的第一中间滤波图像P1即为OP2、OP3和OP4的输入图像,为了保证第一中间滤波图像P1包含OP2、OP3和OP4所需的全部图像数据,因此,在确定OP2、OP3和OP4的滤波区域后,可根据第N层的每个第二滤波算子的滤波区域(即,OP2、OP3和OP4的滤波区域),确定中间滤波区域。For example, as shown in FIG. 8, the first filter operator (ie, OP1) of the N-1th layer (ie, the first layer as an example) and a plurality of second filter operators of the Nth layer (ie, the second layer) (ie, OP2, OP3, and OP4) are associated. The first intermediate filtered image P1 output by OP1 is the input image of OP2, OP3 and OP4. In order to ensure that the first intermediate filtered image P1 contains all the image data required by OP2, OP3 and OP4, after determining OP2, OP3 and OP4 After the filtering regions are determined, the intermediate filtering regions may be determined according to the filtering regions of each second filtering operator of the Nth layer (ie, the filtering regions of OP2, OP3, and OP4).

如图10所示,可将当前滤波层(如第N层)的所有滤波算子的滤波区域的并集作为中间滤波区域S2,如OP2、OP3和OP4的滤波区域(即,OP2、OP3和OP4分别输出的第二中间滤波图像P2)的并集作为中间滤波区域S2,而由于滤波区域一般为矩形,因此,可将OP2、OP3和OP4的滤波区域的并集对应的矩形区域作为中间滤波区域S2。As shown in FIG. 10 , the union of the filtering regions of all the filtering operators of the current filtering layer (eg, the Nth layer) can be taken as the intermediate filtering region S2, such as the filtering regions of OP2, OP3 and OP4 (ie, OP2, OP3 and OP4). The union of the second intermediate filtering images P2) respectively output by OP4 is used as the intermediate filtering area S2, and since the filtering area is generally rectangular, the rectangular area corresponding to the union of the filtering areas of OP2, OP3 and OP4 can be used as the intermediate filtering area. Area S2.

最后,根据中间滤波区域和第一滤波算子的滤波半径,确定第一滤波算子的滤波区域。从而使得第一滤波算子进行滤波处理后输出的图像数据包含OP2、OP3和OP4所需的全部图像数据。如此,可通过一次读取当前滤波层所有滤波算子的图像数据。Finally, the filter region of the first filter operator is determined according to the intermediate filter region and the filter radius of the first filter operator. Therefore, the image data outputted after the first filtering operator performs filtering processing includes all the image data required by OP2, OP3 and OP4. In this way, the image data of all filter operators in the current filter layer can be read at one time.

或者,可将当前滤波层的多个滤波算子(至少两个)的滤波区域的并集作为中间滤波区域S2,如可将OP2和OP3的滤波区域的并集、OP2和OP4的滤波区域的并集、或OP3和OP4的滤波区域的并集作为中间滤波区域S2。Alternatively, the union of the filtering regions of multiple filtering operators (at least two) of the current filtering layer may be used as the intermediate filtering region S2, for example, the union of the filtering regions of OP2 and OP3, and the filtering regions of OP2 and OP4 may be used. The union, or the union of the filter regions of OP3 and OP4, serves as the intermediate filter region S2.

然后,根据中间滤波区域和第一滤波算子的滤波半径,确定第一滤波算子的滤波区域。从而使得第一滤波算子进行滤波处理后输出的图像数据包含多个滤波算子所需的全部图像数据,从而通过一次读取获取多个滤波算子的图像数据。Then, the filter region of the first filter operator is determined according to the intermediate filter region and the filter radius of the first filter operator. Therefore, the image data output by the first filter operator after filtering processing includes all the image data required by the multiple filter operators, so that the image data of the multiple filter operators can be obtained through one reading.

对于第N-1层(以第3层为例)的第一滤波算子为多个(即,OP5和OP6),且与第N层(即,第4层)的OP7关联的情况,则可将多OP5和OP6共生成的两张第三中间滤波图像P3均输入到OP7,OP7分别对两张第三中间滤波图像P3进行滤波处理,以得到两张第四中间滤波图像P4,并将两张第四中间滤波图像P4进行融合,如将两张第四中间滤波图像P4中位置相同的像素进行加权融合等方式,最终输出一张融合后的第四中间滤波图像P4。For the case where there are multiple first filter operators (ie, OP5 and OP6) of the N-1th layer (take the third layer as an example) and are associated with OP7 of the Nth layer (ie, the fourth layer), then The two third intermediate filtered images P3 generated by multiple OP5 and OP6 can be input into OP7, and OP7 can filter the two third intermediate filtered images P3 to obtain two fourth intermediate filtered images P4, and The two fourth intermediate filtered images P4 are fused, for example, by weighted fusion of the pixels in the same positions in the two fourth intermediate filtered images P4, and finally a fused fourth intermediate filtered image P4 is output.

请参阅图2、图3和图11,在某些实施方式中,数据处理方法还包括以下步骤:Please refer to Fig. 2, Fig. 3 and Fig. 11, in some embodiments, the data processing method further comprises the following steps:

014:根据每个第二滤波算子的滤波区域的顶点坐标和中间滤波区域的顶点坐标,确定每个第二滤波算子的坐标偏移;014: Determine the coordinate offset of each second filter operator according to the vertex coordinates of the filter region of each second filter operator and the vertex coordinates of the intermediate filter region;

015:在对第N层进行滤波处理时,根据每个第二滤波算子的坐标偏移、和第N-1层的输出图像的顶点坐标,确定每个第二滤波算子的滤波区域的顶点坐标;015: When performing the filtering process on the Nth layer, according to the coordinate offset of each second filter operator and the vertex coordinates of the output image of the N-1th layer, determine the filter area of each second filter operator. vertex coordinates;

016:从输出图像中,获取并处理与每个第二滤波算子的滤波区域对应的图像数据。016: From the output image, acquire and process image data corresponding to the filtering region of each second filtering operator.

在某些实施方式中,数据处理装置10还包括第二确定模块14、第三确定模块15和第一处理模块16。第二确定模块14、第三确定模块15和第一处理模块16分别用于执行步骤014、步骤015和步骤016。即,第二确定模块14用于根据每个第二滤波算子的滤波区域的顶点坐标和中间滤波区域的顶点坐标,确定每个第二滤波算子的坐标偏移;第三确定模块15用于在对第N层进行滤波处理时,根据每个第二滤波算子的坐标偏移、和第N-1层的输出图像的顶点坐标,确定每个第二滤波算子的滤波区域的顶点坐标;第一处理模块16用于从输出图像中,获取并处理与每个第二滤波算子的滤波区域对应的图像数据。In some embodiments, the data processing apparatus 10 further includes a second determination module 14 , a third determination module 15 and a first processing module 16 . The second determination module 14 , the third determination module 15 and the first processing module 16 are used to execute step 014 , step 015 and step 016 respectively. That is, the second determination module 14 is configured to determine the coordinate offset of each second filter operator according to the vertex coordinates of the filter region of each second filter operator and the vertex coordinates of the intermediate filter region; the third determination module 15 uses When performing the filtering process on the Nth layer, according to the coordinate offset of each second filter operator and the vertex coordinates of the output image of the N-1th layer, determine the vertex of the filter area of each second filter operator Coordinates; the first processing module 16 is used for acquiring and processing image data corresponding to the filtering region of each second filtering operator from the output image.

在某些实施方式中,处理器30还用于根据每个第二滤波算子的滤波区域的顶点坐标和中间滤波区域的顶点坐标,确定每个第二滤波算子的坐标偏移;在对第N层进行滤波处理时,根据每个第二滤波算子的坐标偏移、和第N-1层的输出图像的顶点坐标,确定每个第二滤波算子的滤波区域的顶点坐标;从输出图像中,获取并处理与每个第二滤波算子的滤波区域对应的图像数据。也即是说,步骤014、步骤015和步骤016可以由处理器30实现。In some embodiments, the processor 30 is further configured to determine the coordinate offset of each second filter operator according to the vertex coordinates of the filter region of each second filter operator and the vertex coordinates of the intermediate filter region; When the Nth layer performs filtering, according to the coordinate offset of each second filter operator and the vertex coordinates of the output image of the N-1th layer, determine the vertex coordinates of the filtering area of each second filter operator; In the output image, image data corresponding to the filter region of each second filter operator is acquired and processed. That is, steps 014 , 015 and 016 may be implemented by the processor 30 .

具体地,由于一个第一滤波算子可能关联多个第二滤波算子,且第一滤波算子的滤波区域根据多个第二滤波算子的滤波区域(如多个第二滤波算子的滤波区域的并集,即中间滤波区域)和第一滤波算子的滤波半径确定。Specifically, since one first filter operator may be associated with multiple second filter operators, and the filter region of the first filter operator is based on the filter regions of multiple second filter operators (for example, the filter region of multiple second filter operators The union of the filtering regions, namely the intermediate filtering region) and the filtering radius of the first filtering operator are determined.

为了保证第二滤波算子能够准确地从第一滤波算子输出的第一中间滤波图像P1(对应中间滤波区域)中获取所需的图像数据,需要确定第二滤波算子的滤波区域在中间滤波区域的位置。In order to ensure that the second filter operator can accurately obtain the required image data from the first intermediate filter image P1 (corresponding to the intermediate filter region) output by the first filter operator, it is necessary to determine that the filter region of the second filter operator is in the middle The location of the filter area.

因此,处理器30可根据每个第二滤波算子的滤波区域的顶点坐标和中间滤波区域的顶点坐标,确定每个第二滤波算子的坐标偏移;从而在第一滤波算子(如第1层的第一滤波算子)输出第一中间滤波图像P1(即,中间滤波区域)时,第二滤波算子可以从第一中间滤波图像P1中获取到滤波所需的图像数据。Therefore, the processor 30 can determine the coordinate offset of each second filter operator according to the vertex coordinates of the filter region of each second filter operator and the vertex coordinates of the intermediate filter region; When the first filter operator of the first layer outputs the first intermediate filter image P1 (ie, the intermediate filter region), the second filter operator can obtain image data required for filtering from the first intermediate filter image P1.

例如,在第N层(如第2层)进行滤波时,第二滤波算子可根据其对应的坐标偏移和第一中间滤波图像P1的顶点坐标,计算第二滤波算子的滤波区域的顶点坐标,从而在第一中间滤波图像P1中获取与第二滤波算子的滤波区域对应的图像数据,并进行滤波处理,保证数据获取及处理的准确性。For example, when filtering is performed at the Nth layer (eg, the second layer), the second filter operator can calculate the value of the filter region of the second filter operator according to its corresponding coordinate offset and the vertex coordinates of the first intermediate filter image P1. vertex coordinates, so as to obtain image data corresponding to the filtering region of the second filtering operator in the first intermediate filtering image P1, and perform filtering processing to ensure the accuracy of data acquisition and processing.

请参阅图2、图3和图12,在某些实施方式中,滤波半径包括第五滤波半径和第六滤波半径,数据处理方法还包括以下步骤:Please refer to Fig. 2, Fig. 3 and Fig. 12, in some embodiments, the filtering radius includes a fifth filtering radius and a sixth filtering radius, and the data processing method further comprises the following steps:

017:确定每个第二滤波算子的滤波区域的第五滤波半径和中间滤波区域的第五滤波半径的第一差值、及每个第二滤波算子的滤波区域的第六滤波半径和中间滤波区域的第六滤波半径的第二差值;017: Determine the first difference between the fifth filter radius of the filter area of each second filter operator and the fifth filter radius of the intermediate filter area, and the sixth filter radius of the filter area of each second filter operator and the second difference of the sixth filter radius of the intermediate filter region;

018:在对第N层进行滤波处理时,根据每个第二滤波算子的第一差值和第N-1层的输出图像的宽度,确定每个第二滤波算子的滤波区域的宽度,并根据每个第二滤波算子的第二差值和第N-1层的输出图像的高度,确定每个第二滤波算子的滤波区域的高度;018: When performing the filtering process on the Nth layer, determine the width of the filtering region of each second filter operator according to the first difference value of each second filter operator and the width of the output image of the N-1th layer , and according to the second difference value of each second filter operator and the height of the output image of the N-1th layer, determine the height of the filter area of each second filter operator;

019:根据每个第二滤波算子的宽度和高度确定每个第二滤波算子的滤波区域;及019: determining the filter region of each second filter operator according to the width and height of each second filter operator; and

020:从输出图像中,获取并处理与每个第二滤波算子的滤波区域对应的图像数据。020: From the output image, acquire and process image data corresponding to the filtering region of each second filtering operator.

在某些实施方式中,数据处理装置10还包括第四确定模块17、第五确定模块18、第六确定模块19和第二处理模块20。第四确定模块17、第五确定模块18、第六确定模块19和第二处理模块20分别用于执行步骤017、步骤018、步骤019和步骤020。即,第四确定模块17用于确定每个第二滤波算子的滤波区域的第五滤波半径和中间滤波区域的第五滤波半径的第一差值、及每个第二滤波算子的滤波区域的第六滤波半径和中间滤波区域的第六滤波半径的第二差值;第五确定模块18用于在对第N层进行滤波处理时,根据每个第二滤波算子的第一差值和第N-1层的输出图像的宽度,确定每个第二滤波算子的滤波区域的宽度,并根据每个第二滤波算子的第二差值和第N-1层的输出图像的高度,确定每个第二滤波算子的滤波区域的高度;第六确定模块19用于根据每个第二滤波算子的宽度和高度确定每个第二滤波算子的滤波区域;第二处理模块20用于从输出图像中,获取并处理与每个第二滤波算子的滤波区域对应的图像数据。In some embodiments, the data processing apparatus 10 further includes a fourth determination module 17 , a fifth determination module 18 , a sixth determination module 19 and a second processing module 20 . The fourth determination module 17 , the fifth determination module 18 , the sixth determination module 19 and the second processing module 20 are used to execute step 017 , step 018 , step 019 and step 020 respectively. That is, the fourth determination module 17 is configured to determine the first difference between the fifth filter radius of the filter region of each second filter operator and the fifth filter radius of the intermediate filter region, and the filter value of each second filter operator The second difference between the sixth filtering radius of the region and the sixth filtering radius of the intermediate filtering region; the fifth determining module 18 is configured to, when performing filtering processing on the Nth layer, according to the first difference of each second filtering operator value and the width of the output image of the N-1th layer, determine the width of the filtering area of each second filter operator, and based on the second difference value of each second filter operator and the output image of the N-1th layer The height of each second filter operator determines the height of the filter region; the sixth determination module 19 is used to determine the filter region of each second filter operator according to the width and height of each second filter operator; the second The processing module 20 is used for acquiring and processing image data corresponding to the filtering region of each second filtering operator from the output image.

在某些实施方式中,处理器30还用于确定每个第二滤波算子的滤波区域的第五滤波半径和中间滤波区域的第五滤波半径的第一差值、及每个第二滤波算子的滤波区域的第六滤波半径和中间滤波区域的第六滤波半径的第二差值;在对第N层进行滤波处理时,根据每个第二滤波算子的第一差值和第N-1层的输出图像的宽度,确定每个第二滤波算子的滤波区域的宽度,并根据每个第二滤波算子的第二差值和第N-1层的输出图像的高度,确定每个第二滤波算子的滤波区域的高度;根据每个第二滤波算子的宽度和高度确定每个第二滤波算子的滤波区域;及从输出图像中,获取并处理与每个第二滤波算子的滤波区域对应的图像数据。也即是说,步骤017、步骤018、步骤019和步骤020可以由处理器30实现。In some embodiments, the processor 30 is further configured to determine the first difference between the fifth filter radius of the filter region of each second filter operator and the fifth filter radius of the intermediate filter region, and each second filter The second difference between the sixth filter radius of the filter region of the operator and the sixth filter radius of the intermediate filter region; when performing the filtering process on the Nth layer, according to the first difference of each second filter operator and the sixth filter radius The width of the output image of the N-1 layer determines the width of the filtering area of each second filter operator, and according to the second difference value of each second filter operator and the height of the output image of the N-1th layer, Determine the height of the filter region of each second filter operator; determine the filter region of each second filter operator according to the width and height of each second filter operator; and from the output image, obtain and process and each second filter operator. Image data corresponding to the filtering region of the second filtering operator. That is, step 017 , step 018 , step 019 and step 020 may be implemented by the processor 30 .

具体地,在滤波算子的滤波半径仅包括第五滤波半径和第六滤波半径时,即滤波区域的上边和下边的滤波半径相同,均为第五滤波半径,左边和右边的滤波半径相同,均为第六滤波半径。Specifically, when the filtering radius of the filtering operator only includes the fifth filtering radius and the sixth filtering radius, that is, the filtering radius on the upper and lower sides of the filtering area is the same, both are the fifth filtering radius, and the filtering radius on the left and right are the same, are the sixth filter radius.

处理器30可确定每个第二滤波算子的滤波区域的第五滤波半径和中间滤波区域的第五滤波半径的第一差值、及每个第二滤波算子的滤波区域的第六滤波半径和中间滤波区域的第六滤波半径的第二差值;从而确定每个第二滤波算子的滤波区域的滤波半径相对中间滤波区域的滤波半径的偏移,从而在第一滤波算子(如第1层的第一滤波算子)的输出图像(即,第一中间滤波图像P1,对应中间滤波区域)时,第二滤波算子可以从第一中间滤波图像P1中获取到滤波所需的图像数据。The processor 30 may determine the first difference between the fifth filter radius of the filter region of each second filter operator and the fifth filter radius of the intermediate filter region, and the sixth filter of the filter region of each second filter operator The second difference between the radius and the sixth filter radius of the intermediate filter region; thereby determining the offset of the filter radius of the filter region of each second filter operator relative to the filter radius of the intermediate filter region, thereby determining the offset of the filter radius of the filter region of each second filter operator ( For example, when the output image of the first filter operator of the first layer (that is, the first intermediate filter image P1, corresponding to the intermediate filter area), the second filter operator can obtain the filtering required from the first intermediate filter image P1. image data.

例如,在第N层(如第2层)进行滤波时,第二滤波算子可根据其对应的第一差值和第二差值,来分别与第一中间滤波图像P1的高度和宽度作差,从而得到每个第二滤波算子的高度和宽度。然后,处理器30根据第二滤波算子的高度和宽度,来确定每个第二滤波算子的滤波区域,例如,第一中间滤波图像P1为106*106,第一差值和第二差值分别为2和1,则第二滤波算子的宽度和高度分别为104*102,即For example, when filtering is performed at the Nth layer (eg, the second layer), the second filter operator can be used for the height and width of the first intermediate filtered image P1 according to its corresponding first difference and second difference, respectively. difference to obtain the height and width of each second filter operator. Then, the processor 30 determines the filter region of each second filter operator according to the height and width of the second filter operator, for example, the first intermediate filter image P1 is 106*106, the first difference value and the second difference value are The values are 2 and 1 respectively, then the width and height of the second filter operator are 104*102, namely

因此,在确定第二滤波算子的宽度和高度,即可快速确定每个第二滤波算子的滤波区域。最后,处理器30从第一中间滤波图像P1中获取与第二滤波算子的滤波区域对应的图像数据,并进行滤波处理,保证数据获取及处理的准确性。Therefore, after determining the width and height of the second filter operator, the filter region of each second filter operator can be quickly determined. Finally, the processor 30 acquires image data corresponding to the filtering region of the second filtering operator from the first intermediate filtering image P1, and performs filtering processing to ensure the accuracy of data acquisition and processing.

在另一个实施方式中,滤波区域的四边的滤波半径均相同,则此时只需计算每个第二滤波算子的滤波区域的滤波半径和中间滤波区域的滤波半径的差值即可。从而方便后续进行滤波处理时,每个滤波算子快速从上一层输出的输出图像中,获取到滤波所需的全部图像数据。In another embodiment, the filtering radii of the four sides of the filtering area are all the same, then only the difference between the filtering radius of the filtering area of each second filter operator and the filtering radius of the intermediate filtering area needs to be calculated. Therefore, during subsequent filtering processing, each filtering operator can quickly obtain all the image data required for filtering from the output image output by the previous layer.

在再一个实施方式中,滤波区域的四边的滤波半径均不相同,即滤波区域包括前述提到的第一滤波半径至第四滤波半径,在计算滤波半径的差值时,则需要分别计算每个第二滤波算子的第一滤波半径至第四滤波半径和中间滤波区域的第一滤波半径至第四滤波半径的四个差值,从而方便后续进行滤波处理时,每个滤波算子快速从上一层输出的输出图像中,获取到滤波所需的全部图像数据。In yet another embodiment, the filtering radii of the four sides of the filtering area are all different, that is, the filtering area includes the aforementioned first filtering radius to the fourth filtering radius. When calculating the difference of the filtering radius, it is necessary to calculate each Four differences between the first filter radius to the fourth filter radius of the second filter operator and the first filter radius to the fourth filter radius of the intermediate filter region, so as to facilitate the subsequent filter processing, each filter operator can quickly From the output image output by the previous layer, obtain all the image data required for filtering.

在一个例子中,请再次参阅图8,以上述数据处理算法进行数据处理时,每个滤波算子的输入数据和输出数据都没有进行下采样或者上采样;每个滤波算子的滤波半径都为5个像素,在一般方法中每个滤波算子规划的输出也都规划为[w,h],且假设w=128,h=64。In an example, please refer to Fig. 8 again, when the data processing algorithm is used for data processing, the input data and output data of each filter operator are not down-sampled or up-sampled; the filter radius of each filter operator is is 5 pixels, and in the general method, the planned output of each filter operator is also planned as [w, h], and it is assumed that w=128, h=64.

对于现有的滤波算法在每一层滤波层均单独从终端100的存储器50(如动态随机存取存储器,DRAM)中进行数据读写而言,第一层到第四层存储器50的读写量如下表1:For the existing filtering algorithm, each filtering layer independently reads and writes data from the memory 50 (such as dynamic random access memory, DRAM) of the terminal 100, the read and write of the first layer to the fourth layer memory 50 The quantities are as follows in Table 1:

表1Table 1

DRAM读DRAM read DRAM写DRAM write L1L1 (128+2*5)*(64+2*5)=10212(128+2*5)*(64+2*5)=10212 128*64=8192128*64=8192 L2L2 1021210212 128*64*3=8192*3128*64*3=8192*3 L3L3 10212*310212*3 128*64*2=8192*2128*64*2=8192*2 L4L4 10212*210212*2 128*64=8192128*64=8192 总计total 7148471484 5734457344

而使用本申请的数据处理方法进行数据处理时,存储器50的读写量如下表2:When using the data processing method of the present application for data processing, the read/write volume of the memory 50 is as follows in Table 2:

表2Table 2

DRAM读DRAM read DRAM写DRAM write 总计total (128+2*5*4)*(64+2*5*4)=17472(128+2*5*4)*(64+2*5*4)=17472 w*h=8192w*h=8192

可以看到,利用本方法使得DRAM读的数据量从71484降低到17472,DRAM写的数据量从57344降低到8192,算法所需读写量大大降低,从而算法效率和功耗表现也能够显著提升。It can be seen that by using this method, the amount of data read by DRAM is reduced from 71484 to 17472, the amount of data written by DRAM is reduced from 57344 to 8192, and the amount of reading and writing required by the algorithm is greatly reduced, so the algorithm efficiency and power consumption performance can also be significantly improved. .

请参阅图13,本申请实施方式的一种存储有计算机程序302的非易失性计算机可读存储介质300,当计算机程序302被一个或多个处理器30执行时,使得处理器30可执行上述任一实施方式的数据处理方法。Referring to FIG. 13 , a non-volatile computer-readable storage medium 300 storing a computer program 302 according to an embodiment of the present application, when the computer program 302 is executed by one or more processors 30 , makes the processor 30 executable The data processing method of any one of the above embodiments.

例如,请结合图1,当计算机程序302被一个或多个处理器30执行时,使得处理器30执行以下步骤:For example, referring to FIG. 1, when the computer program 302 is executed by one or more processors 30, the processor 30 is caused to perform the following steps:

011:获取预设的多个滤波层的滤波半径;011: Obtain the filter radius of the preset multiple filter layers;

012:根据多个滤波层的滤波半径,确定待处理数据的滤波区域;及012: Determine the filtering region of the data to be processed according to the filtering radii of the plurality of filtering layers; and

013:获取滤波区域的图像数据。013: Acquire image data of the filtered area.

再例如,请结合图7,当计算机程序302被一个或多个处理器30执行时,处理器30还可以执行以下步骤:For another example, referring to FIG. 7 , when the computer program 302 is executed by one or more processors 30, the processors 30 may further perform the following steps:

0121:根据第N-1层的滤波半径及第N层的滤波区域,确定第N-1层的滤波区域,N为小于或等于M的正整数;0121: Determine the filtering area of the N-1 layer according to the filtering radius of the N-1 layer and the filtering area of the N-th layer, where N is a positive integer less than or equal to M;

0122:在确定得到第N-1层的滤波区域后,使N的值减少1,并再次执行步骤0121:根据第N-1层的滤波半径及第N层的滤波区域,确定第N-1层的滤波区域,直至确定第1层的滤波区域,以作为待处理图像的滤波区域。0122: After determining that the filter area of the N-1th layer is obtained, reduce the value of N by 1, and perform step 0121 again: Determine the N-1th layer according to the filter radius of the N-1th layer and the filter area of the Nth layer The filtering area of the layer is determined until the filtering area of the first layer is determined as the filtering area of the image to be processed.

在本说明书的描述中,参考术语“一个实施方式”、“一些实施方式”、“示意性实施方式”、“示例”、“具体示例”或“一些示例”等的描述意指结合实施方式或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, reference to the terms "one embodiment," "some embodiments," "exemplary embodiment," "example," "specific example," or "some examples," or the like, is meant to combine embodiments or The particular feature, structure, material or characteristic described by example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and combine the different embodiments or examples described in this specification, as well as the features of the different embodiments or examples, without conflicting each other.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的程序的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。Any description of a process or method in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more steps of a program for implementing a specified logical function or process, and The scope of the preferred embodiments of the present application includes alternative implementations in which the functions may be performed out of the order shown or discussed, including performing the functions in a substantially simultaneous manner or in the reverse order depending upon the functions involved, which should be Those skilled in the art to which the embodiments of the application pertain are understood.

尽管上面已经示出和描述了本申请的实施方式,可以理解的是,上述实施方式是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施方式进行变化、修改、替换和变型。Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limitations to the present application. Embodiments are subject to variations, modifications, substitutions and alterations.

Claims (13)

1. A method of data processing, comprising:
acquiring preset filtering radiuses of a plurality of filtering layers;
determining a filtering area of data to be processed according to the filtering radiuses of the plurality of filtering layers; and
and acquiring the image data of the filtering area.
2. The data processing method of claim 1, wherein the determining a filtering region of the data to be processed according to the filtering radii of a plurality of filtering layers comprises:
and determining the filtering area according to the filtering radiuses of the plurality of filtering layers and the position information of the data to be processed.
3. The data processing method according to claim 1, wherein the filter layer includes M layers, M is a positive integer, a filter region of the M layer is determined according to a filter radius of the M layer and an image region where the data to be processed is located, and the determining the filter region of the data to be processed according to the filter radius and the position information includes:
determining a filtering area of an N-1 layer according to the filtering radius of the N-1 layer and the filtering area of the Nth layer, wherein N is a positive integer less than or equal to M;
and after determining to obtain the filtering area of the (N-1) th layer, reducing the value of N by 1, and executing the step of determining the filtering area of the (N-1) th layer again according to the filtering radius of the (N-1) th layer and the filtering area of the (N) th layer until determining the filtering area of the (1) th layer as the filtering area of the data to be processed.
4. The data processing method of claim 3, wherein the filter radius comprises a first filter radius, a second filter radius, a third filter radius, and a fourth filter radius, and wherein the first filter radius, the second filter radius, the third filter radius, and the fourth filter radius are the same; or the first filtering radius is the same as the third filtering radius, and the second filtering radius is the same as the fourth filtering radius; or the first filtering radius, the second filtering radius, the third filtering radius and the fourth filtering radius are different from each other.
5. The data processing method according to claim 3, wherein the filter layer includes a filter operator, a filter region of the filter operator of an M-th layer is determined according to a filter radius of the filter operator of the M-th layer and an image region where the data to be processed is located, and the determining of the filter region of an N-1-th layer according to the filter radius of the N-1-th layer and the filter region of the N-1-th layer includes:
determining the filtering region of each filtering operator of the N-1 th layer according to the filtering radius of the filtering operator of the N-1 th layer and the filtering region of the filtering operator of the N-1 th layer.
6. The data processing method according to claim 5, wherein the first filter operator of the N-1 th layer is associated with the second filter operator of the N-th layer, and the association of the first filter operator of the N-1 th layer with the second filter operator of the N-1 th layer comprises the output data of the filter operator of the N-1 th layer being the input data of the filter operator of the N-1 th layer, the first filter operator being any one of the filter operators of the N-1 th layer, and the second filter operator being any one of the filter operators of the N-1 th layer;
said determining said filter region of each said filter operator of layer N-1 from said filter radius of said filter operator of layer N-1 and a filter region of said filter operator of layer N, comprising:
determining a middle filtering region according to the filtering region of each second filtering operator of the Nth layer; and
and determining the filtering area of the first filtering operator according to the intermediate filtering area and the filtering radius of the first filtering operator.
7. The data processing method according to claim 6, wherein the second filter operator associated with the first filter operator is plural, and the determining an intermediate filter region from the filter regions of each second filter operator of the Nth layer comprises:
and determining the intermediate filtering region according to a union set of the filtering regions of the plurality of second filtering operators.
8. The data processing method of claim 6, further comprising:
determining the coordinate offset of each second filter operator according to the vertex coordinates of the filter region of each second filter operator and the vertex coordinates of the middle filter region;
when the Nth layer is subjected to filtering processing, determining the vertex coordinates of the filtering area of each second filtering operator according to the coordinate offset of each second filtering operator and the vertex coordinates of the output image of the Nth-1 layer;
and acquiring and processing image data corresponding to the filtering region of each second filtering operator from the output image.
9. The data processing method of claim 6, wherein the filter radius comprises a fifth filter radius and a sixth filter radius; the data processing method further comprises:
determining a first difference of the fifth filter radius of the filter region of each of the second filter operators and the fifth filter radius of the intermediate filter region, and a second difference of the sixth filter radius of the filter region of each of the second filter operators and the sixth filter radius of the intermediate filter region;
when the Nth layer is subjected to filtering processing, determining the height of a filtering region of each second filtering operator according to the first difference value of each second filtering operator and the width of an output image of the Nth-1 layer, and determining the width of the filtering region of each second filtering operator according to the second difference value of each second filtering operator and the height of the output image of the Nth-1 layer;
determining a filtering area of each second filtering operator according to the width and the height of each second filtering operator; and
and acquiring and processing image data corresponding to the filtering region of each second filtering operator from the output image.
10. The data processing method of claim 1, further comprising:
and carrying out filtering processing on the image data of the filtering area to generate a filtering image.
11. A data processing apparatus, characterized by comprising:
the first obtaining module is used for obtaining the preset filtering radiuses of a plurality of filtering layers;
the first determining module is used for determining a filtering area of data to be processed according to the filtering radiuses of the plurality of filtering layers; and
and the second acquisition module is used for acquiring the image data of the filtering area.
12. The terminal is characterized by comprising a processor, a first filter layer and a second filter layer, wherein the processor is used for obtaining the filter radius of the preset plurality of filter layers; determining a filtering area of data to be processed according to the filtering radiuses of the plurality of filtering layers; and acquiring the image data of the filtering area.
13. A non-transitory computer-readable storage medium comprising a computer program which, when executed by a processor, causes the processor to perform the data processing method of any one of claims 1-10.
CN202210126015.7A 2022-02-10 2022-02-10 Data processing method, device, terminal and readable storage medium Active CN114529483B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210126015.7A CN114529483B (en) 2022-02-10 2022-02-10 Data processing method, device, terminal and readable storage medium
PCT/CN2022/139728 WO2023151386A1 (en) 2022-02-10 2022-12-16 Data processing method and apparatus, and terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210126015.7A CN114529483B (en) 2022-02-10 2022-02-10 Data processing method, device, terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN114529483A true CN114529483A (en) 2022-05-24
CN114529483B CN114529483B (en) 2024-12-06

Family

ID=81623225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210126015.7A Active CN114529483B (en) 2022-02-10 2022-02-10 Data processing method, device, terminal and readable storage medium

Country Status (2)

Country Link
CN (1) CN114529483B (en)
WO (1) WO2023151386A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151386A1 (en) * 2022-02-10 2023-08-17 Oppo广东移动通信有限公司 Data processing method and apparatus, and terminal and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070147674A1 (en) * 2005-12-06 2007-06-28 Lutz Gundel Method and system for computer aided detection of high contrast objects in tomographic pictures
CN106412582A (en) * 2016-10-21 2017-02-15 北京大学深圳研究生院 Panoramic video region of interest description method and coding method
CN112639867A (en) * 2020-05-07 2021-04-09 深圳市大疆创新科技有限公司 Image processing method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6141459A (en) * 1997-09-24 2000-10-31 Sarnoff Corporation Method and apparatus for processing image pyramid borders
US8261034B1 (en) * 2009-12-15 2012-09-04 Ambarella, Inc. Memory system for cascading region-based filters
CN102170520B (en) * 2011-04-29 2013-12-25 杭州海康威视数字技术股份有限公司 Cascade filter and dynamic setting method for calibrated denoising intensity thereof
JP2013178753A (en) * 2012-02-01 2013-09-09 Canon Inc Image processing device and method
CN112150353A (en) * 2020-09-30 2020-12-29 广州虎牙科技有限公司 Image processing method and device, electronic equipment and readable storage medium
CN114529483B (en) * 2022-02-10 2024-12-06 Oppo广东移动通信有限公司 Data processing method, device, terminal and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070147674A1 (en) * 2005-12-06 2007-06-28 Lutz Gundel Method and system for computer aided detection of high contrast objects in tomographic pictures
CN106412582A (en) * 2016-10-21 2017-02-15 北京大学深圳研究生院 Panoramic video region of interest description method and coding method
CN112639867A (en) * 2020-05-07 2021-04-09 深圳市大疆创新科技有限公司 Image processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HONG-DAR LINDUAN-CHENG HO: "Detection of pinhole defects on chips and wafers using DCT enhancement in computer vision systems", THE INTERNATIONAL JOURNAL OF ADVANCED MANUFACTURING TECHNOLOGY, vol. 34, no. 5, 31 December 2007 (2007-12-31) *
王志刚, 王伟, 许晓鸣: "基于塔型结构的多分辨率模糊边缘检测", 红外与毫米波学报, no. 04, 25 August 2002 (2002-08-25) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151386A1 (en) * 2022-02-10 2023-08-17 Oppo广东移动通信有限公司 Data processing method and apparatus, and terminal and readable storage medium

Also Published As

Publication number Publication date
WO2023151386A1 (en) 2023-08-17
CN114529483B (en) 2024-12-06

Similar Documents

Publication Publication Date Title
US10356385B2 (en) Method and device for stereo images processing
CN110533707B (en) Illumination estimation
JP2009165106A (en) Image distortion correction
US20090315909A1 (en) Unified Shader Engine Filtering System
TW201308309A (en) Apparatus and system for image processing
CN107220930B (en) Fisheye image processing method, computer device and computer readable storage medium
US20190182434A1 (en) Method of providing image and electronic device for supporting the method
CN114529483A (en) Data processing method, device, terminal and readable storage medium
CN109791703B (en) Generating three-dimensional user experience based on two-dimensional media content
US11212435B2 (en) Semiconductor device for image distortion correction processing and image reduction processing
CN113034582B (en) Position optimization device and method, electronic device and computer-readable storage medium
CN107871162B (en) Image processing method based on convolutional neural network and mobile terminal
US11704546B2 (en) Operation processing apparatus that calculates addresses of feature planes in layers of a neutral network and operation processing method
CN106251339A (en) Image processing method and device
CN105427235A (en) Image browsing method and system
WO2023151385A1 (en) Image processing method and device, terminal, and readable storage medium
US20220392207A1 (en) Information processing apparatus, information processing method, and non-transitory computer-readable storage medium
KR20200129957A (en) Neural network processor compressing featuremap data and computing system comprising the same
CN104517273A (en) Image super-resolution processing method and apparatus
CN115249204A (en) Image sensor module, image processing system, and method of operating image sensor module
CN111382696B (en) Method and device for detecting boundary points of an object
CN114119661A (en) A target tracking processor, target tracking method and device
CN106780319A (en) The processing method and processing device of super large image
RU168781U1 (en) STEREO IMAGE PROCESSING DEVICE
US11974062B2 (en) Dynamic configuration of perspective transformation engine

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
GR01 Patent grant
GR01 Patent grant