Data processing method, device, electronic device and machine-readable storage medium

By receiving the coordinates of the analysis objects and determining the edge points and curves of the main area, the problem of low efficiency of computing power under the same hardware specifications is solved, and more efficient picture analysis is achieved.

CN112164090BActive Publication Date: 2025-01-24HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010923387.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-04
Publication Date
2025-01-24
Estimated Expiration
2040-09-04

AI Technical Summary

Technical Problem

Under the same hardware specifications, it is difficult for the existing technology to efficiently utilize computing power, resulting in inefficient image analysis.

Method used

By receiving the coordinates of the object to analyze in the target area during the preset historical period, determine the edge points and edge curves of the main area, and then determine the main area, thereby reducing the pixels that the algorithm needs to analyze.

Benefits of technology

Under the same hardware specifications, the efficiency of image analysis is improved and the number of pixels that the algorithm needs to be processed is reduced, thereby utilizing computing power more efficiently.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112164090B_ABST
    Figure CN112164090B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, device, electronic device and machine-readable storage medium, the method comprising: receiving the coordinates of an object to be analyzed that appears in a target area within a preset historical time period; determining the edge coordinate points of a main area according to the coordinates of the object to be analyzed; determining the edge curve of the main area according to the edge coordinate points of the main area, and determining the main area according to the edge curve. The method can reduce the number of pixels that the algorithm needs to analyze, making more efficient use of computing power under the same hardware specifications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image analysis, and in particular to a data processing method, device, electronic device and machine-readable storage medium. Background Art

[0002] In various industry scenarios, the demand for image analysis accuracy is getting higher and higher. Since IoT data is characterized by short-term and large-scale data, and the current camera accuracy is getting higher and higher, and the number of pixels is increasing, the computing power requirements when the algorithm performs image analysis are also getting higher and higher.

[0003] How to make more efficient use of computing power under the same hardware specifications has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, the present application provides a data processing method, device, electronic device and machine-readable storage medium.

[0005] According to a first aspect of an embodiment of the present application, there is provided a data processing method, including:

[0006] receiving coordinates of an object to be analyzed that appeared in a target area within a preset historical time period;

[0007] Determine the edge coordinate points of the main area according to the coordinates of the object to be analyzed;

[0008] An edge curve of the main area is determined according to the edge coordinate points of the main area, and the main area is determined according to the edge curve.

[0009] According to a second aspect of an embodiment of the present application, there is provided a data processing device, including:

[0010] A receiving unit configured to receive coordinates of an object to be analyzed that appears in a target area within a preset historical time period;

[0011] A first determining unit is configured to determine edge coordinate points of a main area according to the coordinates of the object to be analyzed;

[0012] The second determining unit is configured to determine an edge curve of the main area according to edge coordinate points of the main area, and determine the main area according to the edge curve.

[0013] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0014] Memory, used to store computer programs;

[0015] The processor is used to implement the data processing method of the first aspect when executing the program stored in the memory.

[0016] According to a fourth aspect of an embodiment of the present application, a machine-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the data processing method of the first aspect is implemented.

[0017] According to a fifth aspect of an embodiment of the present application, a computer program is provided. The computer program is stored in a machine-readable storage medium, and when a processor executes the computer program, the processor is prompted to execute the data processing method of the first aspect.

[0018] The data processing method of the embodiment of the present application receives the coordinates of the object to be analyzed that appears in the target area within a preset historical time period, and determines the edge coordinate points of the main area based on the coordinates of the object to be analyzed, and then determines the edge curve of the main area based on the edge coordinate points of the main area, and determines the main area based on the edge curve. By determining the position of the main area of ​​the monitoring front end, the analysis of the main area can be replaced by the analysis of the entire monitoring screen, so as to reduce the number of pixels that the algorithm needs to analyze, so as to make more efficient use of computing power under the same hardware specifications. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of a data processing method shown in an exemplary embodiment of the present application;

[0020] Figure 2 is a schematic diagram of a process for determining edge coordinate points of a main area shown in an exemplary embodiment of the present application;

[0021] Figure 3 is a schematic diagram of a process of determining an edge curve of a main area shown in an exemplary embodiment of the present application;

[0022] Figure 4A is a schematic diagram of an application scenario shown in an exemplary embodiment of the present application;

[0023] Figure 4B is a schematic diagram of coordinate distribution corresponding to a vehicle to be analyzed, shown in an exemplary embodiment of the present application;

[0024] Figure 4C is a schematic diagram of a main area shown in an exemplary embodiment of the present application;

[0025] Figure 5 is a structural schematic diagram of a data processing device shown in an exemplary embodiment of the present application;

[0026] Figure 6It is a schematic diagram of the hardware structure of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0028] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0029] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.

[0030] See also Figure 1 , is a flow chart of a data processing method provided in an embodiment of the present application, such as Figure 1 As shown, the data processing method may include the following steps:

[0031] It should be noted that the serial numbers of the steps in the embodiments of the present application do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0032] In addition, in the embodiment of the present application, the main area determined according to steps S100 to S120 is the main area when analyzing the captured data of a single monitoring front end. When there are multiple monitoring front ends, the main area of ​​each monitoring front end can be determined in the manner described in steps S100 to S120.

[0033] Step S100: receiving the coordinates of the object to be analyzed that appears in the target area within a preset historical time period.

[0034] In the embodiment of the present application, for any monitoring front end, the target area may be a pre-configured area that the monitoring front end is responsible for monitoring.

[0035] For example, taking vehicle monitoring at a checkpoint as an example, for a scenario where one monitoring front end corresponds to one lane, the target area corresponding to the monitoring front end may be the single lane corresponding to the monitoring front end; for a scenario where one monitoring front end corresponds to multiple lanes, the target area corresponding to the monitoring front end may be the multiple lanes corresponding to the monitoring front end.

[0036] In the embodiment of the present application, the coordinates of the object to be analyzed that appears in the target area within a preset time period (the length of the historical time period can be set according to actual needs, such as 1 month or 1 week, etc.) can be received.

[0037] Exemplarily, the coordinates of the objects to be analyzed that appear in the target area within the preset historical time period may be determined based on the captured data of the target area within the preset historical time period.

[0038] Exemplarily, the object to be analyzed may include a vehicle or a pedestrian.

[0039] Exemplarily, the coordinates of the object to be analyzed in the target area may include coordinate information of an identification box of the object to be analyzed in the target area.

[0040] For example, it may be the coordinates of each vertex of the identification frame of the object to be analyzed, or the coordinates of any vertex or center point of the identification frame of the object to be analyzed and the width and height of the identification frame, or the coordinates of two diagonal vertices (such as the upper left corner and the lower right corner, or the upper right corner and the lower left corner) of the identification frame of the object to be analyzed, etc.

[0041] Step S110: Determine edge coordinate points of the main area according to the coordinates of the object to be analyzed.

[0042] Step S120 : determining an edge curve of the main area according to the edge coordinate points of the main area, and determining the main area according to the edge curve.

[0043] In the embodiment of the present application, it is considered that after the monitoring front end is installed, the position usually does not change, and the scene in its monitoring screen is relatively fixed. When analyzing the captured data of the monitoring front end, the objects to be analyzed that appear in the specified area of ​​the monitoring screen of the monitoring front end are usually analyzed, and it is not necessary to analyze all the objects to be analyzed that appear in the monitoring screen.

[0044] For example, taking the object to be analyzed as a vehicle, a camera is installed on a lane. Among the captured data captured by any camera, the object to be analyzed is generally the vehicle traveling on the lane corresponding to the camera; for example, the vehicle at the front of the vehicle is identified.

[0045] For another example, still taking the object to be analyzed as a vehicle, for a camera corresponding to a checkpoint of multiple lanes, in the captured data captured by any camera, the object to be analyzed that needs to be analyzed is generally the vehicles traveling on the multiple lanes corresponding to the camera.

[0046] Therefore, by determining the area that needs to be analyzed in the monitoring screen (referred to as the main area in this article) and analyzing the main area instead of analyzing the entire monitoring screen, the purpose of reducing the number of pixels that the algorithm needs to analyze can be achieved, making more efficient use of computing power under the same hardware specifications.

[0047] However, considering that the lane lines will be deformed to a certain extent in the monitoring screen (especially at the far end of the monitoring screen), and the vehicles driving in a lane may not necessarily drive strictly within the lane lines, the accuracy of the implementation method of determining the main area based on the lane lines will be relatively low.

[0048] In order to improve the accuracy of determining the main area, the edge coordinate points of the main area can be determined based on the coordinates of the objects to be analyzed that appear in the target area within a preset historical time period, so that the edge curve of the main area can be determined based on the determined edge coordinate points, and then the main area can be determined based on the edge curve of the main area.

[0049] It can be seen that in Figure 1 In the method flow shown, the coordinates of the object to be analyzed that appears in the target area within a preset historical time period are received, and the edge coordinate points of the main area are determined based on the coordinates of the object to be analyzed. Then, the edge curve of the main area can be determined based on the edge coordinate points of the main area, and the main area is determined based on the edge curve of the main area. By determining the position of the main area of ​​the monitoring front end, the analysis of the main area can be replaced by the analysis of the entire monitoring screen, so as to reduce the number of pixels that the algorithm needs to analyze, and make more efficient use of computing power under the same hardware specifications.

[0050] For example, the coordinates of the object to be analyzed are taken as the coordinate information of the identification box of the object to be analyzed in the captured image.

[0051] In step S110, determining the edge coordinate points of the main area according to the coordinates of the object to be analyzed may include:

[0052] For any object to be analyzed, the coordinate points corresponding to the vertices of the identification box of the object to be analyzed in the captured image are determined according to the coordinate information of the identification box of the object to be analyzed in the captured image.

[0053] The edge coordinate points of the main area are determined based on the coordinate points corresponding to the vertices of the identification box of each object to be analyzed in the captured image.

[0054] Exemplarily, for any object to be analyzed, the coordinates of the object to be analyzed in the captured image can be converted into coordinate points corresponding to the vertices of the identification box of the object to be analyzed in the captured image, that is, one object to be analyzed can correspond to four coordinate points.

[0055] The edge coordinate points of the main area can be determined based on the coordinate points corresponding to the vertices of the identification box of each object to be analyzed in the captured image.

[0056] In one example, if Figure 2 As shown, in step S110, the edge coordinate points of the main area are determined according to the coordinates of each analysis object, which can be achieved by the following steps:

[0057] Step S111, respectively determining the local anomaly factors of the coordinate points corresponding to each object to be analyzed;

[0058] Step S112: Determine the coordinate points whose local abnormal factors are within the preset threshold range as edge coordinate points of the main area.

[0059] Exemplarily, whether a coordinate point is an edge point may be determined based on a local anomaly factor of the coordinate point.

[0060] When the coordinate points corresponding to the vertices of the identification box of each object to be analyzed in the captured image are determined, the local abnormality factors of each coordinate point can be determined respectively.

[0061] For example, the reachable distances between the coordinate points can be determined respectively, and then the local reachable density of each coordinate point can be determined based on the reachable distances between the coordinate points. Then, the local anomaly factor of each coordinate point can be determined based on the local reachable density of each coordinate point. The specific implementation can be explained in conjunction with examples below.

[0062] When the local anomaly factor of each coordinate point is determined, the coordinate point whose local anomaly factor is within a preset threshold range can be determined as an edge coordinate point of the main area, and its specific implementation can be explained in conjunction with an example below.

[0063] As a possible embodiment, Figure 3 As shown, in step S120, the edge curve of the main area is determined according to the edge coordinate points of the main area, which can be achieved by the following steps:

[0064] Step S121 : grouping the edge coordinate points of the main area to obtain four groups of edge coordinate points; wherein the four groups of edge coordinate points correspond to the upper, lower, left and right boundaries of the main area respectively.

[0065] Step S122: For any group of edge coordinate points, fit the group of edge points to obtain a corresponding edge curve.

[0066] Exemplarily, when the edge coordinate points of the main area are determined, before performing boundary fitting of the main area, the edge coordinate points of the main area can be grouped to obtain four groups of edge points corresponding to the upper, lower, left and right boundaries of the main area respectively.

[0067] For example, the maximum and minimum values ​​of the horizontal and vertical coordinates of each edge coordinate point can be determined respectively, and the average value of the maximum and minimum values ​​of the horizontal coordinate (which can be called the first average value) and the average value of the maximum and minimum values ​​of the vertical coordinate (which can be called the second average value) can be determined respectively, and the edge coordinate points can be grouped based on the first average value and the second average value.

[0068] Among them, for edge coordinate points whose abscissas are less than the first average value (which may be referred to as first edge coordinate points), the first edge coordinate points may be sorted based on their ordinates (from large to small, or from small to large), when there are multiple consecutive first edge coordinate points that satisfy the following conditions:

[0069] Among the plurality of first edge coordinate points, the difference between the ordinates of two adjacent first edge coordinate points is less than a preset first threshold value (which may be an empirical value or an experimental value),

[0070] Then, the first edge coordinate point with the smallest horizontal coordinate is retained among the plurality of continuous first edge coordinate points, and the other first edge coordinate points are discarded.

[0071] After the first edge coordinate points are eliminated in the above manner, the retained first edge coordinate points are the edge coordinate points corresponding to the left boundary of the main area.

[0072] Similarly, for edge coordinate points whose abscissas are greater than the first average value (which may be referred to as second edge coordinate points), the second edge coordinate points may be sorted (from large to small, or from small to large) based on their ordinates. When there are multiple consecutive second edge coordinate points that satisfy the following conditions:

[0073] Among the plurality of second edge coordinate points, the difference between the ordinates of two adjacent second edge coordinate points is less than a preset second threshold value (which may be an empirical value or an experimental value),

[0074] Then, the second edge coordinate point with the largest horizontal coordinate is retained among the plurality of continuous second edge coordinate points, and the other second edge coordinate points are discarded.

[0075] After the second edge coordinate points are eliminated in the above manner, the remaining second edge coordinate points are the edge coordinate points corresponding to the right boundary of the main area.

[0076] For edge coordinate points whose ordinates are greater than the second average value (which may be referred to as third edge coordinate points), the third edge coordinate points may be sorted based on their abscissas (from large to small, or from small to large), when there are multiple consecutive third edge coordinate points that satisfy the following conditions:

[0077] Among the plurality of third edge coordinate points, the difference between the horizontal coordinates of two adjacent third edge coordinate points is less than a preset third threshold value (which may be an empirical value or an experimental value),

[0078] Then, the third edge coordinate point with the largest ordinate is retained among the plurality of consecutive third edge coordinate points, and the other third edge coordinate points are discarded.

[0079] After the third edge coordinate points are eliminated in the above manner, the third edge coordinate points that are retained are the edge coordinate points corresponding to the upper boundary of the main area.

[0080] For edge coordinate points whose ordinates are less than the second average value (which may be referred to as fourth edge coordinate points), the fourth edge coordinate points may be sorted based on their abscissas (from large to small, or from small to large), when there are multiple consecutive fourth edge coordinate points that meet the following conditions:

[0081] Among the plurality of fourth edge coordinate points, a difference between the horizontal coordinates of two adjacent fourth edge coordinate points is less than a preset fourth threshold value (which may be an empirical value or an experimental value),

[0082] Then, the fourth edge coordinate point with the smallest ordinate is retained among the plurality of consecutive fourth edge coordinate points, and the remaining fourth edge coordinate points are discarded.

[0083] After the fourth edge coordinate point is eliminated in the above manner, the retained fourth edge coordinate point is the edge coordinate point corresponding to the upper boundary of the main area.

[0084] For any set of edge coordinate points, the set of edge points is fitted to obtain the corresponding edge curve.

[0085] In one example, in step S122, fitting the group of edge points to obtain a corresponding edge curve includes:

[0086] Fitting the group of edge points to obtain a group of linear functions;

[0087] Convert the set of linear functions into a curve function;

[0088] The optimal curvature of the curve function is determined to obtain an edge curve corresponding to the group of edge points.

[0089] For example, considering that traditional regression models usually directly use the difference between the model output and the actual output to calculate the loss, the loss is zero when and only when the two are consistent. That is, when the traditional regression model is used for boundary fitting, the obtained boundary is strictly determined based on the training samples. However, in the Internet of Things scenario, the coordinates of the object to be analyzed obtained can usually only reflect part of the data features, that is, the training sample set cannot cover all samples in the actual scenario. At this time, if the traditional regression model is used for boundary fitting, the main area obtained will most likely be smaller than the actual main area, thereby affecting the analysis effect in the subsequent process.

[0090] Therefore, in order to improve the accuracy of the determined main area, a support vector machine regression model with greater tolerance to sample deviations can be used for boundary fitting.

[0091] Exemplarily, for any group of edge points, a support vector machine regression model may be used to perform boundary fitting on the group of edge points.

[0092] Since the linear function is the most basic and has strong plasticity, when performing boundary fitting, a linear function can be fitted first, such as y=wx+b.

[0093] However, since the boundary of the main area is usually not a straight line, there will inevitably be deviations when fitting the boundary of the main area as a linear function. Therefore, the deviation value eps can be set so that for any point (x, y), if |y-wx-b|≤eps, it is still considered to conform to the above linear function.

[0094] Considering that on the one hand, the function expressed by the real data is basically not linear, and on the other hand, the linear function we fit is mostly a function group (the graph on the plane can be understood as a broken line), therefore, in order to make the boundary of the main area closer to the real data, the linear function can be converted into a curve function by introducing a relaxation factor.

[0095] After the relaxation factor is introduced, different edge points will have a corresponding relaxation variable to characterize the sample. The specific relaxation factor can be determined by quadratic programming.

[0096] For example, the quadratic programming problem can be solved by dualizing the Lagrangian function, and the Lagrangian function can be solved by partial derivative to determine the optimal curvature of the above curve function and obtain the edge curve corresponding to the group of edge points. The specific implementation can be explained in conjunction with examples below.

[0097] In an embodiment of the present application, for any monitoring front end, after determining the main area in the monitoring screen of the monitoring front end, the entire monitoring screen can be analyzed by analyzing the main area of ​​the monitoring screen, thereby reducing the total number of pixels analyzed and improving the efficiency of image analysis while keeping the hardware conditions unchanged and the accuracy guaranteed.

[0098] In order to enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the technical solutions provided in the embodiments of the present application are described below with reference to specific examples.

[0099] In this embodiment, taking the vehicle analysis of the captured images of the bayonet camera as an example, it is assumed that one camera corresponds to multiple lanes in the same driving direction.

[0100] like Figure 4A As shown, the captured image of the capture machine includes the target area (the lane area corresponding to the capture machine), the remaining area, and the vehicle to be analyzed (the selected vehicle).

[0101] It can be seen that the main position where the vehicle to be analyzed appears in the captured image is fixed to the equipment at a single site.

[0102] In this embodiment, the captured data of the vehicle by the camera can include lane markings and vehicle body coordinate markings, the former is a digital type label, and the latter is a normalized coordinate (for example (x, y, w, h); wherein: x, y represent a point in a two-dimensional coordinate plane, w and h represent the width and height (the width and height of the identification box corresponding to the vehicle) extending from this point, and finally form a rectangle with x, y as the lower left vertex, width w, and length h.

[0103] Based on the captured data of the bayonet camera in the past month, the coordinate information of the vehicles that appeared in the target area in the past month is obtained, and the coordinates of each vehicle are converted into coordinate points in a two-dimensional coordinate plane.

[0104] Among them, the coordinates (x, y, w, h) are converted into four coordinate points (x, y), (x+w, y), (x, y+h), (x+w, y+h), and the schematic diagram can be as follows Figure 4B shown.

[0105] in accordance with Figure 4B The distribution of coordinate points shown in the figure can be used to find the local anomaly factor of each coordinate point. The calculation formula of the local anomaly factor is as follows:

[0106] Assume that the reachable distance from x` to x is as follows:

[0107] RD t (x (i) ,x (j))=max(D k (x (i) ),||x (i) -x (j) ||)

[0108] =max(||x (i) -x (k=k) ||,||x (i) -x (j) ||)

[0109] According to the reachable distance, the local reachable density of x can be expressed as:

[0110]

[0111] According to the local reachability density, the local outlier factor can be expressed as:

[0112]

[0113] The relationship between each coordinate point can be divided by the local reachable anomaly factor.

[0114] The coordinate points are divided into 5 data levels with thresholds of 0.0001, 0.1, 0.3, and 0.7: <0.0001, 0.0001 <p<0.1、0.1<p<0.3、0.3<p<0.7、0.7<p<1。

[0115] By analyzing the local reachability density of points on the edge of a closed figure, we can conclude that when p is in the range of 0.0001 to 0.1, p is near the edge of the closed figure.

[0116] Among them, when p < 0.0001, it represents a noise point and needs to be pointed out. Although this type of data is also actual real data, it is usually caused by some abnormal conditions. For example, in the main area of ​​the checkpoint lane, vehicles traveling in the opposite direction or overtaking in the opposite lane are also analysis objects because their driving direction and the image shape of the vehicle face are consistent with those of normal analysis vehicles, and these data will cause noise.

[0117] After determining the edge coordinate points of the main area, it is necessary to determine whether the subsequent coordinate points are in the main area. This determination needs to be based on a function. For example, if you want to verify whether a point is between two lines, from a function perspective, you only need to prove that the point (x, y) satisfies f1(x)<y<f2(x).

[0118] Considering that traditional regression models usually directly use the difference between the model output and the actual output to calculate the loss, the loss is zero when and only when the two are consistent. That is, when the traditional regression model is used for boundary fitting, the obtained boundary is strictly determined based on the training samples. However, in the IoT scenario, the coordinates of the object to be analyzed can usually only reflect part of the data features, that is, the training sample set cannot cover all samples in the actual scenario. At this time, if the traditional regression model is used for boundary fitting, the main area obtained will most likely be smaller than the actual main area, thus affecting the analysis effect in the subsequent process.

[0119] Therefore, in order to improve the accuracy of the determined main area, a support vector machine regression model (SVR) with greater tolerance to sample deviation can be used for boundary fitting. The specific implementation steps are as follows:

[0120] For any edge coordinate point of the main region:

[0121] 1. In the support vector machine classification model (SVC), a linear function can be fitted based on the edge coordinate points. The objective function and constraints are as follows (w represents the coefficient of x, b represents the unknown constant, and m represents the range of x):

[0122]

[0123] st:y (i) (w T x (i) +b)≥1-ξ i ,i=1,2,...,m

[0124] ξ i ≥0,i=1,2,...,m

[0125] In SVR, the goal is to fit a linear model y=wx+b as much as possible; and since the boundary of the actual main area is not a straight line, there will inevitably be a deviation between the fitted straight line and the actual boundary of the main area. Therefore, a constant eps>0 can be defined. For any coordinate point (x, y), if |y-wx-b|≤eps, it is determined that the coordinate point satisfies the linear model y=wx+b, so the objective function and constraints can be obtained as follows:

[0126]

[0127] st:|y (i) -w T x (i) -b|≤ε,i=1,2,...,m

[0128] 2. On the one hand, the function expressed by the real data is basically not linear. On the other hand, the fitted linear function is mostly a function group (the graph on the plane can be understood as a broken line). Therefore, after obtaining the linear function, these broken lines can be converted into smooth curves by adding a relaxation factor ξ>0, so that the objective function and constraint conditions become:

[0129]

[0130] 3. After introducing the relaxation factor, different coordinate points will have a corresponding relaxation variable to characterize the sample.

[0131] In this embodiment, the corresponding relaxation factor can be calculated by quadratic programming. Taking the implementation of quadratic programming by Lagrangian function dualization as an example:

[0132]

[0133] 4. Solve the above Lagrangian function by partial derivative to find the minimum value of the optimization function for w, b, ξ. By derivation, we can get:

[0134]

[0135] By substituting the values ​​of w, b, and ξ into the function L, L can be converted into a function containing only β, thus obtaining the final optimization objective function.

[0136] Finally, we can get f(xmin) (corresponding to the left boundary), f(xmax) (corresponding to the right boundary), f(ymin) (corresponding to the lower boundary), and f(ymax) (corresponding to the upper boundary). The range formed by these four functions is the main area position, and its schematic diagram can be shown as follows: Figure 4C As shown (the four closed curves represent the functions of four closed intervals respectively).

[0137] The method provided by the present application is described above. The device provided by the present application is described below:

[0138] See also Figure 5 , is a structural diagram of a data processing device provided in an embodiment of the present application, such as Figure 5 As shown, the data processing device may include:

[0139] The receiving unit 510 is configured to receive the coordinates of the object to be analyzed that appears in the target area within a preset historical time period; the first determining unit 520 is configured to determine the edge coordinate points of the main area according to the coordinates of the object to be analyzed;

[0140] The second determining unit 530 is configured to determine an edge curve of the main area according to the edge coordinate points of the main area, and determine the main area according to the edge curve.

[0141] In a possible embodiment, the first determination unit 520 is specifically configured to respectively determine the local anomaly factors of the coordinate points corresponding to each object to be analyzed; and determine the coordinate points whose local anomaly factors are within a preset threshold range as edge coordinate points of the main area.

[0142] In a possible embodiment, the coordinates of the object to be analyzed are coordinate points corresponding to the vertices of the identification box of the object to be analyzed in the captured image;

[0143] or,

[0144] The coordinates of the object to be analyzed are the coordinates of any vertex of the recognition frame of the object to be analyzed in the captured image and the width and height of the recognition frame;

[0145] or,

[0146] The coordinates of the object to be analyzed are the coordinates of the center point of the identification frame of the object to be analyzed in the captured image and the width and height of the identification frame;

[0147] or,

[0148] The coordinates of the object to be analyzed are the coordinates of two vertices of the identification frame of the object to be analyzed in the captured image that are located at diagonal positions.

[0149] In a possible embodiment, the second determination unit 530 is specifically configured to group the edge coordinate points of the main area to obtain four groups of edge coordinate points; wherein the four groups of edge coordinate points correspond to the upper, lower, left and right boundaries of the main area, respectively; for any group of edge coordinate points, the group of edge points is fitted to obtain a corresponding edge curve.

[0150] In a possible embodiment, the second determination unit 530 is specifically configured to fit the group of edge points to obtain a group of linear functions; convert the group of linear functions into a curve function; determine the optimal curvature of the curve function to obtain the edge curve corresponding to the group of edge points.

[0151] See also Figure 6 , is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 601, a communication interface 602, a memory 603 and a communication bus 604. The processor 601, the communication interface 602 and the memory 603 communicate with each other through the communication bus 604. Among them, the memory 603 stores a computer program; the processor 601 can execute the data processing method described above by executing the program stored in the memory 603.

[0152] The memory 603 mentioned herein may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the memory 603 may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage media, or a combination thereof.

[0153] The present application also provides a machine-readable storage medium storing a computer program, such as Figure 6 The computer program may be provided by the memory 603 in the Figure 6 The processor 601 in the electronic device shown is executed to implement the data processing method described above.

[0154] The present application also provides a computer program stored in a machine-readable storage medium, such as Figure 6 The memory 603 in the memory 603, and when the processor executes the computer program, it prompts the processor 601 to execute the data processing method described above.

[0155] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0156] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: include: Receiving the coordinates of the object to be analyzed that appears in the target area within a preset historical time period; the target area is the area that the pre-configured monitoring front end is responsible for monitoring; Determine the edge coordinate points of the main area according to the coordinates of the object to be analyzed; The edge curve of the main area is determined according to the edge coordinate points of the main area, and the main area is determined according to the edge curve; the main area is the area that needs to be analyzed in the monitoring picture taken by the monitoring front end.

2. The method according to claim 1, characterized in that The step of determining edge coordinate points of the main area according to the coordinates of the object to be analyzed includes: Determine the local anomaly factor of the coordinate point corresponding to each object to be analyzed; The coordinate points whose local abnormal factors are within the preset threshold range are determined as the edge coordinate points of the main area.

3. The method according to claim 1, characterized in that The coordinates of the object to be analyzed are the coordinate points corresponding to the vertices of the identification frame of the object to be analyzed in the captured image; or, The coordinates of the object to be analyzed are the coordinates of any vertex of the identification box of the object to be analyzed in the captured image and the width and height of the identification box; or, The coordinates of the object to be analyzed are the coordinates of the center point of the identification frame of the object to be analyzed in the captured image and the width and height of the identification frame; or, The coordinates of the object to be analyzed are the coordinates of two vertices of the identification frame of the object to be analyzed in the captured image, which are located at diagonal positions.

4. The method according to claim 1, characterized in that The step of determining the edge curve of the main area according to the edge coordinate points of the main area includes: The edge coordinate points of the main area are grouped to obtain four groups of edge coordinate points; wherein the four groups of edge coordinate points correspond to the upper, lower, left and right boundaries of the main area respectively; For any set of edge coordinate points, the set of edge points is fitted to obtain the corresponding edge curve.

5. The method according to claim 4, characterized in that The step of fitting the group of edge points to obtain a corresponding edge curve includes: Fitting the group of edge points to obtain a group of linear functions; Convert the set of linear functions into a curve function; An optimal curvature of the curve function is determined to obtain an edge curve corresponding to the group of edge points.

6. A data processing device, characterized in that: include: A receiving unit configured to receive coordinates of an object to be analyzed that appears in a target area within a preset historical time period; The target area is the area that the pre-configured monitoring front end is responsible for monitoring; A first determining unit is configured to determine edge coordinate points of a main area according to the coordinates of the object to be analyzed; The second determination unit is configured to determine the edge curve of the main area based on the edge coordinate points of the main area, and determine the main area based on the edge curve; the main area is the area that needs to be analyzed in the monitoring picture taken by the monitoring front end.

7. The device according to claim 6, characterized in that The first determination unit is specifically configured to respectively determine the local anomaly factors of the coordinate points corresponding to each object to be analyzed; and determine the coordinate points whose local anomaly factors are within a preset threshold range as edge coordinate points of the main area.

8. The device according to claim 6, characterized in that The second determination unit is specifically configured to group the edge coordinate points of the main area to obtain four groups of edge coordinate points; wherein the four groups of edge coordinate points correspond to the upper, lower, left and right four boundaries of the main area respectively; for any group of edge coordinate points, the group of edge points is fitted to obtain a corresponding edge curve.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method according to any one of claims 1 to 5 when executing a program stored in a memory.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Vehicle taillight recognition method and device and vehicle

    CN108021856A