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

CN114677425A - Method and device for determining depth of field of object - Google Patents

Method and device for determining depth of field of object Download PDF

Info

Publication number
CN114677425A
CN114677425A CN202210266067.4A CN202210266067A CN114677425A CN 114677425 A CN114677425 A CN 114677425A CN 202210266067 A CN202210266067 A CN 202210266067A CN 114677425 A CN114677425 A CN 114677425A
Authority
CN
China
Prior art keywords
image data
real
historical
field
depth
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
CN202210266067.4A
Other languages
Chinese (zh)
Other versions
CN114677425B (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.)
Beijing HX Pony AI Technology Co Ltd
Original Assignee
Beijing HX Pony AI Technology Co 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 Beijing HX Pony AI Technology Co Ltd filed Critical Beijing HX Pony AI Technology Co Ltd
Priority to CN202210266067.4A priority Critical patent/CN114677425B/en
Publication of CN114677425A publication Critical patent/CN114677425A/en
Application granted granted Critical
Publication of CN114677425B publication Critical patent/CN114677425B/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
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a method and a device for determining depth of field of an object. The method comprises the following steps: acquiring a plurality of pieces of historical image data, wherein the plurality of pieces of historical image data are obtained by shooting historical target objects at the same distance and/or different distances away from a vehicle in a historical time period by adopting a plurality of image acquisition devices with different field angles; training by adopting each historical image data and the depth of field of the historical target corresponding to each historical image data to obtain a normalized model; acquiring real-time image data, and determining a real-time target object corresponding to the real-time image data by adopting a normalization model to calculate the depth of field; and performing inverse normalization processing on the calculated depth of field of the real-time target object by adopting related parameters of image acquisition equipment for shooting the real-time image data to obtain the real depth of field of the real-time target object corresponding to the real-time image data. The normalization model of the scheme is suitable for image acquisition equipment with different visual angles and target objects with different distances.

Description

确定物体景深的方法与装置Method and device for determining the depth of field of an object

技术领域technical field

本申请涉及计算机视觉领域,具体而言,涉及一种确定物体景深的方法、装置、计算机可读存储介质、处理器、车辆与系统。The present application relates to the field of computer vision, and in particular, to a method, an apparatus, a computer-readable storage medium, a processor, a vehicle and a system for determining the depth of field of an object.

背景技术Background technique

计算机视觉主要是通过计算机以及相关视觉传感器对生物视觉的一种模拟。首先采用视觉传感器获取外界图像,再将外界图像转换成数字信号,实现对图像的数据化处理。Computer vision is mainly a simulation of biological vision through computers and related visual sensors. First, the visual sensor is used to obtain the external image, and then the external image is converted into a digital signal to realize the data processing of the image.

对物体景深进行估计是计算机视觉的一个重要的分支,现有的方案常采用简单的单目场景深度估计方法和双目场景深度估计方法,采用单目相机获取的特征较少,采用双目相机需要进行立体图像匹配,计算比较复杂,采用单目场景深度估计方法和双目场景深度估计方法均造成准确度不高的问题。Estimating the depth of field of an object is an important branch of computer vision. The existing solutions often use a simple monocular scene depth estimation method and a binocular scene depth estimation method. The monocular camera is used to obtain fewer features, and the binocular camera is used. Stereo image matching needs to be performed, and the calculation is relatively complicated. Both the monocular scene depth estimation method and the binocular scene depth estimation method cause the problem of low accuracy.

发明内容SUMMARY OF THE INVENTION

本申请的主要目的在于提供一种确定物体景深的方法、装置、计算机可读存储介质、处理器、车辆与系统,以至少解决对物体景深进行估计的方法准确度较低的问题。The main purpose of the present application is to provide a method, apparatus, computer-readable storage medium, processor, vehicle and system for determining the depth of field of an object, so as to at least solve the problem of low accuracy of the method for estimating the depth of field of an object.

为了实现上述目的,根据本申请的一个方面,提供了一种确定物体景深的方法,所述方法应用于车辆驾驶系统,所述车辆驾驶系统包括车辆和安装在所述车辆上的视场角不同的多个图像采集设备,包括:获取多张历史图像数据,多张所述历史图像数据是采用视场角不同的多个所述图像采集设备,在历史时间段内拍摄距离所述车辆同一距离和/或不同距离处的历史目标物得到的;采用各所述历史图像数据和与各所述历史图像数据对应的所述历史目标物的景深,进行训练得到归一化模型;获取实时图像数据,且采用所述归一化模型确定出与所述实时图像数据对应的实时目标物计算景深;采用拍摄所述实时图像数据的所述图像采集设备的相关参量,对所述实时目标物计算景深进行反归一化处理,得到与所述实时图像数据对应的所述实时目标物的真实景深。In order to achieve the above object, according to an aspect of the present application, a method for determining the depth of field of an object is provided, the method is applied to a vehicle driving system, and the vehicle driving system includes a vehicle and a vehicle mounted on the vehicle with different viewing angles The multiple image acquisition devices, including: acquiring multiple pieces of historical image data, the multiple pieces of the historical image data are obtained by using a plurality of the image acquisition devices with different field of view, shooting the same distance from the vehicle in the historical time period and/or historical objects at different distances; use each of the historical image data and the depth of field of the historical object corresponding to each of the historical image data, and perform training to obtain a normalized model; obtain real-time image data , and use the normalized model to determine the real-time target corresponding to the real-time image data to calculate the depth of field; use the relevant parameters of the image acquisition device that captures the real-time image data to calculate the depth of field for the real-time target. Perform inverse normalization processing to obtain the real depth of field of the real-time target object corresponding to the real-time image data.

进一步地,采用拍摄所述实时图像数据的所述图像采集设备的相关参量,对所述实时目标物计算景深进行反归一化处理,得到与所述实时图像数据对应的所述实时目标物的真实景深,包括:根据所述图像采集设备的相关参量,确定实时目标物计算景深与要确定的所述实时目标物的真实景深之间的比值关系;根据所述比值关系和所述实时目标物计算景深,确定所述实时目标物的真实景深。Further, using the relevant parameters of the image acquisition device that shoots the real-time image data, the real-time target object is calculated with a depth of field to perform inverse normalization processing to obtain the real-time target object corresponding to the real-time image data. The real depth of field includes: determining the ratio relationship between the real-time target calculated depth of field and the real depth of field of the real-time target to be determined according to the relevant parameters of the image acquisition device; according to the ratio relationship and the real-time target object Calculate the depth of field, and determine the real depth of field of the real-time target.

进一步地,采用各所述历史图像数据和与各所述历史图像数据对应的所述历史目标物的景深,进行训练得到归一化模型,包括:对各所述历史图像数据进行滤波处理和阈值分割处理,得到与各所述历史图像数据对应的处理后的历史图像数据;采用各所述处理后的历史图像数据和与各所述处理后的历史图像数据对应的所述历史目标物的景深,进行训练得到归一化模型。Further, using each of the historical image data and the depth of field of the historical target object corresponding to each of the historical image data, performing training to obtain a normalized model, including: filtering and thresholding each of the historical image data. Segmentation processing to obtain processed historical image data corresponding to each of the historical image data; using each of the processed historical image data and the depth of field of the historical target object corresponding to each of the processed historical image data , and train to get a normalized model.

进一步地,采用各所述处理后的历史图像数据和与各所述处理后的历史图像数据对应所述历史目标物的景深,进行训练得到归一化模型,包括:提取出所述处理后的历史图像数据的多种不同的特征参数,且所述处理后的历史图像数据的一个颜色通道代表一种所述特征参数;采用各所述处理后的历史图像数据的多种不同的所述特征参数,以及与各所述处理后的历史图像数据对应所述历史目标物的景深,进行训练得到归一化模型。Further, using each of the processed historical image data and the depth of field of the historical target corresponding to each of the processed historical image data, performing training to obtain a normalized model, including: extracting the processed historical image data. A variety of different characteristic parameters of the historical image data, and one color channel of the processed historical image data represents one kind of the characteristic parameter; adopting a plurality of different characteristics of each of the processed historical image data parameters, and the depth of field of the historical object corresponding to each of the processed historical image data are trained to obtain a normalized model.

进一步地,在所述图像采集设备有三个的情况下,采用各所述历史图像数据和与各所述历史图像数据对应的所述历史目标物的景深,进行训练得到归一化模型,包括:构建训练集,所述训练集包括第一视场角图像采集设备拍摄得到的第一数量的所述历史图像数据,第二视场角图像采集设备拍摄得到的第二数量的所述历史图像数据,第三视场角图像采集设备拍摄得到的第三数量的所述历史图像数据,其中,所述第一数量至少是由所述第一视场角的大小、所述第一视场角图像采集设备与所述车辆的相对位置关系和所述历史目标物与所述车辆的相对位置关系决定的,所述第二数量至少是由所述第二视场角的大小、所述第二视场角图像采集设备与所述车辆的相对位置关系和所述历史目标物与所述车辆的相对位置关系决定的,所述第三数量至少是由所述第三视场角的大小、所述第三视场角图像采集设备与所述车辆的相对位置关系和所述历史目标物与所述车辆的相对位置关系决定的;采用所述训练集进行训练,得到所述归一化模型。Further, when there are three image acquisition devices, use each of the historical image data and the depth of field of the historical object corresponding to each of the historical image data to perform training to obtain a normalized model, including: Constructing a training set, the training set includes a first quantity of the historical image data captured by an image acquisition device with a first field of view, and a second quantity of historical image data captured by an image capture device with a second field of view , the third quantity of the historical image data captured by the image acquisition device at the third angle of view, wherein the first quantity is at least determined by the size of the first angle of view, the image of the first angle of view The relative positional relationship between the acquisition device and the vehicle and the relative positional relationship between the historical target and the vehicle are determined, and the second quantity is at least determined by the size of the second field of view, the second field of view The relative positional relationship between the field angle image acquisition device and the vehicle and the relative positional relationship between the historical target and the vehicle are determined, and the third quantity is at least determined by the size of the third field of view, the The relative positional relationship between the third field of view image acquisition device and the vehicle and the relative positional relationship between the historical target and the vehicle are determined; the training set is used for training to obtain the normalized model.

进一步地,在采用各所述历史图像数据和与各所述历史图像数据对应的所述历史目标物的景深,进行训练的过程中,所述方法还包括:获取所述归一化模型得到的输出结果和所述历史目标物的景深之间的误差;根据所述误差调整所述第一数量、所述第二数量和所述第三数量中的至少之一。Further, in the process of training using each of the historical image data and the depth of field of the historical target object corresponding to each of the historical image data, the method further includes: acquiring the data obtained by the normalized model. an error between the output result and the depth of field of the historical target; adjust at least one of the first number, the second number and the third number according to the error.

进一步地,在采用拍摄所述实时图像数据的所述图像采集设备的相关参量,对所述实时目标物计算景深进行反归一化处理,得到与所述实时图像数据对应的所述实时目标物的真实景深之后,所述方法还包括:根据所述实时目标物的真实景深,确定所述车辆的行驶速度和行驶加速度。Further, by adopting the relevant parameters of the image acquisition device that captures the real-time image data, the real-time target object is calculated depth of field and is subjected to inverse normalization processing to obtain the real-time target object corresponding to the real-time image data. After the real depth of field is obtained, the method further includes: determining the driving speed and the driving acceleration of the vehicle according to the real depth of field of the real-time target.

进一步地,所述图像采集设备的相关参量包括所述图像采集设备的坐标与世界坐标之间的相对位姿、所述图像采集设备的光心位置、所述图像采集设备的畸变量。Further, the relevant parameters of the image capture device include the relative pose between the coordinates of the image capture device and the world coordinates, the position of the optical center of the image capture device, and the distortion amount of the image capture device.

进一步地,所述视场角为以下之一:30°、60°、90°、120°。Further, the angle of view is one of the following: 30°, 60°, 90°, 120°.

进一步地,所述归一化模型为卷积神经网络模型,所述卷积神经网络模型包括输入层、输出层和隐含层。Further, the normalization model is a convolutional neural network model, and the convolutional neural network model includes an input layer, an output layer and a hidden layer.

根据本申请的另一个方面,提供了一种确定物体景深的装置,所述装置应用于车辆驾驶系统,所述车辆驾驶系统包括车辆和安装在所述车辆上的视场角不同的多个图像采集设备,包括:第一获取单元,用于获取多张历史图像数据,多张所述历史图像数据是采用视场角不同的多个所述图像采集设备,在历史时间段内拍摄距离所述车辆同一距离和/或不同距离处的历史目标物得到的;训练单元,用于采用各所述历史图像数据和与各所述历史图像数据对应的所述历史目标物的景深,进行训练得到归一化模型;第二获取单元,用于获取实时图像数据,且采用所述归一化模型确定出所述实时图像数据对应的实时目标物计算景深;处理单元,用于采用拍摄所述实时图像数据的所述图像采集设备的相关参量,对所述实时目标物计算景深进行反归一化处理,得到与所述实时图像数据对应的所述实时目标物的真实景深。According to another aspect of the present application, there is provided an apparatus for determining the depth of field of an object, the apparatus being applied to a vehicle driving system, the vehicle driving system including a vehicle and a plurality of images mounted on the vehicle with different viewing angles The acquisition device includes: a first acquisition unit for acquiring a plurality of pieces of historical image data, the plurality of pieces of the historical image data are obtained by using a plurality of the image acquisition devices with different field of view, and the shooting distance within the historical time period is Obtained from historical objects at the same distance and/or at different distances from the vehicle; the training unit is used to use each of the historical image data and the depth of field of the historical object corresponding to each of the historical image data to perform training to obtain a normalized object. A normalized model; a second acquisition unit for acquiring real-time image data, and using the normalized model to determine a real-time target corresponding to the real-time image data to calculate the depth of field; a processing unit for capturing the real-time image by using According to the relevant parameters of the image acquisition device, the calculated depth of field of the real-time target is denormalized, and the real depth of field of the real-time target corresponding to the real-time image data is obtained.

根据本申请的另一个方面,提供了一种计算机可读存储介质,所述计算机可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机可读存储介质所在设备执行任意一种所述的方法。According to another aspect of the present application, a computer-readable storage medium is provided, and the computer-readable storage medium includes a stored program, wherein when the program is executed, a device on which the computer-readable storage medium is located is controlled to execute any arbitrary program. a method as described.

根据本申请的另一个方面,提供了一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行任意一种所述的方法。According to another aspect of the present application, there is provided a processor for running a program, wherein any one of the methods is executed when the program is run.

根据本申请的又一个方面,提供了一种车辆,包括一个或多个处理器,存储器以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置为由所述一个或多个处理器执行,所述一个或多个程序包括用于执行任意一种所述的方法。According to yet another aspect of the present application, there is provided a vehicle comprising one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured For execution by the one or more processors, the one or more programs include means for performing any of the described methods.

根据本申请的再一个方面,提供了一种系统,包括所述的车辆和多个视场角不同的多个图像采集设备,所述图像采集设备安装在所述车辆上,所述图像采集设备与所述车辆通信。According to yet another aspect of the present application, a system is provided, comprising the vehicle and a plurality of image acquisition devices with different viewing angles, the image acquisition devices are installed on the vehicle, and the image acquisition device communicate with the vehicle.

应用本申请的技术方案,通过获取多张历史图像数据,多张上述历史图像数据是采用视场角不同的多个上述图像采集设备,在历史时间段内拍摄距离上述车辆同一距离和/或不同距离处的历史目标物得到的,采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型,获取实时图像数据,且采用上述归一化模型确定出与上述实时图像数据对应的实时目标物计算景深,采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深。由于归一化模型是采用视场角不同的多个上述图像采集设备采集距离上述车辆同一距离和/或不同距离处的历史目标物得到的,使得得到的归一化模型适用于不同视角的图像采集设备,不同距离的目标物。即训练得到了一种通用的模型,可以求取到视场角不同的上述图像采集设备采集得到的图像对应的目标物的景深,然后再经过反归一化处理,得到实时目标物的真实景深。By applying the technical solution of the present application, by acquiring a plurality of pieces of historical image data, the plurality of pieces of the above-mentioned historical image data are obtained by using a plurality of the above-mentioned image acquisition devices with different field of view, and shooting the same distance and/or different distances from the above-mentioned vehicle within a historical time period. The historical target object at the distance is obtained, using each of the above-mentioned historical image data and the depth of field of the above-mentioned historical target object corresponding to each of the above-mentioned historical image data, conduct training to obtain a normalized model, obtain real-time image data, and use the above-mentioned normalization. The model determines the real-time target object corresponding to the above-mentioned real-time image data to calculate the depth of field, and uses the relevant parameters of the above-mentioned image acquisition device that captures the above-mentioned real-time image data to perform inverse normalization processing on the above-mentioned real-time target object to calculate the depth of field, and obtain the real-time image with the above-mentioned real-time image. The real depth of field of the real-time target object corresponding to the data. Since the normalized model is obtained by using a plurality of the above-mentioned image acquisition devices with different field of view to collect historical objects at the same distance and/or different distances from the above-mentioned vehicle, the obtained normalized model is suitable for images from different perspectives Acquisition equipment, targets at different distances. That is, a general model is obtained by training, which can obtain the depth of field of the target object corresponding to the images collected by the above image acquisition devices with different field angles, and then through inverse normalization processing to obtain the real depth of field of the real-time target object .

附图说明Description of drawings

构成本申请的一部分的说明书附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The accompanying drawings that form a part of the present application are used to provide further understanding of the present application, and the schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute improper limitations on the present application. In the attached image:

图1示出了根据本申请的实施例的确定物体景深的方法流程图;1 shows a flowchart of a method for determining the depth of field of an object according to an embodiment of the present application;

图2示出了根据本申请的实施例的确定物体景深的装置示意图;FIG. 2 shows a schematic diagram of an apparatus for determining the depth of field of an object according to an embodiment of the present application;

图3示出了根据本申请的实施例的求解归一化乘数的原理图。FIG. 3 shows a schematic diagram of solving a normalized multiplier according to an embodiment of the present application.

具体实施方式Detailed ways

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only The embodiments are part of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of the present application.

需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances for the embodiments of the application described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.

应该理解的是,当元件(诸如层、膜、区域、或衬底)描述为在另一元件“上”时,该元件可直接在该另一元件上,或者也可存在中间元件。而且,在说明书以及权利要求书中,当描述有元件“连接”至另一元件时,该元件可“直接连接”至该另一元件,或者通过第三元件“连接”至该另一元件。It will be understood that when an element such as a layer, film, region, or substrate is referred to as being "on" another element, it can be directly on the other element or intervening elements may also be present. Also, in the specification and claims, when an element is described as being "connected" to another element, the element can be "directly connected" to the other element or "connected" to the other element through a third element.

正如背景技术中所介绍的,现有技术中对物体景深进行估计的方法准确度较低,为解决对物体景深进行估计的方法准确度较低的问题,本申请的实施例提供了一种确定物体景深的方法、装置、计算机可读存储介质、处理器、车辆与系统。As described in the background art, the method for estimating the depth of field of an object in the prior art has low accuracy. In order to solve the problem of low accuracy of the method for estimating the depth of field of an object, the embodiments of the present application provide a Methods, apparatus, computer-readable storage media, processors, vehicles, and systems for object depth of field.

根据本申请的实施例,提供了一种确定物体景深的方法。According to an embodiment of the present application, a method for determining the depth of field of an object is provided.

图1是根据本申请实施例的确定物体景深的方法的流程图。上述方法应用于车辆驾驶系统,上述车辆驾驶系统包括车辆和安装在上述车辆上的视场角不同的多个图像采集设备,如图1所示,该方法包括以下步骤:FIG. 1 is a flowchart of a method for determining the depth of field of an object according to an embodiment of the present application. The above-mentioned method is applied to a vehicle driving system, and the above-mentioned vehicle driving system includes a vehicle and a plurality of image acquisition devices with different field of view installed on the above-mentioned vehicle. As shown in FIG. 1 , the method includes the following steps:

步骤S101,获取多张历史图像数据,多张上述历史图像数据是采用视场角不同的多个上述图像采集设备,在历史时间段内拍摄距离上述车辆同一距离和/或不同距离处的历史目标物得到的;Step S101, obtaining a plurality of pieces of historical image data, the plurality of pieces of the above-mentioned historical image data are obtained by using a plurality of above-mentioned image acquisition devices with different field of view to shoot historical objects at the same distance and/or different distances from the above-mentioned vehicle within a historical time period obtained;

步骤S102,采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型;Step S102, using each of the above-mentioned historical image data and the depth of field of the above-mentioned historical target object corresponding to each of the above-mentioned historical image data, perform training to obtain a normalized model;

步骤S103,获取实时图像数据,且采用上述归一化模型确定出与上述实时图像数据对应的实时目标物计算景深;Step S103, acquiring real-time image data, and using the above-mentioned normalization model to determine the real-time target object corresponding to the above-mentioned real-time image data to calculate the depth of field;

步骤S104,采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深。Step S104, using the relevant parameters of the image acquisition device that captures the real-time image data, to perform inverse normalization processing on the real-time target object to calculate the depth of field, to obtain the real depth of field of the real-time target object corresponding to the real-time image data.

具体地,上述图像采集设备可以选用相机。Specifically, the above-mentioned image acquisition device may select a camera.

上述方案中,通过获取多张历史图像数据,多张上述历史图像数据是采用视场角不同的多个上述图像采集设备,在历史时间段内拍摄距离上述车辆同一距离和/或不同距离处的历史目标物得到的,采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型,获取实时图像数据,且采用上述归一化模型确定出与上述实时图像数据对应的实时目标物计算景深,采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深。由于归一化模型是采用视场角不同的多个上述图像采集设备采集距离上述车辆同一距离和/或不同距离处的历史目标物得到的,使得得到的归一化模型适用于不同视角的图像采集设备,不同距离的目标物。即训练得到了一种通用的模型,可以求取到视场角不同的上述图像采集设备采集得到的图像对应的目标物的景深,然后再经过反归一化处理,得到实时目标物的真实景深。In the above scheme, by acquiring a plurality of pieces of historical image data, the plurality of pieces of the above-mentioned historical image data are obtained by using a plurality of the above-mentioned image acquisition devices with different field of view to shoot images at the same distance and/or different distances from the above-mentioned vehicle within a historical time period. If the historical target object is obtained, use each of the above-mentioned historical image data and the depth of field of the above-mentioned historical target object corresponding to each of the above-mentioned historical image data, carry out training to obtain a normalized model, obtain real-time image data, and use the above-mentioned normalized model to determine. The real-time target object corresponding to the above-mentioned real-time image data is used to calculate the depth of field, and the relevant parameters of the above-mentioned image acquisition device that captures the above-mentioned real-time image data are used to perform inverse normalization processing on the above-mentioned real-time target object to calculate the depth of field to obtain the corresponding real-time image data. The real depth of field of the above real-time target. Since the normalized model is obtained by using a plurality of the above-mentioned image acquisition devices with different field of view to collect historical objects at the same distance and/or different distances from the above-mentioned vehicle, the obtained normalized model is suitable for images from different perspectives Acquisition equipment, targets at different distances. That is, a general model is obtained by training, which can obtain the depth of field of the target object corresponding to the images collected by the above image acquisition devices with different field angles, and then through inverse normalization processing to obtain the real depth of field of the real-time target object .

需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that the steps shown in the flowcharts of the accompanying drawings may be executed in a computer system, such as a set of computer-executable instructions, and, although a logical sequence is shown in the flowcharts, in some cases, Steps shown or described may be performed in an order different from that herein.

一种可选的实施例中,采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深,包括:根据上述图像采集设备的相关参量,确定实时目标物计算景深与要确定的上述实时目标物的真实景深之间的比值关系;根据上述比值关系和上述实时目标物计算景深,确定上述实时目标物的真实景深。即经过反归一化得到实时目标物计算景深与实时目标物的真实景深之间的对应关系,由于景深就是距离信息,即得到实时目标物计算景深与实时目标物的真实景深之间的比值关系,然后根据归一化模型得到的实时目标物计算景深和比值关系,确定实时目标物的真实景深。实现对实时目标物的真实景深的精确确定。In an optional embodiment, the relevant parameters of the above-mentioned image acquisition device that captures the above-mentioned real-time image data are used to perform inverse normalization processing on the above-mentioned real-time target object to calculate the depth of field, so as to obtain the above-mentioned real-time target object corresponding to the above-mentioned real-time image data. The real depth of field includes: determining the ratio relationship between the real-time target calculated depth of field and the real depth of field of the real-time target to be determined according to the relevant parameters of the above-mentioned image acquisition device; according to the above-mentioned ratio relationship and the real-time target Calculate the depth of field, Determine the true depth of field of the above real-time target. That is, after inverse normalization, the corresponding relationship between the calculated depth of field of the real-time target and the real depth of field of the real-time target is obtained. Since the depth of field is the distance information, the ratio between the calculated depth of field of the real-time target and the real depth of field of the real-time target is obtained. , and then calculate the depth of field and the ratio relationship according to the real-time target obtained by the normalized model to determine the real depth of field of the real-time target. Accurate determination of the real depth of field of real-time objects is achieved.

本申请的一种具体的实施例中,获取物体景深的方法包括如下步骤:In a specific embodiment of the present application, the method for obtaining the depth of field of an object includes the following steps:

步骤1:将3D目标物的中心点的齐次坐标左乘相机外参矩阵,再左乘相机内参矩阵,得到3D目标物中心点在图像平面中的二维坐标;Step 1: Multiply the homogeneous coordinates of the center point of the 3D object to the left by the camera extrinsic parameter matrix, and then left-multiply the camera intrinsic parameter matrix to obtain the two-dimensional coordinates of the center point of the 3D object in the image plane;

步骤2:将3D目标物中心点在图像平面中的二维坐标通过内参矩阵进行归一化,得到3D目标物中心点在归一化图像平面上的坐标;Step 2: Normalize the two-dimensional coordinates of the center point of the 3D object in the image plane through the internal reference matrix to obtain the coordinates of the center point of the 3D object on the normalized image plane;

步骤3:如图3所示,从相机中心M向3D目标物中心点在归一化图像平面Z上的二维坐标N发射射线,并在预定深度处(例如10米)截取射线得到一个点P,基于点P构造一个球体B(例如,直径为1厘米),然后将球体B投影至归一化图像平面Z上,得到一个圆C,求得该圆的宽度所占的像素数量,将像素数除以球的直径得到归一化乘数;Step 3: As shown in Figure 3, emit a ray from the camera center M to the two-dimensional coordinate N of the 3D object center point on the normalized image plane Z, and intercept the ray at a predetermined depth (for example, 10 meters) to obtain a point P, construct a sphere B (for example, with a diameter of 1 cm) based on point P, and then project the sphere B onto the normalized image plane Z to obtain a circle C, and obtain the number of pixels occupied by the width of the circle. The number of pixels is divided by the diameter of the sphere to get the normalized multiplier;

步骤4:将标注得到的3D目标物的深度(即真实深度)除以归一化乘数,得到归一化后的物体深度,并作为深度学习回归目标;Step 4: Divide the depth of the marked 3D object (ie the true depth) by the normalization multiplier to obtain the normalized object depth, which is used as the deep learning regression target;

步骤5:反归一化:对于一个图像上的物体的二维包围框,归一化模型会估计一个归一化后的深度。进行反归一化时,将框的中心点作为二维坐标,进行上述步骤2和步骤3,得到归一化乘数。将模型估计的深度乘以归一化乘数,即可得到反归一化后的深度,也就是真实深度。Step 5: Denormalization: For a 2D bounding box of an object on an image, the normalization model estimates a normalized depth. When inverse normalization is performed, the center point of the frame is taken as the two-dimensional coordinate, and the above steps 2 and 3 are performed to obtain the normalized multiplier. Multiply the depth estimated by the model by the normalization multiplier to get the denormalized depth, which is the true depth.

一种可选的实施例中,采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型,包括:对各上述历史图像数据进行滤波处理和阈值分割处理,得到与各上述历史图像数据对应的处理后的历史图像数据;采用各上述处理后的历史图像数据和与各上述处理后的历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型。具体地,滤波处理是为了滤除历史图像数据的噪声,阈值分割处理是为了进行二值化分割。采用处理后的历史图像数据有利于模型的训练,保证训练得到的归一化模型的准确性。In an optional embodiment, using each of the above-mentioned historical image data and the depth of field of the above-mentioned historical target object corresponding to each of the above-mentioned historical image data, performing training to obtain a normalized model, including: filtering each of the above-mentioned historical image data. and threshold segmentation processing to obtain processed historical image data corresponding to each of the above-mentioned historical image data; using each of the above-mentioned processed historical image data and the depth of field of the above-mentioned historical object corresponding to each of the above-mentioned processed historical image data, carry out Trained to get a normalized model. Specifically, the filtering process is to filter out the noise of historical image data, and the threshold segmentation process is to perform binarization segmentation. Using the processed historical image data is conducive to the training of the model and ensures the accuracy of the normalized model obtained by training.

一种可选的实施例中,采用各上述处理后的历史图像数据和与各上述处理后的历史图像数据对应上述历史目标物的景深,进行训练得到归一化模型,包括:提取出上述处理后的历史图像数据的多种不同的特征参数,且上述处理后的历史图像数据的一个颜色通道代表一种上述特征参数;采用各上述处理后的历史图像数据的多种不同的上述特征参数,以及与各上述处理后的历史图像数据对应上述历史目标物的景深,进行训练得到归一化模型。模型的训练其实就是对参数进行训练,提取出上述处理后的历史图像数据的多种不同的特征参数,再进行训练,可以得到准确的归一化模型。In an optional embodiment, using each of the above-mentioned processed historical image data and the depth of field of the above-mentioned historical object corresponding to each of the above-mentioned processed historical image data, performing training to obtain a normalized model, including: extracting the above-mentioned processing. A variety of different characteristic parameters of the historical image data after processing, and a color channel of the above-mentioned processed historical image data represents a kind of above-mentioned characteristic parameters; using each of the above-mentioned various different above-mentioned characteristic parameters of the processed historical image data, And the depth of field of the historical target object corresponding to each of the above-mentioned processed historical image data is trained to obtain a normalized model. The training of the model is actually to train the parameters, to extract a variety of different characteristic parameters of the above processed historical image data, and then to train to obtain an accurate normalized model.

具体地,处理后的历史图像数据有十个颜色通道,每一个颜色通道可以代表一种特征参数,进而可以采用不同的颜色通道对应的图像进行训练得到归一化模型。Specifically, the processed historical image data has ten color channels, and each color channel can represent a characteristic parameter, and then images corresponding to different color channels can be used for training to obtain a normalized model.

一种可选的实施例中,在上述图像采集设备有三个的情况下,采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型,包括:构建训练集,上述训练集包括第一视场角图像采集设备拍摄得到的第一数量的上述历史图像数据,第二视场角图像采集设备拍摄得到的第二数量的上述历史图像数据,第三视场角图像采集设备拍摄得到的第三数量的上述历史图像数据,其中,上述第一数量至少是由上述第一视场角的大小、上述第一视场角图像采集设备与上述车辆的相对位置关系和上述历史目标物与上述车辆的相对位置关系决定的,上述第二数量至少是由上述第二视场角的大小、上述第二视场角图像采集设备与上述车辆的相对位置关系和上述历史目标物与上述车辆的相对位置关系决定的,上述第三数量至少是由上述第三视场角的大小、上述第三视场角图像采集设备与上述车辆的相对位置关系和上述历史目标物与上述车辆的相对位置关系决定的;采用上述训练集进行训练,得到上述归一化模型。即可以根据视场角的大小、图像采集设备与上述车辆的相对位置关系和上述历史目标物与上述车辆的相对位置关系等参数决定训练集中的数据的多少,通过适应性地调整,保证训练得到的归一化模型较好的适用性和较高的准确性。In an optional embodiment, when there are three image acquisition devices, each of the above-mentioned historical image data and the depth of field of the above-mentioned historical object corresponding to each of the above-mentioned historical image data are used for training to obtain a normalized model, comprising: constructing a training set, the training set includes a first quantity of the above-mentioned historical image data captured by an image acquisition device with a first field of view, and a second quantity of the above-mentioned historical image data captured by an image acquisition device with a second field of view, The third quantity of the above historical image data captured by the image acquisition device at the third angle of view, wherein the first quantity is at least determined by the size of the first angle of view, the image acquisition device at the first angle of view and the vehicle The relative positional relationship between the above-mentioned historical target and the above-mentioned vehicle is determined, and the above-mentioned second quantity is at least determined by the size of the above-mentioned second angle of view, the relative position of the image acquisition device of the above-mentioned second angle of view and the above-mentioned vehicle. relationship and the relative positional relationship between the historical object and the vehicle, and the third quantity is at least determined by the size of the third angle of view, the relative positional relationship between the image acquisition device and the vehicle at the third angle of view, and the above It is determined by the relative positional relationship between the historical target and the above-mentioned vehicle; the above-mentioned normalized model is obtained by using the above-mentioned training set for training. That is, the amount of data in the training set can be determined according to parameters such as the size of the field of view, the relative positional relationship between the image acquisition device and the above-mentioned vehicle, and the relative positional relationship between the above-mentioned historical target and the above-mentioned vehicle. The normalized model has better applicability and higher accuracy.

一种可选的实施例中,在采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练的过程中,上述方法还包括:获取上述归一化模型得到的输出结果和上述历史目标物的景深之间的误差;根据上述误差调整上述第一数量、上述第二数量和上述第三数量中的至少之一。即在训练过程中为保证模型的参数的准确性,可以根据归一化模型得到的输出结果和上述历史目标物的景深之间的误差调整第一数量、上述第二数量和上述第三数量中的至少之一。In an optional embodiment, in the process of training using each of the above-mentioned historical image data and the depth of field of the above-mentioned historical target object corresponding to each of the above-mentioned historical image data, the above method further includes: obtaining the above normalized model. The error between the output result and the depth of field of the historical target object; adjust at least one of the first quantity, the second quantity and the third quantity according to the above error. That is, in order to ensure the accuracy of the parameters of the model during the training process, the first quantity, the above-mentioned second quantity and the above-mentioned third quantity can be adjusted according to the error between the output result obtained by the normalized model and the depth of field of the above-mentioned historical target. at least one of.

另一种实施例中,可以根据归一化模型得到的输出结果和上述历史目标物的景深之间的误差调整模型中的参数。例如,调整网络的层数。In another embodiment, the parameters in the model may be adjusted according to the error between the output result obtained by the normalized model and the depth of field of the historical target object. For example, adjust the number of layers of the network.

一种可选的实施例中,在采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深之后,上述方法还包括:根据上述实时目标物的真实景深,确定上述车辆的行驶速度和行驶加速度。即根据实时目标物的真实景深,指导实时导航。In an optional embodiment, by using the relevant parameters of the above-mentioned image acquisition device that captures the above-mentioned real-time image data, inverse normalization processing is performed on the above-mentioned real-time target object to calculate the depth of field, and the above-mentioned real-time target corresponding to the above-mentioned real-time image data is obtained. After determining the real depth of field of the object, the method further includes: determining the driving speed and the driving acceleration of the vehicle according to the real depth of field of the real-time target object. That is, according to the real depth of field of the real-time target, the real-time navigation is guided.

一种可选的实施例中,上述图像采集设备的相关参量包括上述图像采集设备的坐标与世界坐标之间的相对位姿、上述图像采集设备的光心位置、上述图像采集设备的畸变量。当然,相关参量还包括除图像采集设备的坐标与世界坐标之间的相对位姿、上述图像采集设备的光心位置、上述图像采集设备的畸变量之外的其他参数,本领域技术人员可以根据实际需求进行选择。In an optional embodiment, the relevant parameters of the image capturing device include the relative pose between the coordinates of the image capturing device and the world coordinates, the optical center position of the image capturing device, and the distortion amount of the image capturing device. Of course, the relevant parameters also include other parameters except the relative pose between the coordinates of the image acquisition device and the world coordinates, the position of the optical center of the above-mentioned image acquisition device, and the distortion amount of the above-mentioned image acquisition device. Choose according to actual needs.

一种可选的实施例中,上述视场角为以下之一:30°、60°、90°、120°。当然,视场角还可以是除30°、60°、90°、120°以外的视场角。In an optional embodiment, the above-mentioned field of view angle is one of the following: 30°, 60°, 90°, and 120°. Of course, the viewing angle may also be a viewing angle other than 30°, 60°, 90°, and 120°.

一种可选的实施例中,上述归一化模型为卷积神经网络模型,上述卷积神经网络模型包括输入层、输出层和隐含层。In an optional embodiment, the normalization model is a convolutional neural network model, and the convolutional neural network model includes an input layer, an output layer, and a hidden layer.

本申请实施例还提供了一种确定物体景深的装置,需要说明的是,本申请实施例的确定物体景深的装置可以用于执行本申请实施例所提供的用于确定物体景深的方法。以下对本申请实施例提供的确定物体景深的装置进行介绍。The embodiment of the present application further provides an apparatus for determining the depth of field of an object. It should be noted that the apparatus for determining the depth of field of an object in the embodiment of the present application may be used to execute the method for determining the depth of field of an object provided by the embodiment of the present application. The device for determining the depth of field of an object provided by the embodiments of the present application will be introduced below.

图2是根据本申请实施例的确定物体景深的装置的示意图。上述装置应用于车辆驾驶系统,上述车辆驾驶系统包括车辆和安装在上述车辆上的视场角不同的多个图像采集设备,如图2所示,该装置包括:FIG. 2 is a schematic diagram of an apparatus for determining the depth of field of an object according to an embodiment of the present application. The above-mentioned device is applied to a vehicle driving system, and the above-mentioned vehicle driving system includes a vehicle and a plurality of image acquisition devices with different viewing angles installed on the above-mentioned vehicle. As shown in FIG. 2 , the device includes:

第一获取单元10,用于获取多张历史图像数据,多张上述历史图像数据是采用视场角不同的多个上述图像采集设备,在历史时间段内拍摄距离上述车辆同一距离和/或不同距离处的历史目标物得到的;The first acquisition unit 10 is used to acquire a plurality of pieces of historical image data. The plurality of pieces of the above-mentioned historical image data are obtained by using a plurality of the above-mentioned image acquisition devices with different field of view, and shooting the same distance and/or different distances from the above-mentioned vehicle within a historical time period. Obtained from historical objects at distance;

训练单元20,用于采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型;The training unit 20 is configured to use each of the above-mentioned historical image data and the depth of field of the above-mentioned historical target object corresponding to each of the above-mentioned historical image data to perform training to obtain a normalized model;

第二获取单元30,用于获取实时图像数据,且采用上述归一化模型确定出上述实时图像数据对应的实时目标物计算景深;The second acquiring unit 30 is configured to acquire real-time image data, and use the above-mentioned normalization model to determine the real-time target object corresponding to the above-mentioned real-time image data to calculate the depth of field;

处理单元40,用于采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深。The processing unit 40 is configured to perform inverse normalization processing on the calculated depth of field of the above-mentioned real-time target by using the relevant parameters of the above-mentioned image acquisition device that captures the above-mentioned real-time image data to obtain the real depth of field of the above-mentioned real-time target corresponding to the above-mentioned real-time image data. .

上述方案中,第一获取单元获取多张历史图像数据,多张上述历史图像数据是采用视场角不同的多个上述图像采集设备,在历史时间段内拍摄距离上述车辆同一距离和/或不同距离处的历史目标物得到的,训练单元采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型,第二获取单元获取实时图像数据,且采用上述归一化模型确定出与上述实时图像数据对应的实时目标物计算景深,处理单元采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深。由于归一化模型是采用视场角不同的多个上述图像采集设备采集距离上述车辆同一距离和/或不同距离处的历史目标物得到的,使得得到的归一化模型适用于不同视角的图像采集设备,不同距离的目标物。即训练得到了一种通用的模型,可以求取到视场角不同的上述图像采集设备采集得到的图像对应的目标物的景深,然后再经过反归一化处理,得到实时目标物的真实景深。In the above solution, the first acquisition unit acquires a plurality of pieces of historical image data, and the plurality of pieces of the above-mentioned historical image data is obtained by using a plurality of above-mentioned image acquisition devices with different field of view, and shooting the same distance and/or different distances from the above-mentioned vehicle within a historical time period. The historical target object at the distance is obtained, the training unit adopts each of the above-mentioned historical image data and the depth of field of the above-mentioned historical target object corresponding to each of the above-mentioned historical image data, and performs training to obtain a normalized model, and the second acquisition unit acquires real-time image data, And the above-mentioned normalization model is used to determine the real-time target object corresponding to the above-mentioned real-time image data to calculate the depth of field, and the processing unit adopts the relevant parameters of the above-mentioned image acquisition device that shoots the above-mentioned real-time image data to calculate the depth of field of the above-mentioned real-time target object. Then, the real depth of field of the real-time target object corresponding to the real-time image data is obtained. Since the normalized model is obtained by using a plurality of the above-mentioned image acquisition devices with different field of view to collect historical objects at the same distance and/or different distances from the above-mentioned vehicle, the obtained normalized model is suitable for images from different perspectives Acquisition equipment, targets at different distances. That is, a general model is obtained by training, which can obtain the depth of field of the target object corresponding to the images collected by the above image acquisition devices with different field angles, and then through inverse normalization processing to obtain the real depth of field of the real-time target object .

一种可选的实施例中,处理单元包括第一确定模块和第二确定模块,第一确定模块用于根据上述图像采集设备的相关参量,确定实时目标物计算景深与要确定的上述实时目标物的真实景深之间的比值关系;第二确定模块用于根据上述比值关系和上述实时目标物计算景深,确定上述实时目标物的真实景深。即经过反归一化得到实时目标物计算景深与实时目标物的真实景深之间的对应关系,由于景深就是距离信息,即得到实时目标物计算景深与实时目标物的真实景深之间的比值关系,然后根据归一化模型得到的实时目标物计算景深和比值关系,确定实时目标物的真实景深。实现对实时目标物的真实景深的精确确定。In an optional embodiment, the processing unit includes a first determination module and a second determination module, and the first determination module is used to determine the real-time target object to calculate the depth of field and the real-time target to be determined according to the relevant parameters of the above-mentioned image acquisition device. The second determining module is configured to calculate the depth of field according to the ratio relationship and the real-time target, and determine the real depth of field of the real-time target. That is, after inverse normalization, the corresponding relationship between the calculated depth of field of the real-time target and the real depth of field of the real-time target is obtained. Since the depth of field is the distance information, the ratio between the calculated depth of field of the real-time target and the real depth of field of the real-time target is obtained. , and then calculate the depth of field and the ratio relationship according to the real-time target obtained by the normalized model to determine the real depth of field of the real-time target. Accurate determination of the real depth of field of real-time objects is achieved.

一种可选的实施例中,训练单元包括处理模块和第一训练模块,处理模块用于对各上述历史图像数据进行滤波处理和阈值分割处理,得到与各上述历史图像数据对应的处理后的历史图像数据;第一训练模块用于采用各上述处理后的历史图像数据和与各上述处理后的历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型。具体地,滤波处理是为了滤除历史图像数据的噪声,阈值分割处理是为了进行二值化分割。采用处理后的历史图像数据有利于模型的训练,保证训练得到的归一化模型的准确性。In an optional embodiment, the training unit includes a processing module and a first training module, and the processing module is used to perform filtering processing and threshold segmentation processing on each of the above-mentioned historical image data to obtain a processed image corresponding to each of the above-mentioned historical image data. Historical image data; the first training module is configured to use each of the processed historical image data and the depth of field of the historical object corresponding to each of the processed historical image data to perform training to obtain a normalized model. Specifically, the filtering process is to filter out the noise of historical image data, and the threshold segmentation process is to perform binarization segmentation. Using the processed historical image data is conducive to the training of the model and ensures the accuracy of the normalized model obtained by training.

一种可选的实施例中,第一训练模块包括提取子模块和训练子模块,提取子模块用于提取出上述处理后的历史图像数据的多种不同的特征参数,且上述处理后的历史图像数据的一个颜色通道代表一种上述特征参数;训练子模块用于采用各上述处理后的历史图像数据的多种不同的上述特征参数,以及与各上述处理后的历史图像数据对应上述历史目标物的景深,进行训练得到归一化模型。模型的训练其实就是对参数进行训练,提取出上述处理后的历史图像数据的多种不同的特征参数,再进行训练,可以得到准确的归一化模型。In an optional embodiment, the first training module includes an extraction sub-module and a training sub-module, and the extraction sub-module is used to extract a variety of different characteristic parameters of the processed historical image data, and the processed historical A color channel of the image data represents a kind of above-mentioned characteristic parameter; the training submodule is used for adopting various above-mentioned characteristic parameters of each above-mentioned processed historical image data, and the above-mentioned historical target corresponding to each above-mentioned processed historical image data The depth of field of the object is trained to obtain a normalized model. The training of the model is actually to train the parameters, to extract a variety of different characteristic parameters of the above processed historical image data, and then to train to obtain an accurate normalized model.

一种可选的实施例中,在上述图像采集设备有三个的情况下,训练单元包括构建模块和第二训练模块,构建模块用于构建训练集,上述训练集包括第一视场角图像采集设备拍摄得到的第一数量的上述历史图像数据,第二视场角图像采集设备拍摄得到的第二数量的上述历史图像数据,第三视场角图像采集设备拍摄得到的第三数量的上述历史图像数据,其中,上述第一数量至少是由上述第一视场角的大小、上述第一视场角图像采集设备与上述车辆的相对位置关系和上述历史目标物与上述车辆的相对位置关系决定的,上述第二数量至少是由上述第二视场角的大小、上述第二视场角图像采集设备与上述车辆的相对位置关系和上述历史目标物与上述车辆的相对位置关系决定的,上述第三数量至少是由上述第三视场角的大小、上述第三视场角图像采集设备与上述车辆的相对位置关系和上述历史目标物与上述车辆的相对位置关系决定的;第二训练模块用于采用上述训练集进行训练,得到上述归一化模型。即可以根据视场角的大小、图像采集设备与上述车辆的相对位置关系和上述历史目标物与上述车辆的相对位置关系等参数决定训练集中的数据的多少,通过适应性地调整,保证训练得到的归一化模型较好的适用性和较高的准确性。In an optional embodiment, when there are three image acquisition devices, the training unit includes a building module and a second training module, and the building module is used to construct a training set, and the training set includes the first field of view image acquisition. The first amount of the above-mentioned historical image data captured by the device, the second amount of the above-mentioned historical image data captured by the second field of view image acquisition device, and the third amount of the above-mentioned historical image data captured by the third field of view image capture device Image data, wherein the first number is at least determined by the size of the first angle of view, the relative positional relationship between the image acquisition device of the first angle of view and the vehicle, and the relative positional relationship between the historical target and the vehicle The above-mentioned second quantity is at least determined by the size of the above-mentioned second angle of view, the relative positional relationship between the image acquisition device of the above-mentioned second angle of view and the above-mentioned vehicle, and the relative positional relationship between the above-mentioned historical target and the above-mentioned vehicle. The third quantity is determined at least by the size of the third angle of view, the relative positional relationship between the image acquisition device for the third angle of view and the vehicle, and the relative positional relationship between the historical target and the vehicle; the second training module It is used for training with the above-mentioned training set to obtain the above-mentioned normalized model. That is, the amount of data in the training set can be determined according to parameters such as the size of the field of view, the relative positional relationship between the image acquisition device and the above-mentioned vehicle, and the relative positional relationship between the above-mentioned historical target and the above-mentioned vehicle. The normalized model has better applicability and higher accuracy.

一种可选的实施例中,上述装置还包括第三获取单元和调整单元,第三获取单元用于在采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练的过程中,获取上述归一化模型得到的输出结果和上述历史目标物的景深之间的误差;调整单元用于根据上述误差调整上述第一数量、上述第二数量和上述第三数量中的至少之一。即在训练过程中为保证模型的参数的准确性,可以根据归一化模型得到的输出结果和上述历史目标物的景深之间的误差调整第一数量、上述第二数量和上述第三数量中的至少之一。In an optional embodiment, the above-mentioned device further includes a third acquisition unit and an adjustment unit, and the third acquisition unit is used for using each of the above-mentioned historical image data and the depth of field of the above-mentioned historical object corresponding to each of the above-mentioned historical image data, During the training process, the error between the output result obtained by the normalized model and the depth of field of the historical target object is obtained; the adjustment unit is used to adjust the above-mentioned first quantity, the above-mentioned second quantity and the above-mentioned third quantity according to the above-mentioned error. at least one of them. That is, in order to ensure the accuracy of the parameters of the model during the training process, the first quantity, the above-mentioned second quantity and the above-mentioned third quantity can be adjusted according to the error between the output result obtained by the normalized model and the depth of field of the above-mentioned historical target. at least one of.

一种可选的实施例中,上述装置还包括确定单元,确定单元用于在采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深之后,根据上述实时目标物的真实景深,确定上述车辆的行驶速度和行驶加速度。即根据实时目标物的真实景深,指导实时导航。In an optional embodiment, the above-mentioned apparatus further includes a determination unit, which is configured to perform inverse normalization processing on the calculated depth of field of the above-mentioned real-time target by using the relevant parameters of the above-mentioned image acquisition device that captures the above-mentioned real-time image data, After the real depth of field of the real-time target object corresponding to the real-time image data is obtained, the driving speed and the driving acceleration of the vehicle are determined according to the real depth of field of the real-time target object. That is, according to the real depth of field of the real-time target, the real-time navigation is guided.

所述确定物体景深的装置包括处理器和存储器,上述第一获取单元、训练单元、第二获取单元和处理单元等均作为程序单元存储在存储器中,由处理器执行存储在存储器中的上述程序单元来实现相应的功能。The device for determining the depth of field of an object includes a processor and a memory, the above-mentioned first acquisition unit, training unit, second acquisition unit and processing unit are all stored in the memory as program units, and the processor executes the above-mentioned program stored in the memory. unit to achieve the corresponding function.

处理器中包含内核,由内核去存储器中调取相应的程序单元。内核可以设置一个或以上,通过调整内核参数来精确确定物体的景深。The processor includes a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to one or more, by adjusting the kernel parameters to accurately determine the depth of field of the object.

存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read only memory (ROM) or flash memory (flash RAM), the memory including at least one memory chip.

本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机可读存储介质所在设备执行所述确定物体景深的方法。An embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, wherein when the program runs, the device where the computer-readable storage medium is located is controlled to execute the determining of the depth of field of the object Methods.

本发明实施例提供了一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行所述确定物体景深的方法。An embodiment of the present invention provides a processor for running a program, wherein the method for determining the depth of field of an object is executed when the program is running.

本发明实施例提供了一种车辆,包括一个或多个处理器,存储器以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置为由上述一个或多个处理器执行,上述一个或多个程序包括用于执行任意一种上述的方法。An embodiment of the present invention provides a vehicle, including one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more programs. Executed by a processor, the above-mentioned one or more programs include any one of the above-mentioned methods.

本发明实施例提供了一种系统,包括上述的车辆和多个视场角不同的多个图像采集设备,上述图像采集设备安装在上述车辆上,上述图像采集设备与上述车辆通信。An embodiment of the present invention provides a system including the above vehicle and a plurality of image acquisition devices with different viewing angles, the image acquisition devices are installed on the vehicle, and the image acquisition device communicates with the vehicle.

本发明实施例提供了一种设备,设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序,处理器执行程序时实现至少以下步骤:An embodiment of the present invention provides a device. The device includes a processor, a memory, and a program stored in the memory and running on the processor. The processor implements at least the following steps when executing the program:

步骤S101,获取多张历史图像数据,多张上述历史图像数据是采用视场角不同的多个上述图像采集设备,在历史时间段内拍摄距离上述车辆同一距离和/或不同距离处的历史目标物得到的;Step S101, obtaining a plurality of pieces of historical image data, the plurality of pieces of the above-mentioned historical image data are obtained by using a plurality of above-mentioned image acquisition devices with different field of view to shoot historical objects at the same distance and/or different distances from the above-mentioned vehicle within a historical time period obtained;

步骤S102,采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型;Step S102, using each of the above-mentioned historical image data and the depth of field of the above-mentioned historical target object corresponding to each of the above-mentioned historical image data, perform training to obtain a normalized model;

步骤S103,获取实时图像数据,且采用上述归一化模型确定出与上述实时图像数据对应的实时目标物计算景深;Step S103, acquiring real-time image data, and using the above-mentioned normalization model to determine the real-time target object corresponding to the above-mentioned real-time image data to calculate the depth of field;

步骤S104,采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深。Step S104, using the relevant parameters of the image acquisition device that captures the real-time image data, to perform inverse normalization processing on the real-time target object to calculate the depth of field, to obtain the real depth of field of the real-time target object corresponding to the real-time image data.

本文中的设备可以是服务器、PC、PAD、手机等。The devices in this article can be servers, PCs, PADs, mobile phones, and so on.

本申请还提供了一种计算机程序产品,当在数据处理设备上执行时,适于执行初始化有至少如下方法步骤的程序:The present application also provides a computer program product that, when executed on a data processing device, is adapted to execute a program initialized with at least the following method steps:

步骤S101,获取多张历史图像数据,多张上述历史图像数据是采用视场角不同的多个上述图像采集设备,在历史时间段内拍摄距离上述车辆同一距离和/或不同距离处的历史目标物得到的;Step S101, obtaining a plurality of pieces of historical image data, the plurality of pieces of the above-mentioned historical image data are obtained by using a plurality of above-mentioned image acquisition devices with different field of view to shoot historical objects at the same distance and/or different distances from the above-mentioned vehicle within a historical time period obtained;

步骤S102,采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型;Step S102, using each of the above-mentioned historical image data and the depth of field of the above-mentioned historical target object corresponding to each of the above-mentioned historical image data, perform training to obtain a normalized model;

步骤S103,获取实时图像数据,且采用上述归一化模型确定出与上述实时图像数据对应的实时目标物计算景深;Step S103, acquiring real-time image data, and using the above-mentioned normalization model to determine the real-time target object corresponding to the above-mentioned real-time image data to calculate the depth of field;

步骤S104,采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深。Step S104, using the relevant parameters of the image acquisition device that captures the real-time image data, to perform inverse normalization processing on the real-time target object to calculate the depth of field, to obtain the real depth of field of the real-time target object corresponding to the real-time image data.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory in the form of, for example, read only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements, but also Other elements not expressly listed, or which are inherent to such a process, method, article of manufacture, or apparatus are also included. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article of manufacture or apparatus that includes the element.

从以上的描述中,可以看出,本申请上述的实施例实现了如下技术效果:From the above description, it can be seen that the above-mentioned embodiments of the present application achieve the following technical effects:

1)、本申请的确定物体景深的方法,通过获取多张历史图像数据,多张上述历史图像数据是采用视场角不同的多个上述图像采集设备,在历史时间段内拍摄距离上述车辆同一距离和/或不同距离处的历史目标物得到的,采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型,获取实时图像数据,且采用上述归一化模型确定出与上述实时图像数据对应的实时目标物计算景深,采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深。由于归一化模型是采用视场角不同的多个上述图像采集设备采集距离上述车辆同一距离和/或不同距离处的历史目标物得到的,使得得到的归一化模型适用于不同视角的图像采集设备,不同距离的目标物。即训练得到了一种通用的模型,可以求取到视场角不同的上述图像采集设备采集得到的图像对应的目标物的景深,然后再经过反归一化处理,得到实时目标物的真实景深。1), the method for determining the depth of field of an object of the present application, by obtaining multiple pieces of historical image data, the multiple pieces of the above-mentioned historical image data are a plurality of above-mentioned image acquisition devices with different field of view, and the shooting distance is the same as the above-mentioned vehicle in the historical time period. distances and/or historical objects at different distances are obtained, using each of the above-mentioned historical image data and the depth of field of the above-mentioned historical objects corresponding to each of the above-mentioned historical image data, performing training to obtain a normalized model, and obtaining real-time image data, and The above-mentioned normalization model is used to determine the real-time target object corresponding to the above-mentioned real-time image data to calculate the depth of field, and the relevant parameters of the above-mentioned image acquisition device that captures the above-mentioned real-time image data are used to perform inverse normalization processing on the above-mentioned real-time target object to calculate the depth of field, The real depth of field of the real-time target object corresponding to the real-time image data is obtained. Since the normalized model is obtained by using a plurality of the above-mentioned image acquisition devices with different field of view to collect historical objects at the same distance and/or different distances from the above-mentioned vehicle, the obtained normalized model is suitable for images from different perspectives Acquisition equipment, targets at different distances. That is, a general model is obtained by training, which can obtain the depth of field of the target object corresponding to the images collected by the above image acquisition devices with different field angles, and then through inverse normalization processing to obtain the real depth of field of the real-time target object .

2)、本申请的确定物体景深的装置,第一获取单元获取多张历史图像数据,多张上述历史图像数据是采用视场角不同的多个上述图像采集设备,在历史时间段内拍摄距离上述车辆同一距离和/或不同距离处的历史目标物得到的,训练单元采用各上述历史图像数据和与各上述历史图像数据对应的上述历史目标物的景深,进行训练得到归一化模型,第二获取单元获取实时图像数据,且采用上述归一化模型确定出与上述实时图像数据对应的实时目标物计算景深,处理单元采用拍摄上述实时图像数据的上述图像采集设备的相关参量,对上述实时目标物计算景深进行反归一化处理,得到与上述实时图像数据对应的上述实时目标物的真实景深。由于归一化模型是采用视场角不同的多个上述图像采集设备采集距离上述车辆同一距离和/或不同距离处的历史目标物得到的,使得得到的归一化模型适用于不同视角的图像采集设备,不同距离的目标物。即训练得到了一种通用的模型,可以求取到视场角不同的上述图像采集设备采集得到的图像对应的目标物的景深,然后再经过反归一化处理,得到实时目标物的真实景深。2), the device for determining the depth of field of an object of the present application, the first acquisition unit acquires a plurality of historical image data, and the above-mentioned historical image data is a plurality of above-mentioned image acquisition devices with different angles of view, and the shooting distance in the historical time period. Obtained from the historical objects at the same distance and/or different distances from the above-mentioned vehicles, the training unit uses each of the above-mentioned historical image data and the depth of field of the above-mentioned historical objects corresponding to each of the above-mentioned historical image data, and performs training to obtain a normalized model. The second acquisition unit acquires real-time image data, and uses the above-mentioned normalization model to determine the real-time target corresponding to the above-mentioned real-time image data to calculate the depth of field, and the processing unit uses the relevant parameters of the above-mentioned image acquisition device that captures the above-mentioned real-time image data. The target object calculates the depth of field and performs inverse normalization processing to obtain the real depth of field of the above-mentioned real-time target object corresponding to the above-mentioned real-time image data. Since the normalized model is obtained by using a plurality of the above-mentioned image acquisition devices with different field of view to collect historical objects at the same distance and/or different distances from the above-mentioned vehicle, the obtained normalized model is suitable for images from different perspectives Acquisition equipment, targets at different distances. That is, a general model is obtained by training, which can obtain the depth of field of the target object corresponding to the images collected by the above image acquisition devices with different field angles, and then through inverse normalization processing to obtain the real depth of field of the real-time target object .

以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims (15)

1. A method for determining a depth of field of an object, the method being applied to a vehicle driving system including a vehicle and a plurality of image capturing devices mounted on the vehicle and having different angles of view, comprising:
acquiring a plurality of pieces of historical image data, wherein the plurality of pieces of historical image data are obtained by shooting historical target objects at the same distance and/or different distances away from the vehicle in a historical time period by adopting a plurality of image acquisition devices with different field angles;
training to obtain a normalized model by adopting each historical image data and the depth of field of the historical target corresponding to each historical image data;
acquiring real-time image data, and determining a real-time target object corresponding to the real-time image data by adopting the normalized model to calculate the depth of field;
And performing inverse normalization processing on the calculated depth of field of the real-time target object by using the related parameters of the image acquisition equipment for shooting the real-time image data to obtain the real depth of field of the real-time target object corresponding to the real-time image data.
2. The method according to claim 1, wherein the denormalizing the real-time object computed depth of field using parameters associated with the image capture device capturing the real-time image data to obtain the real depth of field of the real-time object corresponding to the real-time image data comprises:
determining a ratio relation between the calculated depth of field of the real-time target object and the real depth of field of the real-time target object to be determined according to the related parameters of the image acquisition equipment;
and calculating the depth of field according to the ratio relation and the real-time target object, and determining the real depth of field of the real-time target object.
3. The method of claim 1, wherein training using each of the historical image data and the depth of field of the historical object corresponding to each of the historical image data to obtain a normalized model comprises:
filtering and threshold segmentation processing are carried out on each historical image data to obtain processed historical image data corresponding to each historical image data;
And training to obtain a normalized model by adopting each processed historical image data and the depth of field of the historical target corresponding to each processed historical image data.
4. The method of claim 3, wherein training to obtain a normalized model using each of the processed historical image data and the depth of field of the historical object corresponding to each of the processed historical image data comprises:
extracting a plurality of different characteristic parameters of the processed historical image data, wherein one color channel of the processed historical image data represents one characteristic parameter;
and training to obtain a normalized model by adopting a plurality of different characteristic parameters of each processed historical image data and the depth of field of the historical target corresponding to each processed historical image data.
5. The method according to claim 1, wherein in a case where there are three image capturing devices, training using each of the historical image data and the depth of field of the historical target corresponding to each of the historical image data to obtain a normalized model includes:
Constructing a training set, wherein the training set comprises a first number of the historical image data captured by a first field angle image capture device, a second number of the historical image data captured by a second field angle image capture device, and a third number of the historical image data captured by a third field angle image capture device, wherein the first number is determined by at least the size of the first field angle, the relative positional relationship between the first field angle image capture device and the vehicle, and the relative positional relationship between the historical object and the vehicle, wherein the second number is determined by at least the size of the second field angle, the relative positional relationship between the second field angle image capture device and the vehicle, and the relative positional relationship between the historical object and the vehicle, and wherein the third number is determined by at least the size of the third field angle, The relative position relation between the third field angle image acquisition device and the vehicle and the relative position relation between the historical target object and the vehicle are determined;
and training by adopting the training set to obtain the normalized model.
6. The method of claim 5, wherein during training using each of the historical image data and the depth of field of the historical object corresponding to each of the historical image data, the method further comprises:
Acquiring an error between an output result obtained by the normalized model and the depth of field of the historical target object;
adjusting at least one of the first number, the second number, and the third number based on the error.
7. The method according to any one of claims 1 to 6, wherein after performing denormalization processing on the calculated depth of field of the real-time object using parameters related to the image capturing device capturing the real-time image data to obtain a true depth of field of the real-time object corresponding to the real-time image data, the method further comprises:
and determining the running speed and the running acceleration of the vehicle according to the real depth of field of the real-time target object.
8. The method according to any one of claims 1 to 6, wherein the relevant parameters of the image acquisition device comprise relative pose between coordinates of the image acquisition device and world coordinates, optical center position of the image acquisition device, distortion amount of the image acquisition device.
9. The method according to any of claims 1 to 6, wherein the field angle is one of:
30°、60°、90°、120°。
10. the method of any one of claims 1 to 6, wherein the normalized model is a convolutional neural network model comprising an input layer, an output layer, and a hidden layer.
11. An apparatus for determining depth of field of an object, the apparatus being applied to a vehicle driving system including a vehicle and a plurality of image capturing devices mounted on the vehicle and having different angles of view, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a plurality of pieces of historical image data, and the plurality of pieces of historical image data are obtained by shooting historical target objects at the same distance and/or different distances away from the vehicle in a historical time period by adopting a plurality of image acquisition devices with different field angles;
the training unit is used for training by adopting the historical image data and the depth of field of the historical target object corresponding to the historical image data to obtain a normalized model;
the second acquisition unit is used for acquiring real-time image data and determining a real-time target object corresponding to the real-time image data by adopting the normalization model to calculate the depth of field;
and the processing unit is used for performing inverse normalization processing on the calculated depth of field of the real-time target object by using the related parameters of the image acquisition equipment for shooting the real-time image data to obtain the real depth of field of the real-time target object corresponding to the real-time image data.
12. A computer-readable storage medium, comprising a stored program, wherein the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the method of any one of claims 1 to 10.
13. A processor configured to run a program, wherein the program when executed performs the method of any one of claims 1 to 10.
14. A vehicle comprising one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of any of claims 1-10.
15. A system comprising the vehicle of claim 14 and a plurality of image capturing devices of different field angles, the image capturing devices being mounted on the vehicle, the image capturing devices being in communication with the vehicle.
CN202210266067.4A 2022-03-17 2022-03-17 Method and device for determining depth of field of an object Active CN114677425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210266067.4A CN114677425B (en) 2022-03-17 2022-03-17 Method and device for determining depth of field of an object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210266067.4A CN114677425B (en) 2022-03-17 2022-03-17 Method and device for determining depth of field of an object

Publications (2)

Publication Number Publication Date
CN114677425A true CN114677425A (en) 2022-06-28
CN114677425B CN114677425B (en) 2024-12-27

Family

ID=82075108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210266067.4A Active CN114677425B (en) 2022-03-17 2022-03-17 Method and device for determining depth of field of an object

Country Status (1)

Country Link
CN (1) CN114677425B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118532A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 Vision depth of field estimation method, device, equipment and storage medium
WO2019137081A1 (en) * 2018-01-11 2019-07-18 华为技术有限公司 Image processing method, image processing apparatus, and photographing device
CN111426299A (en) * 2020-06-15 2020-07-17 北京三快在线科技有限公司 Method and device for ranging based on depth of field of target object
CN112417967A (en) * 2020-10-22 2021-02-26 腾讯科技(深圳)有限公司 Obstacle detection method, obstacle detection device, computer device, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118532A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 Vision depth of field estimation method, device, equipment and storage medium
WO2019137081A1 (en) * 2018-01-11 2019-07-18 华为技术有限公司 Image processing method, image processing apparatus, and photographing device
CN111426299A (en) * 2020-06-15 2020-07-17 北京三快在线科技有限公司 Method and device for ranging based on depth of field of target object
CN112417967A (en) * 2020-10-22 2021-02-26 腾讯科技(深圳)有限公司 Obstacle detection method, obstacle detection device, computer device, and storage medium

Also Published As

Publication number Publication date
CN114677425B (en) 2024-12-27

Similar Documents

Publication Publication Date Title
CN110285793B (en) Intelligent vehicle track measuring method based on binocular stereo vision system
CN106033621B (en) A kind of method and device of three-dimensional modeling
CN109887003B (en) Method and equipment for carrying out three-dimensional tracking initialization
US9805294B2 (en) Method for denoising time-of-flight range images
US9323977B2 (en) Apparatus and method for processing 3D information
CN113077476B (en) Height measurement method, terminal device and computer storage medium
EP1982306A1 (en) Method of tracking the position of the head in real time in a video image stream
CN103477644A (en) Method of recording an image and obtaining 3D information from the image, and camera system
CN112233076B (en) Structural vibration displacement measurement method and device based on red round target image processing
US11227407B2 (en) Systems and methods for augmented reality applications
CN112907728B (en) Ship scene restoration and positioning method and system based on camera and edge calculation
Amamra et al. GPU-based real-time RGBD data filtering
CN107248188A (en) The surface rendering method and system of dynamic particles set
CN106327576A (en) Urban scene reconstruction method and system
WO2023016182A1 (en) Pose determination method and apparatus, electronic device, and readable storage medium
CN110706288A (en) Target detection method, device, equipment and readable storage medium
CN114511608A (en) Method, device, terminal, imaging system and medium for acquiring depth image
CN114677425A (en) Method and device for determining depth of field of object
CN112907657A (en) Robot repositioning method, device, equipment and storage medium
CN112132845A (en) Monolithic method, apparatus, electronic device and readable medium for three-dimensional model
CN114219831B (en) Target tracking method, device, terminal equipment and computer readable storage medium
CN112288817B (en) Three-dimensional reconstruction processing method and device based on image
Li et al. Depth-assisted demosaicing for light field data in layered object space
CN109374919A (en) A kind of method and device determining movement speed based on single capture apparatus
CN113255407B (en) Method for detecting target in monocular image, vehicle positioning method, device and equipment

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