An image segmentation method, device, vehicle and storage medium

By improving the watershed method and multidimensional feature fusion metric, the problem of target detection in color images under uneven illumination is solved, achieving higher accuracy in image segmentation and target recognition.

CN115512145BActive Publication Date: 2026-01-02CHINA FAW CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211249080.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2026-01-02
Estimated Expiration
2042-10-12

AI Technical Summary

Technical Problem

When processing color images, existing technologies are affected by uneven lighting, making it difficult to detect targets completely and accurately. Traditional methods also perform poorly in segmentation under irregular color distributions.

Method used

An improved watershed method is used for pre-segmentation, combined with multidimensional gradient fusion and color median labeling to generate target superpixel images. Clustering is performed using multidimensional feature fusion metric, and the fuzzy C-means clustering algorithm is optimized to improve robustness.

Benefits of technology

It improves the accuracy and robustness of image segmentation, better adapts to irregular color distributions, and optimizes target recognition performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115512145B_ABST
    Figure CN115512145B_ABST
Patent Text Reader

Abstract

The application discloses an image segmentation method and device, a vehicle and a storage medium. The method comprises the following steps: acquiring an original target image; performing pre-segmentation on the original target image by using an improved watershed method to obtain a target superpixel image, wherein the improved watershed method is used to regularize the color distribution of a multi-dimensional gradient fusion image based on color similarity; and performing clustering on a target superpixel block in the target superpixel image based on a multi-dimensional feature fusion measurement to realize image segmentation. In order to adapt to the irregular shape of a target contour in an image and fully utilize color information when retaining the target contour information, the application improves the fuzzy C-means clustering algorithm to the superpixel level, embeds a superpixel fusion operation based on color similarity, introduces local color information and gradient information, completes the regularization of target color distribution, and further updates a membership matrix by using a multi-dimensional feature fusion method and embeds the multi-dimensional feature fusion method in the clustering process, thereby improving the robustness of the image segmentation method.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to an image segmentation method and device, a vehicle and a storage medium. BACKGROUND

[0002] Intelligent networked automobile technology has been widely used in ensuring driving safety, simplifying travel and energy saving and emission reduction, etc. Among them, computer vision technology plays a crucial role in the perception and understanding of the driver's surrounding environment. Its objective and accurate prompts are of great help to the driver to make correct decisions and reasonable plans. In order to comprehensively understand the surrounding environment and target posture state, the accurate extraction of the external driving environment needs to have higher requirements.

[0003] Generally, the image information captured by the vehicle video sensor is a three-channel color picture. Compared with a gray picture, a color picture has more spatial information and gradient information. Affected by uneven light intensity, the color distribution of the same target in a color image is irregular. Therefore, there is still a great challenge in how to completely and accurately detect the target. SUMMARY

[0004] The present application provides an image segmentation method, device, vehicle and storage medium to realize image segmentation and accurately identify target objects in the image.

[0005] According to an aspect of the present application, an image segmentation method is provided, which comprises:

[0006] obtaining an original target image;

[0007] pre-segmenting the original target image using an improved watershed method to obtain a target superpixel image, wherein the improved watershed method regularizes the color distribution of a multi-dimensional gradient fusion image based on color similarity;

[0008] clustering target superpixel blocks in the target superpixel image based on a multi-dimensional feature fusion metric to realize image segmentation.

[0009] Optionally, the pre-segmenting the original target image using the improved watershed method to obtain the target superpixel image comprises:

[0010] performing multi-dimensional gradient fusion and watershed operation on the original target image to generate an initial superpixel image;

[0011] performing color median marking on initial superpixel blocks in the initial superpixel image to obtain the target superpixel image.

[0012] Optionally, the performing multi-dimensional gradient fusion and watershed operation on the original target image to generate an initial superpixel image comprises:

[0013] determining a fusion gradient image of the original target image in at least two different dimensions;

[0014] performing multi-dimensional fusion on each of the fusion gradient images to obtain a multi-dimensional gradient fusion image;

[0015] performing a watershed operation on the multi-dimensional gradient fusion image to obtain an initial superpixel image.

[0016] Optionally, the method further comprises:

[0017] determining a color intensity median value of each initial superpixel block in the initial superpixel image;

[0018] assigning the color intensity median value to all pixel points in the initial superpixel block to obtain a target superpixel block;

[0019] reconstructing each of the target superpixel blocks to obtain a target superpixel image.

[0020] Optionally, the method further comprises:

[0021] initializing at least two cluster centers and determining a membership value of each target superpixel block in the target superpixel image to each cluster center, wherein the membership value is obtained by fusing a color similarity and a spatial distance of the target superpixel block to the cluster center;

[0022] determining a target function value according to each of the membership values and in combination with a pre-constructed target function;

[0023] when the target function value is greater than a preset clustering threshold, updating each cluster center and the membership value of each target superpixel block to each cluster center based on a target function minimization principle until the re-determined target function value is less than the preset clustering threshold;

[0024] performing clustering on each of the target superpixel blocks based on the updated membership values to implement image segmentation.

[0025] Optionally, the membership value is positively correlated with the color similarity.

[0026] Optionally, the membership value is negatively correlated with the spatial distance.

[0027] According to another aspect of the present application, there is provided an image segmentation device, which comprises:

[0028] An image acquisition module is configured to acquire an original target image;

[0029] An over-pixel pre-segmentation module is configured to pre-segment the original target image by using an improved watershed method to obtain a target over-pixel image, wherein the improved watershed method is based on color similarity to regularize the color distribution of a multi-dimensional gradient fusion image;

[0030] A multi-feature fusion clustering module is configured to cluster target over-pixel blocks in the target over-pixel image based on a multi-dimensional feature fusion metric to realize image segmentation.

[0031] According to another aspect of the present application, a vehicle is provided, which comprises:

[0032] A sensor is configured to acquire an original target image;

[0033] At least one controller; and

[0034] A memory in communication connection with the at least one controller; wherein,

[0035] The memory stores a computer program executable by the at least one controller, and the computer program is executed by the at least one controller to enable the at least one controller to execute the image segmentation method according to any one of the embodiments of the present application.

[0036] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to execute the image segmentation method according to any one of the embodiments of the present application.

[0037] The technical scheme of the embodiments of the present application comprises the following steps: acquiring an original target image; pre-segmenting the original target image by using an improved watershed method to obtain a target over-pixel image, wherein the improved watershed method is based on color similarity to regularize the color distribution of a multi-dimensional gradient fusion image; and clustering target over-pixel blocks in the target over-pixel image based on a multi-dimensional feature fusion metric to realize image segmentation. In order to adapt to the irregular shape of the target contour in the image and make full use of color information when retaining the target contour information, the improved watershed method is used to promote the fuzzy C-means clustering algorithm to the over-pixel level, embed an over-pixel fusion operation based on color similarity, introduce local color information and gradient information, complete the regularization of the target color distribution, and further update the membership matrix by using a multi-dimensional feature fusion method and embed it in the clustering process, thereby improving the robustness of the fuzzy C-means clustering algorithm to uneven color changes and optimizing the image segmentation effect.

[0038] It is to be understood that the details set forth herein do not limit the scope of the embodiments of the application to the specific embodiments described. Rather, the scope of the embodiments of the application is to be defined by the appended claims. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0040] Figure 1 is a flow chart of an image segmentation method provided by the first embodiment of the present application;

[0041] Figure 2 is a principle diagram of multi-dimensional gradient fusion in an image segmentation method provided by the first embodiment of the present application;

[0042] Figure 3 is a principle diagram of color median marking in an image segmentation method provided by the first embodiment of the present application;

[0043] Figure 4 is a principle diagram of clustering in an image segmentation method provided by the first embodiment of the present application;

[0044] Figure 5 is a structure diagram of an image segmentation device provided by the second embodiment of the present application;

[0045] Figure 6 is a structure diagram of a vehicle for implementing the image segmentation method of the present application. DETAILED DESCRIPTION

[0046] In order to make the technical personnel in the art better understand the present application scheme, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0047] It should be noted that the terms "first", "second", "original", "initial", "target" and the like in the description, claims, and drawings of the application are used for distinguishing between similar objects, not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of such terms herein is merely for distinguishing between the comparable objects and the use of such terms in the context of the present application is not a representation that a specific order or chronology is intended or required. Further, the terms "comprising" and "including" and any variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, system, product, or apparatus that comprises a list of steps or elements not merely comprises those listed steps or elements but can include additional steps or elements not expressly listed or inherent to such process, method, product, or apparatus. The terms "comprising" and "including" and any variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, system, product, or apparatus that comprises a list of steps or elements not merely comprises those listed steps or elements but can include additional steps or elements not expressly listed or inherent to such process, method, product, or apparatus.

[0048] Embodiment one

[0049] Figure 1 A flowchart of an image segmentation method is provided for the embodiment one of the present application, the embodiment can be applied to segment an image and identify target objects in the image, the method can be executed by an image segmentation device, the image segmentation device can be realized in the form of hardware and / or software, and the image segmentation device can be configured in a vehicle controller. As shown in the figure, the method comprises the following steps. Figure 1

[0050] S110, acquiring an original target image.

[0051] The image segmentation method of the embodiment can be applied to a vehicle intelligent driving scene, and the target objects after image segmentation are intelligently identified by segmenting the image collected by a vehicle sensor, so as to assist the driver to make correct decisions and reasonable plans.

[0052] In the embodiment, the original target image can be an environmental image around the vehicle collected by a vehicle collector.

[0053] S120, pre-segmenting the original target image by using an improved watershed method to obtain a target superpixel image, wherein the improved watershed method is based on color similarity to regularize the color distribution of a multi-dimensional gradient fusion image.

[0054] Generally, the traditional watershed method fuses the similar regions of the image according to the intensity change and the similarity between the pixels. Under the condition of uneven light intensity, different parts of the same target in the image will present a complex color distribution, so it is difficult to select a suitable classifier to accurately extract the target in the color real image, and only the original image segmentation clustering method will obtain a low-precision segmentation result. In the embodiment, the improved watershed operation is combined with the clustering method, and the clustering algorithm is improved to the superpixel level to improve the robustness of the algorithm to color difference. ​

[0055] Firstly, the present application improves the watershed algorithm, pre-segments the original target image to generate superpixel blocks and retains the image contour information, and then, to overcome the over-segmentation phenomenon caused by the traditional watershed operation, the embodiment of the present application reconstructs based on the superpixel fusion module of color similarity to obtain a target superpixel image. Local color composition information and gradient information are integrated into the watershed algorithm to regularize the color distribution.

[0056] Optionally, S120 can be implemented by the following steps:

[0057] S1201, performing multi-dimensional gradient fusion and watershed operation on the original target image to generate an initial superpixel image.

[0058] Further, S1201 can be implemented by the following specific method: determining fusion gradient images of the original target image in at least two different dimensions; performing multi-dimensional fusion on each fusion gradient image to obtain a multi-dimensional gradient fusion image; performing watershed operation on the multi-dimensional gradient fusion image to obtain an initial superpixel image.

[0059] S1202, performing color median marking on the initial superpixel blocks in the initial superpixel image to obtain a target superpixel image.

[0060] Further, S1202 can be implemented by the following specific method: for each initial superpixel block in the initial superpixel image, determining the color intensity median of the initial superpixel block; assigning the color intensity median to all pixel points in the initial superpixel block to obtain a target superpixel block; reconstructing each target superpixel block to obtain a target superpixel image.

[0061] In this embodiment, the superpixel merging module based on color similarity is designed in two parts: on the one hand, multi-dimensional gradient fusion is proposed to introduce gradient information; on the other hand, color median marking is embedded into the watershed algorithm to combine local color information. Generally, the traditional watershed algorithm relies too much on the gradient change of the original image, but irregular color intensity will lead to an increase in weak gradient change, so that the region of interest cannot be extracted to the maximum extent. Therefore, to improve the pre-segmentation effect, the present application proposes multi-dimensional gradient fusion to improve the watershed algorithm. Generally, the traditional gradient expression can be expressed as:

[0062]

[0063]

[0064]

[0065] wherein f can represent the original target image, G x , G yThe transverse and longitudinal gradients obtained by the Sobel operator can be represented by G(f), and G(f) can represent the gradient of the image x , G y The gradient fusion image is fused. In the multi-dimensional gradient fusion module, the gradient of another dimension is fused on the basis of G(f) to obtain more gradient information. For example, the gradient information of another two dimensions is fused on the basis of G(f), and the formula can be represented as follows:

[0066]

[0067] Figure 2 is a schematic diagram of the principle of multi-dimensional gradient fusion in an image segmentation method provided by an embodiment of the present application, wherein G(f1) can represent Figure 2 (a) in FIG. 1 to maintain the sharp gradient change and weaken the slight gradient change; G(f2) can represent Figure 2 (b) in FIG. 1, which can be a standard scale fusion gradient image; G(f3) can represent Figure 2 (c) in FIG. 1, which is introduced to also strengthen the sharp gradient change; F G can represent a multi-dimensional gradient fusion image obtained by performing multi-dimensional fusion on each fusion gradient image, such as Figure 2 (d) in FIG. 1.

[0068] The embodiment can perform a watershed operation by taking F G as the basis to obtain an initial superpixel image:

[0069] F w (ξ1,ξ2,…ξ n )=watershed(F G ),

[0070] C(ξ i )=median[C(a1),C(a2),…C(a m )],

[0071] wherein a j ∈ξ i , j∈[1,m], F W can represent the initial superpixel image obtained by the watershed operation, {ξ1,ξ2,…ξ n} can represent different initial superpixel blocks, C(ξ i ) can represent the color intensity of each superpixel block, {a1,a2,…a m} can represent all pixel points in the block ξ i , and the median operation can represent the pixel {a1,a2,…a mThe color intensity of the color value is sorted and the median value is taken. Since the color difference can be represented as a super-pixel block with a very small size, the multi-dimensional gradient fusion is used to suppress the very small region, and the color median value of each super-pixel block is introduced. The local color information is combined with the clustering method to reduce the influence of the uneven color intensity distribution, and the partial data is regularized. Figure 3 Figure 1 is a schematic diagram of the color median value marking principle in an image segmentation method provided by an embodiment of the present application, as shown in Figure 1, the color median value marking operation process of the embodiment can be as follows: Figure 3

[0072] ChannelR, ChannelG and ChannelB can represent the pixel values of the three color channels before color median value marking, Figure 3 In the initial super-pixel block in the red channel ChannelR, the pixel color intensity values are sorted as [0, 221, 221, 225, 228, 228, 230, 234, 237], and it is easy to know that the color intensity median value is 228. Then, the color intensity median value is assigned to all the pixel points in the initial super-pixel block, as shown in the pixel table (c) in Figure 2, that is, the super-pixel block with local color information is introduced. As can be seen, the intensity distribution in the pixel block has been regularized. After the color median value marking is applied to the entire super-pixel image, the complex color distribution will be suppressed, as shown in Figure 2(e). The uneven color distribution has been eliminated, and the target contour information is preserved. The color median value marking method proposed in the embodiment can deal with irregular color distribution in a color image, and reduces the sensitivity of the clustering algorithm to intensity changes. Figure 4 Figure 3

[0073] S130, based on the multi-dimensional feature fusion measurement, clustering the target super-pixel block in the target super-pixel image to realize image segmentation.

[0074] In the classical fuzzy set theory, the membership is defined by the membership degree of each element to each cluster center, and the membership function value of each element is limited to [0, 1]. Mathematically, the fuzzy set F is defined as:

[0075] F = {(x, μ F (x)) | x E},

[0076] Where μ F (x) is the membership value of element x to the universal set E, and for each element x, μ F (x) is between [0, 1].

[0077] ​​​​Traditional fuzzy C-means clustering (FCM) divides the pixels in an image into c fuzzy clusters. In each iteration, the cluster centers and membership values ​​are updated to minimize the objective function. The objective function is used to classify the feature vectors by minimizing the objective function, which can be expressed as:

[0078]

[0079] J is calculated by updating the membership matrix U and the cluster center V. f The minimum value of x, where x k The pixels k and c in the image i Representing the cluster center i, by evaluating pixel x k With cluster center c i The membership relationship between them is used to calculate the member function value u. ik .in addition, The following formula gives u ik With c i The update method, where dis(x) k ,c i ) can be represented as pixels x k With cluster center c i Euclidean distance between them:

[0080]

[0081]

[0082] Although FCM is widely used in image segmentation, as shown in the above formula, it ignores local and spatial information during the iteration process. Furthermore, due to the influence of factors such as illumination intensity on real color images, the color distribution and intensity of the same target are not uniform. This will cause FCM to be unable to fully adapt to the complex color distribution of real color images, resulting in unsatisfactory clustering effects.

[0083] To improve FCM's ability to segment real color images, this embodiment embeds a multi-feature adaptive fusion metric into the membership update process. This metric is designed as a combination of color similarity and spatial distance. Specifically, this metric fuses the similarity between superpixel blocks and cluster centers on top of a simple Euclidean metric. The fusion of multiple features improves the algorithm's robustness to uneven color distributions.

[0084] Optionally, S130 can be implemented through the following steps:

[0085] S1301. Initialize at least two cluster centers and determine the membership value of each target superpixel block in the target superpixel image to each cluster center. The membership value is obtained by fusing the color similarity and spatial distance of the target superpixel block to the cluster center.

[0086] Further, the membership value is positively correlated with the color similarity; and the membership value is negatively correlated with the spatial distance.

[0087] S1302, according to each membership value, a target function is determined in combination with a pre-constructed target function.

[0088] S1303, when the target function value is greater than a preset clustering threshold, each clustering center and the membership value of each target superpixel block to each clustering center are updated based on a target function minimization principle, until the target function value determined again is less than the preset clustering threshold.

[0089] S1304, based on the updated membership value, each target superpixel block is clustered to realize image segmentation.

[0090] Generally, the traditional FCM only updates the membership according to the Euclidean distance between the pixels and the clustering center, which will lead to poor adaptability to the complex structure of the real color image and incomplete target extraction. Although the watershed algorithm is improved in this embodiment to optimize the color distribution, however, the color composition between the superpixel blocks is still complex, and the simple Euclidean distance is still used for image segmentation, which will lead to misclassification. To improve the segmentation ability of FCM, the present application proposes a multi-feature adaptive fusion module to calculate the membership matrix, and further utilizes the spatial information.

[0091] In this embodiment, the color similarity and the spatial distance distribution are considered in the membership evaluation process. In addition, in order to automatically adjust the proportion of each feature, this embodiment also designs an adaptive fusion rule of multiple features. Among them, the measurement method of this embodiment ensures that only the superpixel blocks with high intensity color similarity and distance proximity have high membership values. The optimization of multi-dimensional features not only improves the accuracy of the segmentation result, but also improves the robustness of the clustering algorithm to irregular color intensity.

[0092] Figure 4 is a principle diagram of clustering in an image segmentation method provided by the first embodiment of the present application, as shown in Figure 4 The harmonic mean can automatically normalize all similarities without prior knowledge, and pays more attention to low membership values, so the present embodiment can use a multi-feature adaptive fusion method based on the harmonic mean to fuse the color similarity and the spatial distance. Specifically, the membership measurement method can be defined as:

[0093]

[0094] Among them, the measurement method proposed in this embodiment consists of two parts: the first part D ki can be distance measurement, and the second part S kiThe two parts can represent local color information, and the specific design scheme can be as follows:

[0095] D ki = exp(-dis 2 (ξ k ,v i )),

[0096] S ki = exp(-simu 2 ||ξ k ,v i ||),

[0097] wherein D ki may be spatial distance information based on Euclidean distance proximity, and the simu operation indicates the color similarity between the target superpixel block ξ k and the cluster center v i . The specific calculation method of the simu operation can be as follows:

[0098]

[0099]

[0100]

[0101] wherein R k and R i may represent the R channel values of the target superpixel block ξ k and the cluster center v i respectively, and ΔR, ΔG and ΔB may represent the RGB three-channel color change amount respectively. Smaller color change amount will get larger simu value.

[0102] Since simu>0 and dis>0, it is easy to know that D ki ∈(0,1] and G ki ∈(0,1]. With the decrease of the distance between the target superpixel and the cluster center, the influence of D ki will increase, which represents that the superpixel block with similar distance to the cluster center has a larger weight value. Similarly, if a target superpixel block is not only similar to the cluster center, but also has higher color similarity, the value of M ki will also be larger, so the target superpixel point will be regarded as a member of the class.

[0103] From the perspective of the objective function, the embedding of the multi-feature adaptive fusion measure can be represented as the replacement of the distance variable, so the method proposed in the embodiment has stronger adaptability to the complex structure and fuzzy edge of the real color image.

[0104] The embodiment can cluster the target superpixel map, and directly input the centroid of each superpixel into the clustering process. The objective function of the clustering method of the embodiment can be expressed as:

[0105]

[0106] The embodiment can solve the partial differential equation by using the partial differential variables u ik and v i to minimize the objective function by the Lagrange multiplier method. Through calculation, the membership update formula of the embodiment can be expressed as:

[0107]

[0108] The clustering center update formula can be expressed as:

[0109]

[0110] By u ik in the above formula, the objective function J can be minimized.

[0111] The technical scheme of the embodiment of the application comprises the following steps: obtaining an original target image; performing pre-segmentation on the original target image by using an improved watershed method to obtain a target superpixel image, wherein the improved watershed method performs regularization on the color distribution of a multi-dimensional gradient fusion image based on color similarity; and clustering target superpixel blocks in the target superpixel image based on a multi-dimensional feature fusion measure to realize image segmentation. In order to adapt to the irregular shape of the target contour in the image and fully utilize color information when retaining the target contour information, the improved watershed method is used to promote the fuzzy C-means clustering algorithm to the superpixel level, embed a superpixel fusion operation based on color similarity, introduce local color information and gradient information, complete the regularization of the target color distribution, and further update the membership matrix by using a multi-dimensional feature fusion method and embed it in the clustering process, thereby improving the robustness of the fuzzy C-means clustering algorithm to uneven color changes and optimizing the image segmentation effect.

[0112] Embodiment Two

[0113] Figure 5 A structural schematic diagram of an image segmentation device according to Embodiment Two of the application is provided. As shown in FIG. 5, the device comprises:

[0114] An image acquisition module 510 is configured to acquire an original target image.

[0115] The superpixel pre-segmentation module 520 is configured to pre-segment the original target image by using an improved watershed method to obtain a target superpixel image, wherein the improved watershed method is based on color similarity to regularize color distribution of a multi-dimensional gradient fusion image.

[0116] The multi-feature fusion clustering module 530 is configured to cluster target superpixel blocks in the target superpixel image based on a multi-dimensional feature fusion metric to realize image segmentation.

[0117] Optionally, the superpixel pre-segmentation module 520 comprises:

[0118] The initial superpixel generation unit is configured to perform multi-dimensional gradient fusion and watershed operation on the original target image to generate an initial superpixel image.

[0119] The target superpixel generation unit is configured to perform color median marking on initial superpixel blocks in the initial superpixel image to obtain a target superpixel image.

[0120] Optionally, the initial superpixel generation unit is specifically configured to:

[0121] determine fusion gradient images of the original target image in at least two different dimensions;

[0122] perform multi-dimensional fusion on each of the fusion gradient images to obtain a multi-dimensional gradient fusion image;

[0123] perform watershed operation on the multi-dimensional gradient fusion image to obtain an initial superpixel image.

[0124] Optionally, the target superpixel generation unit is specifically configured to:

[0125] for each initial superpixel block in the initial superpixel image, determine a color intensity median value of the initial superpixel block;

[0126] assign the color intensity median value to all pixel points in the initial superpixel block to obtain a target superpixel block;

[0127] reconstruct each of the target superpixel blocks to obtain a target superpixel image.

[0128] Optionally, the multi-feature fusion clustering module 530 is specifically configured to:

[0129] initialize at least two cluster centers and determine membership values of each target superpixel block in the target superpixel image to each cluster center, wherein the membership value is obtained by fusing color similarity and spatial distance of the target superpixel block to the cluster center;

[0130] Based on the membership values ​​described above, and in conjunction with the pre-constructed objective function, the value of the objective function is determined.

[0131] When the objective function value is greater than the preset clustering threshold, based on the principle of minimizing the objective function, the membership values ​​of each cluster center and each target superpixel block to each cluster center are updated until the newly determined objective function value is less than the preset clustering threshold.

[0132] Based on the updated membership values, the target superpixel blocks are clustered to achieve image segmentation.

[0133] Optionally, the membership value is positively correlated with the color similarity.

[0134] Optionally, the membership value is negatively correlated with the spatial distance.

[0135] The image segmentation apparatus provided in the embodiments of the present invention can execute the image segmentation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0136] Example 3

[0137] Figure 6 This is a structural block diagram of a vehicle provided in Embodiment 3 of the present invention, as shown below. Figure 6 As shown, the vehicle includes a controller 610, a memory 620, a sensor 630, an input device 640, and an output device 650; the number of controllers 610 in the vehicle can be one or more. Figure 6 Taking a controller 610 as an example; the number of sensors 630 in a vehicle can be one or more. Figure 6 Taking sensor 630 as an example; the controller 610, memory 620, sensor 630, input device 640, and output device 650 in the vehicle can be connected via bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.

[0138] The memory 620, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the image segmentation method in this embodiment of the invention (e.g., the image acquisition module 510, the superpixel pre-segmentation module 520, and the multi-feature fusion clustering module 530 in the image segmentation device). The controller 610 executes various functional applications and data processing of the vehicle by running the software programs, instructions, and modules stored in the memory 620, thereby realizing the image segmentation method described above.

[0139] The memory 620 can include a program storage area and a data storage area, where the program storage area can store an operating system, application programs required by at least one function, and the like, and the data storage area can store data created based on use of the terminal, and the like. In addition, the memory 620 can include a high-speed random access memory, and can further include a non-volatile memory, such as at least one of a magnetic disk storage device, a flash memory device, or other non-volatile solid state storage device. In some examples, the memory 620 can further include a memory disposed remotely with respect to the controller 610, which can be connected to the vehicle through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0140] The input device 640 can be used to receive input digital or character information, and to generate key signal inputs related to user settings of the vehicle and function controls. The output device 650 can include a display device such as a display screen.

[0141] Embodiment Four

[0142] The embodiment four of the present application further provides a storage medium containing computer executable instructions, which, when executed by a computer controller, are used to perform an image segmentation method, which comprises:

[0143] Obtaining an original target image;

[0144] Pre-segmenting the original target image by using an improved watershed method to obtain a target superpixel image, wherein the improved watershed method regularizes color distribution of a multi-dimensional gradient fusion image based on color similarity;

[0145] Clustering target superpixel blocks in the target superpixel image based on a multi-dimensional feature fusion metric to achieve image segmentation.

[0146] Of course, the computer executable instructions of the storage medium provided by the embodiment of the present application are not limited to the method operations as described above, and can also perform related operations in the image segmentation method provided by any embodiment of the present application.

[0147] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary universal hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk, or an optical disc, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in various embodiments of the present application.

[0148] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, the steps described in the present application can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, and this is not limited herein.

[0149] The above specific embodiments do not constitute a limitation on the scope of protection of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. An image segmentation method characterized by, The method comprises the following steps: obtaining an original target image; performing pre-segmentation on the original target image by using an improved watershed method to obtain a target superpixel image, wherein the improved watershed method regularizes the color distribution of a multi-dimensional gradient fusion image based on color similarity; performing clustering on target superpixel blocks in the target superpixel image based on a multi-dimensional feature fusion metric to realize image segmentation; the pre-segmentation on the original target image by using the improved watershed method to obtain the target superpixel image comprises the following steps: performing multi-dimensional gradient fusion and watershed operation on the original target image to generate an initial superpixel image; performing color median marking on initial superpixel blocks in the initial superpixel image to obtain the target superpixel image; the multi-dimensional gradient fusion and watershed operation on the original target image to generate the initial superpixel image comprises the following steps: determining fusion gradient images of the original target image in at least two different dimensions; performing multi-dimensional fusion on each of the fusion gradient images to obtain a multi-dimensional gradient fusion image; performing watershed operation on the multi-dimensional gradient fusion image to obtain the initial superpixel image; the clustering on the target superpixel blocks in the target superpixel image based on the multi-dimensional feature fusion metric to realize image segmentation comprises the following steps: initializing at least two cluster centers and determining the membership values of each target superpixel block to each cluster center in the target superpixel image, wherein the membership values are obtained by fusing the color similarity and the spatial distance of the target superpixel block to the cluster center; determining the value of the target function according to the membership values and combining a pre-constructed target function; when the value of the target function is greater than a preset clustering threshold, updating each cluster center and the membership values of each target superpixel block to each cluster center based on the principle of minimizing the target function until the newly determined value of the target function is less than the preset clustering threshold; performing clustering on each of the target superpixel blocks based on the updated membership values to realize image segmentation.

2. The method of claim 1, wherein, the color median marking on the initial superpixel blocks in the initial superpixel image to obtain the target superpixel image comprises the following steps: determining the color intensity median of each initial superpixel block in the initial superpixel image; assigning the color intensity median to all pixel points in the initial superpixel block to obtain a target superpixel block; reconstructing each target superpixel block to obtain the target superpixel image.

3. The method according to claim 1, wherein the membership value is positively correlated with the color similarity.

4. The method according to claim 1, wherein the membership value is negatively correlated with the spatial distance. The method comprises the following steps: an image acquisition module for acquiring an original target image; 5. An image segmentation apparatus characterized by comprising: a superpixel pre-segmentation module for performing pre-segmentation on the original target image by using an improved watershed method to obtain a target superpixel image, wherein the improved watershed method regularizes the color distribution of a multi-dimensional gradient fusion image based on color similarity; ​ ​ The multi-feature fusion clustering module is configured to cluster target superpixel blocks in the target superpixel image based on multi-dimensional feature fusion metrics to achieve image segmentation. The superpixel pre-segmentation module comprises: An initial superpixel generation unit configured to perform multi-dimensional gradient fusion and watershed operation on the original target image to generate an initial superpixel image; A target superpixel generation unit configured to perform color median marking on initial superpixel blocks in the initial superpixel image to obtain a target superpixel image; The initial superpixel generation unit is configured to determine fusion gradient images of the original target image in at least two different dimensions; The fusion gradient images are subjected to multi-dimensional fusion to obtain a multi-dimensional gradient fusion image; The multi-dimensional gradient fusion image is subjected to watershed operation to obtain an initial superpixel image; The multi-feature fusion clustering module is configured to initialize at least two clustering centers and determine membership values of each target superpixel block in the target superpixel image to each clustering center, wherein the membership values are obtained by fusing color similarity and spatial distance of the target superpixel block to the clustering center; According to the membership values, a target function value is determined in combination with a target function constructed in advance; When the target function value is greater than a preset clustering threshold, each clustering center and the membership values of each target superpixel block to each clustering center are updated based on a target function minimization principle until the newly determined target function value is less than the preset clustering threshold; Each target superpixel block is clustered based on the updated membership values to achieve image segmentation.

6. A vehicle characterized by comprising: The vehicle comprises: a sensor configured to collect an original target image; at least one controller; and a memory in communication connection with the at least one controller; wherein the memory stores a computer program executable by the at least one controller, and the computer program is executed by the at least one controller to enable the at least one controller to execute the image segmentation method of any one of claims 1-4.

7. A computer readable storage medium characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the image segmentation method of any one of claims 1-4 when executed.

Citation Information

Patent Citations

  • Image segmentation method based on quaternion and fuzzy C-means clustering

    CN103839269A

  • Color image segmentation method and device based on neutrosophic clustering and superpixels

    CN114792329A