Image processing method and device, electronic equipment, storage medium and chip

By using a point-by-point sliding window method instead of full-picture traversal in image processing, combined with the correction of superpixel segmentation results, the problem of low efficiency of the connectivity domain enhancement algorithm in the prior art is solved, and efficient superpixel segmentation and noise removal are achieved.

CN119904481APending Publication Date: 2025-04-29BEIJING X RING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311414646.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In the prior art, the connectivity domain enhancement algorithm adopts the implementation method of full-graph traversal, which is relatively inefficient.

Method used

In the image to be processed, the target processing area centered on the central pixel point is determined, and the full image traversal is replaced by sliding window by point to achieve online calculation of the communication domain algorithm, and when the number of pixels with the same first identification information within the target communication domain range is less than the preset threshold, the second identification information of the superpixel is corrected.

Benefits of technology

The calculation efficiency of the connectivity domain algorithm is improved, the superpixel segmentation results are optimized, the scattered superpixels and segmentation noise are removed, and the segmentation effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904481A_ABST
    Figure CN119904481A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and device, electronic equipment, a storage medium and a chip, and the method comprises the steps: determining a target processing region taking a central pixel point as a center in a to-be-processed image, the to-be-processed image comprises a plurality of superpixels, each superpixel comprises a plurality of pixels, and each pixel comprises one piece of first identification information; sequentially traversing the first identification information corresponding to the pixels from the central pixel point to determine a target connected domain of the pixels; and when it is determined that the number of pixels of the same first identification information in the target connected domain range is smaller than a preset threshold value, correcting the second identification information corresponding to the superpixels. According to the method, a point-by-point sliding window (namely a target processing area) mode is used for replacing a total image traversal mode, online calculation of a connected domain algorithm is achieved, in addition, a superpixel segmentation result is improved, scattered superpixels (namely superpixels with the number of pixels with the same first identification information in a target connected domain range smaller than a preset threshold value) are corrected, and the target connected domain is obtained. And the segmentation effect is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to an image processing method and device, electronic equipment, storage medium and chip. Background Art

[0002] The connected domain algorithm is a common technique in image processing. It is an algorithm that extracts connected units formed by connecting pixels from an image. In the field of superpixel segmentation, the connected domain enhancement algorithm is usually used to remove superpixel noise that is too small, avoid erroneous superpixel segmentation results, and optimize superpixel segmentation results.

[0003] Common connected domain enhancement algorithms include the Two-Pass algorithm. The Two-Pass algorithm requires two complete traversals of the image. The first traversal sets a mark for all pixels in the image and records the connected domain to which each mark belongs. The second traversal marks each pixel as the connected domain to which it belongs. This implementation method using full-image traversal is less efficient. Summary of the invention

[0004] The present disclosure provides an image processing method and device, an electronic device, a storage medium and a chip to solve the problem in the related art that in the process of determining the connected domain, the implementation method of using the full graph traversal is inefficient.

[0005] A first aspect of the present disclosure provides an image processing method, the method comprising:

[0006] Determine a target processing area centered on a central pixel in an image to be processed, wherein the image to be processed includes a plurality of superpixels, each superpixel includes a plurality of pixels, each pixel includes a first identification information, and the first identification information is used to identify the superpixel to which the pixel belongs;

[0007] Starting from the central pixel point, the first identification information corresponding to the pixels is traversed in sequence to determine the target connected domain of the pixels;

[0008] When it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold, the second identification information corresponding to the superpixel is corrected.

[0009] In some embodiments of the present disclosure, the step of sequentially traversing the first identification information corresponding to the pixels starting from the central pixel point to determine the target connected domain of the pixels includes:

[0010] The target processing area is divided into four quadrants, and two traversal directions are set for each quadrant;

[0011] Traversing the first identification information of the pixel from the central pixel point in sequence according to the traversal direction set in any quadrant area of ​​the four quadrant areas;

[0012] When it is determined that the first identification information of the pixel is consistent with the second identification information of the superpixel, determining that the pixel corresponding to the first identification information belongs to the target connected domain;

[0013] Counting the number of pixels with the same first identification information within the target connected domain;

[0014] Continue to traverse along the traversal direction set by the remaining quadrants until all four quadrant areas are traversed to determine the target connected domain of the pixel.

[0015] In some embodiments of the present disclosure, dividing the target processing area into four quadrants includes:

[0016] Dividing the target processing area equally into a first quadrant area, a second quadrant area, a third quadrant area, and a fourth quadrant area;

[0017] Determine that two traversal directions of the first quadrant area are leftward and upward respectively;

[0018] Determine that two traversal directions of the second quadrant area are rightward and upward respectively;

[0019] Determine that two traversal directions of the third quadrant area are respectively leftward and downward;

[0020] It is determined that the two traversal directions of the fourth quadrant area are rightward and downward respectively.

[0021] In some embodiments of the present disclosure, the method further includes:

[0022] When it is determined that the first identification information of the pixel is inconsistent with the second identification information of the superpixel, the traversal is stopped and the first identification information of the inconsistent pixel is recorded.

[0023] In some embodiments of the present disclosure, the correcting the second identification information corresponding to the superpixel includes:

[0024] Acquire an adjacent connected domain of the target connected domain, and determine the number of pixels in the adjacent connected domain;

[0025] Determine the adjacent connected domain with the largest number of pixels as the target adjacent connected domain;

[0026] The second identification information of the target connected domain is modified to the second identification information of the target adjacent connected domain.

[0027] In some embodiments of the present disclosure, before determining the target processing area centered on the central pixel point in the image to be processed according to a preset processing rule, the method further includes:

[0028] The preset segmentation algorithm is called to segment the original image into a plurality of superpixels to obtain the image to be processed.

[0029] In some embodiments of the present disclosure, when it is determined that the number of pixels with the same first identification information within the connected domain is less than a preset threshold, after correcting the second identification information corresponding to the superpixel, the method further includes:

[0030] Move the center point pixel by one pixel according to a preset processing rule;

[0031] The target processing area is re-determined with the moved pixel point as the center pixel, and the image processing process is repeatedly performed in the target processing area until the entire image to be processed is processed.

[0032] A second aspect of the present disclosure provides an image processing device, the device comprising:

[0033] A first determining unit is used to determine a target processing area centered on a central pixel point in an image to be processed, wherein the image to be processed includes a plurality of superpixels, each superpixel includes a plurality of pixels, each pixel includes a first identification information, and the first identification information is used to identify the superpixel to which the pixel belongs;

[0034] A second determining unit is used to sequentially traverse the first identification information corresponding to the pixels starting from the central pixel point to determine a target connected domain of the pixels;

[0035] The correction unit is used to correct the second identification information corresponding to the superpixel when it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold.

[0036] In some embodiments of the present disclosure, the second determining unit includes:

[0037] A division module, used for dividing the target processing area into four quadrants, each quadrant being set with two traversal directions;

[0038] A traversal module, used to traverse the first identification information of the pixel in sequence from the central pixel point according to a traversal direction set in any quadrant area of ​​the four quadrant areas;

[0039] A determination module, configured to determine that the pixel corresponding to the first identification information belongs to a target connected domain when it is determined that the first identification information of the pixel is consistent with the second identification information of the superpixel;

[0040] A statistical module, used for counting the number of pixels with the same first identification information within the target connected domain;

[0041] The first processing module is used to continue traversing along the traversal direction set for the remaining quadrants until all four quadrant areas are traversed to determine the target connected domain of the pixel.

[0042] In some embodiments of the present disclosure, the partitioning module is further used to:

[0043] Dividing the target processing area equally into a first quadrant area, a second quadrant area, a third quadrant area, and a fourth quadrant area;

[0044] Determine that two traversal directions of the first quadrant area are leftward and upward respectively;

[0045] Determine that two traversal directions of the second quadrant area are rightward and upward respectively;

[0046] Determine that two traversal directions of the third quadrant area are respectively leftward and downward;

[0047] It is determined that the two traversal directions of the fourth quadrant area are rightward and downward respectively.

[0048] In some embodiments of the present disclosure, the device further comprises:

[0049] The second processing module is used to stop traversal and record the first identification information of the inconsistent pixel point when it is determined that the first identification information of the pixel is inconsistent with the second identification information of the superpixel.

[0050] In some embodiments of the present disclosure, the correction unit is further used to:

[0051] Acquire an adjacent connected domain of the target connected domain, and determine the number of pixels in the adjacent connected domain;

[0052] Determine the adjacent connected domain with the largest number of pixels as the target adjacent connected domain;

[0053] The second identification information of the target connected domain is modified to the second identification information of the target adjacent connected domain.

[0054] In some embodiments of the present disclosure, the device further comprises:

[0055] The segmentation unit is used to call a preset segmentation algorithm to segment the original image into a plurality of superpixels to obtain the image to be processed before the first determination unit determines the target processing area centered on the central pixel point in the image to be processed according to the preset processing rule.

[0056] In some embodiments of the present disclosure, the device further comprises:

[0057] A moving unit, configured to move the center point pixel by one pixel according to a preset processing rule after correcting the second identification information corresponding to the superpixel when the number of pixels with the same first identification information within the connected domain is less than a preset threshold;

[0058] The first determination unit is further used to redefine the target processing area with the moved pixel point as the center pixel, and repeatedly perform the image processing process in the target processing area until the entire image to be processed is processed.

[0059] The third aspect embodiment of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect embodiment of the present disclosure.

[0060] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.

[0061] The fifth aspect embodiment of the present disclosure proposes a chip, which includes one or more interfaces and one or more processors; the interface is used to receive signals from a memory of an electronic device and send signals to the processor, the signals include computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the method described in the first aspect embodiment of the present disclosure.

[0062] In summary, according to the image processing method proposed in the present disclosure, the method includes determining a target processing area centered on a central pixel in an image to be processed, wherein the image to be processed contains a plurality of superpixels, each superpixel contains a number of pixels, and each pixel contains a first identification information, wherein the first identification information is used to identify the superpixel to which the pixel belongs; starting from the central pixel, the first identification information corresponding to the pixel is traversed in sequence to determine the target connected domain of the pixel; when it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold, the second identification information corresponding to the superpixel is corrected. The embodiment of the present application replaces the full-image traversal method with a point-by-point sliding window (i.e., the target processing area) to realize the online calculation of the connected domain algorithm. In addition, the superpixel segmentation result is improved, and the scattered superpixels (i.e., the superpixels with the same first identification information within the target connected domain less than the preset threshold) are corrected to optimize the segmentation effect.

[0063] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0065] Figure 1 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0066] Figure 2 A schematic diagram of an image to be processed provided in an embodiment of the present application;

[0067] Figure 3 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0068] Figure 4 A schematic diagram of dividing a target processing area into four quadrants provided in an embodiment of the present application;

[0069] Figure 5 A schematic diagram of a superpixel segmentation result provided in an embodiment of the present application;

[0070] Fig. 6A It is a schematic diagram of the segmentation result of the connected domain algorithm in the related art;

[0071] Figure 6B This is a schematic diagram of the segmentation result using the connected domain algorithm in an embodiment of the present application;

[0072] Figure 7 A schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure;

[0073] Figure 8 A schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure;

[0074] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;

[0075] Fig.10 A schematic diagram of the structure of a chip provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0076] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0077] The connected domain algorithm is a common technique in image processing. It is an algorithm that extracts connected units formed by connecting pixels from an image. In the field of superpixel segmentation, the connected domain enhancement algorithm is usually used to remove superpixel noise that is too small, avoid erroneous superpixel segmentation results, and optimize superpixel segmentation results.

[0078] Common connected domain enhancement algorithms include the Two-Pass algorithm. The Two-Pass algorithm requires two complete traversals of the image. The first traversal sets a mark for all pixels in the image and records the connected domain to which each mark belongs. The second traversal marks each pixel as the connected domain to which it belongs. This implementation method using full-image traversal is less efficient.

[0079] Therefore, in order to solve the problems existing in the related art, the present disclosure proposes an image processing method, which determines a target processing area centered on a central pixel point in an image to be processed, wherein the image to be processed contains multiple superpixels, each superpixel contains a number of pixels, and each pixel contains a first identification information, and the first identification information is used to identify the superpixel to which the pixel belongs. Starting from the central pixel point, the first identification information corresponding to the pixels is traversed in sequence to determine the target connected domain of the pixel. When it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold, the second identification information corresponding to the superpixel is corrected.

[0080] This scheme adopts a hardware-implementable superpixel connected domain algorithm method, which can replace the full-image traversal method with a point-by-point sliding window method to realize online calculation of the connected domain algorithm without caching the entire image. At the same time, different from the direct neighborhood search method (such as the Two-Pass algorithm), this scheme completes the hardware-friendly neighborhood search algorithm by segmenting the image, thereby realizing the hardening of the superpixel connected domain algorithm.

[0081] The embodiments of the present disclosure are not exhaustive, but are only illustrative of some embodiments, and are not intended to be a specific limitation on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a certain embodiment can also be implemented as an independent embodiment, and the order of the steps in a certain embodiment can be arbitrarily exchanged. In addition, the optional implementation methods in a certain embodiment can be arbitrarily combined; in addition, the embodiments can be arbitrarily combined, for example, some or all of the steps of different embodiments can be arbitrarily combined, and a certain embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.

[0082] In each embodiment of the present disclosure, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form a new embodiment based on their internal logical relationships.

[0083] The terms used in the embodiments of the present disclosure are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0084] In the embodiments of the present disclosure, unless otherwise specified, elements expressed in the singular form, such as "a", "an", "the", "above", "said", "aforementioned", "this", etc., may mean "one and only one", or "one or more", "at least one", etc. For example, when using articles such as "a", "an", "the" in English in translation, the noun after the article may be understood as a singular expression or a plural expression.

[0085] In some embodiments, terms such as "in response to ...", "in response to determining ...", "in the case of ...", "at the time of ...", "when ...", "if ...", "if ...", etc. can be used interchangeably.

[0086] In some embodiments, terms such as "greater than", "greater than or equal to", "not less than", "more than", "more than or equal to", "not less than", "higher than", "higher than or equal to", "not lower than", and "above" can be replaced with each other, and terms such as "less than", "less than or equal to", "not greater than", "less than", "less than or equal to", "no more than", "lower than", "lower than or equal to", "not higher than", and "below" can be replaced with each other.

[0087] The prefixes such as "first" and "second" in the embodiments of the present disclosure are only for distinguishing different description objects and do not constitute any restrictions on the position, order, priority, quantity or content of the description objects. For the statement of the description objects, please refer to the description in the context of the claims or embodiments, and no unnecessary restrictions should be constituted due to the use of prefixes.

[0088] In the embodiments of the present disclosure, “plurality” refers to two or more.

[0089] In the embodiments of the present disclosure, terms such as "import", "input", and "read in" can be used interchangeably.

[0090] In some embodiments, devices, etc. can be interpreted as physical or virtual, and their names are not limited to the names recorded in the embodiments. Terms such as "device", "equipment", "device", "circuit", "network element", "node", "function", "unit", "section", "system", "network", "chip", "chip system", "entity", and "subject" can be used interchangeably.

[0091] In some embodiments, the terms "terminal", "terminal device", "user equipment (UE)", "user terminal" "mobile station (MS)", "mobile terminal (MT)", subscriber station, mobile unit, subscriber unit, wireless unit, remote unit, mobile device (mobile device), wireless device (wireless device), wireless communication device (wireless communication device), remote device (remote device), mobile subscriber station (mobile subscriber station), access terminal (access terminal), mobile terminal (mobile terminal), wireless terminal (wireless terminal), remote terminal (remote terminal), handset (handset), user agent (user agent), mobile client (mobile client), client (client) and the like can be used interchangeably.

[0092] Figure 1 This is a flow chart of an image processing method provided by an embodiment of the present disclosure. The method can be applicable to application scenarios such as smart terminals, for example, executed by a terminal with integrated image processing function or an image processor in the terminal, or executed by other devices suitable for image processing to output multi-layer images, and the present disclosure is not limited thereto. Figure 1 As shown, the image processing method includes:

[0093] Step 101: determine a target processing area centered on a central pixel in an image to be processed.

[0094] In some embodiments of the present disclosure, the image to be processed includes multiple superpixels, each superpixel includes a number of pixels, and each pixel includes a first identification information, and the first identification information is used to identify the superpixel to which the pixel belongs.

[0095] In some embodiments of the present disclosure, the terminal may first obtain a preliminarily segmented image to be processed, which is composed of a number of superpixels. For a better understanding of superpixels and target processing areas, please refer to Figure 2 , Figure 2 A schematic diagram of an image to be processed provided in an embodiment of the present application.

[0096] Each square is a superpixel. In some embodiments, it is assumed that the size of the superpixel is S*S, where S is the size of the superpixel initialized.

[0097] As an implementable method of the embodiment of the present application, during the online image processing, a static random access memory (SRAM) stores a line buffer of 3*S rows. The line buffer is an SRAM with a line storage data structure, which is mainly used to store row data in two-dimensional row and column data. The line buffer of 3*S rows is Figure 2 The rectangular box in the middle left figure determines the target processing area centered on the central pixel point ( Figure 2 The target processing area is the image range of 33*3S, and a superpixel segmentation needs to be completed within the target processing area.

[0098] In order to facilitate the understanding of the target processing area, the target processing area can be regarded as a window of preset size, which is a window opened with the central pixel as the center, and the connected domain calculation of the central pixel is performed within the window. The connected domain refers to a connected unit formed by some adjacent pixels in the image.

[0099] Since the superpixel segmentation is performed in an online pipeline manner, the corresponding connected domain algorithm needs to be completed online in a 33*3S window.

[0100] It should be noted that the target processing area described in the above embodiment is a 33*3S image range and a 3*S line buffer is only an exemplary description. These numerical ranges can be flexibly configured according to the hardware conditions of the terminal or the image processing requirements, and this description method cannot be used as a specific limitation.

[0101] Step 102: Starting from the central pixel point, traverse the first identification information corresponding to the pixels in sequence to determine the target connected domain of the pixels.

[0102] In some embodiments, the superpixel connected domain algorithm connects the pixels in the target processing area starting from the center pixel point according to the first identification information to determine the target connected domain of the pixels, which includes at least one target connected domain in the target processing area.

[0103] Step 103: when it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold, the second identification information corresponding to the superpixel is corrected.

[0104] In the superpixel segmentation result obtained in step 102, there may be a problem that the segmentation result is too small. This too small segmentation result can be understood as too few pixels contained in a target connected domain. In practical applications, it may be confirmed as segmentation noise, and the segmentation noise needs to be optimized.

[0105] According to the number of pixels in each target connected domain obtained, it is determined whether the number of pixels in a target connected domain is less than a preset threshold. If it is less than the preset threshold, the first identification information of the pixel points in the target connected domain needs to be corrected to complete the connected domain algorithm of the superpixel.

[0106] According to the image processing method proposed in the present disclosure, the method includes determining a target processing area centered on a central pixel in an image to be processed, wherein the image to be processed contains a plurality of superpixels, each superpixel contains a number of pixels, each pixel contains a first identification information, and the first identification information is used to identify the superpixel to which the pixel belongs; starting from the central pixel, the first identification information corresponding to the pixel is traversed in sequence to determine the target connected domain of the pixel; when it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold, the second identification information corresponding to the superpixel is corrected. The embodiment of the present application replaces the full-image traversal method with a point-by-point sliding window (i.e., the target processing area) to realize the online calculation of the connected domain algorithm. In addition, the superpixel segmentation result is improved, and the scattered superpixels (i.e., the superpixels with the same first identification information within the target connected domain less than the preset threshold) are corrected to optimize the segmentation effect.

[0107] Figure 3 The following further shows a flowchart of an image processing method proposed in the present disclosure. Figure 1 The embodiment shown further explains step 102. Figure 3 The following steps may be included:

[0108] Step 201: divide the target processing area into four quadrants, and set two traversal directions for each quadrant.

[0109] When executing the division of the target processing area into four quadrant areas, the following methods can be adopted but are not limited to: dividing the target processing area into a first quadrant area, a second quadrant area, a third quadrant area, and a fourth quadrant area; determining that the two traversal directions of the first quadrant area are respectively left and upward; determining that the two traversal directions of the second quadrant area are respectively right and upward; determining that the two traversal directions of the third quadrant area are respectively left and downward; determining that the two traversal directions of the fourth quadrant area are respectively right and downward.

[0110] For ease of understanding, Figure 4 As shown, Figure 4 A schematic diagram of dividing a target processing area into four quadrants is provided in an embodiment of the present application, Figure 2 The target processing area shown in the figure has a size of 3S*3S interval, with the center pixel of the target processing area ( Figure 4 The gray center point in the middle right figure) is used as the center window, and the target processing area is divided into four quadrants: upper, lower, left, and right. In a quadrant, each pixel only focuses on two directions. For example, the pixel in the upper left interval (the first quadrant) only focuses on the first identification information of the pixels above and to the left, that is, Figure 4In the direction indicated by the arrow in the first quadrant area, for example, the pixel point in the lower left interval (third quadrant area) only pays attention to the first identification information of the pixels below and to the left, that is, Figure 4 The direction indicated by the arrow in the third quadrant area.

[0111] Step 202: traverse the first identification information of the pixel from the central pixel point in sequence according to the traversal direction set in any quadrant area of ​​the four quadrant areas.

[0112] When it is determined that the first identification information of the pixel is consistent with the second identification information of the superpixel, step 203 is executed; when it is determined that the first identification information of the pixel is inconsistent with the second identification information of the superpixel, step 206 is executed.

[0113] The pixels in each quadrant are enabled step by step using a two-choice switch, that is, each pixel in each quadrant only pays attention to two directions. Taking the traversal of the third quadrant as an example, the pixels in the lower left interval (the third quadrant) only pay attention to the first identification information of the pixels below and to the left. If the first identification information of the target pixel is consistent with the second identification information of the superpixel, the pixels above and to the left of the target pixel are enabled, and traversal continues along these two directions.

[0114] Similarly, the traversal methods for the first quadrant area, the second quadrant area and the fourth quadrant area are similar to the method for the third quadrant area. The difference is that the traversal direction set for each quadrant area is different, and the traversal can be completed along the traversal direction set for each quadrant area.

[0115] Step 203: determine whether the pixel corresponding to the first identification information belongs to the target connected domain.

[0116] In practical applications, a two-choice switch is used to enable the connection step by step, that is, the scheme of calculating the connected domain label by label (identification information) is modified to the logic of pixel by pixel calculation, and the neighborhood search is changed to a hardware-friendly logical operation of 0 and 1 in the form of distinguishing quadrant areas. That is, when the first identification information of the pixel is consistent with the second identification information of the superpixel, the first identification information of the pixel is modified to 1, and when the first identification information of the pixel is inconsistent with the second identification information of the superpixel, the first identification information of the pixel is modified to 0.

[0117] Step 204: Count the number of pixels with the same first identification information within the target connected domain.

[0118] The cumulative value of the number of pixels with the same first identification information within the target connected domain is increased by one, and the modified 0 and 1 in step 203 are directly counted during statistics, thereby efficiently completing the number of pixels with the same first identification information at the hardware level.

[0119] Step 205, determining whether all quadrants have been traversed.

[0120] If the traversal is not completed, step 203 is continued to be executed, and the traversal is continued along the traversal direction set for the remaining quadrants until the four quadrant areas are traversed to determine the target connected domain of the pixel.

[0121] If the traversal is completed, the target connected domain of the pixel is determined according to the traversal result.

[0122] Step 206, stop traversal and record the first identification information of inconsistent pixels.

[0123] Step 207: Determine the segmentation result of the image to be processed.

[0124] Figure 5 As shown, Figure 5 A schematic diagram of a superpixel segmentation result provided in an embodiment of the present application, Figure 5 Four target connected domains are segmented, which are marked by pentagons, rectangles, diamonds and circles respectively. The superpixel marked by circles is the current superpixel label, and the rest are adjacent connected domains.

[0125] When correcting the second identification information corresponding to the superpixel, it can be implemented in but not limited to the following ways, including: obtaining the adjacent connected domain of the target connected domain, and determining the number of pixels in the adjacent connected domain; determining the adjacent connected domain with the largest number of pixels as the target adjacent connected domain; and modifying the second identification information of the target connected domain to the second identification information of the target adjacent connected domain.

[0126] Presented by Figure 5 In the segmentation result shown, the superpixel marked with a circle is the current superpixel label, and its number of pixels is 16. The adjacent connected domains are the connected domain marked with a pentagon, and its number of pixels is 8; the connected domain marked with a rectangle, and its number of pixels is 3; the connected domain marked with a diamond, and its number of pixels is 4. According to the statistical results, it can be determined that the adjacent connected domain with the largest number of pixels is the connected domain marked with a pentagon, and the connected domain marked with a pentagon is the target adjacent connected domain.

[0127] After determining the target adjacent connected domain, the second identification information of the target connected domain is modified to the second identification information of the target adjacent connected domain, thereby completing the connected domain algorithm of the superpixel.

[0128] The superpixel connected domain algorithm described in the embodiment of the present application improves the superpixel segmentation result, removes scattered superpixels and segmentation noise points, and optimizes the segmentation effect. Fig. 6A As shown, Fig. 6Ais the segmentation result of the connected domain algorithm in the related technology, Figure 6B This is the segmentation result of the connected domain algorithm used in the embodiment of the present application.

[0129] After executing Figure 4 After the method shown in FIG. 1 is performed, the processing of a target processing area is completed, that is, when it is determined that the number of pixels with the same first identification information within the connected domain is less than the preset threshold, the second identification information corresponding to the superpixel is corrected, and the center point pixel (such as Figure 2 The pixel pointed to by 1 in ) moves one pixel according to the preset processing rules (such as Figure 2 The target processing area is re-determined with the moved pixel as the center pixel, and the image processing process is repeated in the target processing area until the entire image to be processed is processed.

[0130] In some embodiments, since the segmentation result of the current target processing area depends on the segmentation result of the previous target processing area, when setting the preset processing rule, it is necessary to set it to move one pixel when re-determining the target processing area to ensure that every pixel in the image to be processed is traversed, thereby improving the segmentation result of image processing. The preset processing rule sets the movement displacement (one pixel) and the movement direction, which moves from left to right and from top to bottom.

[0131] In the embodiment of the present application, before determining the target processing area centered on the central pixel in the image to be processed according to the preset processing rule, the preset segmentation algorithm is called to segment the original image into a plurality of superpixels to obtain the image to be processed. The preset segmentation algorithm includes but is not limited to sub-SLIC and SLIC. Specifically, the embodiment of the present application does not limit the preset segmentation algorithm.

[0132] Figure 7 A schematic diagram of the structure of an image processing device 300 provided in an embodiment of the present disclosure, the device comprising:

[0133] A first determining unit 31 is used to determine a target processing area centered on a central pixel in an image to be processed, wherein the image to be processed includes a plurality of superpixels, each superpixel includes a plurality of pixels, each pixel includes a first identification information, and the first identification information is used to identify the superpixel to which the pixel belongs;

[0134] A second determining unit 32 is used to sequentially traverse the first identification information corresponding to the pixels starting from the central pixel point to determine a target connected domain of the pixels;

[0135] The correction unit 33 is used to correct the second identification information corresponding to the superpixel when it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold.

[0136] According to the image processing device proposed in the present disclosure, a target processing area centered on a central pixel is determined in an image to be processed, wherein the image to be processed contains a plurality of superpixels, each superpixel contains a number of pixels, and each pixel contains a first identification information, wherein the first identification information is used to identify the superpixel to which the pixel belongs; starting from the central pixel, the first identification information corresponding to the pixel is traversed in sequence to determine the target connected domain of the pixel; when it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold, the second identification information corresponding to the superpixel is corrected. The embodiment of the present application replaces the full-image traversal method with a point-by-point sliding window (i.e., the target processing area) to realize the online calculation of the connected domain algorithm. In addition, the superpixel segmentation result is improved, and the scattered superpixels (i.e., the superpixels with the same first identification information within the target connected domain less than a preset threshold) are corrected to optimize the segmentation effect.

[0137] In some embodiments of the present disclosure, Figure 8 As shown, the second determining unit 32 includes:

[0138] A division module 321 is used to divide the target processing area into four quadrants, and each quadrant is set with two traversal directions;

[0139] A traversal module 322, configured to traverse the first identification information of the pixel in sequence from the central pixel point according to a traversal direction set in any quadrant area of ​​the four quadrant areas;

[0140] A determination module 323, configured to determine that the pixel corresponding to the first identification information belongs to a target connected domain when it is determined that the first identification information of the pixel is consistent with the second identification information of the superpixel;

[0141] A statistics module 324 is used to count the number of pixels with the same first identification information within the target connected domain;

[0142] The first processing module 325 is used to continue traversing along the traversal direction set for the remaining quadrants until all four quadrants are traversed to determine the target connected domain of the pixel.

[0143] In some embodiments of the present disclosure, Figure 8 As shown, the division module 321 is also used for:

[0144] Dividing the target processing area equally into a first quadrant area, a second quadrant area, a third quadrant area, and a fourth quadrant area;

[0145] Determine that two traversal directions of the first quadrant area are leftward and upward respectively;

[0146] Determine that two traversal directions of the second quadrant area are rightward and upward respectively;

[0147] Determine that two traversal directions of the third quadrant area are respectively leftward and downward;

[0148] It is determined that the two traversal directions of the fourth quadrant area are rightward and downward respectively.

[0149] In some embodiments of the present disclosure, Figure 8 As shown, the device also includes:

[0150] The second processing module 326 is used to stop traversal and record the first identification information of the inconsistent pixel point when it is determined that the first identification information of the pixel is inconsistent with the second identification information of the superpixel.

[0151] In some embodiments of the present disclosure, Figure 8 As shown, the correction unit 33 is also used for:

[0152] Acquire an adjacent connected domain of the target connected domain, and determine the number of pixels in the adjacent connected domain;

[0153] Determine the adjacent connected domain with the largest number of pixels as the target adjacent connected domain;

[0154] The second identification information of the target connected domain is modified to the second identification information of the target adjacent connected domain.

[0155] In some embodiments of the present disclosure, Figure 8 As shown, the device also includes:

[0156] The segmentation unit 34 is used to call a preset segmentation algorithm to segment the original image into a plurality of superpixels to obtain the image to be processed before the first determination unit determines the target processing area centered on the central pixel point in the image to be processed according to the preset processing rule.

[0157] In some embodiments of the present disclosure, Figure 8 As shown, the device also includes:

[0158] A moving unit 35 is configured to move the center pixel by one pixel according to a preset processing rule after correcting the second identification information corresponding to the superpixel when the number of pixels with the same first identification information within the connected domain is less than a preset threshold;

[0159] The first determining unit 31 is further used to redefine the target processing area with the moved pixel point as the center pixel, and repeatedly perform the image processing process in the target processing area until the entire image to be processed is processed.

[0160] Since the device provided in the embodiment of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation of the method is also applicable to the device provided in the embodiment and will not be described in detail in this embodiment.

[0161] In the embodiments provided in the present application, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function of the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.

[0162] Fig. 9 4 is a block diagram of an electronic device 400 for implementing the above-mentioned image processing method according to an exemplary embodiment. For example, the electronic device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0163] Reference Fig. 9 , the electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .

[0164] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.

[0165] The memory 404 is configured to store various types of data to support operations on the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0166] The power supply component 406 provides power to the various components of the electronic device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.

[0167] The multimedia component 408 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0168] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

[0169] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0170] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of components, such as the display and keypad of the electronic device 400, and the sensor assembly 414 can also detect the position change of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and the temperature change of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0171] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio) or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0172] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0173] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the above instructions can be executed by a processor 420 of an electronic device 400 to perform the above method for image processing. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0174] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the above embodiments of the present disclosure.

[0175] For electronic devices that may be chips or chip systems, see Fig.10 Schematic diagram of the chip structure shown. Fig.10 The chip shown includes a processor 501 and an interface 502. The number of the processor 501 may be one or more, and the number of the interface 502 may be multiple.

[0176] Optionally, the chip further includes a memory 503, and the memory 503 is used to store necessary computer programs and data.

[0177] Those skilled in the art may also understand that the various illustrative logical blocks and steps listed in the embodiments of the present application may be implemented by electronic hardware, computer software, or a combination of the two. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the functions for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present application.

[0178] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0179] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0180] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0181] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a first processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.

[0182] It should be understood that the various parts of the embodiments of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0183] A person skilled in the art may understand that all or part of the steps in the above-mentioned embodiment method may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0184] In addition, each functional unit in each embodiment of the present invention may be integrated into a first processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0185] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. An image processing method, characterized in that: include: Determine a target processing area centered on a central pixel in an image to be processed, wherein the image to be processed includes a plurality of superpixels, each superpixel includes a plurality of pixels, each pixel includes a first identification information, and the first identification information is used to identify the superpixel to which the pixel belongs; Starting from the central pixel point, the first identification information corresponding to the pixels is traversed in sequence to determine the target connected domain of the pixels; When it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold, the second identification information corresponding to the superpixel is corrected.

2. The method according to claim 1, characterized in that The step of sequentially traversing the first identification information corresponding to the pixels starting from the central pixel point to determine the target connected domain of the pixels includes: The target processing area is divided into four quadrants, and two traversal directions are set for each quadrant; Traversing the first identification information of the pixel from the central pixel point in sequence according to the traversal direction set in any quadrant area of ​​the four quadrant areas; When it is determined that the first identification information of the pixel is consistent with the second identification information of the superpixel, determining that the pixel corresponding to the first identification information belongs to the target connected domain; Counting the number of pixels with the same first identification information within the target connected domain; Continue to traverse along the traversal direction set by the remaining quadrants until all four quadrant areas are traversed to determine the target connected domain of the pixel.

3. The method according to claim 2, characterized in that The target processing area is divided into four quadrants including: Dividing the target processing area equally into a first quadrant area, a second quadrant area, a third quadrant area, and a fourth quadrant area; Determine that two traversal directions of the first quadrant area are leftward and upward respectively; Determine that two traversal directions of the second quadrant area are rightward and upward respectively; Determine that two traversal directions of the third quadrant area are respectively leftward and downward; It is determined that the two traversal directions of the fourth quadrant area are rightward and downward respectively.

4. The method according to claim 2, characterized in that: The method further comprises: When it is determined that the first identification information of the pixel is inconsistent with the second identification information of the superpixel, the traversal is stopped and the first identification information of the inconsistent pixel is recorded.

5. The method according to claim 1, characterized in that The correcting the second identification information corresponding to the superpixel includes: Acquire an adjacent connected domain of the target connected domain, and determine the number of pixels in the adjacent connected domain; Determine the adjacent connected domain with the largest number of pixels as the target adjacent connected domain; The second identification information of the target connected domain is modified to the second identification information of the target adjacent connected domain.

6. The method according to any one of claims 1 to 5, characterized in that Before determining the target processing area centered on the central pixel point in the image to be processed according to a preset processing rule, the method further includes: The preset segmentation algorithm is called to segment the original image into a plurality of superpixels to obtain the image to be processed.

7. The method according to any one of claims 1 to 5, characterized in that When it is determined that the number of pixels with the same first identification information within the connected domain is less than a preset threshold, after correcting the second identification information corresponding to the superpixel, the method further includes: Move the center point pixel by one pixel according to a preset processing rule; The target processing area is re-determined with the moved pixel point as the center pixel, and the image processing process is repeatedly performed in the target processing area until the entire image to be processed is processed.

8. An image processing device, characterized in that: include: A first determining unit is used to determine a target processing area centered on a central pixel point in an image to be processed, wherein the image to be processed includes a plurality of superpixels, each superpixel includes a plurality of pixels, each pixel includes a first identification information, and the first identification information is used to identify the superpixel to which the pixel belongs; A second determining unit is used to sequentially traverse the first identification information corresponding to the pixels starting from the central pixel point to determine a target connected domain of the pixels; The correction unit is used to correct the second identification information corresponding to the superpixel when it is determined that the number of pixels with the same first identification information within the target connected domain is less than a preset threshold.

9. The device according to claim 8, characterized in that The second determining unit includes: A division module, used for dividing the target processing area into four quadrants, each quadrant being set with two traversal directions; A traversal module, used to traverse the first identification information of the pixel in sequence from the central pixel point according to a traversal direction set in any quadrant area of ​​the four quadrant areas; A determination module, configured to determine that the pixel corresponding to the first identification information belongs to a target connected domain when it is determined that the first identification information of the pixel is consistent with the second identification information of the superpixel; A statistics module, used for counting the number of pixels with the same first identification information within the target connected domain; The first processing module is used to continue traversing along the traversal direction set for the remaining quadrants until all four quadrant areas are traversed to determine the target connected domain of the pixel.

10. The device according to claim 9, characterized in that The partitioning module is further used for: Dividing the target processing area equally into a first quadrant area, a second quadrant area, a third quadrant area, and a fourth quadrant area; Determine that two traversal directions of the first quadrant area are leftward and upward respectively; Determine that two traversal directions of the second quadrant area are rightward and upward respectively; Determine that two traversal directions of the third quadrant area are respectively leftward and downward; It is determined that the two traversal directions of the fourth quadrant area are rightward and downward respectively.

11. The device according to claim 9, characterized in that The device also includes: The second processing module is used to stop traversal and record the first identification information of the inconsistent pixel point when it is determined that the first identification information of the pixel is inconsistent with the second identification information of the superpixel.

12. The device according to claim 8, characterized in that The correction unit is further used for: Acquire an adjacent connected domain of the target connected domain, and determine the number of pixels in the adjacent connected domain; Determine the adjacent connected domain with the largest number of pixels as the target adjacent connected domain; The second identification information of the target connected domain is modified to the second identification information of the target adjacent connected domain.

13. The device according to any one of claims 8 to 12, characterized in that The device also includes: The segmentation unit is used to call a preset segmentation algorithm to segment the original image into a plurality of superpixels to obtain the image to be processed before the first determination unit determines the target processing area centered on the central pixel point in the image to be processed according to the preset processing rule.

14. The device according to any one of claims 8 to 12, characterized in that The device also includes: A moving unit, configured to move the center point pixel by one pixel according to a preset processing rule after correcting the second identification information corresponding to the superpixel when the number of pixels with the same first identification information within the connected domain is less than a preset threshold; The first determination unit is further used to redefine the target processing area with the moved pixel point as the center pixel, and repeatedly perform the image processing process in the target processing area until the entire image to be processed is processed.

15. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.

17. A chip, characterized in that: It comprises one or more interfaces and one or more processors; the interface is used to receive a signal from a memory of an electronic device and send the signal to the processor, the signal includes a computer instruction stored in the memory, and when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 7.