Image processing method and image processing device for recognizing target object

By performing greedy search and tailoring strategy processing in parallel on multi-core processors, the existing Blob analysis method is solved, and efficient image processing and target recognition are achieved.

CN119625248APending Publication Date: 2025-03-14THE BOEING CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311181174.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Existing Blob analysis methods are computationally expensive and become a bottleneck in real-time applications, especially when searching between pixels and lines, which are difficult to efficiently handle.

Method used

Each pixel row of the image is scanned by a multi-core microprocessor or multi-core computing unit with a parallel greedy search method, re-representation of the search results using a cropping strategy, generate a new image to briefly describe the connected area, and apply the classic greedy method to conduct inter-line search.

Benefits of technology

This significantly improves the efficiency of image scanning, reduces processing overhead, and allows real-time applications to identify target objects more efficiently.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625248A_ABST
    Figure CN119625248A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and an image processing device for identifying a target object. The image processing method comprises the following steps: acquiring an original image comprising the target object; performing binarization processing on the original image to obtain a binarized image; performing one-dimensional scanning on each pixel row of the binarized image in a parallel mode through a multi-core processor to extract a one-dimensional connected region of each pixel row of the binarized image; combining adjacent pixel rows to generate a first maximum connected region comprising a plurality of one-dimensional connected regions; aiming at each pixel row of the first maximum connected area, aligning the head part of the head end one-dimensional connected area of each pixel row, and aligning the tail part of the tail end one-dimensional connected area of each pixel row to generate a second maximum connected area; and performing two-dimensional scanning on the aligned head part and the aligned tail part of the second maximum connected region to identify the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the field of image processing technology, and more specifically to an image processing method and an image processing device for identifying a target object. Background Art

[0002] Blob analysis has been widely used in real-time industrial vision systems, and is mainly used in real-time image processing tasks such as target detection, object recognition, image measurement, image statistics, and many other applications.

[0003] In addition, the greedy scanning method is a common tool for blob analysis, but it is computationally expensive and even it has become a bottleneck for real-time applications. Summary of the invention

[0004] At least in order to mitigate or even eliminate the above technical problems, the present application is created. One aspect of the present application proposes an improved parallel scheme of greedy search method, in which each pixel row of an image is scanned in parallel by a multi-core microprocessor or a multi-core computing unit using a greedy method; the search results of each pixel row are re-expressed by a clipping strategy and a new image is generated to describe the connected area in a very concise form, and the new image is convenient for inter-row search by using a classic greedy method. In addition, the traditional tree scanning tool can also be applied to the new image.

[0005] According to one aspect of the present application, an image processing method for identifying a target object is provided, the image processing method comprising: step S1: acquiring an original image including the target object; step S2: binarizing the original image to obtain a binarized image; step S3: performing a one-dimensional scan on each pixel row of the binarized image in parallel by a multi-core processor to extract a one-dimensional connected region of each pixel row of the binarized image, wherein the one-dimensional connected region has a head indicating a starting position of the one-dimensional connected region, a tail indicating an ending position of the one-dimensional connected region, and an intermediate region between the head and the tail; step S4: performing a one-dimensional scan on each pixel row of the binarized image in parallel to extract a one-dimensional connected region of each pixel row of the binarized image, wherein the one-dimensional connected region has a head indicating a starting position of the one-dimensional connected region, a tail indicating an ending position of the one-dimensional connected region, and an intermediate region between the head and the tail; Combine adjacent pixel rows to generate a first maximum connected area including multiple one-dimensional connected areas, wherein the one-dimensional connected areas of the combined adjacent pixel rows are connected to each other; and step S5: for each pixel row of the first maximum connected area, align the heads of the one-dimensional connected areas at the beginning of each pixel row, and align the tails of the one-dimensional connected areas at the end of each pixel row to generate a second maximum connected area, the one-dimensional connected area at the beginning is located at the starting end side of the one-dimensional scan, and the one-dimensional connected area at the end is located at the ending end side of the one-dimensional scan; step S6, perform a two-dimensional scan on the aligned head and the aligned tail of the second maximum connected area to identify the target object.

[0006] In an illustrative example according to one aspect of the present application, step S5 includes: step S50: comparing the distance between the head of the one-dimensional connected area at the head end of each pixel row and the side of the starting end of the one-dimensional scan, so as to determine the head one-dimensional connected area whose head is farthest from the starting end of each pixel row; step S51: comparing the distance between the tail of the one-dimensional connected area at the end of each pixel row and the side of the ending end of the one-dimensional scan, so as to determine the end one-dimensional connected area whose tail is farthest from the ending end of each pixel row; step S52: taking the head of the one-dimensional connected area at the head end farthest from the starting end of the one-dimensional scan as a reference, moving the heads of other one-dimensional connected areas at the head end of each pixel row to align with the head of the one-dimensional connected area at the head end farthest from the starting end of the one-dimensional scan; and step S53: taking the tail of the one-dimensional connected area at the end end farthest from the ending end of the one-dimensional scan as a reference, moving the tails of other one-dimensional connected areas at the end of each pixel row to align with the tail of the one-dimensional connected area at the end farthest from the ending end of the one-dimensional scan.

[0007] In an illustrative example according to one aspect of the present application, step S3 includes: performing a one-dimensional scan on each pixel row to identify the head and tail of the one-dimensional connected region by using a one-dimensional greedy scanning method; and determining the one-dimensional connected region based on the identified head and tail of the one-dimensional connected region by using a four-neighborhood method.

[0008] In an illustrative example according to one aspect of the present application, step S4 also includes: determining the one-dimensional coordinates of the head and tail of each one-dimensional connected region in the pixel row direction, the head and tail each having one pixel; and calculating the number of pixels in the middle region of each one-dimensional connected region as the length of the middle region based on the one-dimensional coordinates of the head and tail of each one-dimensional connected region.

[0009] In an illustrative example according to one aspect of the present application, step S4 includes: determining whether the one-dimensional connected regions of adjacent pixel rows have pixels located at the same position in the pixel row direction based on the one-dimensional coordinates of the head and tail of each one-dimensional connected region and the length of the middle region to determine whether the one-dimensional connected regions of adjacent pixel rows are connected; and combining adjacent pixel rows that are connected between the one-dimensional connected regions to generate a first maximum connected region.

[0010] In an illustrative example according to one aspect of the present application, step S4 further includes: summing the lengths of the head and tail of each one-dimensional connected region included in the first largest connected region and the length of the middle region to calculate the area of ​​the first largest connected region.

[0011] In an illustrative example according to one aspect of the present application, step S50 includes: determining the head of the one-dimensional connected region at the beginning of each pixel row and the tail of the one-dimensional connected region at the end of each pixel row according to the one-dimensional coordinates of the head and tail of each one-dimensional connected region.

[0012] In an illustrative example according to one aspect of the present application, step S6 includes: performing a two-dimensional greedy scan on the aligned head and the aligned tail of the second largest connected region to output feature parameters of the target object.

[0013] In an illustrative example according to one aspect of the present application, the feature parameter includes at least one of the following: an area of ​​the target object, a center of gravity of the target object, and a contour length of the target object.

[0014] In an illustrative example according to one aspect of the present application, a one-dimensional connected area in the second largest connected area and the aligned head and tail form a bifurcated tree structure, wherein the one-dimensional connected area in the second largest connected area represents a leaf node of the bifurcated tree structure, the aligned head and tail represent edges connecting the leaf nodes, and a two-dimensional scan is performed by a bifurcated tree scanning method.

[0015] According to another aspect of the present application, an image processing device for identifying a target object is provided. The image processing device includes a processor and a memory. The memory stores program instructions. The processor is configured to execute the program instructions to perform the above-mentioned image processing method.

[0016] According to another aspect of the present application, a computer-readable storage medium is also provided, which stores a program, and when the program is executed by a processor, the above-mentioned image processing method is implemented.

[0017] The present application uses a multi-core microprocessor or a multi-core computing unit to scan each pixel row of an image in parallel using a greedy method; a pruning strategy is used to re-express the search results of each pixel row and generate a new image to describe the connected area in a very concise form, which can greatly improve the efficiency of scanning and facilitate inter-row search by using a classic greedy method. In addition, traditional tree scanning tools can also be applied to new images. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flowchart illustrating an image processing method for identifying a target object according to an embodiment of the present application.

[0019] Figure 2 It shows Figure 1 Flow chart of the execution process of step S5 of the image processing method.

[0020] Figure 3It is a decomposition diagram of the execution process of the image processing method for identifying the target object according to the implementation mode of the present application.

[0021] Figure 4 is a diagram of a new data structure generated by an image processing method for identifying a target object according to an embodiment of the present application.

[0022] Figure 5 This is a photograph of an image processed by the image processing method for identifying a target object according to an embodiment of the present application.

[0023] Figure 6 A schematic diagram of an example of an image processing device as a part of the hardware portion of the image processing device for recognizing a target object according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the present disclosure, the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0025] In order to solve the problem that most existing Blob analysis methods in the related art are inefficient modules in applications and it is difficult to use mature greedy scanning methods to search between pixel rows, the present disclosure provides an image processing method for identifying target objects. Figure 1 is a flowchart of an image processing method for identifying a target object according to one embodiment of the present disclosure.

[0026] In step S1, an original image including a target object is acquired.

[0027] In this step, an image including the target object may be captured by a camera as an original image, or an image including the target object may be acquired from an image library pre-stored in a memory. The target object may be any object of interest, such as a person, an airplane, an obstacle, and the like.

[0028] In step S2: binarization processing is performed on the original image obtained in step S1 to obtain a binarized image.

[0029] In this step, image segmentation is performed by binarizing the original image. That is, binarization is to simplify and change the image representation, making the image easier to understand and analyze. Image segmentation is used to subdivide the original image into multiple image sub-regions, thereby facilitating the location of the object of interest in the image and its boundary, area and other characteristic parameters. The binarization of the image refers to setting the grayscale value of the pixel on the image to 0 or 255, such as Figure 5 As shown in (a).

[0030] In step S3: each pixel row of the binary image is scanned one-dimensionally in parallel by a multi-core processor to extract a one-dimensional connected region of each pixel row of the binary image, wherein the one-dimensional connected region has a head indicating a starting position of the one-dimensional connected region, a tail indicating an ending position of the one-dimensional connected region, and an intermediate region between the head and the tail.

[0031] As this application Figure 3 As shown in (a), a multi-core processor can use a one-dimensional greedy scan method to perform parallel processing on Figure 5 Each pixel row of the binary image shown in (a) is scanned one-dimensionally to extract a one-dimensional connected region of each pixel row of the binary image, such as Figure 3 The one-dimensional connected areas B0 and B1 shown in (a) are identified, and the head H and tail T of the one-dimensional connected areas are identified. Based on the identified head H and tail T of the one-dimensional connected area, the one-dimensional connected areas B0 and B1 can be determined by using the four-neighborhood method to identify the contact area (corresponding to the pixel) on the right side of the head H and the contact area on the left side of the tail T. The four-neighborhood method is well known in the field of machine vision and will not be described in detail here. In the four-neighborhood method, whether two pixels are in a contact area is determined based on the adjacency of the pixels. The adjacency of the pixels refers to the adjacency property between the current pixel and the surrounding pixels, which is usually called the neighborhood of the pixel. The adjacency property represents the adjacency relationship between the pixels: 1) Whether the positions of the two pixels are adjacent; 2) Whether the color value or grayscale value of the two pixels meets a specific similarity criterion (the two are similar).

[0032] Then, if Figure 3 As shown in (b), the head H and tail T of each one-dimensional connected area B0 and B1 can be marked based on the coordinates in the pixel row direction during scanning, where the head H and the tail T each have 1 pixel, and thus the number of pixels included in the middle area between the head H and the tail T can be further calculated based on the coordinates of the head H and the tail T as the length of the middle area.

[0033] Step S4: combining adjacent pixel rows that have been one-dimensionally scanned to generate a first maximum connected region that includes multiple one-dimensional connected regions, wherein the one-dimensional connected regions of the combined adjacent pixel rows are connected to each other.

[0034] As this application Figure 3 As shown in (c), in this exemplary example, the one-dimensional connected regions of three adjacent pixel rows are connected to each other, so the three adjacent pixel rows are combined, so that multiple (in this example, a total of 5) one-dimensional connected regions contained in the three adjacent pixel rows are connected to each other and form a first maximum connected region. In this first maximum connected region, the total area of ​​the middle region is 3+3+8+5+11=30 pixels.

[0035] In this step, it is possible to determine whether the one-dimensional connected regions of adjacent pixel rows have pixels located at the same position in the pixel row direction based on the one-dimensional coordinates of the head H and the tail T of each one-dimensional connected region determined in the above step and the length of the middle region B to determine whether the one-dimensional connected regions of adjacent pixel rows are connected. Figure 3 As shown in (c) and (c′), the two one-dimensional connected regions B2 and B3 of the second pixel row are connected to the two one-dimensional connected regions B2 and B1 of the first pixel row, respectively, and the one-dimensional connected region B4 of the third pixel row is connected to both the two one-dimensional connected regions B2 and B3 of the second pixel row. Then, the three pixel rows of these mutually connected one-dimensional connected regions are combined to generate the first maximum connected region.

[0036] However, in order to obtain Figure 3 The characteristic parameters of the first largest connected region of the image shown in (c) need to scan five linear one-dimensional connected regions B0, B1, B2, B3, B4 and B5, but it is inconvenient and inefficient to scan each one-dimensional connected region to describe such a two-dimensional connected region. Based on this, the present application conceives a contraction scheme to generate a new image, as detailed in step S5 described below.

[0037] In step S5: for each pixel row of the first maximum connected area, align the heads of the one-dimensional connected areas at the beginning of each pixel row, and align the tails of the one-dimensional connected areas at the end of each pixel row to generate a second maximum connected area, the one-dimensional connected area at the beginning is located on the starting side of the one-dimensional scan, and the one-dimensional connected area at the end is located on the ending side of the one-dimensional scan.

[0038] In this step, for Figure 3 In the 2D image shown in (c′), in the first 2D maximum connected area, the one-dimensional connected areas B0, B1, B2, B3 and B4 should be regarded as part of the entire 2D maximum connected area.

[0039] Then, for Figure 4 The 2D image shown in (c′) uses a shrinkage scheme. The shrinkage scheme is as follows Figure 2As shown, the contraction scheme includes: determining the head of the one-dimensional connected region at the beginning of each pixel row and the tail of the one-dimensional connected region at the end of each pixel row by using the one-dimensional coordinates of the head H and the tail T of the one-dimensional connected region marked in the aforementioned one-dimensional scanning process, as shown in FIG. Figure 4 As shown in (c′), the one-dimensional connected area at the beginning of the first row of pixel rows is B0, the one-dimensional connected area at the beginning of the second row of pixel rows is B2, and the one-dimensional connected area at the beginning of the third row of pixel rows is B4, the one-dimensional connected area at the end of the first row of pixel rows is B1, the one-dimensional connected area at the end of the second row of pixel rows is B3, and the one-dimensional connected area at the end of the third row of pixel rows is B4. Then, in step S50, the distance between the head of the one-dimensional connected areas B0, B2 and B4 at the beginning of each pixel row and the starting end side (the leftmost side) of the one-dimensional scan is compared to determine the one-dimensional connected area at the beginning of each pixel row (in this example, the one-dimensional connected area B2) whose head is farthest from the starting end side of the one-dimensional scan; step S51: compare the distance between the tail of the one-dimensional connected areas B1, B3 and B4 at the end of each pixel row and the ending end side of the one-dimensional scan to determine the one-dimensional connected area at the end of each pixel row (in this example, the one-dimensional connected area B1) whose tail is farthest from the ending end side of the one-dimensional scan (the rightmost side). dimensional connected area B4); step S52: taking the head of the leading one-dimensional connected area B2 farthest from the starting end side of the one-dimensional scan as a reference, move the heads of the other leading one-dimensional connected areas B0 and B4 of each pixel row to align with the head of the leading one-dimensional connected area B2 farthest from the starting end side of the one-dimensional scan; and step S53: taking the tail of the terminal one-dimensional connected area B4 farthest from the ending end side of the one-dimensional scan as a reference, move the tails of the other terminal one-dimensional connected areas B1 and B3 of each pixel row to align with the tail of the terminal one-dimensional connected area B4 farthest from the ending end side of the one-dimensional scan.

[0040] Thus, in step S5, only the head of the one-dimensional connected region at the beginning (leftmost) and the tail of the one-dimensional connected region at the end (rightmost) of each pixel row are moved. In this example, the head of the one-dimensional connected region B2 is used as a reference, and the heads of the one-dimensional connected regions B0 and B4 are moved to the right to align with the head of the one-dimensional connected region B2. The tail of the one-dimensional connected region B4 is used as a reference, and the tails of the one-dimensional connected regions B1 and B3 are moved to the left to align with the tail of the one-dimensional connected region B4. Therefore, the proposed contraction scheme can ensure that the heads of each one-dimensional connected region are connected to each other and the tails are connected to each other, while the main structure (framework) of the two-dimensional connected region is not changed. Figure 5 (b) shows the true connected regions and the aligned head and tail of the image after the above processing.

[0041] Step S6: Perform a two-dimensional scan on the aligned head and the aligned tail of the second largest connected region to identify the target object.

[0042] In this step, a two-dimensional greedy scan may be performed on the aligned head and the aligned tail of the second largest connected region to output feature parameters of the target object. The feature parameters may include at least one of the following: the area of ​​the target object, the center of gravity of the target object, and the contour length of the target object.

[0043] In addition, through the above image processing process, the connection relationship of the one-dimensional connected region can be obtained by only a small amount of calculation to form a complete two-dimensional connected region, and the complete two-dimensional connected region can be formed as Figure 4 The bifurcation tree structure shown, wherein the one-dimensional connected areas B0, B1, B2, B3 and B4 in the second largest connected area represent leaf nodes of the bifurcation tree structure, and the aligned head and tail represent edges connecting the leaf nodes. Thus, in step S6, a two-dimensional scanning node and edge can be performed by a bifurcation tree scanning method to identify the target object and obtain the characteristic parameters of the target object.

[0044] Therefore, in the present disclosure, after the shrinking process is completed, the head and tail will form a straight and connected strip, such as Figure 4 As shown in (d) of FIG. The boxes with dots are the pixels actually involved in the scanning, and the remaining large number of pixels (such as those inside the middle area of ​​the one-dimensional connected region) will not need to be scanned, which will greatly improve the scanning efficiency and reduce the processing overhead.

[0045] The present application uses a multi-core microprocessor or a multi-core computing unit to scan each pixel row of an image in parallel using a greedy method; a pruning strategy is used to re-express the search results of each pixel row and generate a new image to describe the connected area in a very concise form, which can greatly improve the efficiency of scanning and facilitate inter-row search by using a classic greedy method. In addition, traditional tree scanning tools can also be applied to new images.

[0046] Figure 6 1 is a schematic diagram of an example of an image processing device 100 as a part of the hardware portion of the image processing device for recognizing a target object according to an embodiment of the present disclosure. Figure 6As shown, the image processing device 100 may include a CPU 710 for overall control, parallel scanning and execution of program instructions, a read-only memory (ROM) 720 for storing system software, a random access memory (RAM) 730 for storing write / read data, a storage unit 740 for storing various program instructions and data, an input-output unit 750 as an input-output interface, and a communication unit 760 for implementing a communication function. The CPU 710 may be composed of, for example, a multi-core microprocessor or a multi-core computing unit. The input-output unit 750 may include various interfaces such as an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), and a network interface. It can be understood by a person skilled in the art that Figure 6 The structure shown is only for illustration and does not limit the hardware structure of the main control system. Figure 6 More or fewer components as shown, or with Figure 6 Different configurations are shown.

[0047] The storage unit 740 can be used to store software programs of application software, program instructions and modules for implementing the image processing method of the present application, such as the program instructions / data storage device corresponding to the master control instruction image processing method described in the present disclosure. The CPU 710 implements the above-mentioned master control instruction image processing method by running the software programs and modules stored in the storage unit 740. The storage unit 740 may include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the storage unit 740 may further include a memory remotely arranged relative to the CPU 710, and these remote memories may be connected to the image processing device 100 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0048] The communication unit 760 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the image processing device 100. In one example, the communication unit 760 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the communication unit 760 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0049] An embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the image processing method described in the above embodiment is implemented.

[0050] In one embodiment, the computer readable storage medium may be stored in Figure 6 In the storage unit 740, in combination with Figure 6 Other components in the image processing method are used to implement the image processing method for identifying the target object.

[0051] The reference numerals used for the method steps are only used to facilitate explanation and do not limit the order of the steps. Therefore, unless the context clearly stipulates otherwise, the above steps can be performed in other orders or in parallel.

[0052] The above are only preferred embodiments of the present disclosure. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as the protection scope of the present disclosure.

Claims

1. An image processing method for identifying a target object, characterized in that: The image processing method comprises: Step S1: Acquire an original image including a target object; Step S2: binarizing the original image to obtain a binarized image; Step S3: performing one-dimensional scanning on each pixel row of the binary image in parallel by a multi-core processor to extract a one-dimensional connected region of each pixel row of the binary image, wherein the one-dimensional connected region has a head indicating a starting position of the one-dimensional connected region, a tail indicating an ending position of the one-dimensional connected region, and an intermediate region between the head and the tail; Step S4: combining adjacent pixel rows that have been scanned one-dimensionally to generate a first maximum connected region that includes a plurality of the one-dimensional connected regions, wherein the one-dimensional connected regions of the combined adjacent pixel rows are connected to each other; and Step S5: for each pixel row of the first maximum connected area, align the head of the one-dimensional connected area at the head end of each pixel row, and align the tail of the one-dimensional connected area at the end of each pixel row to generate a second maximum connected area, the one-dimensional connected area at the head end is located at the starting end side of the one-dimensional scan, and the one-dimensional connected area at the end is located at the ending end side of the one-dimensional scan; Step S6: Perform a two-dimensional scan on the aligned head and the aligned tail of the second largest connected region to identify the target object.

2. The image processing method according to claim 1, characterized in that: The step S5 comprises: Step S50: comparing the distances between the head of the first-end one-dimensional connected region of each pixel row and the one-dimensional scanning start end side, so as to determine the first-end one-dimensional connected region whose head in each pixel row is farthest from the one-dimensional scanning start end side; Step S51: comparing the distances between the tails of the terminal one-dimensional connected regions of the respective pixel rows and the end side of the one-dimensional scan, so as to determine the terminal one-dimensional connected region whose tail is farthest from the end side of the one-dimensional scan in the respective pixel rows; Step S52: taking the head of the first-end one-dimensional connected region farthest from the starting end side of the one-dimensional scan as a reference, moving the heads of other first-end one-dimensional connected regions of each pixel row to align with the head of the first-end one-dimensional connected region farthest from the starting end side of the one-dimensional scan; and Step S53: Taking the tail of the terminal one-dimensional connected area farthest from the end end side of the one-dimensional scan as a reference, move the tails of other terminal one-dimensional connected areas of each pixel row to align with the tail of the terminal one-dimensional connected area farthest from the end end side of the one-dimensional scan.

3. The image processing method according to claim 1, characterized in that: The step S3 comprises: Scanning each pixel row in one dimension using a one-dimensional greedy scanning method to identify the head and the tail of the one-dimensional connected region; and Based on the identified head and tail of the one-dimensional connected region, the one-dimensional connected region is determined by using a four-neighborhood method.

4. The image processing method according to claim 3, characterized in that: The step S3 further comprises: Determine the one-dimensional coordinates of the head and the tail of each one-dimensional connected region in the direction of pixel rows, the head and the tail each having one pixel; and According to the one-dimensional coordinates of the head and the tail of each one-dimensional connected region, the number of pixels in the middle region of each one-dimensional connected region is calculated as the length of the middle region.

5. The image processing method according to claim 4, characterized in that: The step S4 comprises: Determine, according to the one-dimensional coordinates of the head and the tail of each one-dimensional connected region and the length of the middle region, whether the one-dimensional connected regions of the adjacent pixel rows have pixels located at the same position in the pixel row direction to determine whether the one-dimensional connected regions of the adjacent pixel rows are connected; and The adjacent pixel rows connected between the one-dimensional connected regions are combined to generate the first maximum connected region.

6. The image processing method according to claim 5, characterized in that: The step S4 further comprises: The lengths of the head and the tail of each of the one-dimensional connected regions included in the first maximum connected region and the length of the middle region are summed to calculate the area of ​​the first maximum connected region.

7. The image processing method according to claim 4, characterized in that: The step S3 comprises: The head of the one-dimensional connected region at the beginning of each pixel row and the tail of the one-dimensional connected region at the end of each pixel row are determined according to the one-dimensional coordinates of the head and the tail of each one-dimensional connected region.

8. The image processing method according to any one of the preceding claims 1 to 7, characterized in that: The step S6 comprises: A two-dimensional greedy scan is performed on the aligned head and the aligned tail of the second maximum connected region to output feature parameters of the target object.

9. The image processing method according to claim 8, characterized in that: The characteristic parameter includes at least one of the following: the area of ​​the target object, the center of gravity of the target object, and the contour length of the target object.

10. The image processing method according to claim 1, characterized in that: The one-dimensional connected area in the second maximum connected area and the aligned head and tail form a bifurcated tree structure, wherein the one-dimensional connected area in the second maximum connected area represents a leaf node of the bifurcated tree structure, the aligned head and tail represent edges connecting the leaf nodes, and the two-dimensional scan is performed by a bifurcated tree scanning method.

11. An image processing device for identifying a target object, the image processing device comprising a processor and a memory, the memory storing program instructions, characterized in that: The processor is configured to execute the program instructions to perform the following: Acquire an original image including a target object; Performing binarization processing on the original image to obtain a binarized image; Performing one-dimensional scanning on each pixel row of the binary image in parallel by a multi-core processor to extract a one-dimensional connected region of each pixel row of the binary image, wherein the one-dimensional connected region has a head indicating a starting position of the one-dimensional connected region, a tail indicating an ending position of the one-dimensional connected region, and an intermediate region between the head and the tail; Combining adjacent pixel rows that have been scanned one-dimensionally to generate a first maximum connected region that includes a plurality of the one-dimensional connected regions, wherein the one-dimensional connected regions of the combined adjacent pixel rows are connected to each other; and For each pixel row of the first maximum connected area, align the head of the one-dimensional connected area at the head end of each pixel row, and align the tail of the one-dimensional connected area at the end of each pixel row to generate a second maximum connected area, wherein the one-dimensional connected area at the head end is located at the start end side of the one-dimensional scan, and the one-dimensional connected area at the end end is located at the end end side of the one-dimensional scan; A two-dimensional scan is performed on the aligned head and the aligned tail of the second largest connected region to identify the target object.

12. The image processing device according to claim 11, characterized in that: The processor is further configured to execute the program instructions to perform the following: Comparing the distances between the head of the first-end one-dimensional connected region of each pixel row and the one-dimensional scanning start end side, so as to determine the first-end one-dimensional connected region whose head is farthest from the one-dimensional scanning start end side in each pixel row; Comparing the distances between the tails of the terminal one-dimensional connected regions of the respective pixel rows and the end side of the one-dimensional scan, so as to determine the terminal one-dimensional connected region whose tail is farthest from the end side of the one-dimensional scan in the respective pixel rows; Taking the head of the first-end one-dimensional connected region farthest from the starting end side of the one-dimensional scan as a reference, moving the heads of other first-end one-dimensional connected regions of each pixel row to align with the head of the first-end one-dimensional connected region farthest from the starting end side of the one-dimensional scan; as well as Taking the tail of the terminal one-dimensional connected area farthest from the end end side of the one-dimensional scan as a reference, the tails of other terminal one-dimensional connected areas of each pixel row are moved to align with the tail of the terminal one-dimensional connected area farthest from the end end side of the one-dimensional scan.

13. The image processing device according to claim 11, characterized in that: The processor is further configured to execute the program instructions to perform the following: Scanning each pixel row in one dimension using a one-dimensional greedy scanning method to identify the head and the tail of the one-dimensional connected region; and Based on the identified head and tail of the one-dimensional connected region, the one-dimensional connected region is determined by using a four-neighborhood method.

14. The image processing device according to claim 13, characterized in that: The processor is further configured to execute the program instructions to perform the following: Determine the one-dimensional coordinates of the head and the tail of each one-dimensional connected region in the direction of pixel rows, wherein the head and the tail each have one pixel; as well as According to the one-dimensional coordinates of the head and the tail of each one-dimensional connected region, the number of pixels in the middle region of each one-dimensional connected region is calculated as the length of the middle region.

15. The image processing device according to claim 14, characterized in that: The processor is further configured to execute the program instructions to perform the following: Determine, according to the one-dimensional coordinates of the head and the tail of each one-dimensional connected region and the length of the middle region, whether the one-dimensional connected regions of the adjacent pixel rows have pixels located at the same position in the pixel row direction to determine whether the one-dimensional connected regions of the adjacent pixel rows are connected; as well as The adjacent pixel rows connected between the one-dimensional connected regions are combined to generate the first maximum connected region.

16. The image processing device according to claim 15, characterized in that: The processor is further configured to execute the program instructions to perform the following: The lengths of the head and the tail of each of the one-dimensional connected regions included in the first maximum connected region and the length of the middle region are summed to calculate the area of ​​the first maximum connected region.

17. The image processing device according to claim 14, characterized in that: The processor is further configured to execute the program instructions to perform the following: The head of the one-dimensional connected region at the beginning of each pixel row and the tail of the one-dimensional connected region at the end of each pixel row are determined according to the one-dimensional coordinates of the head and the tail of each one-dimensional connected region.

18. The image processing device according to any one of the preceding claims 11 to 17, characterized in that: The processor is further configured to execute the program instructions to perform the following: A two-dimensional greedy scan is performed on the aligned head and the aligned tail of the second maximum connected region to output feature parameters of the target object.

19. The image processing device according to claim 18, characterized in that: The characteristic parameter includes at least one of the following: the area of ​​the target object, the center of gravity of the target object, and the contour length of the target object.

20. The image processing device according to claim 11, characterized in that: The one-dimensional connected area in the second maximum connected area and the aligned head and tail form a bifurcated tree structure, wherein the one-dimensional connected area in the second maximum connected area represents a leaf node of the bifurcated tree structure, the aligned head and tail represent edges connecting the leaf nodes, and the two-dimensional scan is performed by a bifurcated tree scanning method.