WO2024000375A1 - 图像处理的方法及其装置 - Google Patents

图像处理的方法及其装置 Download PDF

Info

Publication number
WO2024000375A1
WO2024000375A1 PCT/CN2022/102738 CN2022102738W WO2024000375A1 WO 2024000375 A1 WO2024000375 A1 WO 2024000375A1 CN 2022102738 W CN2022102738 W CN 2022102738W WO 2024000375 A1 WO2024000375 A1 WO 2024000375A1
Authority
WO
WIPO (PCT)
Prior art keywords
branch
pixel
searched
skeleton branch
skeleton
Prior art date
Application number
PCT/CN2022/102738
Other languages
English (en)
French (fr)
Inventor
黄强威
江冠南
王智玉
Original Assignee
宁德时代新能源科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宁德时代新能源科技股份有限公司 filed Critical 宁德时代新能源科技股份有限公司
Priority to PCT/CN2022/102738 priority Critical patent/WO2024000375A1/zh
Priority to EP22937655.3A priority patent/EP4328851A1/en
Priority to CN202280006707.6A priority patent/CN117677970A/zh
Priority to US18/303,971 priority patent/US11915443B2/en
Publication of WO2024000375A1 publication Critical patent/WO2024000375A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/162Segmentation; Edge detection involving graph-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20036Morphological image processing
    • G06T2207/20044Skeletonization; Medial axis transform

Definitions

  • the present application relates to the field of image processing, and in particular, to an image processing method and device.
  • This application provides an image processing method and device, which can take into account both processing speed and accuracy.
  • a first aspect provides an image processing method, including: searching for the next pixel point of the skeleton branch according to the searched current pixel point of the skeleton branch of the target image; according to the searched pixel point of the skeleton branch The number determines whether the skeleton branch is a burr branch.
  • An embodiment of the present application provides an image processing method, which includes: searching for the next pixel point of the skeleton branch of the target image according to the searched current pixel point of the skeleton branch; according to the searched pixel point of the skeleton branch The number of points determines whether the skeleton branch is a burr branch.
  • search the next pixel point of the skeleton branch that is, the next pixel point of the skeleton branch is related to the searched current pixel point of the skeleton branch, that is, the target image Skeleton branches are searched according to a certain search path.
  • the number of searched pixels of the skeleton branch it is determined whether the skeleton branch is a burr branch.
  • this application can determine the burr branch based on the number of pixels searched along a specific search path. Therefore, the technical solution of this application can take into account both processing speed and accuracy.
  • the method before searching for the next pixel point of the skeleton branch of the target image according to the searched current pixel point of the skeleton branch of the target image, the method further includes: determining The endpoints and bifurcation points are used to search for the skeleton branch. This facilitates subsequent search operations based on the endpoints and bifurcation points in the image.
  • searching for the next pixel point of the skeleton branch based on the searched current pixel point of the skeleton branch of the target image includes: using the endpoint in the target image as an anchor point, The next pixel point of the skeleton branch is searched in turn according to the searched current pixel point of the skeleton branch corresponding to the end point.
  • the endpoints as anchor points, by processing the skeleton branches corresponding to each endpoint one by one, the number and category of the skeleton branches can be accurately determined, and the misjudgment of glitchy branches caused by classifying different skeleton branches into one skeleton branch can be avoided deletion, thus helping to improve the accuracy of determining burr branches.
  • determining whether the skeleton branch is a burr branch according to the number of searched pixels of the skeleton branch includes: determining the number of searched pixels of the skeleton branch. When the first threshold is reached, it is determined that the skeleton branch is not a burr branch. In this way, it is possible to determine that the skeleton branch is not a burr branch without searching all the pixels of the skeleton branch, which is beneficial to improving processing speed and saving computing resources.
  • determining whether the skeleton branch is a burr branch according to the number of searched pixels of the skeleton branch includes: determining the number of searched pixels of the skeleton branch. If the first threshold is not reached and the searched current pixel point of the skeleton branch is a bifurcation point, the skeleton branch is determined to be a burr branch. In this way, the glitch branch can be quickly determined, and the skeleton branch can be determined to be the glitch branch without searching all the pixels of the target image, which is beneficial to improving the processing speed and saving computing resources.
  • the method further includes: when the number of searched pixel points of the skeleton branch reaches a first threshold, or the current searched pixel point of the skeleton branch is a bifurcation point. , stop searching. In this way, the number of searched pixels in the skeleton branch reaches the first threshold, or the current searched pixel in the skeleton branch is a bifurcation point, which can be used as a trigger condition to stop the search, thereby facilitating subsequent operations.
  • the value of the foreground pixel of the target image corresponds to 1, and the value of the background pixel corresponds to 0.
  • the value of the pixel point of the skeleton branch in the target image corresponds to 1, which facilitates the search for the pixel point of the skeleton branch.
  • searching for the next pixel point of the skeleton branch according to the searched current pixel point of the skeleton branch of the target image includes: converting the value of the searched current pixel point is 0; when there is only one foreground pixel among the eight neighbor pixels of the searched current pixel, determine the one foreground pixel to be the next pixel of the skeleton branch.
  • the value of the current pixel that has been searched is converted to 0, so that when searching for the next pixel based on the current pixel that has been searched, the searched pixel will not be searched again, thus ensuring Search along a specific search path, that is, the skeleton of the skeleton branch; when there is only one foreground pixel among the 8 neighbor pixels of the current pixel that has been searched, determine that one foreground pixel as the skeleton branch The next pixel, this ensures that the foreground pixel is a pixel on the skeleton branch.
  • the method further includes: when there is more than one foreground pixel among the eight neighbor pixels of the searched current pixel, determining the searched current pixel.
  • Pixel points are bifurcation points. In this way, it is convenient to determine whether the skeleton branch is a burr branch based on whether the current pixel point is a bifurcation point.
  • the method further includes: recording the searched current pixel points, where the number of recorded pixel points is the number of searched pixel points of the skeleton branch. In this way, it is convenient to determine the length of the skeleton branch based on the number of recorded pixels, and then determine whether the skeleton branch is a burr branch.
  • recording the searched current pixel point includes: storing the position information of the searched current pixel point in a memory. In this way, it is convenient to obtain the graph of the skeleton branch based on the position information, and it is also convenient for subsequent use to obtain it from the memory when needed.
  • the method further includes: when it is determined that the skeleton branch is a burr branch, converting the value of the current searched bifurcation point to 1; and/or, when determining that the skeleton branch is a burr branch, If the skeleton branch is not a burr branch, the values of all searched pixels of the skeleton branch are converted to 1.
  • the value of the current bifurcation point that has been searched is converted to 1, which can ensure the continuity between other skeleton branches connected through the bifurcation point. Avoid discontinuous patterns in the target image.
  • the values of all searched pixels of the skeleton branch are converted to 1, and the graph of the skeleton branch can be restored to its original state.
  • determining the endpoints and bifurcation points in the target image includes: determining the target image according to the values of eight neighboring pixels of the current pixel of the target image.
  • the current pixel is the endpoint or bifurcation point. This method is simple and easy to implement and facilitates the confirmation of endpoints or bifurcation points.
  • determining that the current pixel point of the target image is an endpoint includes: when the sum of the values of eight neighboring pixel points of the current pixel point of the target image is 1. , determine the current pixel point as the endpoint. This makes it easy to determine the endpoints in the target image.
  • determining that the current pixel of the target image is the bifurcation point includes: the sum of the values of eight neighboring pixels of the current pixel of the target image is greater than Or equal to 3, and the value of at least three neighbor pixels among the eight neighbor pixels is 1 smaller or larger than the value of the previous neighbor pixel in the clockwise or counterclockwise direction,
  • the current pixel is determined to be a bifurcation point.
  • the method further includes: when the number of bifurcation points is 0, determining whether the skeleton branch is a burr branch according to the number of foreground pixels of the skeleton branch. . This will help further improve the processing speed of this method, and at the same time avoid missing deletions of burr branches.
  • determining whether the skeleton branch is a burr branch according to the number of foreground pixels of the skeleton branch includes: when the number of foreground pixels of the skeleton branch is less than a first threshold In the case of , it is determined that the skeleton branch is a burr branch; or, in the case where the number of foreground pixels of the skeleton branch is not less than the first threshold, it is determined that the skeleton branch is not a burr branch. In this way, by setting the first threshold, it is convenient to determine whether the skeleton branch is a burr branch based on the relationship between the number of foreground pixels of the skeleton branch and the first threshold.
  • the method further includes: obtaining an input image, the value of a foreground pixel of the input image corresponding to 1, and the value of a background pixel corresponding to 0; extracting a connected domain of the input image , obtaining at least one target image, each of which includes a connected domain of the input image.
  • each target image corresponds to a connected domain, and each target image is processed separately, which is beneficial to improving the processing speed of this method.
  • the width of the skeleton branch is a single pixel width. In this way, it can be ensured that when searching for the next pixel of the skeleton branch, there will be only one neighbor pixel along the normal direction of the skeleton, ensuring the uniqueness of the skeleton path.
  • an image processing device including: a processing module, the processing module being configured to: determine the next pixel point of the skeleton branch according to the searched current pixel point of the skeleton branch of the target image; The number of searched pixels of the skeleton branch determines whether the skeleton branch is a burr branch.
  • an image processing device including: a memory for storing computer-executable instructions; a processor for accessing the memory and executing the computer-executable instructions to perform the first aspect and the third aspect. Operations in the method of any one of the aspects.
  • a fourth aspect provides a storage medium for storing a computer program.
  • the computing device implements the first aspect and the method described in any one of the first aspects.
  • An embodiment of the present application provides an image processing method, which includes: searching for the next pixel point of the skeleton branch of the target image according to the searched current pixel point of the skeleton branch; according to the searched pixel point of the skeleton branch The number of points determines whether the skeleton branch is a burr branch.
  • search the next pixel point of the skeleton branch that is, the next pixel point of the skeleton branch is related to the searched current pixel point of the skeleton branch, that is, the target image Skeleton branches are searched according to a certain search path.
  • the number of searched pixels of the skeleton branch it is determined whether the skeleton branch is a burr branch.
  • this application can determine the burr branch based on the number of pixels searched along a specific search path. Therefore, the technical solution of this application can take into account both processing speed and accuracy.
  • Figure 1 is an image processing method according to an embodiment of the present application
  • Figure 2 is a schematic diagram of a target image according to an embodiment of the present application.
  • Figure 3 is a schematic diagram of neighborhood pixels according to an embodiment of the present application.
  • Figure 4 is a schematic diagram of neighborhood pixels according to an embodiment of the present application.
  • Figure 5 is a schematic diagram of neighborhood pixels according to an embodiment of the present application.
  • Figures 6 to 8 are schematic diagrams of neighborhood pixels according to an embodiment of the present application.
  • Figure 9 is a flow chart of a method for determining burr branches according to an embodiment of the present application.
  • Figure 10 is a schematic diagram of an image processing method according to an embodiment of the present application.
  • Figure 11 is a schematic diagram of an input image according to an embodiment of the present application.
  • Figures 12 and 13 are schematic diagrams of connected domains extracted from input images according to an embodiment of the present application.
  • Figure 14 is a schematic diagram of an image processing device according to an embodiment of the present application.
  • Figure 15 is a schematic diagram of an image processing device according to an embodiment of the present application.
  • an embodiment of the present application provides an image processing method, which includes: searching for the next pixel point of the skeleton branch according to the searched current pixel point of the skeleton branch of the target image; according to the searched pixel point of the skeleton branch The number of points determines whether the skeleton branch is a burr branch. According to the searched current pixel point of the skeleton branch of the target image, search the next pixel point of the skeleton branch, that is, the next pixel point of the skeleton branch is related to the searched current pixel point of the skeleton branch, that is, the target image Skeleton branches are searched according to a certain search path.
  • the skeleton branch is a burr branch. That is to say, in some cases, it is not necessary to search all the pixels to determine whether the skeleton branch is a burr branch. Rather than determining the burr branch by traversing each pixel one by one, this application can determine the burr branch based on the number of pixels searched along a specific search path. Therefore, the technical solution of this application can take into account both processing speed and accuracy.
  • FIG 1 shows an image processing method according to an embodiment of the present application.
  • the method 100 specifically includes the following steps 110 and 120.
  • Step 110 Search the next pixel of the skeleton branch according to the current searched pixel of the skeleton branch of the target image.
  • the skeleton of the target image may be a graphic composed of foreground pixels in the target image, and the skeleton branch may refer to a branch graphic in which the skeleton is divided into several branches due to the existence of bifurcation points of the graphic.
  • a target image includes a skeleton.
  • the skeleton does not have a bifurcation point
  • the skeleton is a skeleton branch; when the skeleton has a bifurcation point, the skeleton will be divided into at least three skeleton branches.
  • Skeleton branches are generated due to reasons such as noise.
  • Skeleton branches can include burr branches. Under certain specific conditions, skeleton branches can be determined to be burr branches.
  • FIG. 2 is a schematic diagram of a target image according to an embodiment of the present application.
  • the target image may include a plurality of skeleton branches.
  • the target image includes a first skeleton branch W1, a second skeleton branch W2, and a third skeleton branch W3.
  • step 110 for example, for the first skeleton branch W1, point B1 is the current pixel point that has been searched, and the next pixel point B2 of the first skeleton branch W1 is searched based on point B1. That is to say, the next pixel point to be searched in the skeleton branch is related to the current pixel point that has been searched in the skeleton branch. That is, the skeleton branch of the target image is searched according to a certain search path. Compared with traversing each pixel one by one, this method is beneficial to improve the processing speed and can also avoid misjudgment of skeleton branches.
  • Step 120 Determine whether the skeleton branch is a burr branch based on the number of searched pixels of the skeleton branch.
  • step 120 when the number of searched pixel points of the skeleton branch reaches a preset threshold, it is determined that the skeleton branch is not a burr branch.
  • step 120 in some cases, it is not necessary to search all the pixel points of a certain skeleton branch to determine whether the skeleton branch is a burr branch. In this way, compared with searching all pixels of the target image, this method can reduce the search volume to a certain extent, which is beneficial to saving computing resources.
  • An embodiment of the present application provides an image processing method, which includes: searching for the next pixel point of the skeleton branch according to the current searched pixel point of the skeleton branch of the target image; according to the number of searched pixel points of the skeleton branch, Determine whether the skeleton branch is a burr branch.
  • search the next pixel point of the skeleton branch that is, the next pixel point of the skeleton branch is related to the searched current pixel point of the skeleton branch, that is, the target image Skeleton branches are searched according to a certain search path.
  • the number of searched pixels of the skeleton branch it is determined whether the skeleton branch is a burr branch.
  • this application can determine the burr branch based on the number of pixels searched along a specific search path. Therefore, the technical solution of this application can take into account both processing speed and accuracy.
  • the method 100 before step 110, further includes: determining an endpoint and a bifurcation point in the target image, and the endpoint and the bifurcation point are used to search for skeleton branches.
  • the bifurcation point can be the intersection point of multiple skeleton branches in the target image, for example, point A in Figure 2.
  • the end points can be the starting points of the skeleton branches in the target image, for example, point B, point C and point D in Figure 2, where point B is the end point of the first skeleton branch W1 and point C is the end point of the first skeleton branch W2 , point D is the end point of the first skeleton branch W3.
  • Determining the endpoints and bifurcation points in the target image may include determining the number and/or location of the endpoints and bifurcation points in the target image.
  • step 110 the endpoints and bifurcation points in the target image are determined, which facilitates subsequent search operations based on the endpoints and bifurcation points in the image.
  • step 110 the endpoint in the target image is used as the anchor point, and the next pixel of the skeleton branch is searched based on the current searched pixel point of the skeleton branch corresponding to the endpoint. point.
  • step 110 when the number of bifurcation points is greater than 0, the end point in the target image is used as the anchor point, and the next pixel of the skeleton branch is searched based on the current searched pixel point of the skeleton branch corresponding to the end point. point.
  • the anchor point is the current pixel that has been searched.
  • Taking the endpoint in the target image as the anchor point can mean taking the endpoint in the target image as the starting point and starting the search from the endpoint.
  • searching for the next pixel point of the skeleton branch may include the following specific methods.
  • endpoint B is used as the starting point, that is, endpoint B is used as the current searched pixel point of the first skeleton branch W1
  • the first skeleton is searched according to endpoint B.
  • the next pixel may be a neighborhood pixel of the searched current pixel.
  • the next pixel may be one of the 8 neighborhood pixels of the searched current pixel.
  • the search step size that is, the distance between the next pixel and the current pixel that has been searched, can be specifically set according to actual needs, thereby taking into account both search speed and search accuracy.
  • Searching for the next pixel of the skeleton branch based on the current searched pixel of the skeleton branch corresponding to the endpoint may include the following specific methods.
  • the first skeleton branch W1, the second skeleton branch W2 and the third skeleton branch W3 are searched in sequence. That is to say, the skeleton branch corresponding to each endpoint in the target image must be searched, but The search order of each skeleton branch is not specifically limited.
  • the skeleton branches in the target image are classified by the following method.
  • the pixels in the target image are traversed in order from left to right, and then from top to bottom. That is to say, starting from the top of the target image, traversing the first row, the second row, and the second row. OK,... until the last line.
  • the label of the neighboring foreground pixel is assigned. If the current pixel is a foreground point and an endpoint, a new label is assigned to the pixel.
  • the first skeleton branch W1 is assigned a label L1
  • the second skeleton branch W2 and the third skeleton branch W3 are assigned another label L2, and L1 is different from L2.
  • L1 is different from L2.
  • the methods in the related art may cause counting errors of skeleton branches, and misjudgment and deletion of burr branches.
  • the endpoint in the target image is used as the anchor point, and the next pixel point of the skeleton branch is searched based on the current searched pixel point of the skeleton branch corresponding to the endpoint, so that the number and number of skeleton branches can be accurately determined.
  • Category to avoid the misjudgment and deletion of glitch branches caused by classifying different skeleton branches into one skeleton branch, thus helping to improve the accuracy of determining glitch branches.
  • step 120 when the number of searched pixels of the skeleton branch reaches the first threshold, it is determined that the skeleton branch is not a burr branch.
  • the first threshold can be specifically set according to actual conditions, for example, based on experience values in specific application fields.
  • step 120 the number of searched pixels in the skeleton branch does not reach the first threshold and the current searched pixel in the skeleton branch is a bifurcation point. In this case, determine the skeleton branch as a burr branch.
  • the second skeleton branch W2 For example, see Figure 2, for the second skeleton branch W2, starting from the end point C, as the current searched pixel point of the second skeleton branch W2, search for the next pixel point of the second skeleton branch W2... until the search is completed
  • the current pixel point of is the bifurcation point A.
  • the number of searched pixel points of the second skeleton branch W2 does not reach the first threshold.
  • the second skeleton branch W2 can be determined to be a burr branch.
  • the skeleton branch is a burr branch. In this way, the burr branch can be quickly determined, and the skeleton branch can be determined to be a burr branch without searching all the pixels of the target image, which is beneficial to improving processing speed and saving computing resources.
  • the search is stopped.
  • the search is stopped. For example, when D1 point is the current searched pixel point, at this time, the number of searched pixel points in the third skeleton branch W3 reaches the first threshold, and the search is stopped, so that the D1 point on the third skeleton branch W3 reaches A There is no need to search between points, that is to say, the search for the third skeleton branch W3 ends, so that other skeleton branches, such as the first skeleton branch W1 and the second skeleton branch W2, can be searched or the search for the entire target image can be ended. search.
  • the search is stopped, that is to say, the search for the second skeleton branch W2 ends at this time, so that Search other skeleton branches or end the search of the entire target image.
  • ending the search of the entire target image includes: ending the search of the entire target image when all skeleton branches of the target image stop searching.
  • the number of searched pixels of the skeleton branch reaches the first threshold, or the current searched pixel of the skeleton branch is a bifurcation point, which can be used as a trigger condition to stop the search, thereby facilitating subsequent operations. conduct.
  • the value of the foreground pixel of the target image corresponds to 1, and the value of the background pixel corresponds to 0.
  • the value of the pixel point of the skeleton branch in the target image is 1, which facilitates the search for the pixel point of the skeleton branch.
  • the value of the foreground pixel corresponds to 1, which can mean that the label value assigned to the foreground pixel is 1.
  • the value of the background pixel corresponds to 0, which can mean that the label value assigned to the background pixel is 0.
  • the value of the foreground pixel in the target image is any one of 0-255
  • the value of the background pixel is any one of 0-255.
  • the value of the foreground pixel corresponds to 1, which may mean that the pixel value of the foreground pixel itself is 1.
  • the value of the background pixel corresponds to 0, which can mean that the pixel value of the background pixel itself is 0.
  • the values of the foreground pixels of the target image are different from the values of the background pixels.
  • the value of the foreground pixel of the target image can be greater or smaller than the value of the background pixel, which can be set according to the actual situation.
  • the value of the current pixel that has been searched is converted to 0; when there is only one foreground pixel among the 8 neighbor pixels of the current pixel that has been searched, The foreground pixel is determined to be the next pixel of the skeleton branch.
  • the pixel point B1 is the current pixel point that has been searched and the pixel value is 1.
  • the pixel value of pixel point B1 After searching for the first skeleton branch according to the pixel point B1 Before the next pixel point B2 of W1, convert the pixel value of pixel point B1 to 0. In this way, when searching for pixel point B2 based on pixel point B1, the current pixel point B1 that has been searched will not be searched again.
  • the one foreground pixel is determined to be the next pixel of the skeleton branch.
  • the pixel point B1 is the current pixel point that has been searched and the pixel value is converted to 0.
  • B2 can be determined is the next pixel of the first skeleton branch W1. If there are two or more foreground pixels among the eight neighborhood pixels of B1, then these foreground pixels do not belong to the first skeleton branch W1 and cannot be determined as the next pixel of the first skeleton branch W1.
  • the value of the current pixel that has been searched is converted to 0, so that when searching for the next pixel based on the current pixel that has been searched, the searched pixel will not be searched again, thus ensuring that Search along a specific search path, that is, the skeleton of the skeleton branch; when there is only one foreground pixel among the 8 neighbor pixels of the current pixel that has been searched, determine that one foreground pixel as the skeleton branch The next pixel, this ensures that the foreground pixel is a pixel on the skeleton branch.
  • the current pixel that has been searched is determined to be a bifurcation point.
  • point A can be determined as the bifurcation point.
  • determining that the current pixel point that has been searched is a bifurcation point may be to search according to a specific search path, so that in the process of searching along the specific search path, it is determined that the current pixel point that has been searched is a bifurcation point. Fork point.
  • the method of determining that the current pixel that has been searched is a bifurcation point is different from the method of determining the bifurcation point by traversing row by row.
  • the 8-neighborhood of the searched current pixel point may have three, four or even more pixel points.
  • the searched current pixel point may be determined to be a bifurcation point.
  • the current pixel points that have been searched can also be recorded, where the number of pixel points that have been recorded is the number of pixel points that have been searched for the skeleton branch.
  • the number of pixel points that have been recorded is the number of pixel points that have been searched for the skeleton branch. In this way, it is convenient to determine the length of the skeleton branch based on the number of recorded pixels, and then determine whether the skeleton branch is a burr branch.
  • the searched position information of the current pixel point can be stored in the memory.
  • the memory is a stack container.
  • the value of the current branch point that has been searched is converted to 1; or, when it is determined that the skeleton branch is not a burr branch, Converts the value of all searched pixels of the skeleton branch to 1.
  • the value of the current bifurcation point that has been searched is converted to 1, which can ensure the continuity between other skeleton branches connected through the bifurcation point. Avoid discontinuous patterns in the target image. For example, in the process of searching for the second skeleton branch W2, after determining point A as the bifurcation point, if the value of point A is not converted to 1, it will result in the first skeleton branch W1 and the third skeleton branch W3 are discontinuous, which may lead to incorrect counting of skeleton branches.
  • the values of all searched pixels of the skeleton branch are converted to 1, so that the graph of the skeleton branch can be restored to its original state.
  • the current pixel point of the target image can be determined as an endpoint or a bifurcation point based on the values of eight neighboring pixel points of the current pixel point of the target image. This method is simple and easy to implement and facilitates the confirmation of endpoints or bifurcation points.
  • the bifurcation points and end points in the target image can be determined by traversing line by line and pixel by pixel. For example, traverse from top to bottom and from left to right to find or determine bifurcation points and endpoints. During this traversal, endpoints and bifurcation points can be identified.
  • determining the endpoints and bifurcation points in the target image may include: when the number of endpoints in the target image is greater than 2, determining that there are bifurcation points in the target image; When the number is 2, it is determined that there is no bifurcation point in the target image.
  • the current pixel is determined to be the endpoint.
  • Figure 3 is a schematic diagram of neighborhood pixels according to an embodiment of the present application.
  • point P1 represents the current pixel
  • P2, P3, P4, P5, P6, P7, P8, and P9 represent the pixels in the eight neighborhoods of P1.
  • the sum of the pixel values of the 8 neighboring pixels of P1 is equal to 1, the current pixel P1 can be determined as the endpoint.
  • the method of this embodiment facilitates determining endpoints in the target image.
  • the sum of the values of 8 neighboring pixels of the current pixel in the target image is greater than or equal to 3, and at least three of the 8 neighboring pixels are When the value of a point is 1 smaller or larger than the value of the previous neighbor pixel in the clockwise or counterclockwise direction, the current pixel is determined to be a bifurcation point.
  • Figure 4 is a schematic diagram of neighborhood pixels according to an embodiment of the present application.
  • (a) in Figure 4 is a schematic diagram of the values of 8 neighboring pixels of the current pixel point
  • (b) in Figure 4 is a schematic diagram of the skeleton branch where the current pixel point is located.
  • the pixel values of P3, P5, and P7 are 1, and the pixel values of P1, P2, P4, P6, P8, and P9 are 0.
  • the sum of the values of the eight neighboring pixels of the current pixel P1 is 3, and in the clockwise direction, the pixel value of P4 is 1 less than the pixel value of P3, the pixel value of P6 is 1 less than the pixel value of P5, and the pixel value of P8 is 1 less than the pixel value of P5.
  • the pixel value is 1 less than the pixel value of P7, that is, the value of 3 neighbor pixels is 1 less than the value of the previous neighbor pixel in the clockwise direction.
  • the current pixel point P1 can be determined as the bifurcation point.
  • Figure 5 is a schematic diagram of neighborhood pixels according to an embodiment of the present application.
  • (a) in Figure 5 is a schematic diagram of the values of 8 neighboring pixels of the current pixel point
  • (b) in Figure 5 is a schematic diagram of the skeleton branch where the current pixel point is located.
  • the pixel values of P3, P5, P7, P8, and P9 are 1, and the pixel values of P1, P2, P4, and P6 are 0.
  • the sum of the values of the eight neighboring pixels of the current pixel P1 is 5, and in the clockwise direction, the pixel value of P4 is 1 less than the pixel value of P3, the pixel value of P6 is 1 less than the pixel value of P5, and the pixel value of P2 is 1 less than the pixel value of P5.
  • the pixel value is 1 less than the pixel value of P9, that is, the value of 3 neighbor pixels is 1 less than the value of the previous neighbor pixel in the clockwise direction.
  • the current pixel point P1 can be determined as the bifurcation point.
  • the values of at least three neighboring pixels are greater than the values of the previous neighborhood in the clockwise direction. If the value of a pixel is 1 smaller or larger than 1, and the value of at least three neighbor pixels is 1 smaller or larger than the value of the previous neighbor pixel in the counterclockwise direction, the current pixel can be determined to be a bifurcation point.
  • FIGS. 6 to 8 are schematic diagrams of neighborhood pixels according to an embodiment of the present application. As shown in (a) in Figures 6 to 8, it is a schematic diagram of the values of the eight neighboring pixels of the current pixel point. The sum of the values of the eight neighboring pixels of the current pixel point P1 is 3. (b) in Figure 6 to Figure 8 is a schematic diagram of the skeleton branch where the current pixel point is located, as shown in (b) in Figure 6 to Figure 8, because at least three neighborhoods among the eight neighborhood pixel points are satisfied If the value of a pixel is 1 smaller or larger than the value of the previous neighbor pixel in the clockwise or counterclockwise direction, the current pixel P1 cannot be determined as a bifurcation point.
  • the sum of the values of eight neighboring pixels of the current pixel in the target image is greater than or equal to 3, and the value ratio of at least three of the eight neighboring pixels is clockwise. Or when the value of the previous neighbor pixel in the counterclockwise direction is 1 smaller or larger than 1, the current pixel is determined to be a bifurcation point. In this way, the bifurcation points in the target image can be accurately determined and non-bifurcation points can be avoided from being misjudged as bifurcation points.
  • the skeleton branch is a burr branch based on the number of foreground pixels of the skeleton branch.
  • whether the skeleton branch is a burr branch is determined based on the number of foreground pixels of the skeleton branch, which can avoid directly confirming a skeleton branch without a bifurcation point as a non-glitch branch. Burr branches, resulting in missed deletion of burr branches.
  • directly judging the number of foreground pixels of the skeleton branch can confirm whether the skeleton branch is a burr branch, which is beneficial to improving the processing speed of this method.
  • the skeleton branch when the number of bifurcation points is 0 and the number of foreground pixels of the skeleton branch is less than the first threshold, the skeleton branch is determined to be a burr branch; or, When the number of foreground pixels of the skeleton branch is not less than the first threshold, it is determined that the skeleton branch is not a burr branch. In this way, by setting the first threshold, it is convenient to determine whether the skeleton branch is a burr branch based on the relationship between the number of foreground pixels of the skeleton branch and the first threshold.
  • Figure 9 is a flow chart of a method for determining burr branches according to an embodiment of the present application. As shown in Figure 9, method 900 includes the following steps.
  • Step 910 Obtain the target image.
  • the target image is a processed image of the original image.
  • the target image is a binary image, that is, the pixels of the skeleton branches in the target image, that is, the foreground pixels, have a pixel value of 1; the other pixels, that is, the background pixels, have a pixel value of 0.
  • Step 920 Determine bifurcation points and end points in the target image.
  • Step 930 Determine whether the number of bifurcation points in the target image is greater than 0. If the number of bifurcation points is not greater than 0, step 940 is executed. If the number of bifurcation points in the target image is greater than 0, step 950 is executed.
  • Step 940 Count the number of foreground pixels in the target image.
  • Step 950 Search the next pixel of the skeleton branch according to the current searched pixel of the skeleton branch of the target image.
  • Step 960 Determine whether the number of searched pixels reaches the first threshold or whether the current pixel is a bifurcation point. If the number of searched pixels reaches the first threshold or the current pixel is a bifurcation point, step 970 is executed. If the number of searched pixels does not reach the first threshold and the current pixel is not a bifurcation point, return to step 950.
  • Step 970 stop searching.
  • stopping the search can be stopping the search for the next pixel on the skeleton branch.
  • stopping the search may be stopping the search for the next pixel point of all skeleton branches of the target image.
  • the method 100 also includes: obtaining an input image, the value of the foreground pixel of the input image corresponds to 1, and the value of the background pixel corresponds to 0; extracting the connected domain of the input image, obtaining At least one target image, each target image including a connected domain of the input image.
  • FIG 10 is a schematic diagram of an image processing method according to an embodiment of the present application. As shown in Figure 10, the method includes the following steps.
  • Step 1010 obtain the input image.
  • the input image can be a binarized image of the original image.
  • the value of the foreground pixel of the input image is 1 and the value of the background pixel is 0.
  • Step 1020 Extract the connected domain of the input image.
  • a connected domain also known as a connected area, generally refers to an image area composed of foreground pixels with the same pixel value and adjacent positions in the image.
  • step 1020 is performed before step 910.
  • Figure 11 is a schematic diagram of an input image according to an embodiment of the present application.
  • Figures 12 and 13 are schematic diagrams of an input image after extraction of connected domains according to an embodiment of the present application.
  • the input image includes two connected areas.
  • the images shown in Figures 12 and 13 can be obtained, where each connected domain can correspond to a target image.
  • the connected domain can be extracted using the Two-Pass method, seed filling algorithm, etc., and the embodiments of this application do not specifically limit this.
  • each target image corresponds to a connected domain, and each target image is processed separately, which is beneficial to improving the processing speed of the method.
  • the width of the skeleton branch is a single pixel width. In this way, it can be ensured that when searching for the next pixel of the skeleton branch, there will be only one neighbor pixel along the normal direction of the skeleton, ensuring the uniqueness of the skeleton path.
  • FIG. 14 is a schematic diagram of an image processing device according to an embodiment of the present application.
  • the image processing device 200 includes a processing module 201 .
  • the processing module 201 is configured to: determine the next pixel point of the skeleton branch according to the searched current pixel point of the skeleton branch of the target image; and determine whether the skeleton branch is a burr branch according to the number of searched pixel points of the skeleton branch.
  • the processing module 201 is configured to: before searching for the next pixel point of the skeleton branch according to the searched current pixel point of the skeleton branch of the target image, determine the endpoints and The bifurcation point, the endpoint and the bifurcation point are used to search for skeleton branches.
  • the processing module 201 is configured to: use the endpoint in the target image as an anchor point, and sequentially search for the next pixel point of the skeleton branch according to the searched current pixel point of the skeleton branch corresponding to the endpoint. pixel.
  • the processing module 201 is configured to: determine that the skeleton branch is not a burr branch when the number of searched pixels of the skeleton branch reaches the first threshold.
  • the processing module 201 is used to: when the number of searched pixels of the skeleton branch does not reach the first threshold and the current searched pixel of the skeleton branch is a bifurcation point Next, determine the skeleton branch as the burr branch.
  • the processing module 201 is configured to: the number of searched pixel points in the skeleton branch reaches the first threshold, or the current searched pixel point in the skeleton branch is a bifurcation point. case, stop searching.
  • the processing module 201 is configured to: convert the value of the current pixel that has been searched to 0; there is only one foreground among the 8 neighbor pixels of the current pixel that has been searched. In the case of pixels, the foreground pixel is determined to be the next pixel of the skeleton branch.
  • the processing module 201 is configured to: determine the searched current pixel when there is more than one foreground pixel among the eight neighbor pixels of the searched current pixel.
  • the point is the bifurcation point.
  • the processing module 201 is configured to: record the current searched pixel points, where the number of recorded pixel points is the number of searched pixel points of the skeleton branch.
  • the processing module 201 is configured to store the searched position information of the current pixel into the memory.
  • the processing module 201 is configured to: convert the value of the current searched bifurcation point to 1 when it is determined that the skeleton branch is a burr branch; or, when it is determined that the skeleton branch is not In the case of the burr branch, convert the values of all searched pixels in the skeleton branch to 1.
  • the processing module 201 is configured to determine that the current pixel of the target image is an endpoint or a bifurcation point based on the values of eight neighboring pixels of the current pixel of the target image.
  • the processing module 201 is configured to: determine the current pixel as the endpoint when the sum of the values of eight neighboring pixels of the current pixel of the target image is 1.
  • the processing module 201 is configured to: the sum of the values of the eight neighboring pixels of the current pixel in the target image is greater than or equal to 3, and the sum of the values of the eight neighboring pixels in the target image is When the values of at least three neighboring pixels are 1 smaller or larger than the value of the previous neighboring pixel in the clockwise or counterclockwise direction, the current pixel is determined to be a bifurcation point.
  • the processing module 201 is configured to: when the number of bifurcation points is 0, determine whether the skeleton branch is a burr branch according to the number of foreground pixels of the skeleton branch.
  • the processing module 201 is configured to: determine that the skeleton branch is a glitch branch when the number of foreground pixels of the skeleton branch is less than a first threshold; or, when the number of foreground pixels of the skeleton branch When the number of points is not less than the first threshold, it is determined that the skeleton branch is not a burr branch.
  • the processing module 201 is used to: obtain an input image, the value of the foreground pixel of the input image corresponds to 1, and the value of the background pixel corresponds to 0; extract the connected domain of the input image, At least one target image is obtained, and each target image includes a connected domain of the input image.
  • FIG. 15 is a schematic diagram of an image processing device according to an embodiment of the present application. As shown in FIG. 15 , this embodiment of the present application provides an image processing device 210 , including a memory 211 and a processor 212 .
  • the memory 211 is used to store computer-executable instructions; the processor 212 is used to access the memory and execute the computer-executable instructions to perform operations in the image processing method in any of the foregoing embodiments.
  • the processor 212 in this embodiment of the present application may be an integrated circuit chip with signal processing capabilities.
  • each step of the above method embodiment can be completed through an integrated logic circuit of hardware in the processor or instructions in the form of software.
  • the above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available processors.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the memory 211 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDR SDRAM
  • enhanced SDRAM ESDRAM
  • Synchlink DRAM SLDRAM
  • Direct Rambus RAM Direct Rambus RAM
  • Embodiments of the present application provide a storage medium for storing a computer program.
  • the computer program When executed by a computing device, the computing device implements the method described in any one of the preceding embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)

Abstract

本申请实施例提供一种图像处理的方法,包括:根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点;根据骨架分支的已搜索的像素点的数量,确定骨架分支是否为毛刺分支。本申请的技术方案可以兼顾处理速度和准确率。

Description

图像处理的方法及其装置 技术领域
本申请涉及图像处理领域,特别是涉及一种图像处理的方法及其装置。
背景技术
以前,大多数图像处理通过人工来实现,这种处理方式效率较低,耗时较长并且处理结果并不乐观。随着技术的发展,越来越多的领域开始利用计算机进行图像处理。
计算机图像处理技术目前不太成熟,难以兼顾准确率和速度。因此,如何提供一种图像处理的方法及其装置,以兼顾处理速度和准确率是一项亟待解决的技术问题。
发明内容
本申请提供一种图像处理的方法及其装置,可以兼顾处理速度和准确率。
第一方面,提供一种图像处理的方法,包括:根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点;根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支。
本申请实施例提供了一种图像处理的方法,包括:根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点;根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支。根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点,即骨架分支的下一个像素点与骨架分支的已搜索的当前像素点相关,也就是说,目标图像的骨架分支是按一定的搜索路径进行搜索的。根据骨架分支的已搜索的像素点的数量,确定骨架分支是否为毛刺分支,也就是说,在一些情况下,不需要搜索完所有的像素点就可以确定骨架分支是否为毛刺分支。相比于通过逐个地依次遍历每个像素点确定毛刺分支,本申请根据沿特定的搜索路径搜索的像素点的数量即可确定毛刺分支。因此,本申请的技术方案可以兼顾处理速度和准确率。
在一种可能的实现方式中,在所述根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点之前,所述方法还包括:确定所述目标图像中的端点和分叉点,所述端点和所述分叉点用于搜索所述骨架分支。这样,便于根据图像中的端点和分叉点的情况进行后续的搜索操作。
在一种可能的实现方式中,所述根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点,包括:以所述目标图像中的端点为锚点,依次根据所述端点所对应的所述骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点。这样,以端点为锚点,通过逐个处理每个端点所对应的骨架分支,可以准确地确定骨架分支的数量和类别,避免将不同的骨架分支归为一个骨架分支而导致的毛刺分支误判误删的情况,从而有利于提升确定毛刺分支的准确率。
在一种可能的实现方式中,所述根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支,包括:在所述骨架分支的已搜索的像素点的数量达到第一阈值的情况下,确定所述骨架分支不是毛刺分支。这样,不需要搜索完骨架分支的所有的像素点就可以确定骨架分支不是毛刺分支,有利于提升处理速度,节省计算资源。
在一种可能的实现方式中,所述根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支,包括:在所述骨架分支的已搜索的像素点的数量未达到第一阈值且所述骨架分支的已搜索的当前像素点为分叉点的情况下,确定所述骨架分支为毛刺分支。这样,可以快速地确定毛刺分支,不需要搜索完目标图像的所有的像素点就可以确定骨架分支为毛刺分支,有利于提升处理速度,节省计算资源。
在一种可能的实现方式中,所述方法还包括:在所述骨架分支的已搜索的像素点的数量达到第一阈值,或者,所述骨架分支的已搜索的当前像素点为分叉点的情况下,停止搜索。这样,骨架分支的已搜索的像素点的数量达到第一阈值,或者,骨架分支的已搜索的当前像素点为分叉点,可以作为停止搜索的触发条件,从而便于后续操作的进行。
在一种可能的实现方式中,所述目标图像的前景像素点的值对应为1,背景像素点的值对应为0。这样,目标图像中的骨架分支的像素点的值对应为1,便于进行骨架分支的像素点的搜索。
在一种可能的实现方式中,所述根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点,包括:将所述已搜索的当前像素点的值转换为0;在所述已搜索的当前像素点的8个邻域像素点中仅有一个前景像素点的情况下,确定所述一个前景像素点为所述骨架分支的下一个像素点。
在该实现方式中,将已搜索的当前像素点的值转换为0,这样,在根据已搜索的当前像素点搜索下一个像素点时,不会再次搜索到已搜索的像素点,从而可以保证沿特定的搜索路径,即骨架分支的骨架,进行搜索;在已搜索的当前像素点的8个邻域像素点中仅有一个前景像素点的情况下,确定该一个前景像素点为骨架分支的下一个像素点,这样可以保证该一个前景像素点为该骨架分支上的像素点。
在一种可能的实现方式中,所述方法还包括:在所述已搜索的当前像素点的8个邻域像素点中有多于一个前景像素点的情况下,确定所述已搜索的当前像素点为分叉点。这样,便于根据当前像素点是否为分叉点确定骨架分支是否为毛刺分支。
在一种可能的实现方式中,所述方法还包括:记录所述已搜索的当前像素点,其中,已记录的像素点的数量为所述骨架分支的已搜索的像素点的数量。这样,便于根据已记录的像素点的数量确定骨架分支的长度,进而确定骨架分支是否为毛刺分支。
在一种可能的实现方式中,所述记录所述已搜索的当前像素点,包括:将所述已搜索的当前像素点的位置信息存储到存储器中。这样,便于根据位置信息得到骨架分支的图形,也便于后续使用以便在需要时从存储器获取。
在一种可能的实现方式中,所述方法还包括:在确定所述骨架分支为毛刺分支的情况下,将已搜索的当前分叉点的值转换为1;和/或,在确定所述骨架分支不是毛刺分支的情况下,将所述骨架分支的已搜索的所有像素点的值转换为1。
在该实现方式中,在确定骨架分支为毛刺分支的情况下,将已搜索的当前分叉点的值转换为1,可以保证通过该分叉点连接的其他的骨架分支之间的连续性,避免在目标图像中出现不连续的图案。在该实现方式中,在确定骨架分支不是毛刺分支的情况下,将骨架分支的已搜索的所有像素点的值转换为1,可以将骨架分支的图形恢复原样。
在一种可能的实现方式中,所述确定所述目标图像中的端点和分叉点,包括:根据所述目标图像的当前像素点的8个邻域像素点的值,确定所述目标图像的当 前像素点为端点或分叉点。该方法简单易行,便于端点或分叉点的确认。
在一种可能的实现方式中,所述确定所述目标图像的当前像素点为端点,包括:在所述目标图像的当前像素点的8个邻域像素点的值之和为1的情况下,确定所述当前像素点为端点。这样,便于确定目标图像中的端点。
在一种可能的实现方式中,所述确定所述目标图像的当前像素点为所述分叉点,包括:在所述目标图像的当前像素点的8个邻域像素点的值之和大于或等于3,且所述8个邻域像素点中的至少三个邻域像素点的值比顺时针或逆时针方向上的上一个邻域像素点的值小1或大1的情况下,确定所述当前像素点为分叉点。这样,可以准确地确定目标图像中的分叉点,避免将非分叉点误判为分叉点。
在一种可能的实现方式中,所述方法还包括:在所述分叉点的数量为0的情况下,根据所述骨架分支的前景像素点的数量,确定所述骨架分支是否为毛刺分支。这样,有利于进一步提高该方法的处理速度,同时也可以避免毛刺分支漏删的情况。
在一种可能的实现方式中,所述根据所述骨架分支的前景像素点的数量,确定所述骨架分支是否为毛刺分支,包括:在所述骨架分支的前景像素点的数量小于第一阈值的情况下,确定所述骨架分支为毛刺分支;或者,在所述骨架分支的前景像素点的数量不小于第一阈值的情况下,确定所述骨架分支不是毛刺分支。这样,通过第一阈值的设置,便于根据骨架分支的前景像素点的数量与第一阈值之间的关系,确定骨架分支是否为毛刺分支。
在一种可能的实现方式中,所述方法还包括:获取输入图像,所述输入图像的前景像素点的值对应为1,背景像素点的值对应为0;提取所述输入图像的连通域,得到至少一个所述目标图像,每个所述目标图像包括所述输入图像的一个连通域。这样,每个目标图像对应一个连通域,对每个目标图像进行单独处理,有利于提高该方法的处理速度。
在一种可能的实现方式中,所述骨架分支的宽度为单像素宽度。这样,可以保证在搜索骨架分支的下一个像素点时,沿骨架的法向只有一个邻域像素点,可以保证骨架路径的唯一性。
第二方面,提供一种图像处理的装置,包括:处理模块,所述处理模块用于:根据目标图像的骨架分支的已搜索的当前像素点,确定所述骨架分支的下一个像 素点;根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支。
第三方面,提供一种图像处理的装置,包括:存储器,用于存储计算机可执行指令;处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行第一方面及第一方面中任一项所述的方法中的操作。
第四方面,提供一种存储介质,用于存储计算机程序,当所述计算机程序被计算设备执行时,使得所述计算设备实现如第一方面及第一方面中任一项所述的方法。
本申请实施例提供了一种图像处理的方法,包括:根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点;根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支。根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点,即骨架分支的下一个像素点与骨架分支的已搜索的当前像素点相关,也就是说,目标图像的骨架分支是按一定的搜索路径进行搜索的。根据骨架分支的已搜索的像素点的数量,确定骨架分支是否为毛刺分支,也就是说,在一些情况下,不需要搜索完所有的像素点就可以确定骨架分支是否为毛刺分支。相比于通过逐个地依次遍历每个像素点确定毛刺分支,本申请根据沿特定的搜索路径搜索的像素点的数量即可确定毛刺分支。因此,本申请的技术方案可以兼顾处理速度和准确率。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据附图获得其他的附图。
图1为本申请一实施例的图像处理的方法;
图2为本申请一实施例的目标图像的示意图;
图3为本申请一实施例的邻域像素点的示意图;
图4为本申请一实施例的邻域像素点的示意图;
图5为本申请一实施例的邻域像素点的示意图;
图6至图8为本申请一实施例的邻域像素点的示意图;
图9为本申请一实施例的确定毛刺分支的方法的流程图;
图10为本申请一实施例的图像处理的方法示意图;
图11为本申请一实施例的输入图像的示意图;
图12和图13为本申请一实施例的输入图像提取连通域后的示意图;
图14为本申请一实施例的图像处理装置的示意图;
图15为本申请一实施例的图像处理装置的示意图。
在附图中,附图并未按照实际的比例绘制。
具体实施方式
下面结合附图和实施例对本申请的实施方式作进一步详细描述。以下实施例的详细描述和附图用于示例性地说明本申请的原理,但不能用来限制本申请的范围,即本申请不限于所描述的实施例。
本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请中字符“/”,一般表示前后关联对象是一种“或”的关系。
以前,大多数图像处理通过人工来实现,这种处理方式效率较低,耗时较长并且处理结果并不乐观。随着技术的发展,越来越多的领域开始利用计算机进行图像处理。相比于人工处理,计算机进行图像处理的准确率以及速度都有明显改善。因此,在一些毛刺识别以及去除领域,也越来越多地用到计算机的图像处理。但现有的图像的毛刺处理的方法,大多通过按照顺序依次遍历图像中的像素点来查找并确认毛刺,该方法耗时较多,处理速度较慢,并且存在误删的情况。
有鉴于此,本申请实施例提供了一种图像处理的方法,包括:根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点;根据骨架分支的已搜索的像素点的数量,确定骨架分支是否为毛刺分支。根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点,即骨架分支的下一个像素点与骨架分支的已搜索的当前像素点相关,也就是说,目标图像的骨架分支是按一定的搜索路径进行搜索的。根据骨架分支的已搜索的像素点的数量,确定骨架分支是否为 毛刺分支,也就是说,在一些情况下,不需要搜索完所有的像素点就可以确定骨架分支是否为毛刺分支。相比于通过逐个地依次遍历每个像素点确定毛刺分支,本申请根据沿特定的搜索路径搜索的像素点的数量即可确定毛刺分支。因此,本申请的技术方案可以兼顾处理速度和准确率。
图1为本申请一实施例的图像处理的方法,方法100具体包括以下步骤110和步骤120。
步骤110,根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点。
在图像处理领域,通过摄像机拍摄的图像或经过一些图像合成、处理等步骤后的图像一般会存在噪声,这些噪声引起图像中的图像边缘产生突出或凹陷的毛刺,这些毛刺会对后续的图像应用带来一些不便,例如在工业领域,导致一些缺陷的错删或漏删。
目标图像的骨架可以为目标图像中由前景像素点组成的图形,骨架分支可以指由于该图形的分叉点的存在而导致的该骨架被分为好几支的分支图形。例如,一个目标图像中包括一个骨架,当该骨架不存在分叉点时,该骨架即为骨架分支;当该骨架存在分叉点时,该骨架会被分为至少三个骨架分支。
毛刺分支由于噪声等原因而产生,骨架分支可以包括毛刺分支,在某些特定条件下,骨架分支可以被确定为毛刺分支。
图2为本申请一实施例的目标图像的示意图。如图2所示,目标图像可以包括多个骨架分支,例如,目标图像包括第一骨架分支W1,第二骨架分支W2和第三骨架分支W3。
在步骤110中,例如,对于第一骨架分支W1而言,B1点为已搜索的当前像素点,根据B1点搜索第一骨架分支W1的下一个像素点B2。也就是说,骨架分支的待搜索的下一个像素点与骨架分支的已搜索的当前像素点相关,即,目标图像的骨架分支是按一定的搜索路径进行搜索的。相比于逐个地依次遍历每个像素点,该方法有利于提高处理速度,同时也可以避免骨架分支的误判。
步骤120,根据骨架分支的已搜索的像素点的数量,确定骨架分支是否为毛刺分支。
例如,在骨架分支的已搜索的像素点的数量达到预设阈值的情况下,确定 骨架分支不是毛刺分支。可选地,在步骤120中,在一些情况下,不需要搜索完某一骨架分支的所有的像素点就可以确定该骨架分支是否为毛刺分支。这样,相比于搜索完目标图像的全部像素点而言,该方法可以在一定程度上减少搜索量,有利于节约计算资源。
本申请实施例提供了一种图像处理的方法,包括:根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点;根据骨架分支的已搜索的像素点的数量,确定骨架分支是否为毛刺分支。根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点,即骨架分支的下一个像素点与骨架分支的已搜索的当前像素点相关,也就是说,目标图像的骨架分支是按一定的搜索路径进行搜索的。根据骨架分支的已搜索的像素点的数量,确定骨架分支是否为毛刺分支,也就是说,在一些情况下,不需要搜索完所有的像素点就可以确定骨架分支是否为毛刺分支。相比于通过逐个地依次遍历每个像素点确定毛刺分支,本申请根据沿特定的搜索路径搜索的像素点的数量即可确定毛刺分支。因此,本申请的技术方案可以兼顾处理速度和准确率。
可选地,在本申请一实施例中,在步骤110之前,方法100还包括:确定目标图像中的端点和分叉点,该端点和该分叉点用于搜索骨架分支。
分叉点可以为目标图像中的多个骨架分支的交叉点,例如,图2中的A点。端点可以为目标图像中的骨架分支的起始点,例如,图2中的B点,C点和D点,其中B点为第一骨架分支W1的端点,C点为第一骨架分支W2的端点,D点为第一骨架分支W3的端点。
确定目标图像中的端点和分叉点可以包括:确定目标图像中的端点和分叉点的数量和/或位置。
在步骤110之前,确定目标图像中的端点和分叉点,这样便于根据图像中的端点和分叉点的情况进行后续的搜索操作。
可选地,在本申请一实施例中,在步骤110中,以目标图像中的端点为锚点,依次根据端点所对应的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点。
在步骤110中,在分叉点的数量大于0的情况下,以目标图像中的端点为锚点,依次根据端点所对应的骨架分支的已搜索的当前像素点,搜索骨架分支的下一 个像素点。
可选地,锚点为已搜索的当前像素点。以目标图像中的端点为锚点,可以指,以目标图像中的端点作为起始点,从端点开始进行搜索。
根据端点对应的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点,可以包括以下具体方法。例如,参见图2所示,对于目标图像的第一骨架分支W1而言,以端点B为起点,即端点B作为第一骨架分支W1的已搜索的当前像素点,根据端点B搜索第一骨架分支W1的下一个像素点B1;在搜索到B1后,将B1作为已搜索的当前像素点,根据B1搜索第一骨架分支W1的下一个像素点B2,…在第一骨架分支W1上依次进行下一个像素点的搜索。其中,下一个像素点可以为已搜索的当前像素点的邻域像素点,例如,下一个像素点为已搜索的当前像素点的8邻域的像素点中的一个。
可选地,搜索步长,即,下一个像素点与已搜索的当前像素点之间的距离可以根据实际需要具体设置,从而兼顾搜索速度与搜索准确率。
依次根据端点所对应的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点,可以包括以下具体方法。例如,参见图2所示,依次搜索第一骨架分支W1,第二骨架分支W2和第三骨架分支W3,也就是说,目标图像中的每个端点所对应的骨架分支都要进行搜索,但每个骨架分支的搜索顺序不作具体限定。
在相关技术的一些方案中,通过以下方法对目标图像中的骨架分支进行分类。参见图2所示,按照从左到右,再从上到下的顺序依次对目标图像中的像素点遍历,也就是说,先从目标图像的最上端开始,依次遍历第一行,第二行,…直至最后一行。在该方法中,若当前像素点为前景点,则分配邻域前景像素点的标签,若当前像素点为前景点且为端点,则为该像素点分配一个新的标签。按照此方法,第一骨架分支W1被分配一个标签L1,第二骨架分支W2和第三骨架分支W3被分配另一个标签L2,L1与L2不同。在这种情况下,一方面,可能会导致骨架分支的数量计算错误;另一方面,很可能将第一骨架分支W1作为毛刺分支删除,而实际应用中第二骨架分支W2更可能为毛刺分支。因此,相关技术中的方法可能会造成骨架分支的计数错误,毛刺分支的误判和误删。
在该实施例中,以目标图像中的端点为锚点,依次根据端点所对应的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点,可以准确地确定骨架分 支的数量和类别,避免将不同的骨架分支归为一个骨架分支而导致的毛刺分支误判误删的情况,从而有利于提升确定毛刺分支的准确率。
可选地,在本申请一实施例中,在步骤120中,在骨架分支的已搜索的像素点的数量达到第一阈值的情况下,确定骨架分支不是毛刺分支。
可选地,第一阈值可以根据实际情况具体设置,例如根据具体应用领域的经验值设置。
可选地,参见图2,对于第三骨架分支W3而言,在第三骨架分支W3的已搜索的像素点的数量达到第一阈值时,确定第三骨架分支W3不是毛刺分支。
在该实施例中,不需要搜索完骨架分支的所有的像素点就可以确定骨架分支不是毛刺分支,有利于提升处理速度,节省计算资源。
可选地,在本申请一实施例中,在步骤120中,在骨架分支的已搜索的像素点的数量未达到第一阈值且所述骨架分支的已搜索的当前像素点为分叉点的情况下,确定骨架分支为毛刺分支。
例如,参见图2,对于第二骨架分支W2而言,以端点C为起点,作为第二骨架分支W2的已搜索的当前像素点,搜索第二骨架分支W2的下一个像素点…直至已搜索的当前像素点为分叉点A,此时,第二骨架分支W2的已搜索的像素点的数量未达到第一阈值。在这种情况下,可以确定第二骨架分支W2为毛刺分支。
在该实施例中,在骨架分支的已搜索的像素点的数量未达到第一阈值的前提下,若已搜索的当前像素点为分叉点,即可确定该骨架分支为毛刺分支。这样,可以快速地确定毛刺分支,不需要搜索完目标图像所有的像素点就可以确定该骨架分支为毛刺分支,有利于提升处理速度,节省计算资源。
可选地,在本申请一实施例中,在骨架分支的已搜索的像素点的数量达到第一阈值,或者,骨架分支的已搜索的当前像素点为分叉点的情况下,停止搜索。
可选地,参见图2,对于第三骨架分支W3,在第三骨架分支W3的已搜索的像素点的数量达到第一阈值时,停止搜索。例如,在D1点作为已搜索的当前像素点时,此时,第三骨架分支W3的已搜索的像素点的数量达到第一阈值,停止搜索,从而第三骨架分支W3上的D1点至A点之间不需要再进行搜索,也就是说,对第三骨架分支W3的搜索结束,从而可以对其它骨架分支,例如第一骨架分支W1和第二骨架分支W2进行搜索或结束整个目标图像的搜索。
可选地,参见图2,对于第二骨架分支W2,在已搜索的当前像素点为分叉点A时,停止搜索,也就是说,这时对第二骨架分支W2的搜索结束,从而可以对其它骨架分支进行搜索或结束整个目标图像的搜索。
可选地,结束整个目标图像的搜索包括:在目标图像的所有骨架分支停止搜索的情况下,结束整个目标图像的搜索。
在该实施例中,骨架分支的已搜索的像素点的数量达到第一阈值,或者,骨架分支的已搜索的当前像素点为分叉点,可以作为停止搜索的触发条件,从而便于后续操作的进行。
可选地,在本申请一实施例中,目标图像的前景像素点的值对应为1,背景像素点的值对应为0。这样,目标图像中的骨架分支的像素点的值为1,便于进行骨架分支的像素点的搜索。
前景像素点的值对应为1,可以指,赋予前景像素点的标签值为1。背景像素点的值对应为0,可以指,赋予背景像素点的标签值为0。例如,目标图像中的前景像素点的值为0-255中的任一个,背景像素点的值为0-255中的任一个,通过进行预设处理,可以将前景像素点的值统一标签为1,背景像素点的值统一标签为0。
可选地,前景像素点的值对应为1,可以指,前景像素点的本身的像素值为1。背景像素点的值对应为0,可以指,背景像素点的本身的像素值为0。
目标图像的前景像素点的值与背景像素点的值不同。目标图像的前景像素点的值可以大于也可以小于背景像素点的值,这可以根据实际情况具体设置。
可选地,在本申请一实施例中,将已搜索的当前像素点的值转换为0;在已搜索的当前像素点的8个邻域像素点中仅有一个前景像素点的情况下,确定该一个前景像素点为骨架分支的下一个像素点。
将已搜索的当前像素点的值转换为0,例如,对于第一骨架分支W1而言,像素点B1为已搜索的当前像素点并且像素值为1,在根据像素点B1搜索第一骨架分支W1的下一个像素点B2之前,将像素点B1的像素值转换为0。这样,在根据像素点B1搜索像素点B2时,不会再次搜索到已搜索的当前像素点B1。
在已搜索的当前像素点的8个邻域像素点中仅有一个前景像素点的情况下,确定该一个前景像素点为骨架分支的下一个像素点。例如,对于第一骨架分支W1而言,像素点B1为已搜索的当前像素点并且像素值转换为0,B1的8个邻域像素点中 仅有一个前景像素点B2,此时B2可以确定为第一骨架分支W1的下一个像素点。若B1的8个邻域像素点中有两个或更多前景像素点,则这些前景像素点不属于第一骨架分支W1,不能被确定为第一骨架分支W1的下一个像素点。
在该实施例中,将已搜索的当前像素点的值转换为0,这样,在根据已搜索的当前像素点搜索下一个像素点时,不会再次搜索到已搜索的像素点,从而可以保证沿特定的搜索路径,即骨架分支的骨架,进行搜索;在已搜索的当前像素点的8个邻域像素点中仅有一个前景像素点的情况下,确定该一个前景像素点为骨架分支的下一个像素点,这样可以保证该一个前景像素点为该骨架分支上的像素点。
可选地,在本申请一实施例中,在已搜索的当前像素点的8个邻域像素点中有多于一个前景像素点的情况下,确定已搜索的当前像素点为分叉点。
例如,对于第二骨架分支W2而言,当A点为第二骨架分支W2的已搜索的当前像素点且A点的像素值转换为0时,A点的8邻域中有两个前景像素点。在这种情况下,可以确定A点为分叉点。
在该实施例中,确定已搜索的当前像素点为分叉点,可以为,按照特定的搜索路径搜索,从而在沿该特定搜索路径进行搜索的过程中,确定已搜索的当前像素点为分叉点。
可选地,确定已搜索的当前像素点为分叉点的方法与通过逐行依次遍历的方式确定分叉点的方法不同。
可选地,在其它实施例中,已搜索的当前像素点的8邻域可以有三个,四个甚至更多的像素点,这时,可以确定该已搜索的当前像素点为分叉点。
在该实施例中,便于根据当前像素点是否为分叉点确定骨架分支是否为毛刺分支。
可选地,在本申请一实施例中,还可以记录已搜索的当前像素点,其中,已记录的像素点的数量为骨架分支的已搜索的像素点的数量。这样,便于根据已记录的像素点的数量确定骨架分支的长度,进而确定骨架分支是否为毛刺分支。
可选地,在本申请一实施例中,可以将已搜索的当前像素点的位置信息存储到存储器中。这样,便于根据位置信息得到骨架分支的图形,也便于后续使用以便在需要时从存储器获取。
可选地,存储器为堆栈容器。
可选地,在本申请一实施例中,在确定骨架分支为毛刺分支的情况下,将已搜索的当前分叉点的值转换为1;或,在确定骨架分支不是毛刺分支的情况下,将骨架分支的已搜索的所有像素点的值转换为1。
在该实施例中,在确定骨架分支为毛刺分支的情况下,将已搜索的当前分叉点的值转换为1,可以保证通过该分叉点连接的其他的骨架分支之间的连续性,避免在目标图像中出现不连续的图案。例如,在对第二骨架分支W2进行搜索的过程中,确定A点为分叉点后,若未将A点的值转换为1,则会导致第一骨架分支W1和第三骨架分支W3之间不连续,从而可能会导致骨架分支的计数错误。
在该实施例中,在确定骨架分支不是毛刺分支的情况下,将骨架分支的已搜索的所有像素点的值转换为1,可以将骨架分支的图形恢复原样。
可选地,在本申请一实施例中,可以根据目标图像的当前像素点的8个邻域像素点的值,确定目标图像的当前像素点为端点或分叉点。该方法简单易行,便于端点或分叉点的确认。
在该实施例中,可以采用逐行逐个像素点遍历的方式确定目标图像中的分叉点和端点。例如,采用从上到下,从左到右的顺序进行遍历,查找或确定分叉点和端点。在该遍历过程中,即可确认端点和分叉点。
在该实施例中,确定目标图像中的端点和分叉点可以包括:在目标图像中的端点的个数大于2的情况下,确定目标图像中存在分叉点;在目标图像中的端点的个数为2的情况下,确定目标图像中不存在分叉点。
可选地,在本申请一实施例中,在目标图像的当前像素点的8个邻域像素点的值之和为1的情况下,确定当前像素点为端点。
图3为本申请一实施例的邻域像素点的示意图。如图3所示,P1点代表当前像素点,P2,P3,P4,P5,P6,P7,P8,P9代表P1的8邻域的像素点。当P1的8邻域的像素点的像素值之和等于1时,即可确定当前像素点P1为端点。
该实施例的方法便于确定目标图像中的端点。
可选地,在本申请一实施例中,在目标图像的当前像素点的8个邻域像素点的值之和大于或等于3,且8个邻域像素点中的至少三个邻域像素点的值比顺时针或逆时针方向上的上一个邻域像素点的值小1或大1的情况下,确定当前像素点为分叉点。
图4为本申请一实施例的邻域像素点的示意图。图4中的(a)为当前像素点的8邻域像素点的取值的示意图,图4中的(b)为当前像素点所在的骨架分支的示意图。结合图3和图4所示,P3,P5,P7的像素值为1,P1,P2,P4,P6,P8,P9的像素值为0。当前像素点P1的8个邻域像素点的值之和为3,并且沿顺时针方向,P4的像素值比P3的像素值少1,P6的像素值比P5的像素值少1,P8的像素值比P7的像素值少1,即有3个邻域像素点的值比顺时针方向上的上一个邻域像素点的值小1。如图4所示,可以确定当前像素点P1为分叉点。
图5为本申请一实施例的邻域像素点的示意图。图5中的(a)为当前像素点的8邻域像素点的取值的示意图,图5中的(b)为当前像素点所在的骨架分支的示意图。结合图3和图4所示,P3,P5,P7,P8,P9的像素值为1,P1,P2,P4,P6,的像素值为0。当前像素点P1的8个邻域像素点的值之和为5,并且沿顺时针方向,P4的像素值比P3的像素值少1,P6的像素值比P5的像素值少1,P2的像素值比P9的像素值少1,即有3个邻域像素点的值比顺时针方向上的上一个邻域像素点的值小1。如图5所示,可以确定当前像素点P1为分叉点。
需要说明的是,在目标图像的当前像素点的8个邻域像素点的值之和大于或等于3的情况下,至少三个邻域像素点的值比顺时针方向上的上一个邻域像素点的值小1或大1,至少三个邻域像素点的值比逆时针方向上的上一个邻域像素点的值小1或大1均能确定当前像素点为分叉点。
图6至图8为本申请一实施例的邻域像素点的示意图。如图6至图8中的(a)为当前像素点的8邻域像素点的取值的示意图,当前像素点P1的8个邻域的像素点的值之和为3。图6至图8中的(b)为当前像素点所在的骨架分支的示意图,如图6至图8中的(b)所示,因为满足8个邻域像素点中的至少三个邻域像素点的值比顺时针或逆时针方向上的上一个邻域像素点的值小1或大1的,当前像素点P1不能被确定为分叉点。
在该实施例中,在目标图像的当前像素点的8个邻域像素点的值之和大于或等于3,且8个邻域像素点中的至少三个邻域像素点的值比顺时针或逆时针方向上的上一个邻域像素点的值小1或大1的情况下,确定当前像素点为分叉点。这样,可以准确地确定目标图像中的分叉点,避免将非分叉点误判为分叉点。
可选地,在本申请一实施例中,在分叉点的数量为0的情况下,根据骨架 分支的前景像素点的数量,确定骨架分支是否为毛刺分支。
在该实施例中,在分叉点的数量为0的情况下,根据骨架分支的前景像素点的数量确定骨架分支是否为毛刺分支,可以避免直接将没有分叉点的骨架分支直接确认为非毛刺分支,从而导致毛刺分支的漏删的情况。此外,在分叉点的数量为0的情况下,直接判断该骨架分支的前景像素点数量即可确认该骨架分支是否为毛刺分支,有利于提高该方法的处理速度。
可选地,在本申请一实施例中,在分叉点的数量为0的情况下,在骨架分支的前景像素点的数量小于第一阈值的情况下,确定骨架分支为毛刺分支;或者,在骨架分支的前景像素点的数量不小于第一阈值的情况下,确定骨架分支不是毛刺分支。这样,通过第一阈值的设置,便于根据骨架分支的前景像素点的数量与第一阈值之间的关系,确定骨架分支是否为毛刺分支。
图9为本申请一实施例的确定毛刺分支的方法的流程图。如图9所示,方法900包括以下步骤。
步骤910,获取目标图像。
可选地,目标图像为原始图片经过处理后的图像。目标图像为二值化图像,即,目标图像中的骨架分支的像素点,即前景像素点的像素值为1;其他像素点,即背景像素点的像素值为0。
步骤920,确定目标图像中的分叉点和端点。
具体地,确定目标图像中的分叉点和端点的方法可以参考与图3至图8相关的内容,在此不再赘述。
步骤930,判断目标图像中的分叉点的个数是否大于0。若分叉点的个数不大于0,执行步骤940。若目标图像中的分叉点的个数大于0,执行步骤950。
步骤940,统计目标图像中的前景像素点的数量。
步骤950,根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点。
步骤960,判断已搜索的像素点的数量是否达到第一阈值或当前像素点是否为分叉点。若已搜索的像素点的数量达到第一阈值或当前像素点为分叉点,执行步骤970。若已搜索的像素点的数量未达到第一阈值并且当前像素点不是分叉点,返回步骤950。
步骤970,停止搜索。
可选地,停止搜索可以为停止对该骨架分支上的下一个像素点的搜索。
可选地,在目标图像的所有骨架分支都满足步骤960的条件的情况下,停止搜索可以为停止对目标图像的所有骨架分支的下一个像素点的搜索。
可选地,在本申请一实施例中,方法100还包括:获取输入图像,输入图像的前景像素点的值对应为1,背景像素点的值对应为0;提取输入图像的连通域,得到至少一个目标图像,每个目标图像包括输入图像的一个连通域。
图10为本申请一实施例的图像处理的方法示意图。如图10所示,该方法包括以下步骤。
步骤1010,获取输入图像。
输入图像可以为原始图片进行二值化处理后的图像,输入图像的前景像素点的值为1,背景像素点的值为0。
步骤1020,提取输入图像的连通域。
连通域,也被成为连通区域,一般是指图像中具有相同像素值且位置相邻的前景像素点组成的图像区域。
可选地,步骤1020在步骤910之前执行。
图11为本申请一实施例的输入图像的示意图,图12和图13为本申请一实施例的输入图像提取连通域后的示意图。如图11所示,该输入图像包括两个连通区域,经过连通域提取后,可得到图12和图13所示的图像,其中,每个连通域可以与一个目标图像相对应。连通域的提取可以采用Two-Pass法、种子填充算法等,本申请实施例对此不作具体限制。
在该实施例中,每个目标图像对应一个连通域,对每个目标图像进行单独处理,有利于提高该方法的处理速度。
可选地,在本申请一实施例中,骨架分支的宽度为单像素宽度。这样,可以保证在搜索骨架分支的下一个像素点时,沿骨架的法向只有一个邻域像素点,可以保证骨架路径的唯一性。
上文结合图1至图13,详细描述了本申请的方法实施例,下文将详细描述本申请的图像处理装置的实施例。应理解,方法实施例与装置的实施例相互对应,类似的描述可以参照方法实施例。
图14为本申请一实施例的图像处理装置的示意图。如图14所示,图像处理装置200包括处理模块201。处理模块201用于:根据目标图像的骨架分支的已搜索的当前像素点,确定骨架分支的下一个像素点;根据骨架分支的已搜索的像素点的数量,确定骨架分支是否为毛刺分支。
可选地,在本申请一实施例中,处理模块201用于:在根据目标图像的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点之前,确定目标图像中的端点和分叉点,该端点和分叉点用于搜索骨架分支。
可选地,在本申请一实施例中,处理模块201用于:以目标图像中的端点为锚点,依次根据端点所对应的骨架分支的已搜索的当前像素点,搜索骨架分支的下一个像素点。
可选地,在本申请一实施例中,处理模块201用于:在骨架分支的已搜索的像素点的数量达到第一阈值的情况下,确定骨架分支不是毛刺分支。
可选地,在本申请一实施例中,处理模块201用于:在骨架分支的已搜索的像素点的数量未达到第一阈值且骨架分支的已搜索的当前像素点为分叉点的情况下,确定骨架分支为毛刺分支。
可选地,在本申请一实施例中,处理模块201用于:在骨架分支的已搜索的像素点的数量达到第一阈值,或者,骨架分支的已搜索的当前像素点为分叉点的情况下,停止搜索。
可选地,在本申请一实施例中,处理模块201用于:将已搜索的当前像素点的值转换为0;在已搜索的当前像素点的8个邻域像素点中仅有一个前景像素点的情况下,确定该一个前景像素点为骨架分支的下一个像素点。
可选地,在本申请一实施例中,处理模块201用于:在已搜索的当前像素点的8个邻域像素点中有多于一个前景像素点的情况下,确定已搜索的当前像素点为分叉点。
可选地,在本申请一实施例中,处理模块201用于:记录已搜索的当前像素点,其中,已记录的像素点的数量为骨架分支的已搜索的像素点的数量。
可选地,在本申请一实施例中,处理模块201用于:将已搜索的当前像素点的位置信息存储到存储器中。
可选地,在本申请一实施例中,处理模块201用于:在确定骨架分支为毛 刺分支的情况下,将已搜索的当前分叉点的值转换为1;或,在确定骨架分支不是毛刺分支的情况下,将骨架分支的已搜索的所有像素点的值转换为1。
可选地,在本申请一实施例中,处理模块201用于:根据目标图像的当前像素点的8个邻域像素点的值,确定目标图像的当前像素点为端点或分叉点。
可选地,在本申请一实施例中,处理模块201用于:在目标图像的当前像素点的8个邻域像素点的值之和为1的情况下,确定当前像素点为端点。
可选地,在本申请一实施例中,处理模块201用于:在目标图像的当前像素点的8个邻域像素点的值之和大于或等于3,且8个邻域像素点中的至少三个邻域像素点的值比顺时针或逆时针方向上的上一个邻域像素点的值小1或大1的情况下,确定当前像素点为分叉点。
可选地,在本申请一实施例中,处理模块201用于:在分叉点的数量为0的情况下,根据骨架分支的前景像素点的数量,确定骨架分支是否为毛刺分支。
可选地,在本申请一实施例中,处理模块201用于:在骨架分支的前景像素点的数量小于第一阈值的情况下,确定骨架分支为毛刺分支;或者,在骨架分支的前景像素点的数量不小于第一阈值的情况下,确定骨架分支不是毛刺分支。
可选地,在本申请一实施例中,处理模块201用于:获取输入图像,输入图像的前景像素点的值对应为1,背景像素点的值对应为0;提取输入图像的连通域,得到至少一个目标图像,每个目标图像包括输入图像的一个连通域。
图15为本申请一实施例的图像处理装置的示意图。如图15所示,本申请实施例提供一种图像处理的装置210,包括存储器211和处理器212。存储器211用于存储计算机可执行指令;处理器212用于访问所述存储器,并执行所述计算机可执行指令,以进行前述实施例中任一项的图像处理的方法中的操作。
本申请实施例的处理器212可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法和步骤。通用处理器可以是微处理器或者该处理器也 可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
本申请实施例的存储器211可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本申请实施例提供一种存储介质,用于存储计算机程序,当计算机程序被计算设备执行时,使得计算设备实现前述实施例中任一项所述的方法。
虽然已经参考优选实施例对本申请进行了描述,但在不脱离本申请的范围的情况下,可以对其进行各种改进并且可以用等效物替换其中的部件。尤其是,只要不存在结构冲突,各个实施例中所提到的各项技术特征均可以任意方式组合起来。本申请并不局限于文中公开的特定实施例,而是包括落入权利要求的范围内的所有技术方案。

Claims (40)

  1. 一种图像处理的方法,其特征在于,包括:
    根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点;
    根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支。
  2. 根据权利要求1所述的方法,其特征在于,在所述根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点之前,所述方法还包括:
    确定所述目标图像中的端点和分叉点,所述端点和所述分叉点用于搜索所述骨架分支。
  3. 根据权利要求2所述的方法,其特征在于,所述根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点,包括:
    以所述目标图像中的端点为锚点,依次根据所述端点所对应的所述骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支,包括:
    在所述骨架分支的已搜索的像素点的数量达到第一阈值的情况下,确定所述骨架分支不是毛刺分支。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支,包括:
    在所述骨架分支的已搜索的像素点的数量未达到第一阈值且所述骨架分支的已搜索的当前像素点为分叉点的情况下,确定所述骨架分支为毛刺分支。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:
    在所述骨架分支的已搜索的像素点的数量达到第一阈值,或者,所述骨架分支的已搜索的当前像素点为分叉点的情况下,停止搜索。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述目标图像的前景像素点的值对应为1,背景像素点的值对应为0。
  8. 根据权利要求7所述的方法,其特征在于,所述根据目标图像的骨架分支的已 搜索的当前像素点,搜索所述骨架分支的下一个像素点,包括:
    将所述已搜索的当前像素点的值转换为0;
    在所述已搜索的当前像素点的8个邻域像素点中仅有一个前景像素点的情况下,确定所述一个前景像素点为所述骨架分支的下一个像素点。
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    在所述已搜索的当前像素点的8个邻域像素点中有多于一个前景像素点的情况下,确定所述已搜索的当前像素点为分叉点。
  10. 根据权利要求8或9所述的方法,其特征在于,所述方法还包括:
    记录所述已搜索的当前像素点,其中,已记录的像素点的数量为所述骨架分支的已搜索的像素点的数量。
  11. 根据权利要求10所述的方法,其特征在于,所述记录所述已搜索的当前像素点,包括:
    将所述已搜索的当前像素点的位置信息存储到存储器中。
  12. 根据权利要求8至11中任一项所述的方法,其特征在于,所述方法还包括:
    在确定所述骨架分支为毛刺分支的情况下,将已搜索的当前分叉点的值转换为1;或,
    在确定所述骨架分支不是毛刺分支的情况下,将所述骨架分支的已搜索的所有像素点的值转换为1。
  13. 根据权利要求2至12中任一项所述的方法,其特征在于,所述确定所述目标图像中的端点和分叉点,包括:
    根据所述目标图像的当前像素点的8个邻域像素点的值,确定所述目标图像的当前像素点为端点或分叉点。
  14. 根据权利要求13所述的方法,其特征在于,所述确定所述目标图像的当前像素点为端点,包括:
    在所述目标图像的当前像素点的8个邻域像素点的值之和为1的情况下,确定所述当前像素点为端点。
  15. 根据权利要求13所述的方法,其特征在于,所述确定所述目标图像的当前像素点为所述分叉点,包括:
    在所述目标图像的当前像素点的8个邻域像素点的值之和大于或等于3,且所述8 个邻域像素点中的至少三个邻域像素点的值比顺时针或逆时针方向上的上一个邻域像素点的值小1或大1的情况下,确定所述当前像素点为分叉点。
  16. 根据权利要求2至15中任一项所述的方法,其特征在于,所述方法还包括:
    在所述分叉点的数量为0的情况下,根据所述骨架分支的前景像素点的数量,确定所述骨架分支是否为毛刺分支。
  17. 根据权利要求16所述的方法,其特征在于,所述根据所述骨架分支的前景像素点的数量,确定所述骨架分支是否为毛刺分支,包括:
    在所述骨架分支的前景像素点的数量小于第一阈值的情况下,确定所述骨架分支为毛刺分支;或者,
    在所述骨架分支的前景像素点的数量不小于第一阈值的情况下,确定所述骨架分支不是毛刺分支。
  18. 根据权利要求1至17中任一项所述的方法,其特征在于,所述方法还包括:
    获取输入图像,所述输入图像的前景像素点的值对应为1,背景像素点的值对应为0;
    提取所述输入图像的连通域,得到至少一个所述目标图像,每个所述目标图像包括所述输入图像的一个连通域。
  19. 根据权利要求1至18中任一项所述的方法,其特征在于,所述骨架分支的宽度为单像素宽度。
  20. 一种图像处理的装置,其特征在于,包括:处理模块,所述处理模块用于:
    根据目标图像的骨架分支的已搜索的当前像素点,确定所述骨架分支的下一个像素点;
    根据所述骨架分支的已搜索的像素点的数量,确定所述骨架分支是否为毛刺分支。
  21. 根据权利要求20所述的装置,其特征在于,所述处理模块用于:
    在所述根据目标图像的骨架分支的已搜索的当前像素点,搜索所述骨架分支的下一个像素点之前,确定所述目标图像中的端点和分叉点,所述端点和所述分叉点用于搜索所述骨架分支。
  22. 根据权利要求21所述的装置,其特征在于,所述处理模块用于:
    以所述目标图像中的端点为锚点,依次根据所述端点所对应的所述骨架分支的已 搜索的当前像素点,搜索所述骨架分支的下一个像素点。
  23. 根据权利要求20至22中任一项所述的装置,其特征在于,所述处理模块用于:
    在所述骨架分支的已搜索的像素点的数量达到第一阈值的情况下,确定所述骨架分支不是毛刺分支。
  24. 根据权利要求20至23中任一项所述的装置,其特征在于,所述处理模块用于:
    在所述骨架分支的已搜索的像素点的数量未达到第一阈值且所述骨架分支的已搜索的当前像素点为分叉点的情况下,确定所述骨架分支为毛刺分支。
  25. 根据权利要求20至24中任一项所述的装置,其特征在于,所述处理模块用于:
    在所述骨架分支的已搜索的像素点的数量达到第一阈值,或者,所述骨架分支的已搜索的当前像素点为分叉点的情况下,停止搜索。
  26. 根据权利要求20至25中任一项所述的装置,其特征在于,所述目标图像的前景像素点的值对应为1,背景像素点的值对应为0。
  27. 根据权利要求26所述的装置,其特征在于,所述处理模块用于:
    将所述已搜索的当前像素点的值转换为0;
    在所述已搜索的当前像素点的8个邻域像素点中仅有一个前景像素点的情况下,确定所述一个前景像素点为所述骨架分支的下一个像素点。
  28. 根据权利要求27所述的装置,其特征在于,所述处理模块用于:
    在所述已搜索的当前像素点的8个邻域像素点中有多于一个前景像素点的情况下,确定所述已搜索的当前像素点为分叉点。
  29. 根据权利要求27或28所述的装置,其特征在于,所述处理模块用于:
    记录所述已搜索的当前像素点,其中,已记录的像素点的数量为所述骨架分支的已搜索的像素点的数量。
  30. 根据权利要求29所述的装置,其特征在于,所述处理模块用于:
    将所述已搜索的当前像素点的位置信息存储到存储器中。
  31. 根据权利要求27至30中任一项所述的装置,其特征在于,所述处理模块用于:
    在确定所述骨架分支为毛刺分支的情况下,将已搜索的当前分叉点的值转换为1;或,
    在确定所述骨架分支不是毛刺分支的情况下,将所述骨架分支的已搜索的所有像素点的值转换为1。
  32. 根据权利要求21至31中任一项所述的装置,其特征在于,所述处理模块用于:
    根据所述目标图像的当前像素点的8个邻域像素点的值,确定所述目标图像的当前像素点为端点或分叉点。
  33. 根据权利要求32所述的装置,其特征在于,所述处理模块用于:
    在所述目标图像的当前像素点的8个邻域像素点的值之和为1的情况下,确定所述当前像素点为端点。
  34. 根据权利要求32所述的装置,其特征在于,所述处理模块用于:
    在所述目标图像的当前像素点的8个邻域像素点的值之和大于或等于3,且所述8个邻域像素点中的至少三个邻域像素点的值比顺时针或逆时针方向上的上一个邻域像素点的值小1或大1的情况下,确定所述当前像素点为分叉点。
  35. 根据权利要求21至34中任一项所述的装置,其特征在于,所述处理模块用于:
    在所述分叉点的数量为0的情况下,根据所述骨架分支的前景像素点的数量,确定所述骨架分支是否为毛刺分支。
  36. 根据权利要求35所述的装置,其特征在于,所述处理模块用于:
    在所述骨架分支的前景像素点的数量小于第一阈值的情况下,确定所述骨架分支为毛刺分支;或者,
    在所述骨架分支的前景像素点的数量不小于第一阈值的情况下,确定所述骨架分支不是毛刺分支。
  37. 根据权利要求20至36中任一项所述的装置,其特征在于,所述处理模块用于:
    获取输入图像,所述输入图像的前景像素点的值对应为1,背景像素点的值对应为0;
    提取所述输入图像的连通域,得到至少一个所述目标图像,每个所述目标图像包 括所述输入图像的一个连通域。
  38. 根据权利要求20至37中任一项所述的装置,其特征在于,所述骨架分支的宽度为单像素宽度。
  39. 一种图像处理的装置,其特征在于,包括:
    存储器,用于存储计算机可执行指令;
    处理器,用于访问所述存储器,并执行所述计算机可执行指令,以进行根据权利要求1至19中任一项所述的方法中的操作。
  40. 一种存储介质,其特征在于,用于存储计算机程序,当所述计算机程序被计算设备执行时,使得所述计算设备实现如权利要求1至19中任一项所述的方法。
PCT/CN2022/102738 2022-06-30 2022-06-30 图像处理的方法及其装置 WO2024000375A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2022/102738 WO2024000375A1 (zh) 2022-06-30 2022-06-30 图像处理的方法及其装置
EP22937655.3A EP4328851A1 (en) 2022-06-30 2022-06-30 Image processing method and apparatus
CN202280006707.6A CN117677970A (zh) 2022-06-30 2022-06-30 图像处理的方法及其装置
US18/303,971 US11915443B2 (en) 2022-06-30 2023-04-20 Image processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/102738 WO2024000375A1 (zh) 2022-06-30 2022-06-30 图像处理的方法及其装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/303,971 Continuation US11915443B2 (en) 2022-06-30 2023-04-20 Image processing method and apparatus

Publications (1)

Publication Number Publication Date
WO2024000375A1 true WO2024000375A1 (zh) 2024-01-04

Family

ID=89383536

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/102738 WO2024000375A1 (zh) 2022-06-30 2022-06-30 图像处理的方法及其装置

Country Status (4)

Country Link
US (1) US11915443B2 (zh)
EP (1) EP4328851A1 (zh)
CN (1) CN117677970A (zh)
WO (1) WO2024000375A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951788A (zh) * 2015-07-08 2015-09-30 上海海事大学 一种书法作品中单字笔画的提取方法
CN107507171A (zh) * 2017-08-08 2017-12-22 东北大学 一种肺部ct图像气道三维骨架树状结构提取及标记方法
US20180308230A1 (en) * 2016-01-26 2018-10-25 Fujifilm Corporation Crack information detection device, method of detecting crack information, and crack information detection program
CN109754378A (zh) * 2018-12-29 2019-05-14 重庆邮电大学 一种裂缝图像的毛刺去除方法
CN114066752A (zh) * 2021-11-03 2022-02-18 中国科学院沈阳自动化研究所 面向焊缝跟踪的线结构光骨架提取及毛刺去除方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044862A (ja) * 2001-07-26 2003-02-14 Matsushita Electric Ind Co Ltd 不規則線状パターンの分岐点検出方法および分岐点検出プログラム
CN112712273B (zh) * 2020-12-30 2024-01-19 首都师范大学 一种基于骨架相似度的手写体汉字美观度评判方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951788A (zh) * 2015-07-08 2015-09-30 上海海事大学 一种书法作品中单字笔画的提取方法
US20180308230A1 (en) * 2016-01-26 2018-10-25 Fujifilm Corporation Crack information detection device, method of detecting crack information, and crack information detection program
CN107507171A (zh) * 2017-08-08 2017-12-22 东北大学 一种肺部ct图像气道三维骨架树状结构提取及标记方法
CN109754378A (zh) * 2018-12-29 2019-05-14 重庆邮电大学 一种裂缝图像的毛刺去除方法
CN114066752A (zh) * 2021-11-03 2022-02-18 中国科学院沈阳自动化研究所 面向焊缝跟踪的线结构光骨架提取及毛刺去除方法

Also Published As

Publication number Publication date
CN117677970A (zh) 2024-03-08
US20240005542A1 (en) 2024-01-04
US11915443B2 (en) 2024-02-27
EP4328851A1 (en) 2024-02-28

Similar Documents

Publication Publication Date Title
TWI685795B (zh) 資訊識別方法及裝置
US11929048B2 (en) Method and device for marking target cells, storage medium and terminal device
CN110689037A (zh) 用于使用深度网络的自动对象注释的方法和系统
WO2020135056A1 (zh) 一种图像处理方法及装置
CN110866930B (zh) 语义分割辅助标注方法与装置
CN111310759A (zh) 双模式协作的目标检测抑制优化方法及设备
CN113553854B (zh) 实体关系的联合抽取方法和联合抽取装置
WO2022166293A1 (zh) 一种目标检测方法和装置
WO2017181631A1 (zh) 工程文件的容量信息处理方法及装置
JPH02277185A (ja) 矩形座標抽出方法
WO2023185234A1 (zh) 图像处理方法、装置、电子设备及存储介质
WO2024000375A1 (zh) 图像处理的方法及其装置
CN113808131A (zh) 一种连接器缺陷识别方法及系统及装置及介质
CN110929738A (zh) 证卡边缘检测方法、装置、设备及可读存储介质
CN112800824B (zh) 扫描文件的处理方法、装置、设备及存储介质
US20220276754A1 (en) Stroke erase method, terminal, and computer-readable storage medium
WO2024016686A1 (zh) 角点检测的方法和装置
US20160292174A1 (en) File scanning method and device
CN111260759A (zh) 一种路径确定方法及装置
CN116309628A (zh) 车道线识别方法和装置、电子设备和计算机可读存储介质
US11416390B2 (en) Tri-color bitmap array for garbage collection
CN114495144A (zh) 文本图像中表格key-value信息的提取方法及装置
CN112967787A (zh) 一种药品信息录入方法、装置、介质及终端设备
CN112068836A (zh) 点胶机的g代码生成方法、装置、终端设备及存储介质
CN113496134A (zh) 二维码定位方法、装置、设备及存储介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 202280006707.6

Country of ref document: CN

ENP Entry into the national phase

Ref document number: 2022937655

Country of ref document: EP

Effective date: 20231023

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22937655

Country of ref document: EP

Kind code of ref document: A1