Object edge recognition and processing method, system and computer readable storage medium

Through machine learning, identifying the object vertices and their relative positions and forming edge lines, solving the accuracy problem of object edge detection in the image, and achieving rapid positioning and accurate extraction of object edges.

CN114092690BActive Publication Date: 2024-11-26HANGZHOU GLORITY SOFTWARE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010784883.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-06
Publication Date
2024-11-26
Estimated Expiration
2040-08-06

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect and extract the edges of objects from images, which makes it difficult to accurately obtain relevant information about objects when the objects are mixed with the external environment.

Method used

Using machine learning methods, the object vertex recognition model is used to identify the object vertex and its relative positions in the input image, determine the actual position of the object vertex in the image, and connect the vertices in sequence to form edge lines, thereby realizing edge detection of edge objects with edges.

Benefits of technology

It realizes rapid positioning and accurate detection of object edges in the input image, improves the accuracy of edge detection, can effectively remove background areas in the image, and extract relevant information of objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114092690B_ABST
    Figure CN114092690B_ABST
Patent Text Reader

Abstract

The present invention provides an object edge recognition and processing method, system and computer-readable storage medium, the method comprising: obtaining an input image, wherein the input image comprises an object with edges, and the edges of the object comprise multiple object vertices; recognizing the input image through an object vertex recognition model to obtain the relative position of each object vertex and its corresponding image vertex; determining the actual position of each object vertex in the input image according to the relative position of each object vertex and its corresponding image vertex; sequentially connecting adjacent object vertices to form edge lines according to the actual position of each object vertex in the input image to obtain the edge of the object with edges in the input image. The solution provided by the present invention can be used to detect the edge of an object with edges in an image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital image processing, and in particular to an object edge recognition and processing method, system and computer-readable storage medium. Background Art

[0002] At present, people often take photos of objects (for example, the objects may be business cards, test papers, test sheets, documents, etc.), and hope to process the images obtained by taking photos accordingly to obtain relevant information of the objects in the images. However, the images obtained by taking photos not only contain the objects, but also inevitably contain the external environment where the objects are located. The part corresponding to the external environment in the image is redundant for identifying relevant information of the objects in the image. Therefore, when processing the images to obtain relevant information of the objects in the images, it is necessary to detect the edges of the objects from the images so as to extract the objects from the images according to the edges of the objects. Summary of the invention

[0003] The object of the present invention is to provide an object edge recognition and processing method, system and computer-readable storage medium to detect the edge of an object with edges in an image. The specific technical solution is as follows:

[0004] To achieve the above object, the present invention provides an object edge recognition and processing method, comprising:

[0005] Acquire an input image, wherein the input image includes an object having an edge, and the edge of the object includes a plurality of object vertices;

[0006] Identify the input image using an object vertex recognition model to obtain a relative position of each object vertex and its corresponding image vertex;

[0007] Determining the actual position of each object vertex in the input image according to the relative position of each object vertex and its corresponding image vertex;

[0008] According to the actual position of each object vertex in the input image, adjacent object vertices are sequentially connected to form edge lines, so as to obtain the edge of the object with edge in the input image.

[0009] Optionally, in the object edge recognition and processing method, obtaining the relative position of each object vertex and its corresponding image vertex includes:

[0010] For each of the object vertices, the relative position of the object vertex and the image vertex closest to the object vertex in the input image is obtained.

[0011] Optionally, in the object edge recognition and processing method, determining the actual position of each object vertex in the input image according to the relative position of each object vertex and its corresponding image vertex includes:

[0012] For each object vertex, the relative position of the object vertex and the image vertex closest to the object vertex in the input image is converted into the coordinates of the object vertex in the target coordinate system to obtain the actual position of the object vertex in the input image.

[0013] Optionally, in the object edge recognition and processing method, the origin of the target coordinate system is a position point of the input image.

[0014] Optionally, the object edge recognition and processing method further includes:

[0015] The object with the edge is corrected using the edge line.

[0016] Optionally, in the object edge recognition and processing method, the number of the object vertices is 4, and the number of the edge lines is 4, namely the first line, the second line, the third line and the fourth line, respectively; the first line and the third line are arranged along a first direction, the second line and the fourth line are arranged along a second direction, and the first direction is perpendicular to the second direction.

[0017] Optionally, in the object edge recognition and processing method, the correcting the object with edges by using the edge lines includes:

[0018] respectively obtaining the projection lengths of the first line and the third line in the second direction, and respectively obtaining the projection lengths of the second line and the fourth line in the first direction;

[0019] Calculating an average of the projection lengths of the first line and the third line in the second direction as the corrected length of the object with an edge along the second direction;

[0020] An average of the projection lengths of the second line and the fourth line in the first direction is calculated as the corrected length of the object with an edge along the first direction.

[0021] Optionally, in the object edge recognition and processing method, the object vertex recognition model is a neural network model.

[0022] Based on the same inventive concept, the present invention also provides an object edge recognition and processing system, the system includes a processor and a memory, the memory stores instructions, when the instructions are executed by the processor, the steps of the object edge recognition and processing method are implemented, the method includes: obtaining an input image, wherein the input image includes an object with edges, and the edge of the object includes multiple object vertices; identifying the input image through an object vertex recognition model to obtain the relative position of each object vertex and its corresponding image vertex; according to the relative position of each object vertex and its corresponding image vertex, determining the actual position of each object vertex in the input image; according to the actual position of each object vertex in the input image, sequentially connecting adjacent object vertices to form edge lines to obtain the edge of the object with edges in the input image.

[0023] Based on the same inventive concept, the present invention also provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed, the steps of an object edge recognition and processing method are implemented, and the method includes: obtaining an input image, wherein the input image includes an object with edges, and the edges of the object include multiple object vertices; identifying the input image through an object vertex recognition model to obtain the relative position of each object vertex and its corresponding image vertex; determining the actual position of each object vertex in the input image based on the relative position of each object vertex and its corresponding image vertex; and sequentially connecting adjacent object vertices to form edge lines based on the actual positions of each object vertex in the input image to obtain the edges of the object with edges in the input image.

[0024] Compared with the prior art, the object edge recognition and processing method, system and computer-readable storage medium provided by the present invention have the following advantages: in the object edge recognition and processing method, a machine learning method is used to recognize the object vertices in the input image and the relative positions of each object vertex and its corresponding image vertex, so that the actual position of each object vertex in the input image can be determined, and then the adjacent object vertices are sequentially connected to form edge lines, and the edges of the objects with edges in the input image are obtained. The present invention can quickly locate the positions of the object vertices in the input image, realize the edge detection of the objects with edges in the input image, and also improve the accuracy of edge detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 is a flow chart of an object edge recognition and processing method provided by an embodiment of the present invention;

[0027] Figure 2 An input image of a specific example of the present invention;

[0028] Figure 3 An input image of another specific example of the present invention;

[0029] Figure 4 A schematic diagram for correcting an object in an input image;

[0030] Figure 5 It is a structural diagram of an object edge recognition and processing system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following is a further detailed description of an object edge recognition and processing method, system and computer-readable storage medium proposed in the present invention in combination with the accompanying drawings and specific embodiments. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the drawings are all in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention. It should be noted that the structure, proportion, size, etc. illustrated in the drawings of this specification are only used to match the content disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no technical substantive significance. Any modification of the structure, change in the proportional relationship or adjustment of the size, without affecting the effect that the present invention can produce and the purpose that can be achieved, should still fall within the scope of the technical content disclosed by the present invention.

[0032] Figure 1 FIG. 1 is a flow chart showing a method for object edge recognition and processing according to an exemplary embodiment of the present invention, which method can be implemented in an application (app) installed on a smart terminal such as a mobile phone or a tablet computer. Figure 1 As shown, the method may include:

[0033] Step S101 : acquiring an input image, wherein the input image includes an object having an edge, and the edge of the object includes a plurality of object vertices.

[0034] For example, the input image is an image obtained by a user taking a photo of an object, and the object may be, for example, a business card, a test paper, a test sheet, a document, an invoice, etc. Figure 2 As shown, in some embodiments, the input image may be an image obtained by photographing a business card. Figure 3 As shown, in some embodiments, the input image may be an image obtained by photographing the test report.

[0035] For example, the shape of the object in the input image may be a regular shape (such as a rectangle, etc.) or an irregular shape. Accordingly, the edge of the object in the input image also has multiple object vertices. Figure 2 In the input image shown, the shape of the business card is a rectangle, which has four edges (i.e., lines) A1 to A4. The connection between two adjacent edges of the four edges constitutes an object vertex, that is, the business card in the input image has four object vertices a to d. Figure 3 In the input image shown, the shape of the test report is a rectangle. However, since the input image does not capture the entire area of ​​the test report, the lower left corner vertex and the upper right corner vertex of the test report are not included in the input image. In this case, the four edge lines B1 to B4 of the test report in the input image can be extended to obtain the lower left corner vertex and the upper right corner vertex of the test report, thereby obtaining the four object vertices b1 to b4 of the test report.

[0036] The shape of the input image may also be a rectangle, etc., and the shape and size of the input image may be set by the user according to actual conditions. For example, the input image may be an image taken by a digital camera or a mobile phone, and the input image may be a grayscale image or a color image. For example, the input image may be an original image directly acquired by an image acquisition device, or an image obtained after preprocessing the original image. For example, in order to avoid the influence of the data quality and data imbalance of the input image on the object edge detection, before processing the input image, the object edge recognition and processing may also include the operation of preprocessing the input image. Preprocessing may eliminate irrelevant information or noise information in the input image so as to better process the input image.

[0037] Step S102: Identify the input image using an object vertex recognition model to obtain the relative position of each object vertex and its corresponding image vertex.

[0038] For example, the object vertex recognition model can be implemented using machine learning technology and run on a general-purpose computing device or a dedicated computing device. The object vertex recognition model is a pre-trained neural network model. For example, the object vertex recognition model can be implemented using a neural network such as a deep convolutional neural network (DEEP-CNN). In some embodiments, the input image is input into the object vertex recognition model, and the object vertex recognition model can identify the object vertices in the input image to obtain the relative position of each object vertex and its corresponding image vertex. The image vertex of the input image refers to the vertex of the edge of the image, for example, Figure 2 In the example, the input image is a rectangle, so the image has four vertices, 1 to 4 respectively.

[0039] The object vertex recognition model is introduced in detail below.

[0040] First, the object vertex recognition model is established through machine learning training. The training steps of the object vertex recognition model may include:

[0041] Step a, obtaining a training sample set, wherein each sample image in the training sample set is annotated with each object vertex of an object in the image, and the relative position of each object vertex and its corresponding image vertex;

[0042] Step b, obtaining a test sample set, wherein each sample image in the test sample set is also labeled with each object vertex of the object in the image, and the relative position of each object vertex and its corresponding image vertex, wherein the test sample set is different from the training sample set;

[0043] Step c, training the object vertex recognition model based on the training sample set;

[0044] Step d, testing the object vertex recognition model based on the test sample set;

[0045] Step e: when the test result indicates that the recognition accuracy of the object vertex recognition model is less than a preset accuracy, increasing the number of samples in the training sample set to perform re-training; and

[0046] Step f: when the test result indicates that the recognition accuracy of the object vertex recognition model is greater than or equal to the preset accuracy, the training is completed.

[0047] As mentioned above, there are many types of objects, such as business cards, test papers, test reports, documents, invoices, etc. For each type of object, a certain number of sample images annotated with corresponding information are obtained. The number of sample images prepared for each type of object can be the same or different. Each sample image can contain the entire area of ​​the object (such as Figure 2 ), or it may contain only part of the object (such as Figure 3 As shown in FIG. 1 ). The sample images obtained for each object type may include images taken at different shooting angles and under different lighting conditions as much as possible. In these cases, the corresponding information annotated for each sample image may also include information such as the shooting angle and lighting of the sample image.

[0048] The sample images that have undergone the above-mentioned annotation processing can be divided into a training sample set for training the object vertex recognition model and a test sample set for testing the training results. Usually, the number of samples in the training sample set is significantly larger than the number of samples in the test sample set. For example, the number of samples in the test sample set can account for 5% to 20% of the total number of sample images, while the number of samples in the corresponding training sample set can account for 80% to 95% of the total number of sample images. It should be understood by those skilled in the art that the number of samples in the training sample set and the test sample set can be adjusted as needed.

[0049] The object vertex recognition model can be trained using a training sample set, and the recognition accuracy of the trained object vertex recognition model can be tested using a test sample set. If the recognition accuracy does not meet the requirements, the number of sample images in the training sample set is increased, and the object vertex recognition model is retrained using an updated training sample set until the recognition accuracy of the trained object vertex recognition model meets the requirements. If the recognition accuracy meets the requirements, the training ends. In one embodiment, whether the training can end can be determined based on whether the recognition accuracy is less than a preset accuracy. In this way, the trained object vertex recognition model whose output accuracy meets the requirements can be used to recognize object vertices in the input image.

[0050] It should be noted that if the Figure 3 The image shown is used as a sample image. When annotating, in addition to annotating the object vertices b2 and b4 in the sample image, the adjacent edge lines can be extended to obtain the object vertices b1 and b3 outside the sample image, and the object vertices b1 and b3 are also annotated. At the same time, the relative positions of the object vertices b1~b4 and their corresponding image vertices are also annotated.

[0051] In this way, the sample images annotated in the above-mentioned annotation method are used to train the object vertex recognition model. Then, the object vertex recognition model is effective in identifying similar Figure 3When an input image is taken, it is not only possible to identify object vertices located inside the input image, but also object vertices located outside the input image, and to identify the relative positions of each object vertex and its corresponding image vertex. It should be noted that when annotating the sample image, the object vertices located outside the image are obtained by extending the adjacent edge lines. However, when the object vertex recognition model after training recognizes the input image, it does not need to extend the edge lines to obtain the object vertices outside the image, but can directly obtain the coordinates of the external object vertices and their corresponding image vertices.

[0052] Preferably, in the training step of the object vertex recognition model, in step a, when marking the relative positions of each object vertex of the object in the sample image and its corresponding image vertex, it is preferred to mark the relative position of the image vertex closest to each object vertex. Figure 2 The image shown is a sample image as an example. The distance between object vertex a and image vertex 1 is the shortest. Therefore, the relative position of object vertex a and image vertex 1 is marked. That is, for object vertex a, the coordinates of object vertex a are converted to coordinates with image vertex 1 as the origin. Similarly, for object vertex b, the coordinates of object vertex b are converted to coordinates with image vertex 2 as the origin. For object vertex c, the coordinates of object vertex c are converted to coordinates with image vertex 3 as the origin. For object vertex d, the coordinates of object vertex d are converted to coordinates with image vertex 4 as the origin.

[0053] In this way, the sample images annotated in the above-mentioned annotation method are used to train the object vertex recognition model, and the recognition result of the object vertex recognition model is to identify the relative position of each object vertex in the input image relative to the image vertex closest to the object vertex in the input image. Figure 2 The image shown is an input image as an example. After recognition by the object vertex recognition model, the relative position of object vertex a relative to image vertex 1 (i.e., the coordinates of object vertex a when image vertex 1 is the origin) can be obtained, the relative position of object vertex b relative to image vertex 2 (i.e., the coordinates of object vertex b when image vertex 2 is the origin) can be obtained, the relative position of object vertex c relative to image vertex 3 (i.e., the coordinates of object vertex c when image vertex 3 is the origin) can be obtained, and the relative position of object vertex d relative to image vertex 4 (i.e., the coordinates of object vertex d when image vertex 4 is the origin) can be obtained.

[0054] Step S103: determining the actual position of each object vertex in the input image according to the relative position of each object vertex and its corresponding image vertex.

[0055] For example, the relative position of each object vertex and the image vertex closest to the object vertex in the input image is converted into the coordinates of the object vertex in the target coordinate system to obtain the actual position of each object vertex in the input image. Preferably, the origin of the target coordinate system is a position point in the input image.

[0056] by Figure 2 Taking the input image shown as an example, in step S102, the coordinates of object vertex a with image vertex 1 as the origin, the coordinates of object vertex b with image vertex 2 as the origin, the coordinates of object vertex c with image vertex 3 as the origin, and the coordinates of object vertex d with image vertex 4 as the origin are obtained. Since the coordinates of each object vertex obtained at this time are not in the same coordinate system, it is necessary to convert the coordinates of each object vertex into coordinates in the same coordinate system. Specifically, in step S103, the coordinates of the above four object vertices can be converted into coordinates with the same position point as the common origin of the coordinate system, so as to facilitate the determination of the actual position of each object vertex in the input image.

[0057] Since the same position point is a specific position in the input image, the relative coordinates of each image vertex of the input image and the position point are known, and the relative coordinates of each object vertex with the position point as the origin of the coordinate system can be obtained.

[0058] For example, the origin of the target coordinate system may be the center point of the input image. Preferably, the origin of the target coordinate system is a vertex of the input image. Figure 2 Taking the image shown as an input image as an example, the origin of the target coordinate system can be image vertex 1. Therefore, the coordinate values ​​of the object vertices a, b, c, and d when the image vertex 1 is used as the origin of the coordinate system can be obtained, and then the actual positions of the object vertices a, b, c, and d in the input image can be known.

[0059] Step S104 , according to the actual position of each object vertex in the input image, sequentially connect adjacent object vertices to form edge lines, so as to obtain the edge of the object with edge in the input image.

[0060] like Figure 2 For the input image shown, the actual positions of the four object vertices a, b, c, and d in the input image can be obtained by step S103, so the edge lines can be obtained by sequentially connecting the adjacent object vertices, that is, connecting a and b to obtain edge line A1, connecting b and c to obtain edge line A2, connecting c and d to obtain edge line A3, and connecting d and a to obtain edge line A4. These four edge lines constitute the edge of the business card in the input image.

[0061] After determining the edge of the object with edge in the input image, the inner area defined by the edge is the area where the object is located, so the area where the object is located can be cropped to remove the background area in the input image that is not related to the object, and obtain a sliced ​​image of the object. Of course, in other embodiments, slicing may not be performed, but the area where the object is located may be marked in the form of a labeling box.

[0062] Furthermore, in practical applications, the actual shape of the object in the image obtained by taking a photo changes, that is, geometric distortion occurs. Figure 3 In the image shown, the shape of the test sheet is originally a rectangle, but the shape of the test sheet in the image has changed to a parallelogram. Therefore, it is necessary to correct the object in the input image. The corrected object is easier to view and facilitate subsequent processing, such as OCR recognition of characters in the object.

[0063] Specifically, the edge lines may be used to correct the object in the input image.

[0064] In one embodiment, the object with edges is a rectangle, but in the input image the object is not a rectangle. It is understandable that in the input image, the number of vertices of the object may be 4, the number of edge lines may be 4, namely, a first line, a second line, a third line and a fourth line, the first line and the third line are arranged along a first direction, the second line and the fourth line are arranged along a second direction, and the first direction is perpendicular to the second direction.

[0065] Correcting the object with the edge by using the edge line may specifically include:

[0066] respectively obtaining the projection lengths of the first line and the third line in the second direction, and respectively obtaining the projection lengths of the second line and the fourth line in the first direction;

[0067] Calculating an average of the projection lengths of the first line and the third line in the second direction as the corrected length of the object with an edge along the second direction;

[0068] An average of the projection lengths of the second line and the fourth line in the first direction is calculated as the corrected length of the object with an edge along the first direction.

[0069] By using the correction method described above, the lengths of the object with edges in the input image in two directions perpendicular to each other can be obtained, so that the shape of the object in the input image can be corrected from a non-rectangular shape to a rectangular shape.

[0070] For example, Figure 4 In the coordinate system shown, ABCD are four image vertices of the input image, wherein image vertex A is the origin of the coordinate system, the object in the input image has four object vertices, namely a, b, c, and d, and the four edge lines are respectively the first line ab, the second line bc, the third line cd, and the fourth line da, the first line ab and the third line cd are arranged along the first direction (i.e., the X-axis direction), and the second line bc and the fourth line da are arranged along the second direction (i.e., the Y-axis direction).

[0071] Through the above steps, the coordinates of each object vertex in the coordinate system can be known, and then the X-axis coordinate difference of the object vertices a and d and the X-axis coordinate difference of the object vertices b and c can be calculated, so as to obtain two width data L1 and L2. The width of the corrected object can be determined according to the average value of the two width data, that is, the width of the corrected object L=1 / 2(L1+L2).

[0072] The Y-axis coordinate difference between the object vertices a and b and the Y-axis coordinate difference between the object vertices c and d can also be calculated to obtain two height data H1 and H2. The height of the object after correction can be determined based on the average value of the two height data, that is, the height of the object after correction H = 1 / 2 (H1 + H2).

[0073] After obtaining the corrected width and height of the object, interpolation processing can be performed to adjust the pixels in the area where the object is located in the input image to the correct position in the corrected object. The specific method can refer to the existing technology and will not be described here.

[0074] In summary, in the object edge recognition and processing method of the present invention, machine learning is used to recognize the object vertices in the input image and the relative positions of each object vertex and its corresponding image vertex, and then the actual position of each object vertex in the input image can be determined, and then the adjacent object vertices are sequentially connected to form edge lines to obtain the edge of the object with edge in the input image. The present invention can quickly locate the position of the object vertex in the input image, realize the edge detection of the object with edge in the input image, and also improve the accuracy of edge detection.

[0075] It should be noted that in the present invention, the object vertex recognition model is used to first identify each object vertex and the relative position of each object vertex relative to the image vertex closest to the object vertex in the input image, and then the obtained relative positions are converted to determine the actual positions of each object vertex in the input image. This processing method can make the relative position of each identified object vertex relatively more accurate, so the actual position of each object vertex obtained is also more accurate, effectively improving the accuracy of edge detection.

[0076] Based on the same inventive concept, the present invention also provides an object edge recognition and processing system. Figure 5 As shown, the object edge recognition and processing system 200 may include a processor 210 and a memory 220. The memory 220 stores instructions. When the instructions are executed by the processor 210, the steps in the object edge recognition and processing method described above may be implemented.

[0077] Among them, the processor 210 can perform various actions and processes according to the instructions stored in the memory 220. Specifically, the processor 210 can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can be an X86 architecture or an ARM architecture, etc.

[0078] The memory 220 stores executable instructions, which are executed by the processor 210 to perform the object edge recognition and processing method described above. The memory 220 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous connection dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM). It should be noted that the memory of the method described herein is intended to include but is not limited to these and any other suitable types of memory.

[0079] Based on the same inventive concept, the present invention further provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed, the steps in the object edge recognition and processing method described above can be implemented.

[0080] Similarly, the computer-readable storage medium in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. It should be noted that the computer-readable storage medium described herein is intended to include but is not limited to these and any other suitable types of memory.

[0081] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0082] In general, various example embodiments of the present invention may be implemented in hardware or dedicated circuits, software, firmware, logic, or any combination thereof. Certain aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device. When various aspects of embodiments of the present invention are illustrated or described as block diagrams, flow charts, or using some other graphical representation, it will be understood that the blocks, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general purpose hardware or controllers or other computing devices, or some combination thereof as non-limiting examples.

[0083] It should be noted that the various embodiments in this specification are described in a related manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system and computer-readable storage medium, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0084] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0085] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.

Claims

1. A method for object edge recognition and processing, characterized in that: include: Acquire an input image, wherein the input image includes an object having an edge, and the edge of the object includes a plurality of object vertices; The input image is recognized by the object vertex recognition model, and not only the object vertices located in the input image but also the object vertices located outside the input image can be recognized, and the relative position of each object vertex and its corresponding image vertex is obtained; including: for each object vertex, the relative position of the object vertex and the image vertex closest to the object vertex in the input image is obtained; the object vertex recognition model is a neural network model; Determine the actual position of each object vertex in the input image according to the relative position of each object vertex and its corresponding image vertex; including: for each object vertex, convert the relative position of the object vertex and the image vertex closest to the object vertex in the input image into the coordinates of the object vertex in the target coordinate system to obtain the actual position of the object vertex in the input image; the origin of the target coordinate system is a position point of the input image; According to the actual position of each object vertex in the input image, adjacent object vertices are sequentially connected to form edge lines, so as to obtain the edge of the object with edge in the input image.

2. The object edge recognition and processing method according to claim 1, characterized in that: Also includes: The object with the edge is corrected using the edge line.

3. The object edge recognition and processing method according to claim 2, characterized in that: The number of object vertices is 4, and the number of edge lines is 4, namely the first line, the second line, the third line and the fourth line, the first line and the third line are arranged along a first direction, the second line and the fourth line are arranged along a second direction, and the first direction is perpendicular to the second direction.

4. The object edge recognition and processing method according to claim 3, characterized in that: The correcting the object with the edge by using the edge line comprises: respectively obtaining the projection lengths of the first line and the third line in the second direction, and respectively obtaining the projection lengths of the second line and the fourth line in the first direction; Calculating an average of the projection lengths of the first line and the third line in the second direction as the corrected length of the object with an edge along the second direction; An average of the projection lengths of the second line and the fourth line in the first direction is calculated as the corrected length of the object with an edge along the first direction.

5. An object edge recognition and processing system, characterized in that: The system comprises a processor and a memory, wherein instructions are stored in the memory, and when the instructions are executed by the processor, the steps of the method according to any one of claims 1 to 4 are implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the steps of the method according to any one of claims 1 to 4 are implemented.