Sawtooth edge extraction method, device, equipment and medium
By using image processing technology to automatically measure jagged edges, the problem of low efficiency and insufficient accuracy in existing jagged edge measurement methods is solved, and efficient and accurate jagged edge extraction is achieved.
Patent Information
- Application Number
- CN202510916482.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-11-21
AI Technical Summary
Existing methods for measuring serrated edges are inefficient and produce inaccurate results, relying mainly on manual measurement and recording.
By acquiring images of the saw cut by the sawing equipment, image processing technology is used to locate the sawing area, extract the sawing gap area, and perform linear fitting of the target points of the sawing gap, thereby realizing automated measurement of the sawing edge.
It improves the efficiency and accuracy of serrated edge measurement, and solves the problems of inefficiency and inaccuracy in manual measurement and recording.
Smart Images

Figure CN120997121A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of sawtooth equipment, in particular to a sawtooth edge extraction method, device, equipment and medium. BACKGROUND
[0002] In the field of lithium battery intelligent equipment, there are many cases of cutting by sawtooth equipment. For example, in order to prevent the cutting knife (i.e. sawtooth equipment) from being pasted with adhesive tape, the cut adhesive tape is often sawtoothed. Due to the need to measure the sawtooth edge, the existing method usually measures and records the sawtooth edge by manual measurement. However, this method is inefficient and prone to inaccurate measurement results due to improper human operation. SUMMARY
[0003] The embodiments of the present application provide a sawtooth edge extraction method, device, equipment and medium, which can solve the problems of low efficiency and inaccurate measurement results caused by the existing manual measurement and recording method.
[0004] In one aspect of the embodiments of the present application, a sawtooth edge extraction method is provided, which comprises: obtaining an image of a target device cut by a sawtooth equipment; locating a sawtooth region according to the image to obtain the sawtooth region; extracting a sawtooth gap region from the sawtooth region to obtain the sawtooth gap region; determining each sawtooth gap target point in the sawtooth gap region and performing linear fitting on each sawtooth gap target point to obtain a sawtooth edge.
[0005] Optionally, the step of locating the sawtooth region according to the image to obtain the sawtooth region comprises: determining a sawtooth region matched with a preset template in the image by using a template matching algorithm.
[0006] Optionally, the step of extracting the sawtooth gap region from the sawtooth region to obtain the sawtooth gap region comprises: performing local region segmentation on the sawtooth region to obtain a segmented region; extracting the sawtooth gap region from the segmented region to obtain the sawtooth gap region.
[0007] Optionally, the step of performing local region segmentation on the sawtooth region to obtain a segmented region comprises: determining each pixel point in the sawtooth region; for each pixel point, if the gray value corresponding to the pixel point is within a preset gray range, determining that the pixel point is a point to be separated; The segmentation region is determined according to the determined each to-be-segmented point.
[0008] Optionally, the sawtooth gap region extraction on the segmentation region comprises: The recessed region in the segmentation region is filled by using a region closing operation mode, to obtain a target segmentation region after filling; The target segmentation region and the segmentation region are subtracted to obtain the sawtooth gap region.
[0009] Optionally, the determination of each sawtooth gap target point in the sawtooth gap region comprises: Each sub-region in the sawtooth gap region is determined, and each sub-region corresponds to one sawtooth gap target point; For each sub-region, a root point in the sub-region is determined, and the root point is taken as the sawtooth gap target point corresponding to the sub-region.
[0010] Optionally, the determination of the root point in the sub-region comprises: A minimum circumscribed rectangle of the sub-region is determined; According to the row coordinate of the center point of the minimum circumscribed rectangle and the leftmost column coordinate of the minimum circumscribed rectangle, the coordinates of the root point are determined.
[0011] According to an aspect of an embodiment of the present application, a sawtooth edge extraction device is provided, and the device comprises: An acquisition unit is configured to acquire an image of a target device obtained after cutting by a sawtooth device; A positioning unit is configured to position a sawtooth region according to the image, to obtain the sawtooth region; An extraction unit is configured to perform sawtooth gap region extraction on the sawtooth region, to obtain a sawtooth gap region; A determination unit is configured to determine each sawtooth gap target point in the sawtooth gap region, and perform straight line fitting on each sawtooth gap target point, to obtain a sawtooth edge.
[0012] In another aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory; The memory is configured to store a computer program; The processor executes the computer program to implement the foregoing method.
[0013] In another aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the foregoing method.
[0014] The embodiments of the present application at least have the following beneficial effects: According to the sawtooth edge extraction method, device, equipment and medium provided by the present application, the image of the target device obtained after cutting by the sawtooth device can be acquired, the sawtooth region is positioned by using the image, the sawtooth region is obtained, and then the sawtooth gap region extraction is performed on the sawtooth region to obtain the sawtooth gap region. By determining each sawtooth gap target point, that is, the dedendum point, in the sawtooth gap region, the straight line fitting is performed, and the sawtooth edge is obtained. In this way, the sawtooth edge obtained by fitting can be directly measured, the measurement efficiency of the sawtooth edge is high, and the measurement result is very accurate. Therefore, the present application proposes to use the image to extract and measure the sawtooth edge, and solves the problems of low efficiency and inaccurate measurement result caused by the existing manual measurement and recording method. BRIEF DESCRIPTION OF DRAWINGS
[0015] The accompanying drawings are used to provide a further understanding of the technical scheme of the present application, and constitute a part of the specification, and are used together with the embodiments of the present application to explain the technical scheme of the present application, and do not constitute a limitation on the technical scheme of the present application.
[0016] Figure 1 A flowchart of the sawtooth edge extraction method provided by the embodiments of the present application is shown in the figure. Figure 2 A schematic diagram of the target device obtained after cutting by the sawtooth device is shown in the figure. Figure 3 A schematic diagram of the sawtooth region provided by the embodiments of the present application is shown in the figure. Figure 4 A schematic diagram of the divided region provided by the embodiments of the present application is shown in the figure. Figure 5 A schematic diagram of the target divided region provided by the embodiments of the present application is shown in the figure. Figure 6 A schematic diagram of the sawtooth gap region including a plurality of sub-regions provided by the embodiments of the present application is shown in the figure. Figure 7 A schematic diagram of the dedendum point provided by the embodiments of the present application is shown in the figure. Figure 8 A block diagram of the sawtooth edge extraction device provided by the embodiments of the present application is shown in the figure. Figure 9 A structural schematic diagram of an electronic device provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0017] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with embodiments of the present application. They are merely examples of apparatuses and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0018] It can be understood that the terms "first", "second", and the like used in the present application can be used herein to describe various concepts, but unless specifically stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determining".
[0019] The terms "at least one", "multiple", "each", "any" and the like used in the present application include one, two or more, multiple includes two or more, and each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as understood by those skilled in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0021] The method provided by the embodiments of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in the terminal or the server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, and the like, but is not limited thereto; the server end can be configured as a standalone physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms, and the server can also be a node server in a blockchain network; the software can be an application that implements the above method, but is not limited to the above forms.
[0022] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0023] This application provides a method for extracting jagged edges, referring to... Figure 1 As shown, the jagged edge extraction method provided in this application embodiment includes, but is not limited to, steps S1 to S4: In step S1, an image of the target device obtained after being cut by a sawing device is acquired.
[0024] The sawing device can be a serrated cutter or similar equipment, and the target device can be a component such as tape. Figure 2 As shown, Figure 2 This is an image of the target device obtained after being cut by a sawing device. This image can be acquired using a camera and can be a grayscale image, meaning each pixel in the image corresponds to a grayscale value.
[0025] In step S2, the jagged region is located based on the image to obtain the jagged region.
[0026] In one embodiment, the step of locating the jagged region based on the image to obtain the jagged region includes: A template matching algorithm is used to identify jagged regions in the image that match a preset template.
[0027] Specifically, the template matching algorithm works as follows: First, a preset template is determined, which is a template obtained by integrating and synthesizing multiple actual jagged regions. The preset template includes multiple template sub-regions, each corresponding to a parameter value, thus forming a matrix. In the image, a sliding window is established according to the size of the preset template. The sliding window is then moved (or traversed) through the image. When a region corresponding to the preset template is found, meaning the jagged region in the image has a parameter value that is relatively close to the preset template, then the jagged region matching the preset template is obtained. The obtained jagged region can be processed as follows:Figure 3 as shown.
[0028] In step S3, the sawtooth region is subjected to sawtooth gap region extraction to obtain a sawtooth gap region.
[0029] In some embodiments, the sawtooth gap region extraction on the sawtooth region to obtain a sawtooth gap region comprises: locally regionally segmenting the sawtooth region to obtain a segmented region; sawtooth gap region extraction on the segmented region to obtain a sawtooth gap region.
[0030] The locally regionally segmenting the sawtooth region to obtain a segmented region can be as shown in Figure 4 that is, determining each pixel point in the sawtooth region; for each pixel point, if the gray value corresponding to the pixel point is within a preset gray range, determining the pixel point as a point to be separated; and determining the segmented region according to the determined points to be separated.
[0031] Specifically, the gray value corresponding to a certain pixel point in the sawtooth region is g0, and the gray value corresponding to the pixel point after median filtering of the sawtooth region is gt.
[0032] Then, if g0≥gt+offset, the pixel point is determined to be a point in the segmented region (i.e., the point to be separated in the present application), and offset is an input gray offset value parameter.
[0033] If g0≤gt-offset, the point is a point in the segmented region (i.e., the point to be separated in the present application), and offset is an input gray offset value parameter. Wherein, gt+offset and gt-offset constitute a preset gray range.
[0034] In an embodiment, the sawtooth gap region extraction on the segmented region to obtain a sawtooth gap region comprises: filling the recessed region in the segmented region by using a region closing operation mode to obtain a target segmented region after filling; subtracting the target segmented region from the segmented region to obtain the sawtooth gap region.
[0035] Specifically, as shown in Figure 5 , the image of the target segmented region after filling the recessed region in the segmented region is obtained by subtracting the target segmented region from the segmented region to obtain Figure 5 as shown. Figure 4 Figure 6 The sawtooth gap region is shown. The region closing operation can be specifically determining a concave region of the segmentation region, and performing linear fitting on both ends of the concave region, so as to fill the concave region in the segmentation region.
[0036] In step S4, each sawtooth gap target point in the sawtooth gap region is determined, and linear fitting is performed on each sawtooth gap target point to obtain a sawtooth edge.
[0037] In an embodiment, the determination of each sawtooth gap target point in the sawtooth gap region comprises: determining each sub-region in the sawtooth gap region, each sub-region corresponding to a sawtooth gap target point; for each sub-region, determining a root point in the sub-region, and taking the root point as the sawtooth gap target point corresponding to the sub-region.
[0038] After obtaining the sawtooth gap region as shown in Figure 6 Since the sawtooth gap region is composed of multiple sub-regions, each sub-region can be analyzed separately, and the root point of the sub-region can be determined, and the root point is taken as the sawtooth gap target point corresponding to the sub-region.
[0039] Specifically, the determination of the root point in the sub-region comprises: determining the minimum circumscribed rectangle of the sub-region; determining the row coordinate of the center point of the minimum circumscribed rectangle and the column coordinate of the leftmost side of the minimum circumscribed rectangle as the coordinates of the root point.
[0040] As shown in Figure 7 , Figure 7 a schematic diagram of a certain sub-region, by determining the minimum circumscribed rectangle of the sub-region, that is, determining the row coordinate of the center point of the minimum circumscribed rectangle, and determining the column coordinate of the leftmost side of the minimum circumscribed rectangle, the coordinates of the root point can be determined. After determining the coordinates of each root point (sawtooth gap target point), linear fitting can be performed, and finally the sawtooth edge can be obtained. In this way, the sawtooth edge obtained by fitting can be directly measured, solving the problem of low efficiency and inaccurate measurement results caused by the existing manual measurement and recording method. The method provided in the embodiments of the present application can solve the problem of inaccurate sawtooth edge extraction leading to inaccurate measurement results, and can realize accurate edge grabbing, thereby meeting the sawtooth edge extraction and measurement requirements of different application scenarios.
[0041] According to an aspect of the present application, a sawtooth edge extraction device is also provided, as shown in Figure 8 , Figure 8 a block diagram of the sawtooth edge extraction device, the sawtooth edge extraction device comprising: The acquisition unit 301 is configured to acquire an image of a target device after the target device is cut by a sawtooth device; The positioning unit 302 is configured to position a sawtooth region according to the image to obtain the sawtooth region; The extraction unit 303 is configured to extract a sawtooth gap region from the sawtooth region to obtain the sawtooth gap region; The determination unit 304 is configured to determine each sawtooth gap target point in the sawtooth gap region, and perform linear fitting on each sawtooth gap target point to obtain a sawtooth edge.
[0042] The embodiment of the application further discloses an electronic device, comprising: at least one processor; at least one memory configured to store at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method as described above.
[0043] It can be understood that the contents in the specific embodiments of the above method are all applicable to the electronic device embodiment, the function specifically implemented by the electronic device embodiment is the same as that of the above method embodiment, and the beneficial effects achieved are also the same as those of the above method embodiment.
[0044] Exemplarily, refer to Figure 9 , Figure 9 Fig. 1 is a structural schematic diagram of an electronic device provided in the embodiment of the application. Taking the electronic device as a terminal device, Figure 9 In the terminal device 1200, the RF (Radio Frequency, radio frequency) circuit 1210, the memory 1220 including one or more computer readable storage media, the input unit 1230, the display unit 1240, the sensor 1250, the audio circuit 1260, the short distance wireless transmission module 1270, the processor 1280 including one or more processing cores, and the power supply 1290, etc. Those skilled in the art can understand that Figure 9 The device structure shown in the embodiment is not a limitation to the terminal device, and can include more or less components than the diagram, or combine certain components, or different component arrangements.
[0045] The RF circuit 1210 can be used for receiving and transmitting signals in the process of information or communication, in particular, receiving the downlink information from the base station and delivering it to the one or more processors 1180 for processing, and transmitting the uplink data to the base station. Generally, the RF circuit 1210 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, etc. In addition, the RF circuit 1210 can communicate with the network and other devices through wireless communication. The wireless communication can use any communication standards or protocols, including but not limited to GSM (Global System for Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), etc.
[0046] The memory 1220 can be used to store software programs and modules (or units). The processor 1280 performs various functions and data processing by running the software programs and modules (or units) stored in the memory 1220. The memory 1220 can mainly include a program storage area and a data storage area, wherein the program storage area can store operating systems, application programs required by at least one function (such as a sound playing function, an image playing function), etc.; the data storage area can store data created according to the use of the terminal device 1200 (such as audio data, a phone book), etc. In addition, the memory 1220 can include a high-speed random access memory, and can also include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 1220 can also include a memory controller to provide access for the processor 1280 and the input unit 1230 to the memory 1220. Although Figure 9 The RF circuit 1210 is shown, but it can be understood that it does not belong to the essential components of the terminal device 1200, and can be omitted as needed without changing the essence of the application.
[0047] The input unit 1230 can be used to receive inputted digital or character information, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to object setting and function control. Specifically, the input unit 1230 can include a touch-sensitive surface 1231 and other input devices 1232. The touch-sensitive surface 1231, also known as a touch display or touch panel, can collect touch operations (such as operations of an object using a finger, a stylus, or any suitable object or accessory near or on the touch-sensitive surface 1231) of the object thereon or thereabout, and drive corresponding connection devices according to pre-set programs. Optionally, the touch-sensitive surface 1231 can include two parts of a touch detection device and a touch controller. The touch detection device detects the touch position of the object and detects signals caused by touch operations, and transmits the signals to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch coordinates, and sends it to the processor 1280, and can also receive instructions from the processor 1280 and execute them. In addition, the touch-sensitive surface 1231 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 1231, the input unit 1230 can also include other input devices 1232. Specifically, the other input devices 1232 can include one or more of a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, etc.
[0048] The display unit 1240 can be used to display information input by the object or information provided to the object, and to control various graphical object interfaces of the terminal device 1200, which can be composed of graphics, text, icons, video, and any combination thereof. The display unit 1140 can include a display panel 1241, which can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 1231 can be overlaid on the display panel 1241, and when the touch-sensitive surface 1231 detects a touch operation thereon or thereabout, it transmits to the processor 1280 to determine the type of touch event, and then the processor 1280 provides corresponding visual output on the display panel 1241 according to the type of touch event. Although in the Figure 9 above, the touch-sensitive surface 1231 and the display panel 1241 are implemented as two independent components to realize input and output functions, in some embodiments, the touch-sensitive surface 1231 and the display panel 1241 can be integrated to realize input and output functions.
[0049] The terminal device 1200 can further include at least one sensor 1250, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, where the ambient light sensor can adjust the brightness of the display panel 1241 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1241 or the backlight when the terminal device 1200 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and when at rest, it can detect the magnitude and direction of gravity, which can be used for identifying the posture of the mobile phone (such as switching between horizontal and vertical screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, taps), and the like. As for other sensors that the terminal device 1200 can also be configured, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, they will not be described here.
[0050] The audio circuit 1260, the speaker 1261, and the microphone 1262 can provide an audio interface between the object and the terminal device 1200. The audio circuit 1260 can convert the received audio data into an electrical signal and transmit it to the speaker 1261, which converts it into a sound signal for output. On the other hand, the microphone 1262 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1260 and converted into audio data. After being processed by the processor 1280, the audio data is output to another electronic device via the RF circuit 1210 or to the memory 1220 for further processing. The audio circuit 1260 can also include a jack for providing communication between an external earphone and the terminal device 1200.
[0051] The short-range wireless transmission module 1270 can be a WIFI (wireless fidelity) module, a Bluetooth module, or an infrared module, etc. The terminal device 1200 can transmit information with the wireless transmission module provided on other devices through the short-range wireless transmission module 1270.
[0052] The processor 1280 is the control center of the terminal device 1200, which connects all parts of the device through various interfaces and lines, executes various functions of the terminal device 1200 and processes data by running or executing software programs or modules stored in the memory 1220, and calling data stored in the memory 1220, thereby overall controlling the device. Optionally, the processor 1280 can include one or more processing cores; optionally, the processor 1280 can integrate an application processor and a modem processor, where the application processor mainly processes the operating system, the object interface, and the application program, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1280.
[0053] The terminal device 1200 further includes a power supply 1290 (such as a battery) for supplying power to each component. Optionally, the power supply 1290 can be logically connected to the processor 1280 through a power management system, so that the power management system can realize functions such as management of charging, discharging, and power consumption management. The power supply 1290 can also include one or more direct or alternating current power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
[0054] Although not shown, the terminal device 1200 can also include a camera, a Bluetooth module, and the like, which will not be described here.
[0055] The embodiments of the present application also disclose a computer readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used for implementing the method embodiments as described above when the processor executes the program.
[0056] It can be understood that the contents in the above method embodiments are all applicable to the present computer readable storage medium embodiment, the function implemented by the present computer readable storage medium embodiment is the same as that of the above method embodiments, and the beneficial effects achieved by the present computer readable storage medium embodiment are also the same as those achieved by the above method embodiments.
[0057] The embodiments of the present application also disclose a computer program product or a computer program, which comprises computer instructions stored in the above computer readable storage medium. Figure 9 The processor of the electronic device shown can read the computer instructions from the above computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above method.
[0058] It can be understood that the contents in the above method embodiments are all applicable to the present computer program product or computer program embodiment, the function implemented by the present computer program product or computer program embodiment is the same as that of the above method embodiments, and the beneficial effects achieved by the present computer program product or computer program embodiment are also the same as those achieved by the above method embodiments.
[0059] In alternative embodiments, the functions / operations in the flow diagrams can occur in sequences other than those depicted. For example, two operations shown in succession can in fact be executed substantially concurrently or the operations sometimes can be executed in the reverse order depending upon the functionality / operations involved. Also, embodiments presented and described in this application are provided by way of example only. The
[0060] Moreover, while this application has been described in the context of functional modules, it is to be understood that one or more of the functions and / or features can be integrated in a single physical device and / or software module or one or more of the functions and / or features can be implemented in separate physical devices or software modules. It will also be appreciated that detailed discussion of the actual implementation of each module is not necessary for an understanding of the application. Rather, the actual implementation is a matter of choice apart from the conception and since the application is properly deemed to encompass at least the best mode contemplated, definite understanding of the detailed construction of the modules is not not necessary for proper appreciation of the disclosure. The disclosure is therefore to be implemented in the context of this understanding. Accordingly, the present application is not limited to that precisely as shown and described.
[0061] If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media include both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media can be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, or twisted pair, then the coaxial cable, fiber optic cable, or twisted pair are included in the definition of medium. Disk and disc, as used herein, include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), and Blu-Ray® disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0062] The logic and / or steps represented in the flow diagrams or otherwise described herein, for example, can be considered as a sequence of executable instructions, and can be embodied in any computer-readable storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable storage medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device.
[0063] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following technologies, or combinations thereof, can be used: a discrete logic circuit having logic gates for implementing logic functions upon data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), or the like.
[0064] In the above description of the present specification, reference to the description of the terms "one embodiment", "another embodiment", or "certain embodiments" or the like means that a particular feature, structure, material or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present specification. The illustrative representations of the above terms in the present specification do not necessarily refer to the same embodiment or example. Also, the described particular features, structures, materials or characteristics can be combined in any appropriate manner in one or more embodiments or examples.
[0065] Although embodiments of the present application have been shown and described, it would be recognized by those of ordinary skill in the art that various changes, modifications, alternatives, and variations can be made to the embodiments without departing from the spirit and scope of the application, which is defined by the claims and their equivalents.
[0066] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the embodiments, and those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present application, and these equivalent modifications or replacements are included in the scope defined by the claims of the present application.
Claims
1. A sawtooth edge extraction method characterized by, The method comprises: an image of a target device obtained after cutting by a sawtooth device is acquired; a sawtooth region is located according to the image to obtain a sawtooth region; a sawtooth gap region is extracted from the sawtooth region to obtain a sawtooth gap region; each sawtooth gap target point in the sawtooth gap region is determined, and a straight line is fitted for each sawtooth gap target point to obtain a sawtooth edge.
2. The saw edge extraction method according to claim 1, characterized in that, The sawtooth region is located according to the image to obtain a sawtooth region, which comprises: a template matching algorithm is used to determine a sawtooth region matching a preset template in the image.
3. The saw edge extraction method according to claim 1, characterized in that, The sawtooth gap region is extracted from the sawtooth region to obtain a sawtooth gap region, which comprises: a local region is segmented from the sawtooth region to obtain a segmented region; a sawtooth gap region is extracted from the segmented region to obtain a sawtooth gap region.
4. The saw edge extraction method according to claim 3, characterized in that, The local region is segmented from the sawtooth region to obtain a segmented region, which comprises: each pixel point in the sawtooth region is determined; for each pixel point, if a gray value corresponding to the pixel point is within a preset gray range, the pixel point is determined as a point to be separated; the segmented region is determined according to each determined point to be separated.
5. The saw edge extraction method according to claim 4, characterized in that, The sawtooth gap region is extracted from the segmented region to obtain a sawtooth gap region, which comprises: a concave region in the segmented region is filled by using a region closing operation to obtain a target segmented region after filling; the target segmented region and the segmented region are subtracted to obtain the sawtooth gap region.
6. The saw edge extraction method according to claim 5, characterized in that, Each sawtooth gap target point in the sawtooth gap region is determined, which comprises: each sub-region in the sawtooth gap region is determined, and each sub-region corresponds to a sawtooth gap target point; for each sub-region, a root point in the sub-region is determined, and the root point is taken as the sawtooth gap target point corresponding to the sub-region.
7. The saw edge extraction method according to claim 6, characterized in that, The root point in the sub-region is determined, which comprises: a minimum circumscribed rectangle of the sub-region is determined; a row coordinate of a center point of the minimum circumscribed rectangle and a leftmost column coordinate of the minimum circumscribed rectangle are taken as coordinates of the root point.
8. A jaggies extraction apparatus characterized by, The device comprises: an acquisition unit configured to acquire an image of a target device obtained after cutting by a sawtooth device; a positioning unit configured to locate a sawtooth region according to the image to obtain a sawtooth region; an extraction unit configured to extract a sawtooth gap region from the sawtooth region to obtain a sawtooth gap region; a determination unit configured to determine each sawtooth gap target point in the sawtooth gap region, and to fit a straight line for each sawtooth gap target point to obtain a sawtooth edge.
9. An electronic device, comprising: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the sawtooth edge extraction method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the sawtooth edge extraction method of any one of claims 1 to 7.