[go: up one dir, main page]

CN116137079A - Image processing method, device and equipment method - Google Patents

Image processing method, device and equipment method Download PDF

Info

Publication number
CN116137079A
CN116137079A CN202111369280.XA CN202111369280A CN116137079A CN 116137079 A CN116137079 A CN 116137079A CN 202111369280 A CN202111369280 A CN 202111369280A CN 116137079 A CN116137079 A CN 116137079A
Authority
CN
China
Prior art keywords
image
gray
detected
spatial
dimensional coordinates
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.)
Pending
Application number
CN202111369280.XA
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software 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 China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202111369280.XA priority Critical patent/CN116137079A/en
Publication of CN116137079A publication Critical patent/CN116137079A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Landscapes

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

Abstract

本发明公开了一种图像处理方法、装置及设备,其中,所述方法包括:获取待检测图像的多个灰度区域;根据所述多个灰度区域中的每一个灰度区域中的像素点,获取所述像素点对应的空间点的三维坐标;根据所述空间点的三维坐标,获取所述待检测图像的空间梯度直方图;根据所述空间梯度直方图,识别所述待检测图像中的目标对象。通过上述方法,本发明能够更全面提取图像特征,提高图像识别的精确度。

Figure 202111369280

The invention discloses an image processing method, device and equipment, wherein the method includes: acquiring multiple grayscale regions of the image to be detected; point, obtain the three-dimensional coordinates of the spatial point corresponding to the pixel point; obtain the spatial gradient histogram of the image to be detected according to the three-dimensional coordinates of the spatial point; identify the image to be detected according to the spatial gradient histogram target object in . Through the above method, the present invention can more comprehensively extract image features and improve the accuracy of image recognition.

Figure 202111369280

Description

一种图像处理方法、装置及设备方法An image processing method, device and equipment method

技术领域technical field

本发明涉及图像处理技术领域,具体涉及一种图像处理方法、装置及设备。The present invention relates to the technical field of image processing, in particular to an image processing method, device and equipment.

背景技术Background technique

近年来,行人检测和人脸识别在日常生活中越来越常见,计算机视觉已经成为当下学者们的研究热点。方向梯度直方图(Histogram of Oriented Gradient,HOG)特征是一种在计算机视觉和图像处理中用来进行物体检测的特征描述。HOG特征通过计算和统计图像局部区域的梯度方向直方图来构成特征。In recent years, pedestrian detection and face recognition have become more and more common in daily life, and computer vision has become a research hotspot for current scholars. The Histogram of Oriented Gradient (HOG) feature is a feature description used in computer vision and image processing for object detection. The HOG feature constitutes a feature by calculating and counting the gradient orientation histogram of the local area of the image.

现有的HOG特征实现方法的主要缺点有:特征维度大,对于像素较高的图片或远距离的图片进行特征提取灵敏度较低。计算量大,处理复杂图片的时间复杂度较高。HOG特征提取方法存在一定的误差。The main disadvantages of the existing HOG feature implementation methods are: the feature dimension is large, and the feature extraction sensitivity for pictures with high pixels or long-distance pictures is low. The amount of calculation is large, and the time complexity of processing complex images is high. There are certain errors in the HOG feature extraction method.

发明内容Contents of the invention

鉴于上述问题,提出了本发明实施例以便提供一种克服上述问题或者至少部分地解决上述问题的图像处理方法、装置及设备。In view of the above problems, embodiments of the present invention are proposed to provide an image processing method, device, and device that overcome the above problems or at least partially solve the above problems.

根据本发明实施例的一个方面,提供了一种图像处理方法,所述方法包括:According to an aspect of an embodiment of the present invention, an image processing method is provided, the method comprising:

获取待检测图像的多个灰度区域;Obtain multiple grayscale regions of the image to be detected;

根据所述多个灰度区域中的每一个灰度区域中的像素点,获取所述像素点对应的空间点的三维坐标;Acquiring the three-dimensional coordinates of the spatial points corresponding to the pixel points according to the pixel points in each gray-scale area of the plurality of gray-scale areas;

根据所述空间点的三维坐标,获取所述待检测图像的空间梯度直方图;Acquiring a spatial gradient histogram of the image to be detected according to the three-dimensional coordinates of the spatial point;

根据所述空间梯度直方图,识别所述待检测图像中的目标对象。A target object in the image to be detected is identified according to the spatial gradient histogram.

根据本发明实施例的另一方面,提供了一种图像处理装置,所述装置包括:According to another aspect of the embodiments of the present invention, an image processing device is provided, and the device includes:

获取模块,用于获取待检测图像的多个灰度区域;An acquisition module, configured to acquire multiple grayscale regions of the image to be detected;

处理模块,用于根据所述多个灰度区域中的每一个灰度区域中的像素点,获取所述像素点对应的空间点的三维坐标;根据所述空间点的三维坐标,获取所述待检测图像的空间梯度直方图;根据所述空间梯度直方图,识别所述待检测图像中的目标对象。A processing module, configured to obtain the three-dimensional coordinates of the spatial point corresponding to the pixel according to the pixel points in each gray-scale region of the plurality of gray-scale regions; obtain the three-dimensional coordinates of the spatial point according to the three-dimensional coordinates of the spatial point A spatial gradient histogram of the image to be detected; identifying a target object in the image to be detected according to the spatial gradient histogram.

根据本发明实施例的又一方面,提供了一种计算设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;According to still another aspect of the embodiments of the present invention, a computing device is provided, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete the mutual communication via the communication bus. communication between

所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行上述图像处理方法对应的操作。The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the above image processing method.

根据本发明实施例的再一方面,提供了一种计算机存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如上述图像处理方法对应的操作。According to yet another aspect of the embodiments of the present invention, a computer storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform operations corresponding to the above image processing method.

根据本发明上述实施例提供的方案,根据所述多个灰度区域中的每一个灰度区域中的像素点,获取所述像素点对应的空间点的三维坐标;根据所述空间点的三维坐标,获取所述待检测图像的空间梯度直方图;根据所述空间梯度直方图,识别所述待检测图像中目标对象;从而可以在保持图像几何和光学形变不变性的情况下,对图像特征进行提取,保证图像特征提取的全面性,进一步提高图像识别的精确度。According to the solutions provided by the above-mentioned embodiments of the present invention, according to the pixel points in each gray-scale area of the plurality of gray-scale areas, the three-dimensional coordinates of the spatial points corresponding to the pixel points are obtained; according to the three-dimensional coordinates of the spatial points Coordinates, to obtain the spatial gradient histogram of the image to be detected; according to the spatial gradient histogram, identify the target object in the image to be detected; thus, the image features can be analyzed while maintaining the image geometry and optical deformation invariance Extraction is performed to ensure the comprehensiveness of image feature extraction and further improve the accuracy of image recognition.

上述说明仅是本发明实施例技术方案的概述,为了能够更清楚了解本发明实施例的技术手段,而可依照说明书的内容予以实施,并且为了让本发明实施例的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明实施例的具体实施方式。The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and The advantages can be more obvious and understandable, and the specific implementation manners of the embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明实施例的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating the preferred embodiments and are not considered as limiting the embodiments of the present invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:

图1示出了本发明实施例提供的图像处理方法流程图;FIG. 1 shows a flowchart of an image processing method provided by an embodiment of the present invention;

图2示出了本发明另一实施例提供的图像处理方法的流程中将待检测图像单元格示意图;FIG. 2 shows a schematic diagram of image cells to be detected in the flow of an image processing method provided by another embodiment of the present invention;

图3示出了本发明另一实施例提供的图像处理方法的流程中将待检测图像单元格示意图;Fig. 3 shows a schematic diagram of image cells to be detected in the flow of an image processing method provided by another embodiment of the present invention;

图4示出了本发明实施例提供的图像处理装置的结构示意图;FIG. 4 shows a schematic structural diagram of an image processing device provided by an embodiment of the present invention;

图5示出了本发明实施例提供的计算设备的结构示意图。Fig. 5 shows a schematic structural diagram of a computing device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本发明的示例性实施例。虽然附图中显示了本发明的示例性实施例,然而应当理解,可以以各种形式实现本发明而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本发明,并且能够将本发明的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

图1示出了本发明实施例提供的图像处理方法的流程图。如图1所示,该方法包括以下步骤:FIG. 1 shows a flowchart of an image processing method provided by an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:

步骤11,获取待检测图像的多个灰度区域;Step 11, obtaining multiple grayscale regions of the image to be detected;

步骤12,根据所述多个灰度区域中的每一个灰度区域中的像素点,获取所述像素点对应的空间点的三维坐标;Step 12, according to the pixel points in each gray-scale area of the plurality of gray-scale areas, obtain the three-dimensional coordinates of the spatial points corresponding to the pixel points;

步骤13,根据所述空间点的三维坐标,获取所述待检测图像的空间梯度直方图;Step 13, obtaining the spatial gradient histogram of the image to be detected according to the three-dimensional coordinates of the spatial point;

步骤14,根据所述空间梯度直方图,识别所述待检测图像中的目标对象。Step 14: Identify the target object in the image to be detected according to the spatial gradient histogram.

该实施例中,获取待检测图像的灰度区域,避免在进行图像特征提取时存在颜色干扰,将每一个灰度区域中的像素点投影在空间坐标系中,并计算空间点的三维坐标,在三维空间中对图像进行处理,保证了图像几何和光学形变的不变性,并且对遮挡的物体具有一定的预估和计算;根据三维坐标,计算得到所述待检测图像的空间梯度直方图,用所述空间梯度直方图进行待检测图像的特征提取,保证特征提取的全面性,提高了目标对象的识别率以及精确度。In this embodiment, the grayscale area of the image to be detected is obtained to avoid color interference during image feature extraction, and the pixels in each grayscale area are projected into the spatial coordinate system, and the three-dimensional coordinates of the spatial points are calculated, Processing the image in three-dimensional space ensures the invariance of image geometry and optical deformation, and has certain estimation and calculation for occluded objects; according to the three-dimensional coordinates, the spatial gradient histogram of the image to be detected is calculated, The feature extraction of the image to be detected is performed by using the space gradient histogram, which ensures the comprehensiveness of the feature extraction and improves the recognition rate and accuracy of the target object.

本发明的一可选实施例中,步骤11可以包括:In an optional embodiment of the present invention, step 11 may include:

步骤111,获取待检测图像;Step 111, acquiring the image to be detected;

步骤112,对所述待检测图像进行灰度处理,得到待检测图像的灰度图像;Step 112, performing grayscale processing on the image to be detected to obtain a grayscale image of the image to be detected;

步骤113,对所述灰度图像进行分割处理,得到多个灰度区域。Step 113 , performing segmentation processing on the grayscale image to obtain multiple grayscale regions.

该实施例中,对待检测图像进行灰度化处理,避免在特征提取时颜色干扰,对灰度化处理后的灰度图像进行归一化处理,以调整待检测图像的对比度,降低待检测图像中人体、背景和光照等信息造成的影响;In this embodiment, grayscale processing is performed on the image to be detected to avoid color interference during feature extraction, and normalization processing is performed on the grayscale image after grayscale processing to adjust the contrast of the image to be detected and reduce the Influenced by information such as human body, background and light;

优选的,采用Gamma压缩公式进行处理,即I(x,y,z)=I(x,y,z)gamma,其中I为待检测图像;对灰度化且归一化处理后的待检测图像进行切割处理,在进行特征提取时,对每一个切片进行提取,保证特征提取的全面性、准确性。Preferably, the Gamma compression formula is used for processing, i.e. I(x, y, z)=I(x, y, z) gamma , wherein I is an image to be detected; The image is cut and processed, and each slice is extracted during feature extraction to ensure the comprehensiveness and accuracy of feature extraction.

本发明的一可选实施例中,步骤113可以包括:In an optional embodiment of the present invention, step 113 may include:

步骤1131,根据第一灰度阈值,对所述灰度图像进行分割处理,得到多个灰度区域;所述第一灰度阈值的取值范围为[0,255]。Step 1131 , segment the grayscale image according to the first grayscale threshold to obtain multiple grayscale regions; the value range of the first grayscale threshold is [0, 255].

该实施例中,在第一灰度阈值范围内对所述灰度图像进行分割处理,优选的,采用信息熵进行分割,当系统越混乱,不确定性越大时,信息熵越大;当系统越有序,确定性越高时,信息熵越小;In this embodiment, the grayscale image is segmented within the first grayscale threshold range. Preferably, information entropy is used for segmentation. When the system is more chaotic and the uncertainty is greater, the information entropy is greater; when The more ordered the system, the higher the certainty, the smaller the information entropy;

这里,可以根据公式:H=-∑p(x)logp(x),其中P(x)表示灰度x出现的频率,H表示信息熵。Here, according to the formula: H=-Σp(x)logp(x), wherein P(x) represents the frequency of occurrence of the gray level x, and H represents information entropy.

本发明的一可选实施例中,步骤1131可以包括:In an optional embodiment of the present invention, step 1131 may include:

步骤S1,将所述灰度图像的灰度值低于第一灰度阈值的灰度区域作为背景区域,高于所述第一灰度阈值的灰度区域作为目标对象区域;Step S1, using the grayscale area of the grayscale image whose grayscale value is lower than the first grayscale threshold as the background area, and the grayscale area higher than the first grayscale threshold as the target object area;

步骤S2,计算每个灰度在所述背景区域和所述目标对象区域中的比例;Step S2, calculating the ratio of each gray level in the background area and the target object area;

步骤S3,根据所述比例,计算每个灰度在所述背景区域和所述目标对象区域中的信息熵;Step S3, calculating the information entropy of each gray level in the background area and the target object area according to the ratio;

步骤S4,根据所述每个灰度在所述背景区域和所述目标对象区域中的信息熵的和,与预设最大信息熵,得到多个灰度区域。Step S4, according to the sum of the information entropy of each gray level in the background area and the target object area, and a preset maximum information entropy, multiple gray area areas are obtained.

该实施例中,可以根据公式:

Figure BDA0003361818400000051
计算每个灰度在所述背景区域比例,其中PB表示每个灰度在所述背景区域中的比例;In this embodiment, according to the formula:
Figure BDA0003361818400000051
Calculate the proportion of each grayscale in the background area, where P B represents the proportion of each grayscale in the background area;

根据公式:

Figure BDA0003361818400000052
计算每个灰度在所述目标对象区域中的比例,其中,PO表示每个灰度在所述目标对象区域中的比例,i表示一灰度,取值为正整数,PT表示灰度值在灰度图像中出现的频率总和;According to the formula:
Figure BDA0003361818400000052
Calculate the ratio of each gray level in the target object area, wherein P O represents the ratio of each gray level in the target object area, i represents a gray level, and the value is a positive integer, and P T represents gray The sum of the frequencies of the grayscale values appearing in the grayscale image;

Figure BDA0003361818400000053
根据PB、PO的值以及信息熵计算公式,分别计算灰度i在所述背景区域和所述目标对象区域中的信息熵,即/>
Figure BDA0003361818400000054
Figure BDA0003361818400000055
并将两者信息熵相加,将得到的信息熵总和与最大信息熵对比;
Figure BDA0003361818400000053
According to the values of P B , P O and the information entropy calculation formula, respectively calculate the information entropy of the gray level i in the background area and the target object area, i.e.
Figure BDA0003361818400000054
Figure BDA0003361818400000055
Add the two information entropies together, and compare the obtained information entropy sum with the maximum information entropy;

如果信息熵总和大于最大信息熵,则将最大信息熵赋给最大信息熵,将i设为二值化的阈值,如果信息熵总和小于最大信息熵,则最大信息熵不变;可选的,这里的最大信息熵的初始值设置为-1。If the sum of information entropy is greater than the maximum information entropy, assign the maximum information entropy to the maximum information entropy, set i as the threshold of binarization, if the information entropy sum is less than the maximum information entropy, then the maximum information entropy remains unchanged; optional, The initial value of the maximum information entropy here is set to -1.

本发明的一可选实施例中,步骤12可以包括:In an optional embodiment of the present invention, step 12 may include:

步骤121,获得所述多个灰度区域中每一个灰度区域中,像素点对应的空间点在所述灰度区域中的投影坐标;Step 121, obtaining the projection coordinates of the spatial point corresponding to the pixel point in the gray-scale area in each gray-scale area of the plurality of gray-scale areas;

步骤122,根据所述空间点在所述灰度区域中不同方向上的投影点的齐次坐标以及所述空间点在世界坐标系中的齐次坐标,得到所述像素点对应的空间点的三维坐标。Step 122, according to the homogeneous coordinates of the projection points of the spatial points in different directions in the gray-scale region and the homogeneous coordinates of the spatial points in the world coordinate system, obtain the coordinates of the spatial points corresponding to the pixel points 3D coordinates.

该实施例中,根据像素点在投影坐标系下的坐标计算像素点空间坐标,对于不规则的、遮挡程度较高的物体,从空间坐标系中可以更精确计算出各个像素点的特征,从而提高目标对象识别的精度。In this embodiment, the spatial coordinates of the pixel points are calculated according to the coordinates of the pixel points in the projected coordinate system. For irregular objects with a high degree of occlusion, the characteristics of each pixel point can be calculated more accurately from the spatial coordinate system, so that Improve the accuracy of target object recognition.

以下将结合具体示例,对上述实施例进行说明:The above embodiments will be described below in conjunction with specific examples:

对于空间中任意一点Q在图像上的成像位置q,q是光心O与Q点连线OQ与图像平面的交点,则有如下关系:For the imaging position q of any point Q in the image on the image, q is the intersection point of the line OQ connecting the optical center O and point Q and the image plane, then the relationship is as follows:

Figure BDA0003361818400000061
Figure BDA0003361818400000061

Figure BDA0003361818400000062
Figure BDA0003361818400000062

其中,(x,y)为q点的图像坐标,(Xc,Yc,Zc)是空间点Q在投影坐标系下的坐标,f为连线OQ的长度,通过齐次坐标和矩阵可以将上述关系表示为:Among them, (x, y) is the image coordinates of point q, (X c , Y c , Z c ) is the coordinates of spatial point Q in the projected coordinate system, f is the length of the connection line OQ, through homogeneous coordinates and matrix The above relationship can be expressed as:

Figure BDA0003361818400000063
Figure BDA0003361818400000063

将公式(12.1)、公式(12.2)代入上公式(12.3)可得Q点的坐标和q点坐标(u,v)的关系:Substituting formula (12.1) and formula (12.2) into the above formula (12.3), the relationship between the coordinates of point Q and the coordinates (u, v) of point q can be obtained:

Figure BDA0003361818400000064
Figure BDA0003361818400000064

其中,

Figure BDA0003361818400000065
M是3行4列的投影矩阵,R是旋转矩阵,t是平移矩阵;in,
Figure BDA0003361818400000065
M is a projection matrix with 3 rows and 4 columns, R is a rotation matrix, and t is a translation matrix;

假设相机对Q点从左右两个方向进行拍摄,他们的投影点分别是q1和q2,该相机位置固定,他们的投影矩阵分别为M1和M2,于是有:Assuming that the camera shoots point Q from left and right directions, their projection points are q 1 and q 2 respectively, the position of the camera is fixed, and their projection matrices are M 1 and M 2 respectively, so there are:

Figure BDA0003361818400000066
Figure BDA0003361818400000066

Figure BDA0003361818400000071
Figure BDA0003361818400000071

其中,(u1,v1,1)和(u2,v2,1)分别表示q1和q2在各自图像中的齐次坐标,(X,Y,Z,1)表示Q在世界坐标系中的齐次坐标,

Figure BDA0003361818400000072
表示为Mk的第i行第j列元素,Zc1、Zc2表示非零比例项。消去比例项,可以得到关于X,Y,Z的线性方程如下:Among them, (u 1 ,v 1 ,1) and (u 2 ,v 2 ,1) represent the homogeneous coordinates of q 1 and q 2 in their respective images, and (X,Y,Z,1) represent Q in the world Homogeneous coordinates in the coordinate system,
Figure BDA0003361818400000072
Expressed as the i-th row and j-th column element of M k , Z c1 and Z c2 represent non-zero proportional items. By eliminating the proportional term, the linear equations about X, Y, and Z can be obtained as follows:

Figure BDA0003361818400000073
Figure BDA0003361818400000073

Figure BDA0003361818400000074
Figure BDA0003361818400000074

Figure BDA0003361818400000075
Figure BDA0003361818400000075

Figure BDA0003361818400000076
Figure BDA0003361818400000076

在上述四个方程中,通过最小二乘法可以求出X,Y,Z的值,(X,Y,Z)即为Q点的空间坐标。In the above four equations, the values of X, Y, and Z can be obtained by the method of least squares, and (X, Y, Z) is the spatial coordinate of point Q.

本发明的一可选实施例中,步骤13可以包括:In an optional embodiment of the present invention, step 13 may include:

步骤131,计算所述灰度区域中像素点对应的空间点的三维坐标与相邻像素点对应的空间点的三维坐标的变化量;Step 131, calculating the amount of change between the three-dimensional coordinates of the spatial point corresponding to the pixel point in the grayscale area and the three-dimensional coordinates of the spatial point corresponding to the adjacent pixel point;

步骤132,根据所述三维坐标的变化量,得到所述像素点的图像梯度;Step 132, obtain the image gradient of the pixel point according to the variation of the three-dimensional coordinates;

步骤133,根据所述像素点的图像梯度,得到所述待检测图像的空间梯度直方图。Step 133, according to the image gradient of the pixel, obtain the spatial gradient histogram of the image to be detected.

该实施例中,图像梯度是指图像某点像素和相邻像素相比较,在x,y,z三个方向上的变化率,是一个三维向量,由3个分量组成,X轴的变化、Y轴的变化和Z轴的变化;其中X轴的变化是指当前像素右侧(X加1)的像素值减去当前像素左侧(X减1)的像素值,Y轴的变化是指当前像素前面(Y加1)的像素值减去当前像素后面(Y减1)的像素值,Z轴的变化是指当前像素下方(Z加1)的像素值减去当前像素上方(Z减1)的像素值。计算出这3个分量,形成一个三维向量,从而得到该像素的图像梯度。图像梯度可以包括梯度方向以及梯度的大小,通过计算图像的像素三维空间梯度,能够捕获图像的轮廓信息,进一步弱化光照的干扰。进一步的,取反正切arctan,可得到梯度角度。采用三维空间梯度计算方式识别图像特征,对于不规则的、遮挡程度较高的物体,从空间坐标系中可以更精确计算出各个像素点的特征,从而提高识别的精度。In this embodiment, the image gradient refers to the rate of change in the three directions of x, y, and z compared with adjacent pixels at a certain point of the image. It is a three-dimensional vector consisting of 3 components. The change of the X axis, The change of the Y axis and the change of the Z axis; the change of the X axis refers to the pixel value on the right side of the current pixel (X plus 1) minus the pixel value on the left side of the current pixel (X minus 1), and the change of the Y axis refers to The pixel value in front of the current pixel (Y plus 1) minus the pixel value behind the current pixel (Y minus 1), the change of the Z axis refers to the pixel value below the current pixel (Z plus 1) minus the pixel value above the current pixel (Z minus 1) Pixel value. These three components are calculated to form a three-dimensional vector, thereby obtaining the image gradient of the pixel. The image gradient can include the gradient direction and the magnitude of the gradient. By calculating the pixel three-dimensional space gradient of the image, the contour information of the image can be captured, and the interference of illumination can be further weakened. Further, take the arc tangent arctan to get the gradient angle. The three-dimensional spatial gradient calculation method is used to identify image features. For irregular and highly occluded objects, the features of each pixel can be calculated more accurately from the spatial coordinate system, thereby improving the accuracy of recognition.

具体的,图像中像素点(x,y,z)的梯度表示:Specifically, the gradient representation of the pixel point (x, y, z) in the image:

Gx(x,y,z)=H(x+1,y,z)-H(x-1,y,z) 公式(13.1)Gx(x,y,z)=H(x+1,y,z)-H(x-1,y,z) formula (13.1)

Gy(x,y,z)=H(x,y+1,z)-H(x,y-1,z) 公式(13.2)Gy(x,y,z)=H(x,y+1,z)-H(x,y-1,z) formula (13.2)

Gz(x,y,z)=H(x,y,z+1)-H(x,y,z-1) 公式(13.3)Gz(x,y,z)=H(x,y,z+1)-H(x,y,z-1) formula (13.3)

其中,Gx(x,y,z)表示输入图像中像素点(x,y,z)在x轴方向梯度,Gy(x,y,z)表示在y轴方向梯度,Gz(x,y,z)表示在z轴方向梯度。Among them, Gx(x,y,z) represents the gradient of the pixel point (x,y,z) in the input image in the x-axis direction, Gy(x,y,z) represents the gradient in the y-axis direction, Gz(x,y, z) represents the gradient in the z-axis direction.

在像素点(x,y,z)处的梯度大小是:The magnitude of the gradient at the pixel point (x, y, z) is:

Figure BDA0003361818400000081
Figure BDA0003361818400000081

梯度方向是:The gradient direction is:

Figure BDA0003361818400000082
Figure BDA0003361818400000082

本发明的一可选实施例中,步骤14可以包括:In an optional embodiment of the present invention, step 14 may include:

步骤141,对所述待检测图像划分成多个单元格;Step 141, dividing the image to be detected into a plurality of cells;

步骤142,在所述多个单元格在空间上互相连通的区间进行方向梯度直方图特征收集,获得所述待检测图像的方向梯度直方图特征集合;Step 142, collect the directional gradient histogram features in the spatially connected intervals of the plurality of cells, and obtain the directional gradient histogram feature set of the image to be detected;

步骤143,根据所述待检测图像的方向梯度直方图特征集合中的方向梯度直方图特征向量,得到至少一个目标对象。Step 143: Obtain at least one target object according to the directional gradient histogram feature vector in the directional gradient histogram feature set of the image to be detected.

该实施例中,将图像划分成多个“单元格”,便于给图像的不同区域设定不同的编码,降低算法对图像中人体的形态和外观的敏感性。所述多个单元格中的每个单元格包含多个像素,使用方向单元的直方图来统计一个单元格的特征信息。In this embodiment, the image is divided into multiple "cells", which facilitates setting different codes for different regions of the image, and reduces the sensitivity of the algorithm to the shape and appearance of the human body in the image. Each of the plurality of cells includes a plurality of pixels, and the characteristic information of a cell is counted using a histogram of direction cells.

如图2和图3所示,将图像划分成无数个“单元格cell”,每个cell包含6×6个像素,使用9个bin(方向)的直方图来统计一个cell的特征信息,不考虑正负方向把单元格的梯度空间方向360度划分成9份,每20度对应一个方向单元,所有梯度方向被分成一个包含9个维度的特征向量,也即是得到该单元格对应的梯度方向直方图。As shown in Figure 2 and Figure 3, the image is divided into countless "cells", each cell contains 6 × 6 pixels, and the histogram of 9 bins (directions) is used to count the feature information of a cell. Considering the positive and negative directions, divide the 360-degree gradient space direction of the cell into 9 parts, and every 20 degrees corresponds to a direction unit. All gradient directions are divided into a feature vector containing 9 dimensions, that is, the gradient corresponding to the cell is obtained. Orientation histogram.

进一步地,通过对所述空间梯度直方图进行归一化处理,进而减轻图像中光照等因素的影响;将多个单元格组合成在空间上互相连通的区间,避免因图像背景亮度和对比度的影响导致的多个单元格之间差异大问题;并在所述区间上进行HOG特征收集,一个区间的HOG特征是该区间内所有单元格特征向量串联起来的组合。Further, by normalizing the spatial gradient histogram, the influence of factors such as illumination in the image can be reduced; multiple cells are combined into intervals that are connected to each other in space, and the background brightness and contrast of the image are avoided. The problem of large differences between multiple cells caused by the impact; and HOG feature collection is performed on the interval, and the HOG feature of an interval is the combination of all cell feature vectors in the interval.

优选的,通过L2-norm归一化函数

Figure BDA0003361818400000091
进行归一化处理,通过归一化处理;Preferably, through the L2-norm normalization function
Figure BDA0003361818400000091
Perform normalization processing, through normalization processing;

通过以上过程可以得到一个由

Figure BDA0003361818400000092
个数据组成的高维度向量,其中β表示每个单元格中方向(bin)单元的数目,/>
Figure BDA0003361818400000093
表示区间的个数,η表示一个区间中单元格的数目。Through the above process, a
Figure BDA0003361818400000092
A high-dimensional vector composed of data, where β represents the number of direction (bin) cells in each cell, />
Figure BDA0003361818400000093
Indicates the number of intervals, and η indicates the number of cells in an interval.

最终把检测窗口中所有重叠的区间进行方向梯度直方图HOG特征收集,获得所述待检测图像的方向梯度直方图特征集合;Finally, collect the histogram of orientation gradient HOG features in all overlapping intervals in the detection window, and obtain the histogram of orientation gradient feature set of the image to be detected;

将所述待检测图像的方向梯度直方图特征集合中的方向梯度直方图特征向量进行分类识别,得到至少一个目标对象,例如,将满足一预设条件的方向梯度直方图特征向量归为一类,根据该类别的方向梯度直方图特征向量确定一目标对象。Classifying and identifying the directional gradient histogram feature vectors in the directional gradient histogram feature set of the image to be detected to obtain at least one target object, for example, classifying the directional gradient histogram feature vectors that meet a preset condition into one category , determine a target object according to the eigenvector of the histogram of oriented gradients of this category.

本发明的上述实施例,以三维向量空间对图像进行梯度计算,在保持图像几何和光学形变不变性的情况下,对待检测图像中的目标物体进行特征提取,具有良好的特性,能够更全面提取图像特征,从而提高图像识别的精确度。In the above-mentioned embodiment of the present invention, the gradient calculation is performed on the image in a three-dimensional vector space, and the feature extraction of the target object in the image to be detected is performed while maintaining the invariance of the image geometry and optical deformation, which has good characteristics and can be more comprehensively extracted Image features, thereby improving the accuracy of image recognition.

图4示出了本发明实施例提供的图像处理装置40的结构示意图。如图4所示,该装置40包括:FIG. 4 shows a schematic structural diagram of an image processing device 40 provided by an embodiment of the present invention. As shown in Figure 4, the device 40 includes:

获取模块41,用于获取待检测图像的多个灰度区域;An acquisition module 41, configured to acquire a plurality of grayscale regions of the image to be detected;

处理模块42,用于根据所述多个灰度区域中的每一个灰度区域中的像素点,获取所述像素点对应的空间点的三维坐标;根据所述空间点的三维坐标,获取所述待检测图像的空间梯度直方图;根据所述空间梯度直方图,识别所述待检测图像中的目标对象。The processing module 42 is configured to obtain the three-dimensional coordinates of the spatial points corresponding to the pixel points according to the pixel points in each of the gray-scale regions; and obtain the three-dimensional coordinates of the spatial points according to the three-dimensional coordinates of the spatial points. The spatial gradient histogram of the image to be detected; according to the spatial gradient histogram, identify the target object in the image to be detected.

可选的,所述获取模块41具体用于:获取待检测图像,对所述待检测图像进行灰度处理,得到待检测图像的灰度图像;对所述灰度图像进行分割处理,得到多个灰度区域。Optionally, the acquiring module 41 is specifically configured to: acquire an image to be detected, perform grayscale processing on the image to be detected to obtain a grayscale image of the image to be detected; perform segmentation processing on the grayscale image to obtain multiple grayscale area.

可选的,对所述灰度图像进行分割处理,得到多个灰度区域,包括:Optionally, the grayscale image is segmented to obtain multiple grayscale regions, including:

根据第一灰度阈值,对所述灰度图像进行分割处理,得到多个灰度区域;所述第一灰度阈值的取值范围为[0,255]。The grayscale image is segmented according to the first grayscale threshold to obtain multiple grayscale regions; the value range of the first grayscale threshold is [0, 255].

可选的,根据第一灰度阈值,对所述灰度图像进行分割处理,得到多个灰度区域,包括:Optionally, according to the first grayscale threshold, the grayscale image is segmented to obtain multiple grayscale regions, including:

将所述灰度图像的灰度值低于第一灰度阈值的灰度区域作为背景区域,高于所述第一灰度阈值的灰度区域作为目标对象区域;Using the grayscale region of the grayscale image whose grayscale value is lower than the first grayscale threshold as the background region, and the grayscale region higher than the first grayscale threshold as the target object region;

计算每个灰度在所述背景区域和所述目标对象区域中的比例;calculating the proportion of each gray level in the background area and the target object area;

根据所述比例,计算每个灰度在所述背景区域和所述目标对象区域中的信息熵;Calculate the information entropy of each gray level in the background area and the target object area according to the ratio;

根据所述每个灰度在所述背景区域和所述目标对象区域中的信息熵的和,与预设最大信息熵,得到多个灰度区域。According to the sum of the information entropy of each gray level in the background area and the target object area and a preset maximum information entropy, multiple gray area areas are obtained.

可选的,所述处理模块42具体用于:获得所述多个灰度区域中每一个灰度区域中,像素点对应的空间点在所述灰度区域中的投影坐标;Optionally, the processing module 42 is specifically configured to: obtain the projected coordinates of a spatial point corresponding to a pixel in each gray-scale area in the plurality of gray-scale areas;

根据所述空间点在所述灰度区域中不同方向上的投影点的齐次坐标以及所述空间点在世界坐标系中的齐次坐标,得到所述像素点对应的空间点的三维坐标。According to the homogeneous coordinates of the projection points of the spatial points in different directions in the gray scale area and the homogeneous coordinates of the spatial points in the world coordinate system, the three-dimensional coordinates of the spatial points corresponding to the pixel points are obtained.

可选的,所述处理模块42具体用于:计算所述灰度区域中像素点对应的空间点的三维坐标与相邻像素点分别对应的空间点的三维坐标的变化量;Optionally, the processing module 42 is specifically configured to: calculate the amount of change between the three-dimensional coordinates of the spatial point corresponding to the pixel point in the grayscale area and the three-dimensional coordinates of the spatial point corresponding to the adjacent pixel points;

根据所述三维坐标的变化量,得到所述像素点的图像梯度;Obtaining the image gradient of the pixel point according to the variation of the three-dimensional coordinates;

根据所述像素点的图像梯度,得到所述待检测图像的空间梯度直方图。According to the image gradient of the pixel point, the spatial gradient histogram of the image to be detected is obtained.

可选的,所述处理模块42具体用于:对所述待检测图像划分成多个单元格;在所述多个单元格在空间上互相连通的区间进行方向梯度直方图特征收集,获得所述待检测图像的方向梯度直方图特征集合;根据所述待检测图像的方向梯度直方图特征集合中的方向梯度直方图特征向量,得到至少一个目标对象。Optionally, the processing module 42 is specifically configured to: divide the image to be detected into a plurality of cells; perform direction gradient histogram feature collection in intervals where the plurality of cells are connected to each other in space, and obtain the The directional gradient histogram feature set of the image to be detected; according to the directional gradient histogram feature vector in the directional gradient histogram feature set of the image to be detected, at least one target object is obtained.

需要说明的是,所述装置40是与上述方法对应的装置,上述方法实施例中的所有实现方式均适用于该装置的实施例中,也能达到相同的技术效果。It should be noted that the device 40 is a device corresponding to the above-mentioned method, and all the implementation modes in the above-mentioned method embodiments are applicable to the embodiments of the device, and can also achieve the same technical effect.

本发明实施例提供了一种计算机存储介质,所述计算机存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任一方法实施例中的图像处理方法。An embodiment of the present invention provides a computer storage medium, where at least one executable instruction is stored in the computer storage medium, and the computer executable instruction can execute the image processing method in any one of the above method embodiments.

图5示出了本发明实施例提供的计算设备的结构示意图,本发明具体实施例并不对计算设备的具体实现做限定。FIG. 5 shows a schematic structural diagram of a computing device provided by an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the computing device.

如图5所示,该计算设备可以包括:处理器(processor)、通信接口(Communications Interface)、存储器(memory)、以及通信总线。As shown in FIG. 5 , the computing device may include: a processor (processor), a communication interface (Communications Interface), a memory (memory), and a communication bus.

其中:处理器、通信接口、以及存储器通过通信总线完成相互间的通信。通信接口,用于与其它设备比如客户端或其它服务器等的网元通信。处理器,用于执行程序,具体可以执行上述用于计算设备的图像处理方法实施例中的相关步骤。Wherein: the processor, the communication interface, and the memory complete the mutual communication through the communication bus. The communication interface is used to communicate with network elements of other devices such as clients or other servers. The processor is configured to execute a program, and specifically, may execute relevant steps in the above embodiments of the image processing method for a computing device.

具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。Specifically, the program may include program code including computer operation instructions.

处理器可能是中央处理器CPU,或者是特定集成电路ASIC(Application SpecificIntegrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。计算设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor may be a central processing unit CPU, or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computing device may be of the same type, such as one or more CPUs, or may be different types of processors, such as one or more CPUs and one or more ASICs.

存储器,用于存放程序。存储器可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。Memory for storing programs. The memory may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

程序具体可以用于使得处理器执行上述任意方法实施例中的图像处理方法。程序中各步骤的具体实现可以参见上述图像处理方法实施例中的相应步骤和单元中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。The program may specifically be used to cause the processor to execute the image processing method in any of the above method embodiments. For the specific implementation of each step in the program, refer to the corresponding descriptions in the corresponding steps and units in the above image processing method embodiment, and details are not repeated here. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the foregoing method embodiments, and details are not repeated here.

在此提供的算法或显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明实施例也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明实施例的内容,并且上面对特定语言所做的描述是为了披露本发明实施例的最佳实施方式。The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, embodiments of the present invention are not directed to any particular programming language. It should be understood that various programming languages can be used to implement the contents of the embodiments of the present invention described herein, and the above description of specific languages is for disclosing the best implementation mode of the embodiments of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本发明实施例并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明实施例的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明实施例要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be understood that in the above description of the exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together in order to simplify the embodiments of the present invention and facilitate understanding of one or more of the various inventive aspects. in a single embodiment, figure, or description thereof. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will appreciate that although some embodiments herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. And form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的一些或者全部部件的一些或者全部功能。本发明实施例还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明实施例的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components according to the embodiments of the present invention. Embodiments of the present invention can also be implemented as a device or apparatus program (eg, computer program and computer program product) for performing a part or all of the methods described herein. Such a program implementing an embodiment of the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明实施例进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明实施例可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。上述实施例中的步骤,除有特殊说明外,不应理解为对执行顺序的限定。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the execution order.

Claims (10)

1. An image processing method, the method comprising:
acquiring a plurality of gray areas of an image to be detected;
according to the pixel points in each gray scale area in the plurality of gray scale areas, three-dimensional coordinates of space points corresponding to the pixel points are obtained;
acquiring a spatial gradient histogram of the image to be detected according to the three-dimensional coordinates of the spatial points;
and identifying the target object in the image to be detected according to the spatial gradient histogram.
2. The image processing method according to claim 1, wherein acquiring a plurality of gradation areas of the image to be detected includes:
acquiring an image to be detected;
carrying out gray scale processing on the image to be detected to obtain a gray scale image of the image to be detected;
and carrying out segmentation processing on the gray level image to obtain a plurality of gray level areas.
3. The image processing method according to claim 2, wherein the dividing the gradation image to obtain a plurality of gradation regions includes:
dividing the gray level image according to a first gray level threshold value to obtain a plurality of gray level areas; the value range of the first gray threshold is [0, 255].
4. The image processing method according to claim 3, wherein the dividing the gray image according to the first gray threshold value to obtain a plurality of gray areas comprises:
taking a gray level region of the gray level image, the gray level value of which is lower than a first gray level threshold value, as a background region, and taking a gray level region of which is higher than the first gray level threshold value as a target region;
calculating the proportion of each gray value in the background area and the target object area;
calculating information entropy of each gray value in the background area and the target object area according to the proportion;
and obtaining a plurality of gray areas according to the sum of the information entropy of each gray value in the background area and the target object area and the preset maximum information entropy.
5. The image processing method according to claim 1, wherein acquiring three-dimensional coordinates of a spatial point corresponding to a pixel point in each of the plurality of gradation areas from the pixel point, comprises:
obtaining projection coordinates of space points corresponding to pixel points in each gray scale region in the plurality of gray scale regions;
and obtaining the three-dimensional coordinates of the space point corresponding to the pixel point according to the homogeneous coordinates of the projection points of the space point in different directions in the gray scale area and the homogeneous coordinates of the space point in a world coordinate system.
6. The image processing method according to claim 1, wherein acquiring the spatial gradient histogram of the image to be detected based on the three-dimensional coordinates of the spatial points includes:
calculating the change quantity of the three-dimensional coordinates of the space points corresponding to the pixel points in the gray scale area and the three-dimensional coordinates of the space points corresponding to the adjacent pixel points respectively;
obtaining the image gradient of the pixel point according to the variation of the three-dimensional coordinates;
and obtaining a spatial gradient histogram of the image to be detected according to the image gradient of the pixel point.
7. The image processing method according to claim 1, wherein identifying the target object in the image to be detected based on the spatial gradient histogram, comprises:
dividing the image to be detected into a plurality of cells;
performing directional gradient histogram feature collection in the interval where the cells are spatially communicated to obtain a directional gradient histogram feature set of the image to be detected;
and obtaining at least one target object according to the directional gradient histogram feature vector in the directional gradient histogram feature set of the image to be detected.
8. An image processing apparatus, characterized in that the apparatus comprises:
the method comprises the steps of obtaining a module speed, wherein the module speed is used for obtaining a plurality of gray areas of an image to be detected;
the processing module is used for acquiring the three-dimensional coordinates of the space point corresponding to the pixel point according to the pixel point in each gray scale area in the plurality of gray scale areas; acquiring a spatial gradient histogram of the image to be detected according to the three-dimensional coordinates of the spatial points; and identifying the target object in the image to be detected according to the spatial gradient histogram.
9. A computing device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform the operations corresponding to the image processing method according to any one of claims 1 to 7.
10. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the image processing method of any one of claims 1-7.
CN202111369280.XA 2021-11-18 2021-11-18 Image processing method, device and equipment method Pending CN116137079A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111369280.XA CN116137079A (en) 2021-11-18 2021-11-18 Image processing method, device and equipment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111369280.XA CN116137079A (en) 2021-11-18 2021-11-18 Image processing method, device and equipment method

Publications (1)

Publication Number Publication Date
CN116137079A true CN116137079A (en) 2023-05-19

Family

ID=86326918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111369280.XA Pending CN116137079A (en) 2021-11-18 2021-11-18 Image processing method, device and equipment method

Country Status (1)

Country Link
CN (1) CN116137079A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116977430A (en) * 2023-08-08 2023-10-31 江阴极动智能科技有限公司 Obstacle avoidance method, obstacle avoidance device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116977430A (en) * 2023-08-08 2023-10-31 江阴极动智能科技有限公司 Obstacle avoidance method, obstacle avoidance device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111553946B (en) Method and device for removing ground point cloud and method and device for detecting obstacle
US20190050681A1 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
US10621446B2 (en) Handling perspective magnification in optical flow processing
US10713530B2 (en) Image processing apparatus, image processing method, and image processing program
CN114862929B (en) 3D target detection methods, devices, computer-readable storage media, and robots
CN110310301B (en) A method and device for detecting a target object
CN110443245B (en) A method, device and equipment for locating license plate area in unrestricted scene
CN113837202A (en) Feature point extraction method, image reconstruction method and device
CN112017221A (en) Multi-modal image registration method, device and equipment based on scale space
CN110673607A (en) Feature point extraction method and device in dynamic scene and terminal equipment
CN109766896A (en) A kind of method for measuring similarity, device, equipment and storage medium
CN110599407B (en) Human body noise reduction method and system based on multiple TOF cameras in downward inclination angle direction
CN116137079A (en) Image processing method, device and equipment method
CN116051736A (en) Three-dimensional reconstruction method, device, edge equipment and storage medium
CN116128919A (en) Multi-temporal image abnormal target detection method and system based on polar constraint
CN115035033A (en) Target detection method and related equipment
CN114299109A (en) Multi-target object trajectory generation method, system, electronic device and storage medium
CN114708230A (en) Vehicle frame quality detection method, device, equipment and medium based on image analysis
KR101733288B1 (en) Object Detecter Generation Method Using Direction Information, Object Detection Method and Apparatus using the same
CN113971671A (en) Instance partitioning method, instance partitioning device, electronic equipment and storage medium
CN112101134A (en) Object detection method and device, electronic device and storage medium
CN117576653A (en) Target tracking methods, devices, computer equipment and storage media
CN117253022A (en) An object recognition method, device and inspection equipment
CN115683109A (en) Visual dynamic barrier detection method based on CUDA and three-dimensional grid map
CN114663507A (en) Distance detection method and device, electronic equipment and computer storage medium

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