WO2023050590A1 - Image processing method and apparatus, storage medium, and terminal - Google Patents

Image processing method and apparatus, storage medium, and terminal Download PDF

Info

Publication number
WO2023050590A1
WO2023050590A1 PCT/CN2021/138185 CN2021138185W WO2023050590A1 WO 2023050590 A1 WO2023050590 A1 WO 2023050590A1 CN 2021138185 W CN2021138185 W CN 2021138185W WO 2023050590 A1 WO2023050590 A1 WO 2023050590A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
metadata
total
value
counting
Prior art date
Application number
PCT/CN2021/138185
Other languages
French (fr)
Chinese (zh)
Inventor
王明
Original Assignee
歌尔股份有限公司
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 歌尔股份有限公司 filed Critical 歌尔股份有限公司
Publication of WO2023050590A1 publication Critical patent/WO2023050590A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

An image processing method and apparatus, a storage medium, and a terminal, applied to an image acquisition device. The method comprises: generating metadata of an image according to an acquired image (S101); using an idle register among registers storing the metadata for counting to generate a metadata counting total value (S102); embedding the metadata counting total value into the metadata to generate target metadata (S103); obtaining redundant pixels in the image, and counting on the basis of the redundant pixels to generate an image counting total value (S104); embedding the image counting total value into the image to generate a target image (S105); and sending the target metadata and the target image to a client (S106). According to the method, a counting mechanism is added into the image and the metadata, and the counting data generated by the counting mechanism is directly stored in the metadata and the image, and does not rely on the counting mechanism of other modules, so that the certainty of counting is ensured, and the successful matching between the image and the metadata is ensured even if a frame loss problem occurs at a high load.

Description

一种图像处理方法、装置、存储介质及终端An image processing method, device, storage medium and terminal
本申请要求于2021年9月30日提交中国专利局、申请号为202111164363.5、申请名称为“一种图像处理方法、装置、存储介质及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111164363.5 and the application title "An image processing method, device, storage medium and terminal" submitted to the China Patent Office on September 30, 2021, the entire contents of which are incorporated by reference incorporated in this application.
技术领域technical field
本申请涉及数据处理技术领域,特别涉及一种图像处理方法、装置、存储介质及终端。The present application relates to the technical field of data processing, and in particular to an image processing method, device, storage medium and terminal.
背景技术Background technique
对于一款图像采集设备中的camera传感器,其输出的数据主要分为两类,一类图像数据,也就是通过ISP解析成我们常见的摄像头的拍摄图片;一类是元数据,包含了拍摄这张图像的一些曝光、增益等信息。这两种数据需要在主芯片端解析后才能将元数据添加到图片的备注信息中。For a camera sensor in an image acquisition device, its output data is mainly divided into two types, one type of image data, which is parsed into pictures taken by our common cameras through ISP; Some exposure, gain and other information of an image. These two kinds of data need to be parsed by the main chip before the metadata can be added to the remark information of the picture.
在现有技术中,camera传感器每输出一次数据时,这两类数据分为两条通路上传到客户端,为了将图像和元数据匹配起来,客户端主芯片需要对图像信息和元数据进行计数,主芯片在每收到一个图像数据后,会对图像的帧序号image_index加一,每收到一个元数据,就会对元数据的帧序号metadata_index加一。上层通过image_index和metadata_index来对图像和元数据进行匹配,有相同序号,认为就是同一次camera输出。但是这种方式在主芯片负载较高和帧率较高时,帧数据会出现丢失,导致图像序号和元数据序号计数出现异常,这样再通过序号进行匹配导致实际上匹配的图像和元数据并不属于同一次camera传感器输出,从而增加了图片备注信息的错误率。In the existing technology, each time the camera sensor outputs data, the two types of data are divided into two channels and uploaded to the client. In order to match the image and metadata, the main chip of the client needs to count the image information and metadata , the main chip will add one to the frame number image_index of the image every time it receives an image data, and will add one to the frame number metadata_index of the metadata every time it receives a piece of metadata. The upper layer uses image_index and metadata_index to match the image and metadata. If they have the same serial number, they are considered to be the same camera output. However, in this way, when the main chip load is high and the frame rate is high, the frame data will be lost, resulting in an abnormal count of the image serial number and metadata serial number, and then matching through the serial number will cause the actually matched image and metadata to be separated. It does not belong to the same camera sensor output, which increases the error rate of the picture remark information.
发明内容Contents of the invention
本申请实施例提供了一种图像处理方法、装置、存储介质及终端。为了对披露的实施例的一些方面有一个基本的理解,下面给出了简单的概括。该概括部分不是泛泛评述,也不是要确定关键/重要组成元素或描绘这些实施 例的保护范围。其唯一目的是用简单的形式呈现一些概念,以此作为后面的详细说明的序言。Embodiments of the present application provide an image processing method, device, storage medium, and terminal. In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is presented below. This summary is not an overview, nor is it intended to identify key/critical elements or delineate the scope of these embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
第一方面,本申请实施例提供了一种图像处理方法,应用于图像采集设备,方法包括:In the first aspect, the embodiment of the present application provides an image processing method, which is applied to an image acquisition device, and the method includes:
根据采集到的图像生成所述图像的元数据;generating metadata of the image according to the collected image;
利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值;Counting by using the free registers existing in the registers storing the metadata to generate the total value of the metadata count;
将元数据计数总值嵌入到元数据中,生成目标元数据;Embed the total value of the metadata count into the metadata to generate the target metadata;
获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值;Obtain the redundant pixels in the image, and count based on the redundant pixels to generate the total value of the image count;
将图像计数总值嵌入到图像中,生成目标图像;Embed the total image count value into the image to generate the target image;
将目标元数据与目标图像发送至客户端。Send target metadata and target image to client.
可选的,利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值,包括:Optionally, counting is performed by using free registers existing in registers storing metadata to generate a total metadata count value, including:
确定存储元数据的寄存器中所存在的空闲寄存器;determining the presence of free registers among registers storing metadata;
获取空闲寄存器中的当前计数值;Get the current count value in the free register;
获取预设递增值;Get the preset incremental value;
将当前计数值与预设递增值做和,生成元数据计数总值。Add the current count value and the preset increment value to generate the total metadata count value.
可选的,方法还包括:Optionally, the method also includes:
将空闲寄存器中的当前计数值修改为元数据计数总值。Modifies the current count value in the free register to the total metadata count value.
可选的,图像是根据目标分辨率采集的;Optionally, the image is collected according to the target resolution;
根据采集到的图像生成所述图像的元数据之前时,还包括:Before generating the metadata of the image according to the collected image, it also includes:
当接收到分辨率设置指令时,确定当前采集图像的实际分辨率;When receiving the resolution setting instruction, determine the actual resolution of the currently collected image;
接收输入的冗余分辨率的长宽参数;Receive input length and width parameters of redundant resolution;
基于冗余分辨率的长宽参数重置实际分辨率,生成目标分辨率。Reset the actual resolution based on the length and width parameters of the redundant resolution to generate the target resolution.
可选的,基于冗余像素进行计数,生成图像计数总值,包括:Optionally, count based on redundant pixels to generate a total image count value, including:
从冗余像素行中获取任一像素作为计数像素;Obtain any pixel from the redundant pixel row as a count pixel;
获取上一历史图像的历史计数总值;Get the total value of the history count of the last history image;
将历史计数总值与预设递增值做和,并将做和后的值确定为计数像素的图像计数总值。The total historical count value and the preset incremental value are summed, and the summed value is determined as the total image count value of the counted pixels.
第二方面,本申请实施例提供了一种图像处理方法,应用于客户端,方法包括:In the second aspect, the embodiment of the present application provides an image processing method, which is applied to the client, and the method includes:
接收图像采集设备针对客户端发送的目标元数据与目标图像;receiving the target metadata and the target image sent by the image acquisition device for the client;
解析目标元数据与目标图像,生成元数据计数总值和图像计数总值;Parse the target metadata and target image, and generate the total value of metadata count and the total value of image count;
根据元数据计数总值计算第一总的帧序号;Calculate the first total frame sequence number according to the total value of the metadata count;
根据图像计数总值计算第二总的帧序号;Calculate the second total frame number according to the total value of the image count;
当第一总的帧序号与第二总的帧序号相同时,确定目标元数据为目标图像的元数据。When the first total frame number is the same as the second total frame number, it is determined that the target metadata is metadata of the target image.
可选的,根据元数据计数总值计算第一总的帧序号,包括:Optionally, the first total frame number is calculated according to the total value of the metadata count, including:
获取上一帧历史图像的寄存器值;Get the register value of the last frame of historical image;
当元数据计数总值大于上一帧历史图像的寄存器值时,确定寄存器的计数轮次;When the total value of the metadata count is greater than the register value of the last frame of historical image, determine the counting round of the register;
根据元数据计数总值与寄存器的计数轮次计算第一总的帧序号;Calculate the first total frame sequence number according to the total value of the metadata count and the count round of the register;
或者,or,
当元数据计数总值小于上一帧历史图像的寄存器值时,确定寄存器的计数轮次;When the total value of the metadata count is less than the register value of the last frame of historical image, determine the counting round of the register;
对寄存器的计数轮次加一,得到最终计数轮次;Add one to the counting round of the register to get the final counting round;
根据最终计数轮次与元数据计数总值计算第一总的帧序号。The first total frame number is calculated according to the final counting round and the total value of the metadata count.
第二方面,本申请实施例提供了一种图像处理装置,应用于图像采集设备,装置包括:In the second aspect, the embodiment of the present application provides an image processing device, which is applied to an image acquisition device, and the device includes:
元数据生成模块,用于根据采集到的图像生成所述图像的元数据;A metadata generating module, configured to generate metadata of the image according to the collected image;
元数据计数总值生成模块,用于利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值;A metadata counting total value generating module, configured to use the idle registers existing in the metadata storage registers to perform counting to generate the metadata counting total value;
目标元数据生成模块,用于将元数据计数总值嵌入到元数据中,生成目标元数据;The target metadata generation module is used to embed the total value of the metadata count into the metadata to generate the target metadata;
图像计数总值生成模块,用于获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值;An image counting total value generation module is used to obtain redundant pixels in the image, and perform counting based on the redundant pixels to generate an image counting total value;
目标图像生成模块,用于将图像计数总值嵌入到图像中,生成目标图像;A target image generation module is used to embed the total value of the image count into the image to generate the target image;
数据发送模块,用于将目标元数据与目标图像发送至客户端。The data sending module is used for sending the target metadata and the target image to the client.
第三方面,本申请实施例提供一种计算机存储介质,计算机存储介质存储有多条指令,指令适于由处理器加载并执行上述的方法步骤。In a third aspect, an embodiment of the present application provides a computer storage medium, where a plurality of instructions are stored in the computer storage medium, and the instructions are suitable for being loaded by a processor and executing the above method steps.
第四方面,本申请实施例提供一种终端,可包括:处理器和存储器;其中,存储器存储有计算机程序,计算机程序适于由处理器加载并执行上述的方法步骤。In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute the above method steps.
本申请实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present application may include the following beneficial effects:
在本申请实施例中,图像处理装置首先根据采集到的图像生成所述图像的元数据,再利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值,然后将元数据计数总值嵌入到元数据中,生成目标元数据,再获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值,以及将图像计数总值嵌入到图像中,生成目标图像,最后将目标元数据与目标图像发送至客户端。由于本申请在图像和元数据自身内部添加计数机制,该计数机制产生的计数数据直接存储在元数据和图像中,不依赖于其它模块的计数机制,确保计数的确定性,即使在高负载出现丢帧的问题,也会保证图像和元数据匹配成功,从而降低了照片备注信息的错误率。In the embodiment of the present application, the image processing device first generates the metadata of the image according to the captured image, and then counts the free registers existing in the registers storing the metadata to generate the total value of the metadata count, and then counts the metadata The total value of the data count is embedded in the metadata to generate the target metadata, and then the redundant pixels in the image are obtained, and counted based on the redundant pixels, the total value of the image count is generated, and the total value of the image count is embedded into the image to generate the target image, and finally send the target metadata and the target image to the client. Since this application adds a counting mechanism inside the image and metadata itself, the counting data generated by the counting mechanism is directly stored in the metadata and image, without relying on the counting mechanism of other modules, ensuring the determinism of counting, even when high load occurs The problem of frame loss will also ensure the successful matching of images and metadata, thereby reducing the error rate of photo remark information.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一部分附图,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or 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 accompanying drawings in the following description are only The accompanying drawings are a part of this application. For those skilled in the art, other drawings can be obtained according to the provided drawings without creative work.
图1是本申请实施例提供的一种图像处理方法的流程示意图;FIG. 1 is a schematic flow diagram of an image processing method provided in an embodiment of the present application;
图2是本申请实施例提供的一种空闲寄存器计数示意图;FIG. 2 is a schematic diagram of counting idle registers provided by an embodiment of the present application;
图3是本申请实施例提供的一种设置分辨率后的图像变化示意图;Fig. 3 is a schematic diagram of an image change after setting a resolution provided by an embodiment of the present application;
图4是本申请实施例提供的一种图像中冗余像素的划分示意图;FIG. 4 is a schematic diagram of division of redundant pixels in an image provided by an embodiment of the present application;
图5是本申请实施例提供的另一种图像处理方法的流程示意图;Fig. 5 is a schematic flow chart of another image processing method provided by the embodiment of the present application;
图6是本申请实施例提供的一种图像处理装置的结构示意图;FIG. 6 is a schematic structural diagram of an image processing device provided by an embodiment of the present application;
图7是本申请实施例提供的一种终端的结构示意图。FIG. 7 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
本申请提供了一种图像处理方法、装置、存储介质及终端,以解决上述相关技术问题中存在的问题。本申请提供的技术方案中,由于本申请在图像和元数据自身内部添加计数机制,利用存储元数据的寄存器中所存在的空闲寄存器进行循环计数,在图像数据中添加一行冗余像素用来进行图像数据的计数,这样通过硬件上的计数,产生的计数数据直接存储在元数据和图像数据中,不依赖于其它模块的计数机制,确保计数的确定性,即使在高负载出现丢帧的问题,也会保证图像和元数据匹配成功,从而降低了照片备注信息的错误率,下面采用示例性的实施例进行详细说明。The present application provides an image processing method, device, storage medium and terminal to solve the problems existing in the above-mentioned related technical problems. In the technical solution provided by this application, since this application adds a counting mechanism inside the image and metadata itself, the free registers in the registers storing metadata are used for cycle counting, and a row of redundant pixels is added to the image data for The counting of image data, in this way, through the counting on the hardware, the generated counting data is directly stored in the metadata and image data, without relying on the counting mechanism of other modules, to ensure the determinism of counting, even if there is a problem of frame loss under high load , it will also ensure that the image and the metadata are successfully matched, thereby reducing the error rate of the photo remark information, which will be described in detail below using an exemplary embodiment.
下面将结合附图1-附图5,对本申请实施例提供的图像处理方法进行详细介绍。该方法可依赖于计算机程序实现,可运行于基于冯诺依曼体系的图像处理装置上。该计算机程序可集成在应用中,也可作为独立的工具类应用运行。The image processing method provided by the embodiment of the present application will be described in detail below with reference to FIG. 1 to FIG. 5 . The method can be implemented relying on computer programs, and can run on an image processing device based on the von Neumann system. The computer program can be integrated in the application, or run as an independent utility application.
请参见图1,为本申请实施例提供了一种图像处理方法的流程示意图。应用于图像采集设备,如图1所示,本申请实施例的方法可以包括以下步骤:Please refer to FIG. 1 , which provides a schematic flowchart of an image processing method according to an embodiment of the present application. Applied to an image acquisition device, as shown in Figure 1, the method of the embodiment of the present application may include the following steps:
S101,根据采集到的图像生成所述图像的元数据;S101. Generate metadata of the image according to the collected image;
其中,图像采集设备可以是照相机、摄影机、摄像机等设备。元数据是图像的拍摄参数,例如感光度、曝光指数与增益指数。Wherein, the image acquisition device may be a camera, video camera, video camera and other devices. Metadata are shooting parameters of an image, such as ISO, Exposure Index, and Gain Index.
通常,元数据是相机传感器自动产生的。图像采集设备采集到图像后,会生成该图像的元数据,该元数据用于添加到该图片的备注信息中。Usually, metadata is automatically generated by the camera sensor. After the image acquisition device acquires the image, it will generate metadata of the image, and the metadata is used to add to the remark information of the image.
在一种可能的实现方式中,当照相机接收到拍摄指令后,确定当前的拍摄参数,根据该拍摄参数进行拍摄后得到一张目标图像,并将拍摄参数与实际场景得到的参数作为元数据。In a possible implementation manner, after the camera receives the shooting instruction, it determines the current shooting parameters, obtains a target image after shooting according to the shooting parameters, and uses the shooting parameters and parameters obtained from the actual scene as metadata.
在另一种可能的实现方式中,当摄影机、摄像机启动后,确定预设拍摄参数,并根据预设拍摄参数实时获取图像帧,并将每个图像帧的拍摄时刻对应的相应参数作为元数据。In another possible implementation, when the camera and the camera are started, the preset shooting parameters are determined, and image frames are acquired in real time according to the preset shooting parameters, and the corresponding parameters corresponding to the shooting time of each image frame are used as metadata .
S102,利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值;S102, use the free registers existing in the registers storing the metadata to count, and generate the total value of the metadata count;
其中,寄存器可以理解为内存,是用来存储元数据的介质,该介质中存在用户预先设定的空闲寄存器。Among them, the register can be understood as a memory, which is a medium for storing metadata, and there are free registers preset by the user in the medium.
在本申请实施例中,在生成元数据计数总值时,首先确定存储元数据的寄存器中所存在的空闲寄存器,然后获取空闲寄存器中的当前计数值,再获取预设递增值,最后将当前计数值与预设递增值做和,生成元数据计数总值。In the embodiment of the present application, when generating the total value of the metadata count, first determine the free register existing in the register storing the metadata, then obtain the current count value in the free register, then obtain the preset increment value, and finally set the current The count value is summed with the preset increment value to generate the total metadata count value.
优选的,预设递增值可以为1。Preferably, the preset increment value may be 1.
例如,由于元数据是相机传感器自动产生的,不会有复杂的计数机制,可以简单的控制寄存器的数值跳变,使用硬件计数。寄存器中一个存储单位为1个字节,可以控制相机传感器在每出一个元数据时,将指定空闲寄存器的值递增一次,逻辑图2所示,这样该寄存器的值就会从0-255,循环计数。For example, since the metadata is automatically generated by the camera sensor, there is no complicated counting mechanism, and the value jump of the register can be simply controlled, and hardware counting is used. A storage unit in the register is 1 byte, which can control the camera sensor to increase the value of the specified free register once every time a piece of metadata is output, as shown in the logic diagram 2, so that the value of the register will be from 0-255, loop count.
进一步地,在生成元数据计数总值后,还需要将空闲寄存器中的当前计数值修改为元数据计数总值。Further, after the total metadata count value is generated, it is also necessary to modify the current count value in the free register to the total metadata count value.
S103,将元数据计数总值嵌入到元数据中,生成目标元数据;S103, embedding the total value of the metadata count into the metadata to generate target metadata;
在本申请实施例中,图像是根据目标分辨率采集的,因此在根据采集到的图像生成所述图像的元数据之前还需要设置图像采集设备的分辨率。In the embodiment of the present application, the image is collected according to the target resolution. Therefore, it is necessary to set the resolution of the image collection device before generating the metadata of the image according to the collected image.
具体的,在设置分辨率时,首先当接收到分辨率设置指令时,确定当前采集图像的实际分辨率,然后接收输入的冗余分辨率的长宽参数,最后基于冗余分辨率的长宽参数重置实际分辨率,生成目标分辨率。Specifically, when setting the resolution, first, when the resolution setting command is received, the actual resolution of the currently captured image is determined, then the length and width parameters of the input redundant resolution are received, and finally the length and width based on the redundant resolution The parameter resets the actual resolution, generating the target resolution.
在一种可能的实现方式中,在得到元数据计数总值后,可将元数据计数总值嵌入到元数据中,得到目标元数据。In a possible implementation manner, after obtaining the total value of the metadata count, the total value of the metadata count may be embedded into the metadata to obtain the target metadata.
S104,获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值;S104, acquiring redundant pixels in the image, and counting based on the redundant pixels, to generate a total image count value;
通常,对于图像数据,由于指定分辨率内的像素将都会用来曝光成像,没有空闲的像素位置可以用来计数,为了解决这个问题,本申请通过改变图像分辨率,增加冗余像素,在冗余像素中进行硬件计数。Usually, for image data, since the pixels within the specified resolution will be used for exposure and imaging, there is no free pixel position for counting. In order to solve this problem, this application changes the image resolution and adds redundant pixels. Hardware counting is performed in the remaining pixels.
在一种可能的实现方式中,首先从冗余像素行中获取任一像素作为计数像素,然后获取上一历史图像的历史计数总值,最后将历史计数总值与预设递增值做和,并将做和后的值确定为计数像素的图像计数总值。In a possible implementation, first obtain any pixel from the redundant pixel row as a count pixel, then obtain the total historical count value of the previous historical image, and finally add the total historical count value and the preset incremental value, And the value after doing the sum is determined as the total image count value of the counted pixels.
例如图3所示,图3中的左侧图是实际分辨率采集到的图像,右侧图是通过用户输入的冗余分辨率而得到最终的分辨率所采集的图像,右侧图中的黑色区域为冗余像素。For example, as shown in Figure 3, the image on the left in Figure 3 is the image collected at the actual resolution, the image on the right is the image collected at the final resolution through the redundant resolution input by the user, and the image on the right is Black areas are redundant pixels.
具体的,例如图4所示,在图像采集设备的图像结构中有冗余像素(即dummy区域)。为了获取冗余像素,需要将图像采集设备的分辨率设置为比实际分辨率多一行,并利用多出来的一行中某一个像素进行硬件计数,优选第一个像素。Specifically, as shown in FIG. 4, for example, there are redundant pixels (ie, dummy regions) in the image structure of the image acquisition device. In order to obtain redundant pixels, it is necessary to set the resolution of the image acquisition device to one line more than the actual resolution, and use a certain pixel in the extra line for hardware counting, preferably the first pixel.
S105,将图像计数总值嵌入到图像中,生成目标图像;S105, embedding the total image count value into the image to generate a target image;
S106,将目标元数据与目标图像发送至客户端。S106. Send the target metadata and the target image to the client.
其中,客户端可以是穿戴式设备、虚拟现实设备、增强现实设备以及立体视觉设备。Wherein, the client may be a wearable device, a virtual reality device, an augmented reality device, and a stereo vision device.
在一种可能的实现方式中,在得到图像计数总值后,将图像计数总值嵌入到图像中生成目标图像,最后将目标元数据与目标图像发送至客户端,使用客户端的主芯片进行处理。In a possible implementation, after obtaining the total value of the image count, embed the total value of the image count into the image to generate the target image, and finally send the target metadata and target image to the client, and use the main chip of the client for processing .
在本申请实施例中,图像处理装置首先根据采集到的图像生成所述图像的元数据,再利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值,然后将元数据计数总值嵌入到元数据中,生成目标元数据,再获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值,以及将图像计数总值嵌入到图像中,生成目标图像,最后将目标元数据与目标图像发送至客户端。由于本申请在图像和元数据自身内部添加计数机制,该计数机制产生的计数数据直接存储在元数据和图像中,不依赖于其它模块的计数机制,确保计数的确定性,即使在高负载出现丢帧的问题,也会保证图像和元数据匹配成功,从而降低了照片备注信息的错误率。In the embodiment of the present application, the image processing device first generates the metadata of the image according to the captured image, and then counts the free registers existing in the registers storing the metadata to generate the total value of the metadata count, and then counts the metadata The total value of the data count is embedded in the metadata to generate the target metadata, and then the redundant pixels in the image are obtained, and counted based on the redundant pixels, the total value of the image count is generated, and the total value of the image count is embedded into the image to generate the target image, and finally send the target metadata and the target image to the client. Since this application adds a counting mechanism inside the image and metadata itself, the counting data generated by the counting mechanism is directly stored in the metadata and image, without relying on the counting mechanism of other modules, ensuring the determinism of counting, even when high load occurs The problem of frame loss will also ensure the successful matching of images and metadata, thereby reducing the error rate of photo remark information.
请参见图5,为本申请实施例提供了一种图像处理方法的流程示意图。应用于客户端,具体应用于客户端的主芯片,如图5所示,本申请实施例的方法可以包括以下步骤:Please refer to FIG. 5 , which provides a schematic flowchart of an image processing method according to the embodiment of the present application. Applied to the client, specifically applied to the main chip of the client, as shown in Figure 5, the method of the embodiment of the present application may include the following steps:
S201,接收图像采集设备针对客户端发送的目标元数据与目标图像;S201, receiving the target metadata and the target image sent by the image acquisition device for the client;
通常,图像采集设备每输出一次图像数据和元数据时,对这两类数据进行硬件计数后分为两条通路上传到客户端的主芯片上。此时主芯片收到的目 标图像与目标元数据中携带了计数总值。Usually, each time the image acquisition device outputs image data and metadata, the two types of data are counted by hardware and then divided into two paths and uploaded to the main chip of the client. At this time, the target image and target metadata received by the main chip carry the total count value.
S202,解析目标元数据与目标图像,生成元数据计数总值和图像计数总值;S202, analyzing the target metadata and the target image, and generating a total metadata count value and a total image count value;
在一种可能的实现方式中,客户端的主芯片在接收到目标元数据与目标图像后,通过数据解析的方式从目标元数据与目标图像中提取出元数据计数总值和图像计数总值。In a possible implementation manner, after receiving the target metadata and the target image, the main chip of the client extracts the total metadata count value and the total image count value from the target metadata and target image by means of data analysis.
S203,根据元数据计数总值计算第一总的帧序号;S203. Calculate the first total frame number according to the total value of the metadata count;
在一种可能的实现方式中,根据元数据计数总值计算第一总的帧序号时,首先获取上一帧历史图像对应的元数据的寄存器值,然后当元数据计数总值大于上一帧历史图像对应的元数据的寄存器值时,确定寄存器的计数轮次,最后根据元数据计数总值与寄存器的计数轮次计算第一总的帧序号。In a possible implementation, when calculating the first total frame number according to the total value of the metadata count, first obtain the register value of the metadata corresponding to the previous frame of historical image, and then when the total value of the metadata count is greater than the previous frame For the register value of the metadata corresponding to the historical image, the counting round of the register is determined, and finally the first total frame number is calculated according to the total count value of the metadata and the counting round of the register.
在另一种可能的实现方式中,根据元数据计数总值计算第一总的帧序号时,首先当元数据计数总值小于上一帧历史图像对应的元数据的寄存器值时,确定寄存器的计数轮次,然后对寄存器的计数轮次加一,得到最终计数轮次,最后根据最终计数轮次与元数据计数总值计算第一总的帧序号。In another possible implementation, when calculating the first total frame number according to the total value of the metadata count, first, when the total value of the metadata count is less than the register value of the metadata corresponding to the previous frame of historical image, determine the value of the register Counting rounds, and then adding one to the counting rounds of the register to obtain the final counting rounds, and finally calculating the first total frame number according to the final counting rounds and the total value of metadata counting.
通常,Metadata_index表示当前最新的metadata的总的帧序号,初始为0;Round_index表示当前处于计数的第几轮,因为寄存器的值每一轮是从0-256,初始为0;Pre_reg_index表示上一帧metadata的寄存器值(0-255);Cur_reg_index表示当前收到的metadata解析出的寄存器值(0-255)。Usually, Metadata_index indicates the total frame number of the latest metadata, which is initially 0; Round_index indicates the current round of counting, because the value of the register is from 0-256 in each round, initially 0; Pre_reg_index indicates the previous frame The register value of metadata (0-255); Cur_reg_index indicates the register value (0-255) parsed from the currently received metadata.
具体的,当收到一帧metadata数据,解析计数寄存器值为Cur_reg_index,如果Cur_reg_index大于Pre_reg_index,则:Specifically, when a frame of metadata data is received, the parsing count register value is Cur_reg_index, if Cur_reg_index is greater than Pre_reg_index, then:
Metadata_index=Round_index*256+Cur_reg_index;Metadata_index=Round_index*256+Cur_reg_index;
Pre_reg_index=Cur_reg_index,进行下一帧解析。Pre_reg_index=Cur_reg_index, to analyze the next frame.
如果Cur_reg_index小于Pre_reg_index,则:If Cur_reg_index is less than Pre_reg_index, then:
Round_index=Round_index+1;Round_index=Round_index+1;
Metadata_index=Round_index*256+Cur_reg_indexMetadata_index=Round_index*256+Cur_reg_index
Pre_reg_index=Cur_reg_index。Pre_reg_index = Cur_reg_index.
S204,根据图像计数总值计算第二总的帧序号;S204. Calculate the second total frame number according to the total image count value;
其中,第二总的帧序号可表示为Image_index。Wherein, the second total frame number can be expressed as Image_index.
在一种可能的实现方式中,根据图像计数总值计算第二总的帧序号时, 首先获取上一帧历史图像中冗余像素中计数像素的计数值,然后当图像计数总值大于上一帧历史图像中冗余像素中计数像素的计数值时,确定计数像素的计数轮次,最后根据图像计数总值与计数像素的计数轮次计算第一总的帧序号。In a possible implementation, when calculating the second total frame number according to the total image count value, first obtain the count value of the redundant pixels in the previous frame of historical image, and then when the total image count value is greater than the previous When counting the counting value of counting pixels in redundant pixels in the frame history image, the counting round of counting pixels is determined, and finally the first total frame number is calculated according to the total image counting value and counting rounds of counting pixels.
在另一种可能的实现方式中,根据图像计数总值计算第二总的帧序号时,首先获取上一帧历史图像中冗余像素中计数像素的计数值,然后当图像计数总值小于上一帧历史图像中冗余像素中计数像素的计数值时,确定计数像素的计数轮次,然后对计数像素的计数轮次加一,得到最终计数轮次,最后根据最终计数轮次与图像计数总值计算第二总的帧序号。In another possible implementation, when calculating the second total frame number according to the total image count value, first obtain the count value of the redundant pixels in the previous frame of historical image, and then when the total image count value is less than the above When counting the count value of counting pixels in redundant pixels in a frame of historical image, determine the counting round of counting pixels, and then add one to the counting round of counting pixels to obtain the final counting round, and finally according to the final counting round and image counting The total value is calculated as the second total frame number.
S205,当第一总的帧序号与第二总的帧序号相同时,确定目标元数据为目标图像的元数据。S205. When the first total frame number is the same as the second total frame number, determine that the target metadata is metadata of the target image.
在进行元数据和图像匹配时,对应的Image_index和Metadata_index如果一致,则认为该元数据和图像是图像采集设备的同一次输出,最后将该元数据添加至图像的备注信息中。When matching metadata and images, if the corresponding Image_index and Metadata_index are consistent, the metadata and the image are considered to be the same output of the image acquisition device, and finally the metadata is added to the remark information of the image.
在本申请实施例中,图像处理装置首先根据采集到的图像生成所述图像的元数据,再利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值,然后将元数据计数总值嵌入到元数据中,生成目标元数据,再获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值,以及将图像计数总值嵌入到图像中,生成目标图像,最后将目标元数据与目标图像发送至客户端。由于本申请在图像和元数据自身内部添加计数机制,该计数机制产生的计数数据直接存储在元数据和图像中,不依赖于其它模块的计数机制,确保计数的确定性,即使在高负载出现丢帧的问题,也会保证图像和元数据匹配成功,从而降低了照片备注信息的错误率。In the embodiment of the present application, the image processing device first generates the metadata of the image according to the captured image, and then counts the free registers existing in the registers storing the metadata to generate the total value of the metadata count, and then counts the metadata The total value of the data count is embedded in the metadata to generate the target metadata, and then the redundant pixels in the image are obtained, and counted based on the redundant pixels, the total value of the image count is generated, and the total value of the image count is embedded into the image to generate the target image, and finally send the target metadata and the target image to the client. Since this application adds a counting mechanism inside the image and metadata itself, the counting data generated by the counting mechanism is directly stored in the metadata and image, without relying on the counting mechanism of other modules, ensuring the determinism of counting, even when high load occurs The problem of frame loss will also ensure the successful matching of images and metadata, thereby reducing the error rate of photo remark information.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
请参见图6,其示出了本申请一个示例性实施例提供的图像处理装置的结构示意图。该图像处理装置可以通过软件、硬件或者两者的结合实现成为终端的全部或一部分。该装置1包括元数据生成模块10、元数据计数总值生成模块20、目标元数据生成模块30、图像计数总值生成模块40、目标图像生成模块50、数据发送模块60。Please refer to FIG. 6 , which shows a schematic structural diagram of an image processing apparatus provided by an exemplary embodiment of the present application. The image processing device can be implemented as all or a part of the terminal through software, hardware or a combination of the two. The device 1 includes a metadata generation module 10 , a metadata count total value generation module 20 , a target metadata generation module 30 , an image count total value generation module 40 , a target image generation module 50 , and a data transmission module 60 .
元数据生成模块10,用于根据采集到的图像生成所述图像的元数据;A metadata generation module 10, configured to generate metadata of the image according to the collected image;
元数据计数总值生成模块20,用于利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值;The metadata counting total value generation module 20 is used for counting by using the idle registers existing in the metadata storage registers to generate the metadata counting total value;
目标元数据生成模块30,用于将元数据计数总值嵌入到元数据中,生成目标元数据;The target metadata generation module 30 is used to embed the total value of the metadata count into the metadata to generate the target metadata;
图像计数总值生成模块40,用于获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值;Image counting total value generating module 40, for obtaining redundant pixels in the image, and counting based on redundant pixels, generating image counting total value;
目标图像生成模块50,用于将图像计数总值嵌入到图像中,生成目标图像;A target image generating module 50, configured to embed the image count total value into the image to generate the target image;
数据发送模块60,用于将目标元数据与目标图像发送至客户端。The data sending module 60 is configured to send the target metadata and the target image to the client.
需要说明的是,上述实施例提供的图像处理装置在执行图像处理方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的图像处理装置与图像处理方法实施例属于同一构思,其体现实现过程详见方法实施例,这里不再赘述。It should be noted that, when the image processing device provided in the above embodiment executes the image processing method, the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to needs. , which divides the internal structure of the device into different functional modules to complete all or part of the functions described above. In addition, the image processing device and the image processing method embodiments provided in the above embodiments belong to the same idea, and the implementation process thereof is detailed in the method embodiments, and will not be repeated here.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments.
在本申请实施例中,图像处理装置首先根据采集到的图像生成所述图像的元数据,再利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值,然后将元数据计数总值嵌入到元数据中,生成目标元数据,再获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值,以及将图像计数总值嵌入到图像中,生成目标图像,最后将目标元数据与目标图像发送至客户端。由于本申请在图像和元数据自身内部添加计数机制,该计数机制产生的计数数据直接存储在元数据和图像中,不依赖于其它模块的计数机制,确保计数的确定性,即使在高负载出现丢帧的问题,也会保证图像和元数据匹配成功,从而降低了照片备注信息的错误率。In the embodiment of the present application, the image processing device first generates the metadata of the image according to the captured image, and then counts the free registers existing in the registers storing the metadata to generate the total value of the metadata count, and then counts the metadata The total value of the data count is embedded in the metadata to generate the target metadata, and then the redundant pixels in the image are obtained, and counted based on the redundant pixels, the total value of the image count is generated, and the total value of the image count is embedded into the image to generate the target image, and finally send the target metadata and the target image to the client. Since this application adds a counting mechanism inside the image and metadata itself, the counting data generated by the counting mechanism is directly stored in the metadata and image, without relying on the counting mechanism of other modules, ensuring the determinism of counting, even when high load occurs The problem of frame loss will also ensure the successful matching of images and metadata, thereby reducing the error rate of photo remark information.
本申请还提供一种计算机可读介质,其上存储有程序指令,该程序指令被处理器执行时实现上述各个方法实施例提供的图像处理方法。The present application also provides a computer-readable medium, on which program instructions are stored, and when the program instructions are executed by a processor, the image processing methods provided in the foregoing method embodiments are implemented.
本申请还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各个方法实施例的图像处理方法。The present application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the image processing method of each method embodiment above.
请参见图7,为本申请实施例提供了一种终端的结构示意图。如图7所示,终端1000可以包括:至少一个处理器1001,至少一个网络接口1004,用户接口1003,存储器1005,至少一个通信总线1002。Referring to FIG. 7 , it provides a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in FIG. 7 , a terminal 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .
其中,通信总线1002用于实现这些组件之间的连接通信。Wherein, the communication bus 1002 is used to realize connection and communication between these components.
其中,用户接口1003可以包括显示屏(Display)、摄像头(Camera),可选用户接口1003还可以包括标准的有线接口、无线接口。Wherein, the user interface 1003 may include a display screen (Display) and a camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
其中,网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。Wherein, the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
其中,处理器1001可以包括一个或者多个处理核心。处理器1001利用各种借口和线路连接整个电子设备1000内的各个部分,通过运行或执行存储在存储器1005内的指令、程序、代码集或指令集,以及调用存储在存储器1005内的数据,执行电子设备1000的各种功能和处理数据。可选的,处理器1001可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1001可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1001中,单独通过一块芯片进行实现。Wherein, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts of the entire electronic device 1000, and by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005, execute Various functions of the electronic device 1000 and processing data. Optionally, the processor 1001 may use at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware. The processor 1001 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the content that needs to be displayed on the display screen; the modem is used to handle wireless communication. It can be understood that the above modem may also not be integrated into the processor 1001, but implemented by a single chip.
其中,存储器1005可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选的,该存储器1005包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1005可用于存储指令、程序、代码、代码集或指令集。存储器1005可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储上面各个方法实施例中涉及到的数据等。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图7所示,作为一种计算 机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及图像处理应用程序。Wherein, the memory 1005 may include a random access memory (Random Access Memory, RAM), and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The memory 1005 may be used to store instructions, programs, codes, sets of codes or sets of instructions. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the above method embodiments; the storage data area can store the data and the like involved in the above method embodiments. Optionally, the memory 1005 may also be at least one storage device located away from the aforementioned processor 1001 . As shown in FIG. 7, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an image processing application program.
在图7所示的终端1000中,用户接口1003主要用于为用户提供输入的接口,获取用户输入的数据;而处理器1001可以用于调用存储器1005中存储的图像处理应用程序,并具体执行以下操作:In the terminal 1000 shown in FIG. 7 , the user interface 1003 is mainly used to provide the user with an input interface to obtain the data input by the user; and the processor 1001 can be used to call the image processing application program stored in the memory 1005, and specifically execute Do the following:
根据采集到的图像生成所述图像的元数据;generating metadata of the image according to the collected image;
利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值;Counting by using the free registers existing in the registers storing the metadata to generate the total value of the metadata count;
将元数据计数总值嵌入到元数据中,生成目标元数据;Embed the total value of the metadata count into the metadata to generate the target metadata;
获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值;Obtain the redundant pixels in the image, and count based on the redundant pixels to generate the total value of the image count;
将图像计数总值嵌入到图像中,生成目标图像;Embed the total image count value into the image to generate the target image;
将目标元数据与目标图像发送至客户端。Send target metadata and target image to client.
在一个实施例中,处理器1001在执行利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值时,具体执行以下操作:In one embodiment, when the processor 1001 executes counting by utilizing free registers existing in the registers storing metadata to generate the total value of the metadata count, the following operations are specifically performed:
确定存储元数据的寄存器中所存在的空闲寄存器;determining the presence of free registers among registers storing metadata;
获取空闲寄存器中的当前计数值;Get the current count value in the free register;
获取预设递增值;Get the preset incremental value;
将当前计数值与预设递增值做和,生成元数据计数总值。Add the current count value and the preset increment value to generate the total metadata count value.
在一个实施例中,处理器1001在还执行以下操作:In one embodiment, the processor 1001 also performs the following operations:
将空闲寄存器中的当前计数值修改为元数据计数总值。Modifies the current count value in the free register to the total metadata count value.
在一个实施例中,处理器1001在执行根据采集到的图像生成所述图像的元数据之前时,还执行以下操作:In one embodiment, before the processor 1001 executes generating the metadata of the image according to the collected image, it further executes the following operations:
当接收到分辨率设置指令时,确定当前采集图像的实际分辨率;When receiving the resolution setting instruction, determine the actual resolution of the currently collected image;
接收输入的冗余分辨率的长宽参数;Receive input length and width parameters of redundant resolution;
基于冗余分辨率的长宽参数重置实际分辨率,生成目标分辨率。Reset the actual resolution based on the length and width parameters of the redundant resolution to generate the target resolution.
在一个实施例中,处理器1001在执行基于冗余像素进行计数,生成图像计数总值时,具体执行以下操作:In one embodiment, when the processor 1001 performs counting based on redundant pixels to generate the total image count value, it specifically performs the following operations:
从冗余像素行中获取任一像素作为计数像素;Obtain any pixel from the redundant pixel row as a count pixel;
获取上一历史图像的历史计数总值;Get the total value of the history count of the previous history image;
将历史计数总值与预设递增值做和,并将做和后的值确定为计数像素的 图像计数总值。Summing the total historical count value and the preset incremental value, and determining the summed value as the total image count value of the counted pixels.
在本申请实施例中,图像处理装置首先根据采集到的图像生成所述图像的元数据,再利用存储元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值,然后将元数据计数总值嵌入到元数据中,生成目标元数据,再获取图像中冗余像素,并基于冗余像素进行计数,生成图像计数总值,以及将图像计数总值嵌入到图像中,生成目标图像,最后将目标元数据与目标图像发送至客户端。由于本申请在图像和元数据自身内部添加计数机制,该计数机制产生的计数数据直接存储在元数据和图像中,不依赖于其它模块的计数机制,确保计数的确定性,即使在高负载出现丢帧的问题,也会保证图像和元数据匹配成功,从而降低了照片备注信息的错误率。In the embodiment of the present application, the image processing device first generates the metadata of the image according to the captured image, and then counts the free registers existing in the registers storing the metadata to generate the total value of the metadata count, and then counts the metadata The total value of the data count is embedded in the metadata to generate the target metadata, and then the redundant pixels in the image are obtained, and counted based on the redundant pixels, the total value of the image count is generated, and the total value of the image count is embedded into the image to generate the target image, and finally send the target metadata and the target image to the client. Since this application adds a counting mechanism inside the image and metadata itself, the counting data generated by the counting mechanism is directly stored in the metadata and image, without relying on the counting mechanism of other modules, ensuring the determinism of counting, even when high load occurs The problem of frame loss will also ensure the successful matching of images and metadata, thereby reducing the error rate of photo remark information.
本说明书中各个实施例采用并列或者递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处可参见方法部分说明。Various embodiments in this specification are described in a parallel or progressive manner, each embodiment focuses on the differences from other embodiments, and the same or similar parts of the various embodiments can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for related details, please refer to the description of the method part.
本领域普通技术人员还可以理解,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can also understand that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the relationship between hardware and software Interchangeability. In the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包 括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this article, relational terms such as first and second etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations Any such actual relationship or order exists between. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

Claims (10)

  1. 一种图像处理方法,应用于图像采集设备,其特征在于,所述方法包括:An image processing method applied to an image acquisition device, characterized in that the method comprises:
    根据采集到的图像生成所述图像的元数据;generating metadata of the image according to the collected image;
    利用存储所述元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值;Counting by using free registers existing in the registers storing the metadata to generate a total value of the metadata count;
    将所述元数据计数总值嵌入到所述元数据中,生成目标元数据;Embedding the total value of the metadata count into the metadata to generate target metadata;
    获取所述图像中冗余像素,并基于所述冗余像素进行计数,生成图像计数总值;Obtaining redundant pixels in the image, and counting based on the redundant pixels, to generate a total image count value;
    将所述图像计数总值嵌入到所述图像中,生成目标图像;Embedding the image count total value into the image to generate a target image;
    将所述目标元数据与所述目标图像发送至客户端。sending the target metadata and the target image to a client.
  2. 根据权利要求1所述的方法,其特征在于,所述利用存储所述元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值,包括:The method according to claim 1, wherein the counting is performed by using an idle register existing in the register storing the metadata to generate a total value of the metadata count, comprising:
    确定存储所述元数据的寄存器中所存在的空闲寄存器;determining a free register present among the registers storing the metadata;
    获取所述空闲寄存器中的当前计数值;obtaining the current count value in the free register;
    获取预设递增值;Get the preset incremental value;
    将所述当前计数值与所述预设递增值做和,生成元数据计数总值。Adding the current count value and the preset increment value to generate a total metadata count value.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, further comprising:
    将所述空闲寄存器中的当前计数值修改为所述元数据计数总值。Modifying the current count value in the free register to the total metadata count value.
  4. 根据权利要求1所述的方法,其特征在于,所述图像是根据目标分辨率采集的;The method according to claim 1, wherein the image is collected according to the target resolution;
    所述根据采集到的图像生成所述图像的元数据之前时,还包括:Before generating the metadata of the image according to the collected image, it also includes:
    当接收到分辨率设置指令时,确定当前采集图像的实际分辨率;When receiving the resolution setting instruction, determine the actual resolution of the currently collected image;
    接收输入的冗余分辨率的长宽参数;Receive input length and width parameters of redundant resolution;
    基于所述冗余分辨率的长宽参数重置所述实际分辨率,生成目标分辨率。The actual resolution is reset based on the length and width parameters of the redundant resolution to generate a target resolution.
  5. 根据权利要求4所述的方法,其特征在于,所述基于所述冗余像素进行计数,生成图像计数总值,包括:The method according to claim 4, wherein said counting based on said redundant pixels to generate a total image count value comprises:
    从所述冗余像素行中获取任一像素作为计数像素;obtaining any pixel from the redundant pixel row as a count pixel;
    获取上一历史图像的历史计数总值;Get the total value of the history count of the previous history image;
    将所述历史计数总值与预设递增值做和,并将做和后的值确定为所述计数像素的图像计数总值。summing the total historical count value and a preset incremental value, and determining the summed value as the total image count value of the counted pixels.
  6. 一种图像处理方法,应用于客户端,其特征在于,所述方法包括:An image processing method applied to a client, characterized in that the method comprises:
    接收图像采集设备针对客户端发送的目标元数据与目标图像;receiving the target metadata and the target image sent by the image acquisition device for the client;
    解析所述目标元数据与目标图像,生成元数据计数总值和图像计数总值;Analyzing the target metadata and the target image to generate a total metadata count value and a total image count value;
    根据所述元数据计数总值计算第一总的帧序号;calculating a first total frame sequence number according to the total value of the metadata count;
    根据所述图像计数总值计算第二总的帧序号;calculating a second total frame number according to the total image count value;
    当所述第一总的帧序号与所述第二总的帧序号相同时,确定所述目标元数据为所述目标图像的元数据。When the first total frame number is the same as the second total frame number, it is determined that the target metadata is metadata of the target image.
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述元数据计数总值计算第一总的帧序号,包括:The method according to claim 6, wherein the calculating the first total frame sequence number according to the total count value of the metadata comprises:
    获取上一帧历史图像的寄存器值;Get the register value of the last frame of historical image;
    当所述元数据计数总值大于所述上一帧历史图像的寄存器值时,确定所述寄存器的计数轮次;When the total count value of the metadata is greater than the register value of the last frame of historical image, determine the count round of the register;
    根据所述元数据计数总值与所述寄存器的计数轮次计算第一总的帧序号;calculating a first total frame number according to the total count value of the metadata and the count round of the register;
    或者,or,
    当所述元数据计数总值小于所述上一帧历史图像的寄存器值时,确定所述寄存器的计数轮次;When the total count value of the metadata is less than the register value of the last frame of historical image, determine the count round of the register;
    对所述寄存器的计数轮次加一,得到最终计数轮次;Adding one to the counting round of the register to obtain the final counting round;
    根据所述最终计数轮次与所述元数据计数总值计算第一总的帧序号。A first total frame number is calculated according to the final counting round and the total metadata count value.
  8. 一种图像处理装置,应用于图像采集设备,其特征在于,所述装置包括:An image processing device applied to image acquisition equipment, characterized in that the device includes:
    元数据生成模块,用于根据采集到的图像生成所述图像的元数据;A metadata generating module, configured to generate metadata of the image according to the collected image;
    元数据计数总值生成模块,用于利用存储所述元数据的寄存器中所存在的空闲寄存器进行计数,生成元数据计数总值;A metadata counting total value generating module, configured to use the free registers existing in the registers storing the metadata to perform counting to generate the metadata counting total value;
    目标元数据生成模块,用于将所述元数据计数总值嵌入到所述元数据中,生成目标元数据;A target metadata generating module, configured to embed the total value of the metadata count into the metadata to generate target metadata;
    图像计数总值生成模块,用于获取所述图像中冗余像素,并基于所述冗余像素进行计数,生成图像计数总值;An image counting total value generating module, configured to acquire redundant pixels in the image, and perform counting based on the redundant pixels to generate an image counting total value;
    目标图像生成模块,用于将所述图像计数总值嵌入到所述图像中,生成目标图像;A target image generating module, configured to embed the total image count value into the image to generate a target image;
    数据发送模块,用于将所述目标元数据与所述目标图像发送至客户端。A data sending module, configured to send the target metadata and the target image to the client.
  9. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行如权利要求1-7任意一项的方法步骤。A computer storage medium, characterized in that the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1-7.
  10. 一种终端,其特征在于,包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行如权利要求1-7任意一项的方法步骤。A terminal, characterized by comprising: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute the method according to any one of claims 1-7 step.
PCT/CN2021/138185 2021-09-30 2021-12-15 Image processing method and apparatus, storage medium, and terminal WO2023050590A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111164363.5 2021-09-30
CN202111164363.5A CN113986530A (en) 2021-09-30 2021-09-30 Image processing method and device, storage medium and terminal

Publications (1)

Publication Number Publication Date
WO2023050590A1 true WO2023050590A1 (en) 2023-04-06

Family

ID=79737486

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/138185 WO2023050590A1 (en) 2021-09-30 2021-12-15 Image processing method and apparatus, storage medium, and terminal

Country Status (2)

Country Link
CN (1) CN113986530A (en)
WO (1) WO2023050590A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572316A (en) * 2010-09-30 2012-07-11 苹果公司 Overflow control techniques for image signal processing
CN103297682A (en) * 2012-02-27 2013-09-11 三星电子株式会社 Moving image shooting apparatus and method of using a camera device
CN103686042A (en) * 2012-09-25 2014-03-26 三星电子株式会社 Method and apparatus for image data processing, and electronic device including the apparatus
US20150356081A1 (en) * 2014-06-04 2015-12-10 Grandios Technologies, Llc Advanced camera management function
CN110637295A (en) * 2017-05-16 2019-12-31 谷歌有限责任公司 Storing metadata relating to captured images

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572316A (en) * 2010-09-30 2012-07-11 苹果公司 Overflow control techniques for image signal processing
CN103297682A (en) * 2012-02-27 2013-09-11 三星电子株式会社 Moving image shooting apparatus and method of using a camera device
CN103686042A (en) * 2012-09-25 2014-03-26 三星电子株式会社 Method and apparatus for image data processing, and electronic device including the apparatus
US20150356081A1 (en) * 2014-06-04 2015-12-10 Grandios Technologies, Llc Advanced camera management function
CN110637295A (en) * 2017-05-16 2019-12-31 谷歌有限责任公司 Storing metadata relating to captured images

Also Published As

Publication number Publication date
CN113986530A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
CN108737738B (en) Panoramic camera and exposure method and device thereof
US10699431B2 (en) Method and apparatus for generating image generative model
CN108833785B (en) Fusion method and device of multi-view images, computer equipment and storage medium
WO2019184657A1 (en) Image recognition method, apparatus, electronic device and storage medium
CN110430365B (en) Anti-shake method, anti-shake device, computer equipment and storage medium
US20160112757A1 (en) Server, client and video processing method
EP2872963B1 (en) Abstract camera pipeline for uniform cross-device control of image capture and processing
CN105979363A (en) Identity identification method and device
JP7277373B2 (en) transmitter
WO2022166258A1 (en) Behavior recognition method and apparatus, terminal device, and computer-readable storage medium
WO2021083031A1 (en) Time delay error correction method, terminal device, server, and storage medium
CN108124157B (en) Information interaction method, device and system
WO2017173817A1 (en) Computing method and apparatus for video display quality
WO2023207379A1 (en) Image processing method and apparatus, device and storage medium
CN108174084A (en) panoramic video processing method and terminal device
WO2023050590A1 (en) Image processing method and apparatus, storage medium, and terminal
WO2024088132A1 (en) Target-image display method and display apparatus, and electronic device and storage medium
WO2024056030A1 (en) Image depth estimation method and apparatus, electronic device and storage medium
WO2024022391A1 (en) Multimedia data transmission method and apparatus, and electronic device and storage medium
CN113658065A (en) Image noise reduction method and device, computer readable medium and electronic equipment
CN115482286A (en) Calibration verification method, device, equipment and medium for camera internal parameters
CN113205011A (en) Image mask determining method and device, storage medium and electronic equipment
CN115103204B (en) Method and device for realizing edge intelligent application supporting AI engine
CN115908219A (en) Face recognition method, device, equipment and storage medium
CN109377460A (en) A kind of image processing method, image processing apparatus and terminal device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21959150

Country of ref document: EP

Kind code of ref document: A1