Motion state identification and motion positioning method, system, device and storage medium
Through visual processing and digital image processing technology, the rotation offset of non-coaxial rotating workpieces is automatically judged and adjusted, which solves the problems of low manual adjustment efficiency and poor consistency, and realizes efficient and automated production of ceramic micro-machining.
Patent Information
- Application Number
- CN202111585364.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-12-22
AI Technical Summary
In ceramic micro-machining, non-coaxially rotating workpieces require manual adjustment of their rotation offset, resulting in low production efficiency, poor product consistency and high labor costs.
By collecting the workpiece rotation image, using visual processing and digital image processing methods, the workpiece rotation state is judged and the range of the workpiece axis target is estimated, so as to achieve fast and accurate positioning tracking of the workpiece axis.
It realizes fully automated and accurate adjustment of workpiece rotation offset, improves production efficiency, reduces labor costs, and ensures product consistency.
Smart Images

Figure CN114332161B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motion state identification and motion positioning, and in particular to a motion state identification and motion positioning method, system, device and storage medium. Background Art
[0002] In ceramic micromachining, the workpiece is cut by the rotation of the fixture. On the one hand, the rotation state of the workpiece, such as whether it rotates coaxially, will directly affect the quality of workpiece processing (generally, coaxial rotation is required); on the other hand, when the offset of a non-coaxially rotating workpiece needs to be adjusted, the offset of the non-coaxial rotation needs to be obtained, which is generally equivalent to the radius of the trajectory circle of the workpiece axis rotation in practical applications, such as Figure 1 As shown, this radius or offset needs to be achieved by fast motion positioning and tracking of the workpiece axis.
[0003] At present, the adjustment process of non-coaxial rotating fixtures is generally completed by manual methods, such as Figure 2 As shown, the left side is the image before adjustment, the middle is the adjustment process, and the right side is the image after adjustment, that is, the center point of the vertebral canal represented by the small circle (i.e., the axis center of hole 1 in the figure) is adjusted by the arrows in the figure so that the two centers of the center point of the vertebral canal in the figure and the center of the fixture (i.e., the axis center of the main rotating axis in the figure) coincide.
[0004] The above-mentioned manually completed process requires the human eye to judge whether the coaxial rotation is carried out and to locate the axis movement of the workpiece, which requires a large investment of mental and physical labor. On the one hand, the operator is more prone to fatigue, and on the other hand, there is no objective criterion and subjective judgment is required. The production efficiency of manual operation is low and the product consistency is poor. Summary of the invention
[0005] The purpose of the present invention is to provide a motion state identification and motion positioning method, system, equipment and storage medium, which can achieve rapid positioning and tracking by tracking and monitoring the motion state of the workpiece, thereby quickly realizing fully automated and accurate adjustment of the workpiece rotation offset, which will significantly improve the production efficiency of the product and greatly save labor costs.
[0006] The objective of the present invention is achieved through the following technical solutions:
[0007] A motion state identification and motion positioning method, comprising:
[0008] Collect the workpiece rotation image and use the visual processing method to determine whether the workpiece rotation state is coaxial rotation;
[0009] If it is non-coaxial rotation, the digital image processing method is used to estimate the range of the video frame where the workpiece axis target is located, and the workpiece axis target is detected based on the pattern characteristics of the workpiece axis target.
[0010] A motion state identification and motion positioning system is implemented based on the above method, and the system includes:
[0011] The motion state determination unit is used to collect the workpiece rotation image and determine whether the workpiece rotation state is coaxial rotation by using the visual processing method;
[0012] The motion positioning unit is used to estimate the range of the video frame where the workpiece axis target is located by using a digital image processing method when the workpiece rotation state is non-coaxial rotation, and detect the workpiece axis target based on the pattern characteristics of the workpiece axis target.
[0013] A processing device, comprising: one or more processors; a memory for storing one or more programs;
[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method.
[0015] A readable storage medium stores a computer program, which implements the above method when the computer program is executed by a processor.
[0016] It can be seen from the technical solutions provided by the present invention that: 1) the machine vision method is used to quickly determine whether the rotation of the workpiece is coaxial, that is, whether the workpiece is installed in place, saving preparation time before processing. 2) The motion estimation of the target is converted into a fast positioning algorithm for a specific target pattern, thereby reducing the complexity of the algorithm. 3) The digital image processing method is used to effectively utilize prior knowledge and complete target pattern features to achieve fast and accurate positioning and tracking of the target, thereby improving production efficiency and ensuring product consistency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0018] Figure 1 The adjustment principle diagram for non-coaxial rotation provided by the background technology of the present invention;
[0019] Figure 2 A schematic diagram of the principle of the axis adjustment process provided as the background technology of the present invention;
[0020] Figure 3 A flow chart of a motion state identification and motion positioning method provided by an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of the image block division and image block search sequence of the target area provided by an embodiment of the present invention;
[0022] Figure 5 A schematic diagram of selecting overlapping image blocks provided by an embodiment of the present invention;
[0023] Figure 6 A flow chart of the main steps of motion state identification and motion positioning provided by an embodiment of the present invention;
[0024] Figure 7 A schematic diagram of a motion state identification and motion positioning system provided by an embodiment of the present invention;
[0025] Figure 8 A schematic diagram of a processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.
[0027] First, the terms that may be used in this article are explained as follows:
[0028] The terms "include", "comprises", "contains", "has" or other descriptions with similar semantics should be interpreted as non-exclusive inclusion. For example, including certain technical feature elements (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, procedures, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or products, etc.) should be interpreted as including not only certain technical feature elements explicitly listed, but also other technical feature elements known in the art that are not explicitly listed.
[0029] The following is a detailed description of a motion state discrimination and motion positioning scheme provided by the present invention. The contents not described in detail in the embodiments of the present invention belong to the prior art known to professionals in the field. If no specific conditions are specified in the embodiments of the present invention, the conventional conditions in the field or the conditions recommended by the manufacturer are used. If the manufacturer is not specified in the instruments used in the embodiments of the present invention, they are all conventional products that can be purchased commercially.
[0030] Embodiment 1
[0031] like Figure 3As shown in the figure, a method for discriminating motion state and motion positioning mainly includes the following steps:
[0032] Step 1: Collect the rotating image of the workpiece, and use the method of visual processing to determine whether the workpiece is rotating coaxially.
[0033] The preferred implementation of this step is as follows:
[0034] Step a: Determine the pattern patch B0 of the initial video frame, that is, the patch containing the workpiece axis point (i.e., the spinal canal center point mentioned above); Let: the maximum number of motion frames for detection be N, the maximum time be T, and the video frame number i = 0.
[0035] Step b: Calculate the mean value m0 of the pattern patch B0 of the initial video frame.
[0036] Step c: Let M = (((m0 + m i ) / 2 - m0) < m t )? 1:0, where m i is the mean value of the corresponding pattern patch of the i-th frame, and m t is the mean value threshold; in the above formula, if ((m0 + m i ) / 2 - m0) < m t , then M = 1, and at this time, go to Step d; otherwise, M = 0, and at this time, it is determined as non-coaxial rotation.
[0037] Step d: When 1 < i < N and i * t < T, let i = i + 1 and go to Step c; where t is the time interval between adjacent video frames, for example, t = 25ms.
[0038] Step e: If i > N, or i * t > T, and all M = 1, then it is determined as coaxial rotation.
[0039] Step 2: If it is non-coaxial rotation, then use the digital image processing method to estimate the range of the video frame where the workpiece axis target is located, and detect the workpiece axis target based on the pattern features of the workpiece axis target.
[0040] The preferred implementation of this step is as follows:
[0041] 1) Determine the range of the video frame where the workpiece axis target is located.
[0042] In the embodiment of the present invention, any one of the following two methods is used to estimate the range of the video frame where the workpiece axis target is located:
[0043] a) Determine the foreground and background of the video through frame difference operation of the video, and the workpiece axis target is located in the foreground range of the video.
[0044] b) Determine the moving distance of the workpiece axis target in adjacent video frames through the maximum and minimum rotation speeds of the workpiece, and judge the range where the workpiece axis target appears. For example, the time interval between adjacent video frames is 25ms, and the speed and angle values monitored at the same time are calculated to obtain the approximate position, time, and angle of the target.
[0045] 2) Coarse screening of targets based on image blocks.
[0046] In the embodiment of the present invention, a block pattern feature detection method or a block matching algorithm is used to screen out a series of blocks where the workpiece axis target is located. Since there is only one correct block, a detailed detection is required later. If the detailed detection results are multiple, it is also necessary to remove the false target blocks in combination with prior knowledge.
[0047] a) Block pattern feature detection method.
[0048] A variety of features of each image block are extracted from the range of the video frame where the workpiece axis target is located. All features describe the pattern of the workpiece axis target. A series of image blocks where the workpiece axis target is located are screened out by feature detection, thereby converting the video motion estimation (motion positioning) problem into a detection problem of specific pattern features; among which, the extracted multiple features include: mean, variance, histogram features, clustering features and peripheral features.
[0049] The principle is as follows: the mean and variance are single numerical features of each image block. For these two types of features, it is judged whether the value is within the specified range to assist in determining whether the image block contains the axis target of the workpiece; the image block size, the histogram of the image block containing the target should have a bimodal feature. If the image block size is selected to be smaller, there are only target pixels, which should be a single-peak feature with low grayscale values; the clustering feature refers to the obvious clustering feature of the axis pixels. The regional growing method can be used to calculate the number of target pixels clustered in the region. If a certain pixel number threshold is met, it is considered to contain the target. The peripheral feature means that the surrounding of the target should be a high-brightness, high-mean background.
[0050] like Figure 4 As shown, the image block division and image block search order of the target area are shown. According to the scheme introduced here, pattern feature detection is performed on each image block in order, so as to select a series of image blocks where the axis target of the workpiece is located according to the features; Figure 4 In the figure, 0 represents the block position of the workpiece axis target in the initial video frame. There is no displacement, so it is represented as 0, and the 0 block also needs to be matched.
[0051] b) Efficient block matching algorithm. When selecting blocks, the overlap method can be used, such as Figure 5As shown in the figure, in order to deal with the situation where the target is at the edge of the block, since the block is a square data array, the block overlap is the maximum range that the data array can repeatedly cover when the block moves on the data array. Figure 5 As shown in the figure, the dotted line indicates the maximum moving range of the boundary points of the matching image block. The efficiency of the block matching algorithm within the image block comes from two aspects: first, sampling the overlapping image blocks to reduce the resolution of the image blocks and thus reduce the complexity of the algorithm; second, using an efficient algorithm similar to the three-step search method. Similarly, a series of image blocks where the axis target of the workpiece is located are screened out by block matching.
[0052] 3) Pixel-based object detection.
[0053] The pixel-based target fine detection aims to further improve the accuracy of motion estimation. A pixel-based block matching algorithm or a feature-based precise positioning algorithm (the algorithm flow can be found in conventional technology and will not be described in detail in the present invention) is used to detect several workpiece axis targets from a series of image blocks where the workpiece axis targets are located, so as to significantly reduce the amount of calculation.
[0054] 4) Removal of false targets.
[0055] In the embodiment of the present invention, if the detection result has only one workpiece axis target, it is the final result. If multiple workpiece axis targets are obtained, it is necessary to determine the final workpiece axis target in combination with prior knowledge, including:
[0056] a) The workpiece axis target that falls outside the foreground range of the video frame where the determined workpiece axis target is located is removed as a pseudo target.
[0057] b) The workpiece axis target that exceeds the maximum and minimum rotational speed range is removed as a pseudo target. The principle here is: for any video frame image, the time from the initial video frame is known, and the time multiplied by the maximum and minimum rotational speeds is the maximum and minimum distance. If the distance between the position of the workpiece axis target and the position of the workpiece axis target in the initial video frame is within the maximum and minimum distance range, the position is correct, otherwise it is removed as a pseudo target.
[0058] c) Determine whether various features (for example, the five features mentioned above) of the image block where the workpiece axis target is located meet the specified requirements. If not, remove the corresponding workpiece axis target as a pseudo target.
[0059] d) Merge adjacent workpiece axis targets whose spacing is smaller than the set setting.
[0060] Through the above four types of operations, the final workpiece axis target is determined.
[0061] Preferably, in order to improve the calculation speed of the above scheme, the video frames are sampled, and the final workpiece axis target is determined using a digital image processing method between the sparse frames after sampling; wherein the sampling method includes uniform sampling and non-uniform sampling including key frames.
[0062] Based on the above scheme, the maximum value of the distance between the target of the initial frame and the target of the subsequent frame can be approximated as the diameter of the axis track circle, thereby obtaining the radius of the track circle, which is used as the offset to adjust the workpiece. This part of the adjustment scheme can be implemented by conventional technology, and the present invention will not be elaborated. Figure 6 As shown, a flowchart showing the main steps of motion state identification and motion positioning is presented.
[0063] The above solution of the embodiment of the present invention mainly achieves the following beneficial effects:
[0064] 1) Put the determination of motion status first to ensure the realization of the fundamental goal of improving production efficiency.
[0065] 2) Converting the motion estimation algorithm into a fast target positioning algorithm greatly improves the efficiency of the algorithm, reduces the operator's mental and physical input, and reduces the preparation time before processing.
[0066] 3) It provides an objective judgment method and a fast and efficient objective calculation method for the deviation in workpiece installation, effectively reducing labor costs and improving labor productivity.
[0067] Embodiment 2
[0068] The present invention also provides a motion state identification and motion positioning system, which is mainly implemented based on the method provided in the above embodiment, such as Figure 7 As shown, the system mainly includes:
[0069] The motion state determination unit is used to collect the workpiece rotation image and determine whether the workpiece rotation state is coaxial rotation by using the visual processing method;
[0070] The motion positioning unit is used to estimate the range of the video frame where the workpiece axis target is located by using a digital image processing method when the workpiece rotation state is non-coaxial rotation, and detect the workpiece axis target based on the pattern characteristics of the workpiece axis target.
[0071] Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above.
[0072] Embodiment 3
[0073] The present invention also provides a processing device, such as Figure 8 As shown, it mainly includes: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the methods provided in the aforementioned embodiments.
[0074] Furthermore, the processing device also includes at least one input device and at least one output device; in the processing device, the processor, memory, input device, and output device are connected via a bus.
[0075] In the embodiment of the present invention, the specific types of the memory, input device and output device are not limited; for example:
[0076] The input device may be a touch screen, an image acquisition device, a physical button or a mouse, etc.;
[0077] The output device may be a display terminal;
[0078] The memory may be a random access memory (RAM) or a non-volatile memory, such as a disk memory.
[0079] Embodiment 4
[0080] The present invention also provides a readable storage medium storing a computer program, which implements the method provided in the above embodiment when the computer program is executed by a processor.
[0081] In the embodiment of the present invention, the readable storage medium is a computer-readable storage medium and can be set in the aforementioned processing device, for example, as a memory in the processing device. In addition, the readable storage medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk, etc., which can store program codes.
[0082] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A motion state identification and motion positioning method, characterized in that: include: Collect the rotating image of the workpiece and use the method of vision processing to judge whether the workpiece is rotating coaxially. The method includes: Step a, determine the pattern patch B0 of the initial video frame, that is, the patch containing the axis point of the workpiece; Let: the maximum number of motion frames for detection be N, the maximum time be T, and the video frame sequence number i = 0; Step b, calculate the mean value m0 of the pattern patch B0 of the initial video frame; Step c, let M = (((m0 + m i ) / 2 - m0) < m t )? 1:0, where m i is the mean value of the corresponding pattern patch of the i-th frame, and m t is the mean value threshold; in the above formula, if ((m0 + m i ) / 2 - m0) < m t , then M = 1, and at this time, go to Step d; otherwise, M = 0, and at this time, it is judged as non-coaxial rotation; Step d, when 1 < i < N and i * t < T, let i = i + 1 and go to Step c; where t is the time interval between adjacent video frames; Step e, if i > N, or i * t > T, and all M = 1, then it is judged as coaxial rotation; If it is a non-coaxial rotation, the digital image processing method is used to estimate the range of the video frame where the workpiece axis target is located, and the workpiece axis target is detected based on the pattern characteristics of the workpiece axis target; if multiple workpiece axis targets are detected, the final workpiece axis target is determined in combination with prior knowledge, including: removing the workpiece axis target that falls outside the foreground range of the video frame where the determined workpiece axis target is located as a pseudo target; removing the workpiece axis target that exceeds the maximum and minimum rotation speed allowable range as a pseudo target; judging whether various features of the image block where the workpiece axis target is located meet the specified requirements, if not, removing the corresponding workpiece axis target as a pseudo target; merging adjacent workpiece axis targets whose spacing is less than the set value; and determining the final workpiece axis target through the above four types of operations.
2. A motion state identification and motion positioning method according to claim 1, characterized in that: The range of the video frame where the workpiece axis target is estimated includes: Determine the foreground and background of the video by performing frame difference calculation on the video, wherein the workpiece axis target is located in the foreground range of the video; Alternatively, the moving distance of the workpiece axis target in adjacent video frames is determined through the maximum and minimum rotation speeds of the workpiece, and the range in which the workpiece axis target appears is determined.
3. A motion state identification and motion positioning method according to claim 1, characterized in that: The method of detecting a plurality of workpiece axis targets based on the pattern features of the workpiece axis targets includes: rough target screening based on image blocks and fine target detection based on pixels; wherein: The block-based target rough screening includes: using a block pattern feature detection method or a block matching algorithm to screen out a series of blocks where the workpiece axis target is located; The pixel-based target fine detection includes: using a pixel-based block matching algorithm or a feature-based precise positioning algorithm to detect a number of workpiece axis targets from a series of image blocks where the workpiece axis targets are located.
4. A motion state identification and motion positioning method according to claim 3, characterized in that: The image block pattern feature detection method comprises: A variety of features of each image block are extracted from the range of the video frame where the workpiece axis target is located. All features describe the pattern of the workpiece axis target, and a series of image blocks where the workpiece axis target is located are screened out by feature detection. Among them, the extracted features include: mean, variance, histogram features, clustering features and peripheral features.
5. A motion state identification and motion positioning method according to claim 1, characterized in that: The method further includes: sampling the video frames, and detecting the workpiece axis target by using a digital image processing method between the sparse frames after sampling; The sampling methods include uniform sampling and non-uniform sampling including key frames.
6. A motion state identification and motion positioning system, characterized in that: The method according to any one of claims 1 to 5 is implemented, and the system comprises: The motion state determination unit is used to collect the workpiece rotation image and determine whether the workpiece rotation state is coaxial rotation by using the visual processing method; The motion positioning unit is used to estimate the range of the video frame where the workpiece axis target is located by using a digital image processing method when the workpiece rotation state is non-coaxial rotation, and detect the workpiece axis target based on the pattern characteristics of the workpiece axis target.
7. A processing device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Automatic alignment system and method of workpiece and main shaft rotation center in ultra-precision turning
CN101844237A
Method and apparatus for judging direction of rotation of target
CN109145681A