Sewing machine camera visual angle deviation detection and correction method and system, medium and terminal

Through the sewing machine camera perspective offset detection and correction method, the pixel value comparison of the reference image and the real-time image and the vibration sensor are used, combined with the edge detection and target detection algorithms, the camera perspective offset is automatically or manually corrected, which solves the perspective offset problem caused by sewing machine vibration and improves the image analysis precision and recognition accuracy.

CN120612263APending Publication Date: 2025-09-09JACK SEWING MASCH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510737727.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

The vibration of the sewing machine during operation causes the camera's viewing angle to shift, affecting the image analysis effect and recognition accuracy. Existing technologies make it difficult to quickly and efficiently detect and correct the viewing angle shift.

Method used

By obtaining the baseline image and real-time image captured by the camera on the sewing machine, pixel value comparison is performed, and the vibration data is detected by the vibration sensor. Combined with edge detection and target detection algorithms, the camera perspective offset is automatically or manually corrected.

Benefits of technology

The system achieves fast and efficient detection and correction of the camera viewing angle deviation of sewing machines, improves the precision of image analysis and recognition accuracy, and reduces system load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612263A_ABST
    Figure CN120612263A_ABST
Patent Text Reader

Abstract

The invention provides a sewing machine camera visual angle deviation detection and correction method and system, a medium and a terminal. The sewing machine camera visual angle deviation detection and correction method comprises the following steps of obtaining a reference image collected by a camera arranged on a sewing machine; acquiring a real-time image acquired by the camera; carrying out pixel value comparison on specific areas of the reference image and the real-time image to obtain a pixel value difference value; when the pixel value difference meets a preset condition, detecting a machine needle in the real-time image; if the machine needle is detected, automatically correcting the visual angle deviation of the camera based on the machine needle; and otherwise, manually correcting the visual angle deviation of the camera. According to the sewing machine camera visual angle deviation detection and correction method and system, the medium and the terminal, detection and correction of camera visual angle deviation are achieved through image detection of the sewing machine, and rapidness and high efficiency are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology and relates to a method, system, medium and terminal for detecting and correcting the viewing angle offset of a sewing machine camera. Background Art

[0002] In the existing technology, with the continuous advancement of artificial intelligence technology, especially the increasing maturity of target detection and edge detection technologies, new possibilities have been opened up for the application of machine vision in sewing machines. The application of image processing technology must be combined with a camera, and the large vibration of the sewing machine during operation will inevitably cause the camera's view angle to appear as follows. Figure 1 The offset shown causes the visual algorithm to shift the area it ultimately recognizes, leading to erroneous recognition results. In particular, when the camera's deflection angle is too large, the camera may not even capture the needle, only the platen. In this case, automatically adjusting the image area is ineffective, and manual adjustment of the camera angle is required.

[0003] In addition, existing image analysis technologies usually require region division. Once the region coordinates are determined, the camera's viewing angle offset will significantly reduce the effectiveness of image analysis.

[0004] Therefore, how to solve the problem of camera viewing angle deviation caused by vibration during sewing machine operation has become a hot topic.

[0005] Application Contents

[0006] The purpose of this application is to provide a method, system, medium and terminal for detecting and correcting the viewing angle offset of a sewing machine camera, which can realize the detection and correction of the viewing angle offset of the camera through image detection of the sewing machine in a fast and efficient manner.

[0007] In the first aspect, the present application provides a method for detecting and correcting the viewing angle offset of a sewing machine camera, the method comprising the following steps: obtaining a reference image captured by a camera installed on a sewing machine; obtaining a real-time image captured by the camera; performing pixel value comparison on specific areas of the reference image and the real-time image to obtain a pixel value difference; when the pixel value difference meets a preset condition, detecting a needle in the real-time image; if the needle is detected, automatically correcting the viewing angle offset of the camera based on the needle; if the needle is not detected, manually correcting the viewing angle offset of the camera.

[0008] In an implementation of the first aspect, the method further includes obtaining vibration data collected by a vibration sensor provided on the sewing machine, and obtaining a real-time image collected by the camera only when the vibration data is greater than a vibration threshold.

[0009] In an implementation of the first aspect, the vibration threshold is obtained in the following manner:

[0010] Setting an initial threshold corresponding to the vibration threshold;

[0011] When the pixel difference value obtained under the initial threshold is not greater than the difference threshold, the vibration threshold is set to the corresponding vibration data; otherwise, the vibration threshold remains unchanged;

[0012] When the pixel difference value obtained under the vibration threshold is not greater than the difference threshold, the vibration threshold is set to the corresponding vibration data; otherwise, the vibration threshold remains unchanged.

[0013] In an implementation of the first aspect, the vibration threshold is obtained in the following manner:

[0014] Obtaining vibration data when the camera performs viewing angle correction;

[0015] At each preset time interval, the minimum value in the vibration data is selected as the vibration threshold.

[0016] In an implementation of the first aspect, the method further includes determining whether the pixel value difference satisfies a preset condition;

[0017] Determining whether the pixel value difference meets a preset condition includes the following steps:

[0018] comparing the pixel value difference with a difference threshold;

[0019] Counting the number of pixels whose pixel value difference is greater than the difference threshold;

[0020] Calculating a ratio of the number of pixels to the total number of pixels in the specific area;

[0021] When the ratio is greater than the ratio threshold, it is determined that the pixel value difference meets a preset condition.

[0022] In an implementation of the first aspect, if the machine needle is detected, automatically correcting the viewing angle offset of the camera based on the machine needle includes the following steps:

[0023] Performing edge detection on the reference image and the real-time image to obtain an edge detection image, a reference edge image, and a real-time edge image;

[0024] Setting a reference reference point and a reference area in the reference edge image; setting a real-time reference point corresponding to the reference reference point and a correction area corresponding to the reference area in the real-time edge image;

[0025] Acquire the reference coordinates of the reference point on the reference edge image, and acquire the real-time coordinates of the real-time reference point on the real-time edge image;

[0026] Based on the offset of the real-time coordinates relative to the reference coordinates, the coordinates of the correction area are acquired according to the coordinates of the reference area.

[0027] In a second aspect, the present application provides a sewing machine camera viewing angle deviation detection and correction system, the system comprising a first acquisition module, a second acquisition module, a comparison module, a detection module and a correction module;

[0028] The first acquisition module is used to acquire a reference image captured by a camera provided on the sewing machine;

[0029] The second acquisition module is used to acquire the real-time image collected by the camera;

[0030] The comparison module is used to compare pixel values ​​of a specific area of ​​the reference image and the real-time image to obtain a pixel value difference;

[0031] The detection module is used to detect the machine needle in the real-time image when the pixel value difference meets a preset condition;

[0032] The correction module is used to automatically correct the viewing angle offset of the camera based on the machine needle if the machine needle is detected; and manually correct the viewing angle offset of the camera if the machine needle is not detected.

[0033] In a third aspect, the present application provides a terminal, comprising: a processor and a memory;

[0034] The memory is used to store computer programs;

[0035] The processor is used to execute the computer program stored in the memory, so that the terminal executes the above-mentioned sewing machine camera viewing angle offset detection and correction method.

[0036] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a terminal, implements the above-mentioned method for detecting and correcting the viewing angle offset of a sewing machine camera.

[0037] In a fifth aspect, the present application provides a sewing machine camera viewing angle deviation detection and correction system, comprising the above-mentioned terminal, a vibration sensor and a camera;

[0038] The vibration sensor is provided on the sewing machine, and is used to collect vibration data of the sewing machine and provide the data to the terminal;

[0039] The camera is arranged on the sewing machine, and is used for collecting a reference image and a real-time image, and providing the images to the terminal.

[0040] As described above, the method, system, medium, and terminal for detecting and correcting the viewing angle offset of a sewing machine camera described in this application have the following beneficial effects:

[0041] (1) Vibration detection of the sewing machine and camera image detection are used to detect and correct camera viewing angle deviation quickly and efficiently.

[0042] (2) A vibration sensor is used for vibration detection, and an edge detection algorithm and a target detection algorithm are used to detect and correct the viewing angle offset of the sewing machine camera, thereby ensuring the accuracy of detection and correction and meeting the needs of actual application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 Shown is a schematic diagram of a conventional sewing machine camera being offset in one embodiment;

[0044] Figure 2 Shown is a flow chart of a method for detecting and correcting a viewing angle deviation of a sewing machine camera according to one embodiment of the present application;

[0045] Figure 3 Shown is a schematic diagram of a specific area in one embodiment of the present application;

[0046] Figure 4 Shown is a schematic diagram of needle detection in one embodiment of the present application;

[0047] Figure 5 Shown is a schematic diagram of edge detection in one embodiment of the present application;

[0048] Figure 6 Shown is a schematic diagram of an embodiment selected from the references in this application;

[0049] Figure 7 Shown is a schematic structural diagram of a sewing machine camera viewing angle deviation detection and correction system in one embodiment of the present application;

[0050] Figure 8 Shown is a schematic structural diagram of a terminal in one embodiment of the present application;

[0051] Figure 9 Shown is a structural schematic diagram of another embodiment of the sewing machine camera viewing angle deviation detection and correction system of the present application. DETAILED DESCRIPTION

[0052] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0053] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. Therefore, the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0054] In addition, the descriptions of "first", "second", etc. in this application are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0055] like Figure 1 As shown, in one embodiment, the sewing machine camera viewing angle offset detection and correction method of the present application includes steps S1 to S6.

[0056] Step S1: Acquire a reference image captured by a camera installed on a sewing machine.

[0057] Specifically, in the present application, a camera is provided on the sewing machine, and the image captured by the camera when it is at the reference position serves as the reference image.

[0058] Step S2: Acquire the real-time image captured by the camera.

[0059] Specifically, the image collected by the camera at the real-time position is used as the real-time image.

[0060] Preferably, in the present application, it is also necessary to obtain vibration data collected by a vibration sensor provided on the sewing machine, and only when the vibration data is greater than a vibration threshold, obtain the real-time image collected by the camera. In the present application, a vibration sensor is provided on the sewing machine. The vibration sensor is used to collect vibration data of the sewing machine. The vibration data can be displayed in real time on a screen or other hardware device.

[0061] In this application, whether to trigger the detection and correction of the sewing machine camera's viewing angle offset is determined based on the magnitude of the vibration data. When the vibration data is greater than a preset vibration threshold, the detection and correction of the sewing machine camera's viewing angle offset is triggered, causing the camera to capture a real-time image; otherwise, no action is performed.

[0062] As can be seen from the above, the selection of the vibration threshold is crucial, as it directly determines whether to detect and correct the sewing machine camera's perspective offset. To accommodate situations where there isn't a large amount of sewing machine vibration data accumulated, the present application learns and updates the vibration threshold during the camera perspective offset detection and correction process. First, an initial threshold corresponding to the vibration threshold is set. When the real-time image detects no offset or a small offset at the initial threshold, i.e., the pixel difference is no greater than the difference threshold, the vibration threshold is set to the corresponding vibration data; otherwise, the vibration threshold remains unchanged. When the real-time image detects no offset or a small offset at the vibration threshold, i.e., the pixel difference is no greater than the difference threshold, the vibration threshold is set to the corresponding vibration data; otherwise, the vibration threshold remains unchanged. Therefore, according to the above method, the vibration threshold is continuously optimized during the use of the present application, thereby reducing the frequency of camera perspective offset detection and lowering system load. Furthermore, in the present application, vibration data from the camera performing perspective correction can be acquired and stored; at intervals, the minimum value in the vibration data is selected as the vibration threshold.

[0063] Step S3: Compare pixel values ​​of specific areas of the reference image and the real-time image to obtain pixel value differences.

[0064] Specifically, the detection of the viewing angle deviation of the sewing machine camera is performed by comparing the pixel values ​​of the specific area of ​​the reference image and the real-time image. Figure 3 As shown, the area within the box can be selected as a specific area. The pixel values ​​of each pixel in the specific area are subtracted one by one, and then the differences are summed to obtain the pixel value difference. When the reference image and the real-time image overlap, the pixel value difference is 0.

[0065] Step S4: When the pixel value difference meets a preset condition, the machine needle is detected in the real-time image.

[0066] Specifically, when there is an offset between the reference image and the real-time image, the pixel value difference is compared with the difference threshold, the number of pixels whose pixel value difference is greater than the difference threshold is counted, and then the ratio of the number of pixels to the total number of pixels in the specific area is calculated. When the ratio is greater than the ratio threshold, it is determined that the pixel value difference meets the preset conditions, and the correction of the viewing angle offset of the sewing machine camera is started. Among them, the target detection model such as yolo is used to perform target detection on the real-time image at any time to detect whether it contains such Figure 4 It should be noted that the difference threshold and the ratio threshold are obtained and updated through multiple learning.

[0067] In another embodiment, when the sum of the pixel value differences is greater than a sum threshold, a needle is detected in the real-time image.

[0068] Step S5: If the machine needle is detected, the viewing angle offset of the camera is automatically corrected based on the machine needle; if the machine needle is not detected, the viewing angle offset of the camera is manually corrected.

[0069] Specifically, when the machine needle cannot be detected in the real-time image, it indicates that the camera's viewing angle offset needs to be corrected manually until the real-time image and the reference image are consistent.

[0070] When the needle is detected in the real-time image, the camera's viewing angle offset can be corrected by automatic control until the real-time image is consistent with the reference image.

[0071] In one embodiment, if the machine needle is detected, automatically correcting the camera's viewing angle offset based on the machine needle includes the following steps:

[0072] If the machine needle is detected, automatically correcting the camera's viewing angle offset based on the machine needle includes the following steps:

[0073] a) performing edge detection on the reference image and the real-time image to obtain an edge detection image, a reference edge image, and a real-time edge image.

[0074] Among them, such as Figure 5 As shown, the edge detection image corresponding to the left image can be obtained through the edge detection algorithm.

[0075] b) setting a reference reference point and a reference area in the reference edge image; and setting a real-time reference point corresponding to the reference reference point and a correction area corresponding to the reference area in the real-time edge image.

[0076] Among them, the reference point is set on the edge of the sewing machine table or the edge of the head. Considering that the table will be blocked during the sewing process, it is better to use the edge of the head. For example, Figure 6 A reference point is set in the box shown. At the same time, according to image analysis requirements, a reference area and a real-time area are set on the reference image and the real-time image. The reference area and the real-time area are the same image area.

[0077] c) obtaining the reference coordinates of the reference point on the reference edge image, and obtaining the real-time coordinates of the real-time reference point on the real-time edge image.

[0078] d) Based on the offset of the real-time coordinates relative to the reference coordinates, obtaining the coordinates of the correction area according to the coordinates of the reference area.

[0079] The offset of the real-time coordinates relative to the reference coordinates is calculated, and the same offset is applied to each coordinate of the reference area to obtain the corrected coordinates of the correction area. Based on the corrected coordinates, the correction area can be accurately located in the real-time image, thereby completing the correction of the camera angle offset.

[0080] It should be noted that the entire process of the sewing machine camera viewing angle offset detection and correction method of the present application can be displayed through a display screen or other hardware devices to enable the staff to know the real-time status of the sewing machine.

[0081] The protection scope of the sewing machine camera perspective offset detection and correction method described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, subtracting, or replacing steps in the existing technology based on the principles of the present application are included in the protection scope of the present application.

[0082] An embodiment of the present application also provides a sewing machine camera viewing angle offset detection and correction system, which can implement the sewing machine camera viewing angle offset detection and correction method described in the present application. However, the implementation device of the sewing machine camera viewing angle offset detection and correction system described in the present application includes but is not limited to the structure of the sewing machine camera viewing angle offset detection and correction system listed in this embodiment. All structural deformations and replacements of the existing technology made according to the principles of the present application are included in the protection scope of the present application.

[0083] like Figure 7 As shown, in one embodiment, the sewing machine camera viewing angle offset detection and correction system of the present application includes a first acquisition module 71 , a second acquisition module 72 , a comparison module 73 , a detection module 74 and a correction module 75 .

[0084] The first acquisition module 71 is used to acquire a reference image captured by a camera installed on the sewing machine.

[0085] The second acquisition module 72 is connected to the first acquisition module 71 and is used to acquire the real-time image captured by the camera.

[0086] The comparison module 73 is connected to the first acquisition module 71 and the second acquisition module 72 and is used to compare pixel values ​​of specific areas of the reference image and the real-time image to obtain pixel value differences.

[0087] The detection module 74 is connected to the comparison module 73 and is used to detect the machine needle in the real-time image when the pixel value difference meets a preset condition.

[0088] The correction module 75 is connected to the detection module 74 and is used to automatically correct the viewing angle offset of the camera based on the machine needle if the machine needle is detected; and manually correct the viewing angle offset of the camera if the machine needle is not detected.

[0089] Among them, the structures and principles of the first acquisition module 71, the second acquisition module 72, the comparison module 73, the detection module 74 and the correction module 75 correspond one to one with the steps in the above-mentioned sewing machine camera perspective offset detection and correction method, so they are not repeated here.

[0090] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices or methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.

[0091] The modules / units described as separate components may or may not be physically separate, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into a processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into a single module / unit.

[0092] Those skilled in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0093] The embodiment of the present application also provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state drive, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid-state drive (SSD)), etc.

[0094] An embodiment of the present application further provides a terminal comprising a processor and a memory.

[0095] The memory is used to store computer programs.

[0096] The memory includes various media that can store program codes, such as ROM, RAM, magnetic disk, USB flash drive, memory card or optical disk.

[0097] The processor is connected to the memory and is used to execute the computer program stored in the memory so that the terminal executes the above-mentioned sewing machine camera viewing angle offset detection and correction method.

[0098] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0099] like Figure 8 As shown, the terminal of the present application is in the form of a general-purpose computing device. The components of the terminal may include but are not limited to: one or more processors or processing units 81, memory 82, and a bus 83 connecting different system components (including memory 82 and processing unit 81).

[0100] Bus 83 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0101] The terminal typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the terminal, including volatile and non-volatile media, removable and non-removable media.

[0102] The memory 82 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 821 and / or cache memory 822. The terminal may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 823 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 Not shown, often called a "hard drive"). Although Figure 8Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 83 via one or more data medium interfaces. The memory 82 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.

[0103] A program / utility 824 having a set (at least one) of program modules 8241 may be stored, for example, in memory 82. Such program modules 8241 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 8241 generally implement the functions and / or methods of the embodiments described herein.

[0104] The terminal may also communicate with one or more external devices (e.g., a keyboard, a pointing device, a display, etc.), one or more devices that enable a user to interact with the terminal, and / or any device that enables the terminal to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may occur via an input / output (I / O) interface 84. Furthermore, the terminal may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 85. Figure 8 As shown, network adapter 85 communicates with other modules of the terminal via bus 83. It should be understood that, although not shown in the figures, other hardware and / or software modules may be used in conjunction with the terminal, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0105] like Figure 9 As shown, in one embodiment, the sewing machine camera viewing angle deviation detection and correction system of the present application includes the above-mentioned terminal 91, vibration sensor 92 and camera 93.

[0106] The vibration sensor 92 is provided on the sewing machine, and is used to collect vibration data of the sewing machine and provide the data to the terminal 81 .

[0107] The camera 93 is provided on the sewing machine and is used to collect a reference image and a real-time image and provide the images to the terminal 91 .

[0108] It should be noted that the terminal 92 can be set on the sewing machine for local processing or set on the cloud for cloud processing. When the terminal 92 is set on the cloud, one terminal can simultaneously detect and correct the viewing angle deviation of the cameras of multiple sewing machines.

[0109] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical concepts disclosed in this application shall be covered by the claims of this application.

Claims

1. A method for detecting and correcting the viewing angle deviation of a sewing machine camera, characterized in that: The method comprises the following steps: Acquire a reference image captured by a camera disposed on the sewing machine; Acquire the real-time image captured by the camera; Comparing pixel values ​​of specific areas of the reference image and the real-time image to obtain a pixel value difference; When the pixel value difference satisfies a preset condition, detecting a machine needle in the real-time image; If the needle is detected, the viewing angle offset of the camera is automatically corrected based on the needle; if the needle is not detected, the viewing angle offset of the camera is manually corrected.

2. The method for detecting and correcting the viewing angle deviation of a sewing machine camera according to claim 1, wherein: The method also includes obtaining vibration data collected by a vibration sensor provided on the sewing machine, and obtaining a real-time image collected by the camera only when the vibration data is greater than a vibration threshold.

3. The method for detecting and correcting the viewing angle deviation of a sewing machine camera according to claim 2, wherein: The vibration threshold is obtained in the following way: Setting an initial threshold corresponding to the vibration threshold; When the pixel difference value obtained under the initial threshold is not greater than the difference threshold, the vibration threshold is set to the corresponding vibration data; otherwise, the vibration threshold remains unchanged; When the pixel difference value obtained under the vibration threshold is not greater than the difference threshold, the vibration threshold is set to the corresponding vibration data; otherwise, the vibration threshold remains unchanged.

4. The method for detecting and correcting the viewing angle deviation of a sewing machine camera according to claim 2, wherein: The vibration threshold is obtained in the following way: Obtaining vibration data when the camera performs viewing angle correction; At each preset time interval, the minimum value in the vibration data is selected as the vibration threshold.

5. The method for detecting and correcting the viewing angle deviation of a sewing machine camera according to claim 1, wherein: It also includes determining whether the pixel value difference meets a preset condition; Determining whether the pixel value difference meets a preset condition includes the following steps: comparing the pixel value difference with a difference threshold; Counting the number of pixels whose pixel value difference is greater than the difference threshold; Calculating a ratio of the number of pixels to the total number of pixels in the specific area; When the ratio is greater than the ratio threshold, it is determined that the pixel value difference meets a preset condition.

6. The method for detecting and correcting the viewing angle deviation of a sewing machine camera according to claim 1, wherein: If the machine needle is detected, automatically correcting the camera's viewing angle offset based on the machine needle includes the following steps: Performing edge detection on the reference image and the real-time image to obtain a reference edge image and a real-time edge image; Setting a reference reference point and a reference area in the reference edge image; setting a real-time reference point corresponding to the reference reference point and a correction area corresponding to the reference area in the real-time edge image; Acquire the reference coordinates of the reference point on the reference edge image, and acquire the real-time coordinates of the real-time reference point on the real-time edge image; Based on the offset of the real-time coordinates relative to the reference coordinates, the coordinates of the correction area are acquired according to the coordinates of the reference area.

7. A sewing machine camera angle deviation detection and correction system, characterized in that: The system includes a first acquisition module, a second acquisition module, a comparison module, a detection module and a correction module; The first acquisition module is used to acquire a reference image captured by a camera provided on the sewing machine; The second acquisition module is used to acquire the real-time image collected by the camera; The comparison module is used to compare pixel values ​​of a specific area of ​​the reference image and the real-time image to obtain a pixel value difference; The detection module is used to detect the machine needle in the real-time image when the pixel value difference meets a preset condition; The correction module is used to automatically correct the viewing angle offset of the camera based on the machine needle if the machine needle is detected; and manually correct the viewing angle offset of the camera if the machine needle is not detected.

8. A terminal, characterized in that: The terminal includes: a processor and a memory; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory so as to enable the terminal to execute the method for detecting and correcting the viewing angle offset of a sewing machine camera according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a terminal, the method for detecting and correcting the viewing angle offset of a sewing machine camera according to any one of claims 1 to 6 is implemented.

10. A sewing machine camera angle deviation detection and correction system, characterized in that: comprising the terminal, vibration sensor and camera according to claim 8; The vibration sensor is provided on the sewing machine, and is used to collect vibration data of the sewing machine and provide the data to the terminal; The camera is arranged on the sewing machine, and is used for collecting a reference image and a real-time image, and providing the images to the terminal.

Citation Information

Patent Citations

  • Image shooting deviation correcting system and method thereof

    CN102567981A

  • Online operation abnormity identification system of sewing equipment

    CN115239711A

  • Camera offset detection method, camera offset detection device and electronic equipment

    CN115733968A

  • Camera offset detection method and related device thereof

    CN115937311A

  • Angle-of-view deviation correction device

    JP2016134636A