Target image information extraction method and device, vehicle equipment, and storage medium
By extracting and processing the gradient and color information of the target image, combining spatial and non-spatial distance information for iterative updates, and generating object mask maps, it solves the problem that the intelligent driving system cannot accurately identify object shapes, improves vehicle detection accuracy and reduces false braking.
Patent Information
- Application Number
- CN202210439678.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The existing intelligent driving system cannot accurately identify the shape of the object in the image during object detection, resulting in the automatic emergency braking system being erroneously braking. The existing object detection algorithm is difficult to train, costly, poor mathematical interpretability, and the calculation amount increases exponentially.
By extracting the image gradient information of the target image and the color information of each pixel block, combining the image gradient information and color information to merge and segment the adjacent pixel blocks, calculate the spatial distance information and non-spatial distance information of each segmented pixel block and the clustering center, iteratively update the membership degree and update the clustering center, and output the image classification object to generate an object mask map.
This method can simplify the complex background during driving, accurately extract the dimension information of the object to be detected, accurately identify the shape of the object in the image, improve the vehicle detection accuracy in the driving field of view, and reduce the phenomenon of erroneous braking.
Smart Images

Figure CN114792415B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle information processing, and in particular to a method and device for extracting information from a target image, vehicle equipment, and a storage medium. Background Art
[0002] At present, with the continuous development of computer technology, it has gradually been integrated into various industries, such as the automotive industry. At present, with the introduction of the concept of "intelligent driving", the connection between computer technology and the automotive industry is becoming increasingly close. Traditional automobiles are mainly based on mechanical manufacturing and simple communication of the vehicle bus, providing limited auxiliary information for drivers. However, as the public's requirements for automobile intelligence gradually increase, major automobile companies have integrated a variety of intelligent driving technologies into the car, expanding a large amount of auxiliary driving information for drivers, and emerging collision warnings, automatic emergency braking, adaptive cruise and other intelligent driving systems.
[0003] In the related technologies, the intelligent driving systems used still have a large number of defects: the target detection algorithm used to mark the vehicle is not accurate, the marking box range exceeds the vehicle size, and the automatic emergency braking system (AEB) has a small probability of misidentifying the target, resulting in "false alarm" or "false braking" of the system; the adaptive cruise control function (ACC) combined with the front camera of the car has higher requirements on the accuracy of detecting targets within the camera's field of view, and the existing target detection algorithms usually use neural networks to obtain results, but their training is difficult, and the time and labor costs are too high; in addition, their mathematical interpretability is poor; secondly, as the number of targets in the driving field of view increases, the amount of calculation required by the network to consider the interactions between targets increases exponentially.
[0004] Due to the complexity of the driving environment, the current intelligent driving system cannot identify the precise shape of an object when performing target detection, but can only detect the approximate position of the object, which will cause AEB false braking.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a method and device for extracting information from a target image, a vehicle device, and a storage medium, so as to at least solve the technical problem in the related art that the intelligent driving system of a vehicle cannot accurately identify the shape of an object in an image, which easily causes the vehicle to brake incorrectly.
[0007] According to one aspect of an embodiment of the present invention, a method for extracting information of a target image is provided, comprising: extracting image gradient information of a pre-collected target image and color information of each pixel block, wherein the target image is segmented into a plurality of pixel blocks; merging adjacent pixel blocks in combination with the image gradient information and the color information of each pixel block, and segmenting the merged pixel blocks to obtain a plurality of segmented pixel blocks; calculating spatial distance information and non-spatial distance information between each of the segmented pixel blocks and a cluster center; iteratively updating the membership of each segmented pixel block and the cluster center in combination with the spatial distance information and the non-spatial distance information, and updating the cluster center based on the updated membership; when the number of iterations reaches a preset iteration threshold, outputting the image classification objects indicated by each cluster center to obtain an object mask map.
[0008] Optionally, the step of extracting image gradient information of a pre-captured target image and color information of each pixel block includes: acquiring a target image currently captured by the vehicle; extracting color distribution information of the target image to obtain the image gradient information; combining the image gradient information, using a preset watershed algorithm to segment the target image to obtain a plurality of pixel blocks, wherein each of the pixel blocks includes a plurality of pixel points.
[0009] Optionally, the step of merging adjacent pixel blocks in combination with the image gradient information and the color information of each pixel block includes: traversing each pixel point in each pixel block to obtain the color information of each pixel point; determining the color mean of the pixel block in combination with the color information of each pixel point; assigning the color mean to each pixel point in the pixel block; calculating the color similarity between two adjacent pixel blocks in combination with the change in the RGB color channel between each two adjacent pixel blocks; and merging the adjacent pixel blocks when the color similarity is greater than a preset similarity threshold.
[0010] Optionally, the step of calculating the spatial distance information and non-spatial distance information between each of the segmented pixel blocks and the cluster center includes: obtaining an adaptive parameter of the mean non-Euclidean distance error between all the segmented pixel blocks and the current cluster center; calculating the Gaussian kernel distance value between each of the segmented pixel blocks and the cluster center in combination with the inner product parameter of the Gaussian kernel function; and calculating the non-spatial distance information between each of the segmented pixel blocks and the cluster center in combination with the adaptive parameter and the Gaussian kernel distance value.
[0011] Optionally, the step of iteratively updating the membership of each segmented pixel block and the cluster center in combination with the spatial distance information and the non-spatial distance information includes: calculating the product between the spatial distance information and the non-spatial distance information to obtain a spatial mixing parameter; substituting the spatial mixing parameter and the initial membership into the objective function; simplifying the objective function to update the membership between each segmented pixel block and the cluster center; and iteratively updating the membership of each segmented pixel block and the cluster center when the number of iterations does not reach the preset iteration threshold.
[0012] Optionally, the objective function is simplified to update the membership between each segmented pixel block and the cluster center, including: optimizing and adjusting the objective function using the Lagrange multiplier method to obtain a partial differential equation under preset constraints; calculating the minimum value of the partial differential equation using the initial membership and the partial derivative of the cluster center; and updating the membership between each segmented pixel block and the cluster center in combination with the minimum value of the partial differential equation.
[0013] Optionally, the step of outputting the image classification objects indicated by each cluster center to obtain an object mask map includes: when the number of iterations reaches a preset iteration threshold, determining the target membership and target cluster center output by the last iteration update; obtaining the image classification object of the segmented pixel block indicated by the target membership and the target cluster center; and color-labeling the image classification object in combination with the color information determined when segmenting the pixel block to generate the object mask map.
[0014] According to another aspect of an embodiment of the present invention, there is also provided an information extraction device for a target image, comprising: an extraction unit, for extracting image gradient information of a pre-collected target image and color information of each pixel block, wherein the target image is divided into a plurality of pixel blocks; a merging unit, for merging adjacent pixel blocks in combination with the image gradient information and the color information of each pixel block, and performing segmentation processing on the merged pixel blocks to obtain a plurality of segmented pixel blocks; a calculation unit, for calculating spatial distance information and non-spatial distance information between each of the segmented pixel blocks and a cluster center; an updating unit, for iteratively updating the membership of each segmented pixel block and a cluster center in combination with the spatial distance information and the non-spatial distance information, and updating the cluster center based on the updated membership; and an output unit, for outputting the image classification objects indicated by each cluster center when the number of iterations reaches a preset iteration threshold, to obtain an object mask map.
[0015] Optionally, the extraction unit includes: a first acquisition module, used to acquire a target image collected by the current vehicle; a first extraction module, used to extract color distribution information of the target image to obtain the image gradient information; a first segmentation module, used to combine the image gradient information and use a preset watershed algorithm to segment the target image to obtain multiple pixel blocks, wherein each pixel block includes multiple pixel points.
[0016] Optionally, the merging unit includes: a first traversal module, used to traverse each pixel point in each pixel block to obtain the color information of each pixel point; a first determination module, used to determine the color mean of the pixel block in combination with the color information of each pixel point; a first assignment module, used to assign the color mean to each pixel point in the pixel block; a first calculation module, used to calculate the color similarity between two adjacent pixel blocks in combination with the change in the RGB color channels between each two adjacent pixel blocks; and a first merging module, used to merge the adjacent pixel blocks when the color similarity is greater than a preset similarity threshold.
[0017] Optionally, the calculation unit includes: a second acquisition module, used to obtain the adaptive parameters of the mean non-Euclidean distance errors between all the segmented pixel blocks and the current cluster center; a second calculation module, used to calculate the Gaussian kernel distance value between each of the segmented pixel blocks and the cluster center in combination with the inner product parameter of the Gaussian kernel function; and a third calculation module, used to calculate the non-spatial distance information between each of the segmented pixel blocks and the cluster center in combination with the adaptive parameters and the Gaussian kernel distance value.
[0018] Optionally, the updating includes: a third calculation module, used to calculate the product between the spatial distance information and the non-spatial distance information to obtain a spatial mixing parameter; a first substitution module, used to substitute the spatial mixing parameter and the initial membership into the objective function; a simplification module, used to simplify the objective function to update the membership between each segmented pixel block and the cluster center; an updating module, used to iteratively update the membership of each segmented pixel block and the cluster center when the number of iterations does not reach the preset iteration threshold.
[0019] Optionally, the simplification module includes: a first adjustment submodule, used to optimize and adjust the objective function using the Lagrange multiplier method to obtain a partial differential equation under preset constraints; a calculation submodule, used to calculate the minimum value of the partial differential equation using the initial membership and the partial derivative of the cluster center; and an update submodule, used to update the membership between each segmented pixel block and the cluster center in combination with the minimum value of the partial differential equation.
[0020] Optionally, the output unit includes: a second determination module, used to determine the target membership and target cluster center output by the last iterative update when the number of iterations reaches a preset iteration threshold; a third acquisition module, used to obtain the image classification object of the segmented pixel block indicated by the target membership and the target cluster center; and a generation module, used to color-identify the image classification object in combination with the color information determined when segmenting the pixel block, and generate the object mask map.
[0021] According to another aspect of an embodiment of the present invention, a vehicle device is also provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned target image information extraction methods by executing the executable instructions.
[0022] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the target image information extraction methods described above.
[0023] In the present invention, the traditional FCM is improved by spatial hybrid metric, and the spatial distance information and non-spatial distance information are fused in an adaptive manner; and the watershed algorithm is improved in the image preprocessing process, and multiple neighborhood information is introduced to adapt to the change of the original image color.
[0024] In the embodiment of the present invention, the image gradient information of the pre-collected target image and the color information of each pixel block are extracted, and the adjacent pixel blocks are merged in combination with the image gradient information and the color information of each pixel block, and the merged pixel blocks are segmented to obtain multiple segmented pixel blocks, and the spatial distance information and non-spatial distance information of each segmented pixel block and the cluster center are calculated. The membership of each segmented pixel block and the cluster center is iteratively updated in combination with the spatial distance information and the non-spatial distance information, and the cluster center is updated based on the updated membership, and when the number of iterations reaches the preset iteration threshold, the image classification object indicated by each cluster center is output to obtain an object mask map. In this embodiment, the image can be segmented in combination with the color information of multiple fields, and the spatial distance information and the non-spatial distance information are integrated, and the membership of each segmented pixel block and the cluster center is iteratively updated, thereby simplifying the complex background in the driving process, accurately extracting the size information of each object to be detected, and accurately identifying the shape of the object in the image, so as to improve the vehicle detection accuracy in the driving field of view, thereby solving the technical problem that the intelligent driving system of the vehicle in the related art cannot accurately identify the shape of the object in the image, which easily causes the vehicle to brake incorrectly. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 is a flow chart of an optional method for extracting information from a target image according to an embodiment of the present invention;
[0027] Figure 2 is a schematic diagram of an optional output target image information according to an embodiment of the present invention;
[0028] Figure 3 is a flow chart of an optional screening process based on color similarity according to an embodiment of the present invention;
[0029] Figure 4 is a schematic diagram of an optional target image information extraction device according to an embodiment of the present invention;
[0030] Figure 5 The present invention is a hardware structure block diagram of an electronic device (or mobile device) for extracting information of a target image according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] To facilitate those skilled in the art to understand the content of the present invention, some terms or names appearing in the embodiments are explained below:
[0034] FCM algorithm, fuzzy C-means algorithm, referred to as FCM algorithm, is a fuzzy clustering algorithm based on objective function, mainly used for cluster analysis of data. The steps of the conventional FCM algorithm include: (1) determining the classification value, the value of index m, and determining the number of iterations required (end condition); (2) initializing the membership degree U; (3) calculating the cluster center C based on U; (4) calculating the objective function J through the cluster center C; (5) returning to calculate U based on C, returning to step 3, and looping until the end (i.e. reaching the required number of iterations).
[0035] The watershed algorithm is an image region segmentation method. In the segmentation process, the similarity between adjacent pixel blocks is used as an important reference, so that the pixels with similar spatial positions and similar grayscale values (gradient) are connected to form a closed contour. The common operation steps of the watershed algorithm are: grayscale the color image, then calculate the gradient map, and finally perform the watershed algorithm based on the gradient map to obtain the edge line of the segmented image.
[0036] The Lagrange multiplier method is a method for finding the extreme value of a multivariate function whose variables are restricted by one or more conditions. It converts an optimization problem with n variables and k constraints into an extreme value problem of a system of equations with n+k variables, whose variables are not subject to any constraints.
[0037] The Euclidean metric is a commonly used distance definition, which refers to the true distance between two points in m-dimensional space.
[0038] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0039] The present invention can be applied to various image processing systems, software, and applications, especially for vehicle intelligent driving systems, and the solutions of the following embodiments of the present invention can be used. Taking the vehicle intelligent driving system as an example, the vehicle types provided in the present invention include but are not limited to: new energy vehicles, fuel vehicles, trucks, sports cars, road cleaning vehicles, sprinkler trucks, etc.
[0040] Compared with the prior art, due to the influence of light intensity, the colors of the same object at different angles are different, and the size, color and other information of the photographed external objects of the vehicle cannot be accurately extracted, which affects the vehicle detection accuracy within the driving field of view. The present invention is improved on the basis of the fuzzy C-means (FCM) clustering algorithm, and proposes an improved FCM scheme that can be used for vehicle intelligent driving image segmentation, which can improve the accuracy of object detection and reduce "misoperation" of intelligent driving.
[0041] It should be noted that compared with the prior art, when performing image object detection, since spatial information is not introduced, the algorithm is highly sensitive to color changes, resulting in unsatisfactory segmentation effect. To solve this problem, the present invention improves the watershed transform and the original FCM membership measurement method, reduces the algorithm's sensitivity to color changes, and improves the algorithm's segmentation accuracy.
[0042] It should be noted that the main process of the present invention can be divided into two parts: 1. The improved watershed transform is used to optimize the segmentation of the image: the watershed algorithm is improved by combining multiple neighborhood color information and gradient information, and the present invention is upgraded to the superpixel level to better adapt to the irregular boundaries of the image and improve the adaptability to color changes; 2. In order to improve the algorithm's ability to segment driving images, the present invention proposes a spatial hybrid metric method, which organically integrates spatial distance information (i.e., non-Euclidean information) and spatial distance information (i.e., Euclidean information) to improve the accuracy of the algorithm.
[0043] The present invention is described in detail below in conjunction with various embodiments.
[0044] Embodiment 1
[0045] According to an embodiment of the present invention, an embodiment of a method for extracting information from a target image is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0046] Figure 1 is a flowchart of an optional method for extracting information from a target image according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0047] Step S102, extracting image gradient information of a pre-collected target image and color information of each pixel block, wherein the target image is divided into a plurality of pixel blocks;
[0048] Step S104, combining the image gradient information and the color information of each pixel block, merging adjacent pixel blocks, and segmenting the merged pixel blocks to obtain a plurality of segmented pixel blocks;
[0049] Step S106, calculating the spatial distance information and non-spatial distance information between each segmented pixel block and the cluster center;
[0050] Step S108, combining the spatial distance information and the non-spatial distance information, iteratively updating the membership degree of each segmented pixel block and the cluster center, and updating the cluster center based on the updated membership degree;
[0051] Step S110 , when the number of iterations reaches a preset iteration threshold, output the image classification objects indicated by each cluster center to obtain an object mask map.
[0052] Through the above steps, the image gradient information of the pre-collected target image and the color information of each pixel block can be extracted, and the adjacent pixel blocks are merged in combination with the image gradient information and the color information of each pixel block, and the merged pixel blocks are segmented to obtain multiple segmented pixel blocks, and the spatial distance information and non-spatial distance information of each segmented pixel block and the cluster center are calculated. In combination with the spatial distance information and the non-spatial distance information, the membership of each segmented pixel block and the cluster center is iteratively updated, and the cluster center is updated based on the updated membership, and when the number of iterations reaches the preset iteration threshold, the image classification object indicated by each cluster center is output to obtain an object mask map. In this embodiment, the image can be segmented in combination with the color information of multiple fields, and the spatial distance information and the non-spatial distance information are integrated, and the membership of each segmented pixel block and the cluster center is iteratively updated, thereby simplifying the complex background in the driving process, accurately extracting the size information of each object to be detected, and accurately identifying the shape of the object in the image, so as to improve the vehicle detection accuracy in the driving field of view, thereby solving the technical problem that the intelligent driving system of the vehicle in the related technology cannot accurately identify the shape of the object in the image, which easily causes the vehicle to brake incorrectly.
[0053] The embodiments of the present invention are described in detail below in combination with the above-mentioned implementation steps.
[0054] According to an embodiment of the present invention, at least one camera and sensor may be provided on a device (e.g., a car) that provides a data set or an image set, and objects around the vehicle may be collected through the camera. For example, a front camera, a rear camera, a left door position sensor, and a right door position sensor may be provided for the vehicle respectively. During the process of vehicle starting, reversing, turning, and straight driving, the camera may be used to capture surrounding images, and the embodiment of the present invention may be used to analyze and extract object masks in the captured images, so as to assist the intelligent driving system in making road condition judgments.
[0055] Step S102: extracting image gradient information of a pre-collected target image and color information of each pixel block, wherein the target image is divided into a plurality of pixel blocks.
[0056] Optionally, the step of extracting image gradient information of a pre-collected target image and color information of each pixel block includes: acquiring a target image collected by the current vehicle; extracting color distribution information of the target image to obtain image gradient information; combining the image gradient information and using a preset watershed algorithm to segment the target image to obtain multiple pixel blocks, wherein each pixel block includes multiple pixel points.
[0057] In this embodiment, an intelligent driving system can be installed inside the current vehicle, and the intelligent driving system can be connected to cameras, sensors, controllers, etc. After the camera collects an image data set, the collected data set can be pre-processed by interference filtering, noise reduction, etc. to obtain a target image to be analyzed.
[0058] In this embodiment, the watershed algorithm and fuzzy C-means are improved. The existing watershed algorithm is overly dependent on the gradient change of the original image. However, the change of color will have a bad effect on the result of the original watershed algorithm. Therefore, the present invention introduces multiple neighborhood information in the classification process to reduce the algorithm's sensitivity to color. After the improvement, the method used in this embodiment can adapt to the color variability and boundary complexity of the driving process image, accurately separate the object frame in the image (for example, separate the frame of other vehicles driving on the road), object color and other information, and improve the traditional FCM in two steps.
[0059] When extracting the color distribution information of the target image, a variety of algorithms can be used for extraction. For example, the sobel operator is used to obtain the image gradient information. Furthermore, an embodiment of the present invention proposes a color mean labeling scheme, which performs a watershed operation on the target image in combination with the domain color information of the pixel block to obtain multiple pixel blocks.
[0060] Step S104 , combining the image gradient information and the color information of each pixel block, merging adjacent pixel blocks, and segmenting the merged pixel blocks to obtain a plurality of segmented pixel blocks.
[0061] In an optional implementation, the step of merging adjacent pixel blocks in combination with image gradient information and color information of each pixel block includes: traversing each pixel point in each pixel block to obtain color information of each pixel point; determining a color mean of the pixel block in combination with the color information of each pixel point; assigning the color mean to each pixel point in the pixel block; calculating the color similarity between two adjacent pixel blocks in combination with the change in the RGB color channel between each two adjacent pixel blocks; and merging the adjacent pixel blocks when the color similarity is greater than a preset similarity threshold.
[0062] In this embodiment, a color mean labeling method and a multiple neighborhood merging method are introduced. The color mean labeling method is used to unify the color information in each pixel block, that is, a color mean operation is performed on each pixel block, and the mean is assigned to all pixels in the pixel block. Since the color variation of the same object is small, the color mean labeling method is used to neutralize the color variation in each area and reduce the color difference between pixel blocks.
[0063] In this embodiment, the multiple neighborhood merging method adopted refers to merging adjacent pixel blocks with relatively close color similarity indicators, that is, a color similarity screening method is proposed, which analyzes the neighborhood color information between pixel blocks, judges the color similarity between adjacent pixel blocks, merges pixel blocks with similar colors, introduces the neighborhood color information between superpixels, improves the algorithm's adaptability to color changes, and completes pre-segmentation.
[0064] Step S106, calculating the spatial distance information and non-spatial distance information between each segmented pixel block and the cluster center.
[0065] When calculating the degree of membership between the segmented pixel blocks and the cluster centers, the present invention proposes an adaptive fusion of spatial distance information and non-spatial distance information as a new measurement method.
[0066] An optional implementation method, the step of calculating the spatial distance information and non-spatial distance information between each segmented pixel block and the cluster center, includes: obtaining an adaptive parameter of the mean non-Euclidean distance error between all segmented pixel blocks and the current cluster center; calculating the Gaussian kernel distance value between each segmented pixel block and the cluster center in combination with the inner product parameter of the Gaussian kernel function; and calculating the non-spatial distance information between each segmented pixel block and the cluster center in combination with the adaptive parameter and the Gaussian kernel distance value.
[0067] In this embodiment, when updating the membership of the cluster center, it is taken into account that the membership is presented in the form of consideration, and the proportion of spatial distance and non-spatial distance information about the membership of the cluster center in each membership is different. Therefore, it is necessary to calculate the spatial distance information and non-spatial distance information separately.
[0068] In this embodiment, spatial distance information and non-spatial distance information are integrated. The calculated spatial distance information can refer to the result obtained by measuring by Euclidean metric, and can also be understood as Euclidean distance, Euclidean distance, and Euclidean information. Non-spatial distance information refers to the result calculated by non-Euclidean metric, for example, the result calculated by Gaussian kernel. The fuzzy clustering algorithm based on Gaussian kernel introduces non-Euclidean information to achieve accurate segmentation. Therefore, non-spatial distance information can also be understood as Gaussian kernel function and non-Euclidean information.
[0069] In order to improve the segmentation ability of the original FCM, an embodiment of the present invention proposes a spatial hybrid metric method to calculate the membership relationship between pixels and cluster centers, which combines Euclidean information and non-Euclidean information. The original FCM only uses Euclidean distance, and cannot show superior performance when segmenting color-changing images. In an embodiment of the present invention, the introduction of more local spatial information can not only improve the accuracy of the algorithm, but also improve the robustness of the method to color changes. Although the improved watershed algorithm introduces gradient information and neighborhood color information, it still lacks local spatial information in the clustering process. The fuzzy clustering algorithm based on Gaussian kernel can introduce non-Euclidean information to achieve accurate segmentation. Therefore, in the clustering process, the present invention considers Gaussian kernel function and Euclidean distance to update the membership.
[0070] In this embodiment of the present invention, spatial distance information and non-spatial distance information are integrated: the first part is set to D ki , is the original spatial distance information; the second part is set to G ki , represents non-spatial distance information (or can be understood as non-Euclidean information). Since the error mean can reflect the distribution of data, the embodiment of the present invention needs to introduce an adaptive parameter setting method, which needs to set an adaptive parameter based on the non-Euclidean distance error mean of all segmented pixel blocks and the current cluster center.
[0071] In this embodiment, considering the three situations of segmenting pixel blocks and cluster centers, the judgment of whether a pixel block belongs to a final cluster member becomes increasingly clear:
[0072] In the first case, the spatial distance between the segmented pixel block and the cluster center is decreasing, and the influence of the spatial distance information will increase, that is, the segmented pixel block close to the cluster center has a greater weight; at the same time, if the segmented pixel block is not only close to the cluster center, but also the distance of the non-spatial distance information is small, then the segmented pixel block will be regarded as a member of the cluster.
[0073] In the second case, the spatial distance between the segmented pixel block and the cluster center is decreasing, and the influence of the spatial distance information will increase, that is, the segmented pixel block close to the cluster center has a larger weight; however, at this time, the distance between the segmented pixel block and the cluster center's non-spatial distance information becomes larger. At this time, although the segmented pixel block is close to the cluster center in terms of spatial distance, it is not close to the cluster center in terms of non-spatial distance information. Further analysis is needed to determine whether the segmented pixel block belongs to a cluster member.
[0074] In the third case, the spatial distance between the segmented pixel block and the cluster center is increasing, and the influence of the spatial distance information will decrease, that is, the weight of the segmented pixel block close to the cluster center becomes smaller; however, at this time, the distance between the segmented pixel block and the cluster center's non-spatial distance information is decreasing. At this time, although the segmented pixel block is farther and farther away from the cluster center in spatial distance, it is close to the cluster center in non-spatial distance information. At this time, the segmented pixel block may also be a member of the cluster.
[0075] Step S108, combining the spatial distance information and the non-spatial distance information, iteratively updating the membership degree of each segmented pixel block and the cluster center, and updating the cluster center based on the updated membership degree.
[0076] After calculating the spatial distance information and the non-spatial distance information, cluster analysis can be performed. The embodiment of the present invention improves the FCM measurement method, an optional step of iteratively updating the membership of each segmented pixel block and the cluster center in combination with the spatial distance information and the non-spatial distance information, including: calculating the product between the spatial distance information and the non-spatial distance information to obtain the spatial mixing parameter; substituting the spatial mixing parameter and the initial membership into the objective function; simplifying the objective function to update the membership between each segmented pixel block and the cluster center; when the number of iterations does not reach a preset iteration threshold, iteratively updating the membership of each segmented pixel block and the cluster center.
[0077] As an optional implementation of this embodiment, the objective function is simplified to update the membership between each segmented pixel block and the cluster center, including: optimizing and adjusting the objective function using the Lagrange multiplier method to obtain a partial differential equation under preset constraints; calculating the minimum value of the partial differential equation using the initial membership and the partial derivative of the cluster center; and updating the membership between each segmented pixel block and the cluster center in combination with the minimum value of the partial differential equation.
[0078] After updating the membership degree, the present embodiment can update the cluster center by the membership degree. The cluster center may include the number of categories of several objects in the target image. The number of cluster centers means the number of categories in the end.
[0079] Step S110 , when the number of iterations reaches a preset iteration threshold, output the image classification objects indicated by each cluster center to obtain an object mask map.
[0080] An optional implementation method, outputting the image classification objects indicated by each cluster center and obtaining the step of an object mask map, includes: when the number of iterations reaches a preset iteration threshold, determining the target membership and target cluster center output by the last iteration update; obtaining the image classification objects of the segmented pixel blocks indicated by the target membership and target cluster center; combining the color information determined when segmenting the pixel blocks, color-labeling the image classification objects to generate an object mask map.
[0081] After the number of iterations reaches the preset iteration threshold, the current update iteration is indicated to be finished, and the optimal membership and cluster center can be determined. At this time, the membership of each pixel block in the target image has been determined. After determining the membership of each pixel block, the previously analyzed assigned color can be used to darken the pixel block to generate a mask image.
[0082] Through the above embodiments, the improved FCM algorithm can be introduced into the vehicle intelligent driving system, and the color of each pixel block of the image can be adjusted. The color mean labeling method and the multiple neighborhood merging method are used to unify the color information in each pixel block, neutralize the color changes in each area, and reduce the color difference between pixel blocks. Then, combined with the spatial hybrid metric (fusion of spatial distance information and non-spatial distance information) and the improved watershed algorithm, non-Euclidean spatial information is introduced in the clustering process to calculate the membership of the pixel, which can improve the accuracy of the collected object mask information.
[0083] The present invention is described below in conjunction with another optional embodiment.
[0084] Embodiment 2
[0085] In this embodiment, the target image is analyzed in conjunction with the vehicle's intelligent driving system.
[0086] In the embodiment of the present invention, the watershed transform and the original FCM membership measurement method are improved, which reduces the sensitivity of the algorithm to color changes and improves the segmentation accuracy of the algorithm. The main process of this embodiment can be divided into three parts: the first part uses the improved watershed algorithm to optimize the segmentation of the image; the second part combines the multiple neighborhood color information and gradient information to improve the watershed algorithm, and upgrades the method to the superpixel level to improve the adaptability to color changes; the third part, in order to improve the algorithm's segmentation ability for driving images, this embodiment proposes a spatial hybrid measurement method, which organically combines non-spatial distance information (or understood as non-Euclidean information) with spatial distance information (or understood as Euclidean information).
[0087] Figure 2 is a schematic diagram of an optional output target image information according to an embodiment of the present invention, such as Figure 2As shown, it includes: extracting gradient information from the original image; then performing color mean marking and color similarity screening and merging; then performing spatial mixing measurement based on the judgment of iteration conditions, and then outputting the object mask map after continuous clustering iterations.
[0088] The following is combined with the above Figure 2 The schematic content explains the clustering iteration process.
[0089] Part I: Improved Watershed Algorithm
[0090] The original watershed algorithm is overly dependent on the gradient change of the original image, but the change of color will have a bad effect on the result of the original watershed algorithm. Therefore, the present invention introduces multiple neighborhood information in the classification process to reduce the algorithm's sensitivity to color.
[0091] Based on the traditional Sobel operator to obtain the image gradient, the embodiment of the present invention proposes a color mean labeling method, combines the neighborhood color information of the pixel to perform a watershed operation, and specifically introduces the following formula (1) and formula (2):
[0092] F w (ξ 1 ,ξ 2 ,…ξ n )=watershed(F G ) (1);
[0093] Color(ξ i )={mean[Color(a 1 ),Color(a 2 ),…Color(a m )]|a j ∈ξ i ,j∈[1,m]} (2);
[0094] In formula (1), F G is the gradient map obtained by the sobel operator, F w is the super-pixel image obtained after the watershed operation, {ξ 1 ,ξ 2 ,…ξ n} represents n superpixel blocks. In the formula, Color(ξ i ) represents the color of each superpixel block, {a 1 ,a 2 ,…a m} represents all the pixels in the superpixel block, and the mean operation converts the pixel block {a 1 ,a 2 ,…a m}, and finally assign this value to all pixels in the superpixel block. Since the color variation of the same object is small, the mean operation will neutralize the color variation in each area and reduce the color difference between superpixel blocks.
[0095] Part 2: Multi-Neighborhood Color Filtering
[0096] During the merging process, color differences still exist between adjacent superpixel blocks of the same object. To address this problem, the present invention proposes a color similarity screening method, which introduces neighborhood color information between superpixels, and merges superpixel blocks with similar colors by judging the color similarity between adjacent blocks to complete pre-segmentation. The method is specifically implemented using the following formula (3):
[0097] s=Simu(Color(ζ i ),Color(ζ i-1 )) (3);
[0098] Among them, Simu operation calculates Color(ξ i ) and Color(ξ i-1 ) between the colors. When the similarity s satisfies the similarity condition, Color(ξ i-1 ) value is assigned to Color(ξ i ) is used to introduce the neighborhood color information between superpixels and improve the algorithm's adaptability to color changes. The specific formula for the Simu operation is:
[0099]
[0100] ΔR=R i -R i-1 (5);
[0101] ΔG=G i -G i-1 (6);
[0102] ΔB=B i -B i-1 (7);
[0103]
[0104] Among them, R i represents the red channel value of the current superpixel block, R represents the average red channel value of the adjacent superpixel block, ΔR, ΔG, and ΔB represent the changes in the red, green, and blue channels of the adjacent superpixel blocks, respectively.
[0105] Figure 3 is a flowchart of an optional screening process based on color similarity according to an embodiment of the present invention. Figure 3As shown, after a superpixel image (i.e., the target image in Example 1) is input, all superpixel blocks are traversed, and then the R, G, and B values of two adjacent superpixel blocks are extracted. After that, the similarity s of the two superpixel blocks is calculated, and then it is determined whether the s is greater than a threshold value. If so, the two adjacent superpixel blocks are merged, if not, they are not merged; then the superpixel blocks are continued to be traversed until all superpixel blocks are traversed.
[0106] Part III: Spatial Mixture Metrics
[0107] In order to improve the segmentation ability of the original FCM, the embodiment of the present invention proposes a spatial hybrid metric method to calculate the membership relationship between pixels and cluster centers, which combines Euclidean information and non-Euclidean information. The original FCM only uses Euclidean distance, and cannot show superior performance when segmenting color-changing images. As discussed in the above two parts, it can be seen that introducing more local spatial information can not only improve the accuracy of the algorithm, but also improve the robustness of this method to color changes. Although the improved watershed algorithm introduces gradient information and neighborhood color information, it still lacks local spatial information in the clustering process. Therefore, non-spatial distance information is introduced in this embodiment. The fuzzy clustering algorithm based on Gaussian kernel can introduce non-Euclidean information to achieve accurate segmentation. In the clustering process, the present invention considers Gaussian kernel function and Euclidean distance to update the membership (presented in the form of probability, and the proportion of Euclidean and non-Euclidean in each probability is different).
[0108] The spatial hybrid metric method proposed in the embodiment of the present invention is defined as the following formula (9):
[0109] in,
[0110]
[0111]
[0112] It can be seen from formula (9) that the measurement method proposed in the embodiment of the present invention is formed by adaptively fusing spatial distance information and non-spatial distance information (or non-Euclidean information): the first part is D ki , is the original spatial distance information, where σ>0. In the second part, G ki Represents non-spatial distance information (in this embodiment, it may refer to non-Euclidean information). Since the error mean can reflect the distribution of data, the embodiment of the present invention provides a new adaptive parameter setting method. In formula (11), H is set as an adaptive parameter based on the mean of the non-Euclidean distance errors between all superpixels and the current cluster center. The specific calculation formula (12) of H is as follows:
[0113]
[0114] where g ki For k With v i The non-Euclidean information between i refers to the current cluster center, g ki The specific calculation method is shown in the following formula (13):
[0115]
[0116] in is with v i The Gaussian kernel distance between them, K(a,b) is the inner product of the kernel function. In addition, K(a,b) satisfies K(a,a) = 1. Therefore, the final result of equation (13) is 2-2K(ξ k ,v i ).
[0117] As the distance between the superpixel and the cluster center decreases, D ki The influence of will increase, that is, the superpixel block close to the cluster center has a larger weight. At the same time, if the superpixel is not only close to the cluster center, but also has a small non-Euclidean distance (g ki larger), then The value will also be larger, in which case the superpixel block will be considered a member of the cluster.
[0118] Part IV: Cluster Analysis
[0119] The embodiment of the present invention improves the traditional FCM measurement method and performs the target image or the super pixel image F w (ξ 1 ,ξ 2 ,…ξ n ) is clustered, and the centroid of each superpixel block is directly input into the iterative process. Based on the traditional FCM, the objective function of the present invention can be expressed as the following formula (14):
[0120]
[0121] Among them, u ik is the superpixel x k For cluster center v i Substituting formula (13) into formula (14) yields the final objective function of the present invention:
[0122]
[0123] The above algorithm is optimized by using the Lagrange multiplier method, so that the problem is converted into Next, we find the minimum value of the objective function. The specific formula is as follows (16):
[0124]
[0125] Using u i ' k and v i The partial derivative of can calculate the minimum value of the partial differential equation and obtain the optimal solution:
[0126]
[0127] Afterwards,
[0128]
[0129]
[0130] Solving formula (18) yields u ik :
[0131]
[0132] Substituting formula (20) into formula (18) yields:
[0133]
[0134] Therefore, the membership updating formula of the present invention is as follows (22):
[0135]
[0136] According to the FCM algorithm, the update formula involving the cluster center in the embodiment of the present invention is as follows (23):
[0137]
[0138] Through the above embodiments, in order to improve the accurate information of the object mask in the image, the watershed algorithm and the FCM algorithm are improved. In the preprocessing process, the watershed algorithm is improved by introducing a color mean algorithm and multiple neighborhood information to adapt to the color change of the original image. The target is separated by traditional fuzzy clustering technology, which can reduce the difficulty and time of target monitoring. The traditional FCM is improved by spatial mixed measurement. By adaptively fusing spatial distance information and non-spatial distance information, the information of each object in the image can be accurately separated. The two-step improvement process of the traditional FCM can adapt to the color variability and boundary complexity of the image during the driving process.
[0139] The present invention is described below in conjunction with another optional embodiment.
[0140] Embodiment 3
[0141] This embodiment provides a device for extracting information from a target image. The multiple implementation units involved in the information extraction device correspond to the various implementation steps in the above-mentioned embodiment 1.
[0142] Figure 4 is a schematic diagram of an optional target image information extraction device according to an embodiment of the present invention. Figure 4 As shown, the information extraction device may include: an extraction unit 41, a merging unit 42, a calculation unit 43, an updating unit 44, and an output unit 45, wherein:
[0143] An extraction unit 41 is used to extract image gradient information of a pre-collected target image and color information of each pixel block, wherein the target image is divided into a plurality of pixel blocks;
[0144] A merging unit 42 is used to combine the image gradient information and the color information of each pixel block, merge adjacent pixel blocks, and segment the merged pixel blocks to obtain a plurality of segmented pixel blocks;
[0145] A calculation unit 43, used for calculating the spatial distance information and non-spatial distance information between each segmented pixel block and the cluster center;
[0146] An updating unit 44, configured to iteratively update the membership degree between each segmented pixel block and the cluster center by combining the spatial distance information and the non-spatial distance information, and update the cluster center based on the updated membership degree;
[0147] The output unit 45 is used to output the image classification objects indicated by each cluster center to obtain an object mask map when the number of iterations reaches a preset iteration threshold.
[0148] The above-mentioned target image information extraction device can extract the image gradient information of the pre-collected target image and the color information of each pixel block through the extraction unit 41, merge the adjacent pixel blocks by combining the image gradient information and the color information of each pixel block through the merging unit 42, and segment the merged pixel blocks to obtain multiple segmented pixel blocks, calculate the spatial distance information and non-spatial distance information of each segmented pixel block and the cluster center through the calculation unit 43, iteratively update the membership of each segmented pixel block and the cluster center by combining the spatial distance information and the non-spatial distance information through the updating unit 44, and update the cluster center based on the updated membership, and output the image classification objects indicated by each cluster center through the output unit 45 when the number of iterations reaches a preset iteration threshold, so as to obtain an object mask map. In this embodiment, the image can be segmented in combination with multi-domain color information, and the spatial distance information and non-spatial distance information can be fused, and the membership of each segmented pixel block and the cluster center can be iteratively updated, thereby simplifying the complex background in the driving process, accurately extracting the size information of each object to be detected, and accurately identifying the shape of the object in the image to improve the vehicle detection accuracy within the driving field of view, thereby solving the technical problem in the related technology that the intelligent driving system of the vehicle cannot accurately identify the shape of the object in the image, which easily causes the vehicle to brake incorrectly.
[0149] Optionally, the extraction unit includes: a first acquisition module, used to acquire the target image collected by the current vehicle; a first extraction module, used to extract color distribution information of the target image to obtain image gradient information; a first segmentation module, used to combine the image gradient information and use a preset watershed algorithm to segment the target image to obtain multiple pixel blocks, wherein each pixel block includes multiple pixel points.
[0150] Optionally, the merging unit includes: a first traversal module, used to traverse each pixel point in each pixel block to obtain color information of each pixel point; a first determination module, used to determine the color mean of the pixel block in combination with the color information of each pixel point; a first assignment module, used to assign the color mean to each pixel point in the pixel block; a first calculation module, used to calculate the color similarity between two adjacent pixel blocks in combination with the change in the RGB color channel between each two adjacent pixel blocks; and a first merging module, used to merge adjacent pixel blocks when the color similarity is greater than a preset similarity threshold.
[0151] Optionally, the calculation unit includes: a second acquisition module, used to obtain the adaptive parameters of the mean non-Euclidean distance errors between all segmented pixel blocks and the current cluster center; a second calculation module, used to calculate the Gaussian kernel distance value between each segmented pixel block and the cluster center in combination with the inner product parameter of the Gaussian kernel function; and a third calculation module, used to calculate the non-spatial distance information between each segmented pixel block and the cluster center in combination with the adaptive parameters and the Gaussian kernel distance value.
[0152] Optionally, the update includes: a third calculation module, used to calculate the product between spatial distance information and non-spatial distance information to obtain spatial mixing parameters; a first substitution module, used to substitute the spatial mixing parameters and the initial membership into the objective function; a simplification module, used to simplify the objective function to update the membership between each segmented pixel block and the cluster center; an update module, used to iteratively update the membership of each segmented pixel block and the cluster center when the number of iterations does not reach a preset iteration threshold.
[0153] Optionally, the simplification module includes: a first adjustment submodule, which is used to optimize and adjust the objective function using the Lagrange multiplier method to obtain a partial differential equation under preset constraints; a calculation submodule, which is used to calculate the minimum value of the partial differential equation using the initial membership and the partial derivative of the cluster center; and an update submodule, which is used to update the membership between each segmented pixel block and the cluster center in combination with the minimum value of the partial differential equation.
[0154] Optionally, the output unit includes: a second determination module, used to determine the target membership and target cluster center output by the last iterative update when the number of iterations reaches a preset iteration threshold; a third acquisition module, used to obtain the image classification object of the segmented pixel block indicated by the target membership and the target cluster center; a generation module, used to color identify the image classification object in combination with the color information determined when the pixel block is segmented, and generate an object mask map.
[0155] The above-mentioned target image information extraction device may also include a processor and a memory. The above-mentioned extraction unit 41, merging unit 42, calculation unit 43, update unit 44, output unit 45, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0156] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters are adjusted to output the image classification objects indicated by each cluster center when the number of iterations reaches a preset iteration threshold, so as to obtain an object mask map.
[0157] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0158] According to another aspect of an embodiment of the present invention, a vehicle device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above-mentioned target image information extraction methods by executing the executable instructions.
[0159] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned target image information extraction methods.
[0160] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: extracting image gradient information and color information of each pixel block of a pre-collected target image, wherein the target image is divided into multiple pixel blocks; combining the image gradient information and the color information of each pixel block, merging adjacent pixel blocks, and segmenting the merged pixel blocks to obtain multiple segmented pixel blocks; calculating the spatial distance information and non-spatial distance information between each segmented pixel block and the cluster center; combining the spatial distance information and the non-spatial distance information, iteratively updating the membership of each segmented pixel block and the cluster center, and updating the cluster center based on the updated membership; when the number of iterations reaches a preset iteration threshold, outputting the image classification objects indicated by each cluster center to obtain an object mask map.
[0161] Figure 5 1 is a hardware structure block diagram of an electronic device (or mobile device) according to a method for extracting information of a target image according to an embodiment of the present invention. Figure 5 As shown, the electronic device may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 5 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 5 More or fewer components as shown, or with Figure 5 Different configurations shown.
[0162] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0163] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0165] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0166] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0168] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for extracting information from a target image, characterized in that: include: Extracting image gradient information and color information of each pixel block of a pre-collected target image, wherein the target image is divided into a plurality of pixel blocks; Combining the image gradient information and the color information of each pixel block, merging adjacent pixel blocks, and segmenting the merged pixel blocks to obtain a plurality of segmented pixel blocks; Calculating the spatial distance information and non-spatial distance information between each of the segmented pixel blocks and the cluster center, including: obtaining an adaptive parameter of the mean value of the non-Euclidean distance error between all the segmented pixel blocks and the current cluster center; calculating the Gaussian kernel distance value between each of the segmented pixel blocks and the cluster center in combination with the inner product parameter of the Gaussian kernel function; calculating the non-spatial distance information between each of the segmented pixel blocks and the cluster center in combination with the adaptive parameter and the Gaussian kernel distance value; Iteratively updating the membership degree between each segmented pixel block and the cluster center in combination with the spatial distance information and the non-spatial distance information, and updating the cluster center based on the updated membership degree; When the number of iterations reaches a preset iteration threshold, the image classification objects indicated by each cluster center are output to obtain an object mask map.
2. The information extraction method according to claim 1, characterized in that: The step of extracting image gradient information of the pre-collected target image and color information of each pixel block comprises: Get the target image collected by the current vehicle; Extracting color distribution information of the target image to obtain image gradient information; In combination with the image gradient information, a preset watershed algorithm is used to segment the target image to obtain a plurality of pixel blocks, wherein each of the pixel blocks includes a plurality of pixel points.
3. The information extraction method according to claim 2, characterized in that: The step of combining adjacent pixel blocks in combination with the image gradient information and the color information of each pixel block comprises: Traversing each pixel point in each pixel block to obtain color information of each pixel point; Determine the color mean of the pixel block by combining the color information of each pixel point; Assigning the color mean to each pixel in the pixel block; Combine the changes in the RGB color channels between each two adjacent pixel blocks to calculate the color similarity between the two adjacent pixel blocks; When the color similarity is greater than a preset similarity threshold, the adjacent pixel blocks are merged.
4. The information extraction method according to claim 1, characterized in that: The step of iteratively updating the degree of membership of each segmented pixel block and the cluster center in combination with the spatial distance information and the non-spatial distance information comprises: Calculate the product between the spatial distance information and the non-spatial distance information to obtain a spatial mixing parameter; Substituting the spatial mixing parameters and the initial membership into the objective function; Simplifying the objective function to update the degree of membership between each segmented pixel block and the cluster center; When the number of iterations does not reach the preset iteration threshold, the membership degree of each segmented pixel block and the cluster center is iteratively updated.
5. The information extraction method according to claim 4, characterized in that: The step of simplifying the objective function to update the degree of membership between each segmented pixel block and the cluster center includes: The objective function is optimized and adjusted by using the Lagrange multiplier method to obtain a partial differential equation under preset constraints; Calculating the minimum value of the partial differential equation using the initial membership degree and the partial derivative of the cluster center; In combination with the minimum value of the partial differential equation, the degree of membership between each segmented pixel block and the cluster center is updated.
6. The information extraction method according to claim 1, characterized in that: The step of outputting the image classification objects indicated by each cluster center to obtain the object mask map includes: When the number of iterations reaches a preset iteration threshold, the target membership and target cluster center outputted by the last iteration update are determined; Obtaining the target membership and the image classification object of the segmented pixel block indicated by the target cluster center; The color information determined when the pixel blocks are segmented is combined to perform color identification on the image classification objects to generate the object mask image.
7. A device for extracting information from a target image, characterized in that: include: An extraction unit, used to extract image gradient information of a pre-collected target image and color information of each pixel block, wherein the target image is divided into a plurality of pixel blocks; A merging unit, used to combine the image gradient information and the color information of each pixel block, merge adjacent pixel blocks, and segment the merged pixel blocks to obtain a plurality of segmented pixel blocks; A calculation unit, used to calculate the spatial distance information and non-spatial distance information between each of the segmented pixel blocks and the cluster center, the calculation unit comprising: a second acquisition module, used to obtain the adaptive parameter of the mean value of the non-Euclidean distance error between all the segmented pixel blocks and the current cluster center; a second calculation module, used to calculate the Gaussian kernel distance value between each of the segmented pixel blocks and the cluster center in combination with the inner product parameter of the Gaussian kernel function; a third calculation module, used to calculate the non-spatial distance information between each of the segmented pixel blocks and the cluster center in combination with the adaptive parameter and the Gaussian kernel distance value; An updating unit, configured to iteratively update the membership degree between each segmented pixel block and the cluster center in combination with the spatial distance information and the non-spatial distance information, and update the cluster center based on the updated membership degree; The output unit is used to output the image classification objects indicated by each clustering center when the number of iterations reaches a preset iteration threshold, so as to obtain an object mask map.
8. A vehicle device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the target image information extraction method according to any one of claims 1 to 6 by executing the executable instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the target image information extraction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Combined distance based FCM image segmentation algorithm
CN106447662A
An image significance detection method and device
CN109685806A
Super-pixel segmentation method based on image color and density characteristics
CN112365517A