Product amplitude detection method and device and computer readable storage medium

By performing the difference superposition and contour detection of the vibration images of the vibration massage products, and combining the distance calculation of the amplitude of the imaging equipment, the problems of vibration measurement accuracy and cost are solved, and cost-effective vibration amplitude detection is achieved.

CN119323541APending Publication Date: 2025-01-17SHENZHEN YOUXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410952542.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The existing vibration massage product measuring equipment has the problems of low contact measurement accuracy and high contactless measurement cost, and it is difficult to reduce costs while ensuring measurement accuracy.

Method used

By superimposing the vibration images of the product to be tested, detecting the product profile, determining the pixel value of the vibration amplitude, and calculating the real amplitude based on the distance between the product to be tested and the camera equipment, and using a camera to measure, avoiding the use of expensive equipment.

Benefits of technology

The accuracy of vibration measurement is achieved while reducing costs, overcoming the technical shortcomings of low accuracy of contact measurement and high cost of contactless measurement, and providing a cost-effective vibration amplitude detection method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323541A_ABST
    Figure CN119323541A_ABST
Patent Text Reader

Abstract

The invention discloses a product amplitude detection method and device and a computer readable storage medium, and relates to the technical field of image recognition, and the method comprises the steps: carrying out the difference superposition through a preset dimension based on vibration images of adjacent frames of a to-be-detected product, and determining a superposed image; determining a vibration amplitude pixel value according to the contour area of the superposed image; and based on the vibration amplitude pixel value, calculating the amplitude according to the distance between the to-be-detected product and the camera device. According to the invention, difference superposition is carried out on the vibration image of the to-be-measured product, the product contour is detected, the vibration amplitude pixel value is determined, and the real amplitude is calculated according to the distance between the to-be-measured product and the camera equipment, so that the technical defects of low accuracy of contact measurement and high cost of non-contact measurement are overcome; the vibration measurement accuracy is guaranteed, and meanwhile the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a product amplitude detection method, device and computer-readable storage medium. Background Art

[0002] In the field of vibration massage products, whether the product experience meets the needs is mostly determined by making the product and judging whether the experience meets the needs based on people's actual experience. Among the current vibration detection equipment products, they are mainly divided into non-contact measurement equipment and contact measurement equipment.

[0003] The current contact measurement equipment relies on the experience of the person measuring. Different measurement positions and contact forces will produce different amplitude data. Even the values ​​measured by the same person and the same product at different time periods are different, and the measured data is inaccurate. The current non-contact measurement equipment measures data accurately, but the equipment cost is high.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a product amplitude detection method, device and computer-readable storage medium, aiming to solve the technical problem of how to reduce costs while ensuring the accuracy of vibration measurement.

[0006] To achieve the above purpose, the present application proposes a product amplitude detection method, which includes: Based on the vibration images of adjacent frames of the product to be tested, difference superposition is performed through a preset dimension to determine a superimposed image; Determining a vibration amplitude pixel value according to a contour area of ​​the superimposed image; Based on the vibration amplitude pixel value, the amplitude is calculated according to the distance between the product to be tested and the camera device.

[0007] In one embodiment, the step of performing difference superposition based on vibration images of adjacent frames of the product to be tested through a preset dimension to determine the superimposed image includes: Performing a difference operation on the vibration images of adjacent frames of the product to be tested according to the preset dimension to determine a difference image; Superimposing the difference images according to a preset number to determine a difference superposition result; The result of the difference superposition is binarized to determine a superimposed image.

[0008] In one embodiment, the step of performing a difference operation on the vibration images of adjacent frames of the product to be tested according to the preset dimension to determine the difference image, the preset dimension includes any one of the following: The preset dimension is a grayscale value, and a difference operation is performed on the grayscale results of the vibration images of adjacent frames of the product to be tested to determine a grayscale value difference image; The preset dimension is a pixel value, and a difference operation is performed on the pixelation results of the vibration images of adjacent frames of the product to be tested to determine a pixel value difference image.

[0009] In one embodiment, the step of determining the pixel value of the vibration amplitude according to the contour area in the superimposed image comprises: Determining a target contour in the superimposed image; According to the target contour, calculating the minimum inscribed rectangle area; The vibration amplitude pixel value is determined according to the minimum inscribed rectangle and the contour area of ​​the target contour.

[0010] In one embodiment, the step of determining the target contour in the superimposed image comprises: identifying all contours in the superimposed image; According to the area of ​​each contour, the contour with the largest area is determined as the target contour.

[0011] In one embodiment, the step of determining the pixel value of the vibration amplitude according to the minimum inscribed rectangle and the contour area of ​​the target contour comprises: Determine the product of the width of the inscribed rectangle and the area of ​​the contour; The vibration amplitude pixel value is determined based on the product and the area of ​​the minimum inscribed rectangle.

[0012] In one embodiment, the step of calculating the amplitude based on the vibration amplitude pixel value according to the distance between the product to be tested and the camera device includes: Determining the magnification of the vibration image of the product to be tested according to the distance between the product to be tested and the camera device; The amplitude of the product to be tested is calculated according to the magnification factor and the vibration amplitude pixel value.

[0013] In one embodiment, before the step of performing difference superposition based on vibration images of adjacent frames of the product to be tested by preset dimensions and determining the superimposed image, the step includes: Place the product to be tested on the testing table and turn on the vibration state; The vibration image of each frame of the product to be tested is collected by the camera device.

[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a product amplitude detection device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the product amplitude detection method as described above.

[0015] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the product amplitude detection method described above are implemented.

[0016] The present application provides a control method for a wearable device. The present application firstly uses difference superposition images to compare the differences between images of different frames, thereby highlighting the dynamic changes of vibration and improving the accuracy of amplitude calculation; by determining the target contour, the range of vibration can be more accurately identified; by combining the distance information of the camera device and the product, the vibration amplitude pixel value is converted into the real amplitude, the error caused by the camera device is eliminated, and the accuracy of the measurement data is improved; since only a camera is used, no expensive equipment is required, thereby reducing the cost of product amplitude detection.

[0017] In summary, the present application overcomes the technical defects of low contact measurement accuracy and high non-contact measurement cost by performing difference superposition on the vibration images of the product to be tested, detecting the product contour, determining the pixel value of the vibration amplitude, and calculating the true amplitude based on the distance between the product to be tested and the camera device, thereby achieving the goal of reducing costs while ensuring the accuracy of vibration measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 A flow chart of the first embodiment of the amplitude detection method of the product of the present application; Figure 2 A schematic diagram of the flow chart provided for the second embodiment of the amplitude detection method of the product of the present application; Figure 3 A flow chart of the third embodiment of the amplitude detection method of the product of the present application; Figure 4Schematic diagram of the device structure of the hardware operating environment involved in the product amplitude detection method in the embodiment of the present application.

[0021] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0022] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0023] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0024] The main solution of the embodiment of the present application is: based on the vibration images of adjacent frames of the product to be tested, difference superposition is performed through preset dimensions to determine the superimposed image; according to the contour area of ​​the superimposed image, the vibration amplitude pixel value is determined; based on the vibration amplitude pixel value, the amplitude is calculated according to the distance between the product to be tested and the camera device.

[0025] At present, contact measurement equipment relies on the experience of the person measuring. Different measurement positions and contact forces will produce different amplitude data. Even the values ​​measured by the same person and the same product at different time periods are different, and the measured data is inaccurate. Non-contact measurement equipment measures data accurately, but the equipment cost is high.

[0026] The present application overcomes the technical defects of low contact measurement accuracy and high non-contact measurement cost by performing difference superposition on the vibration images of the product to be measured, detecting the product contour, determining the pixel value of the vibration amplitude, and calculating the real amplitude according to the distance between the product to be measured and the camera device, thereby achieving the goal of reducing costs while ensuring the accuracy of vibration measurement.

[0027] It should be noted that the execution subject of this embodiment can be a product amplitude detection device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a control device for product amplitude detection that can realize the above functions, etc. This embodiment does not specifically limit this. The following takes the product amplitude detection device as the execution subject as an example to illustrate this embodiment and the following embodiments.

[0028] Embodiment 1 Based on this, the present application proposes a product amplitude detection method of the first embodiment, please refer to Figure 1 , the product amplitude detection method comprises: Step S110, based on the vibration images of adjacent frames of the product to be tested, difference superposition is performed through a preset dimension to determine a superimposed image.

[0029] In this embodiment, the product to be tested is a product with a vibration function, such as a vibration massager, an electric toothbrush, a game controller and other products; the vibration image is image data taken by a camera device when the product to be tested is in a vibrating state; the preset dimension is a preset dimension for difference superposition, including grayscale values ​​and pixel values, etc.; difference superposition is to superimpose the differences of at least two images in the preset dimension to generate a new image; the superimposed image is an image obtained by superimposing the difference images according to a preset number.

[0030] As an optional implementation, a difference operation is performed on vibration images of adjacent frames of the product to be tested according to a preset dimension to determine a difference image of the adjacent frames, and a preset number of difference images are superimposed to determine a superimposed image.

[0031] Exemplarily, the preset dimension is the grayscale value, and a difference operation is performed on the grayscale values ​​of the vibration images of adjacent frames of the product to be tested to obtain a difference image of the grayscale values ​​of adjacent frames, and 25 frames of the difference images are superimposed to determine a superimposed image.

[0032] Optionally, before step S110, the following steps are included: Step S111, placing the product to be tested on a testing table and turning on the vibration state.

[0033] In this embodiment, the testing platform is a platform specially designed to support and fix the product to be tested so as to perform various tests and measurements; the vibration state is a state in which the vibration function of the product to be tested is turned on.

[0034] As an optional implementation, turn on the camera and the test software, put the product to be tested into the test bench and fix it, and turn on the vibration function of the product to be tested. The test software is software for product amplitude detection, which can realize all the functions of the product amplitude detection method of this application.

[0035] Step S112: collecting the vibration image of each frame of the product to be tested by the camera device.

[0036] In this embodiment, acquisition is a process of using a camera to capture a vibration image of the product to be tested.

[0037] As an optional implementation, when the product to be tested is in a vibrating state, the camera device captures a vibration image of each frame of the product to be tested.

[0038] As another optional implementation, when the product to be tested is in a vibrating state, the camera device captures a preset number of continuous frames of vibration images of the product to be tested.

[0039] Step S120: determining the pixel value of the vibration amplitude according to the contour area of ​​the superimposed image.

[0040] In this embodiment, the contour area is the area of ​​the target contour identified in the superimposed image, and the vibration amplitude pixel value is the displacement of the vibration amplitude in the image in the form of pixel value calculated by comparing the position change of the contour of the product to be tested in different frames.

[0041] As an optional implementation, determine the target contour in the superimposed image, calculate the contour area of ​​the target contour, calculate the area of ​​the minimum inscribed rectangle of the target contour, and calculate the vibration amplitude pixel value through the area of ​​the target contour, the width of the inscribed rectangle and the area of ​​the minimum inscribed rectangle.

[0042] Exemplarily, the contours in the superimposed image are detected by an edge detection algorithm to determine the target contour, the area of ​​the contour enclosed by the boundary of the target contour is calculated, the minimum inscribed rectangle of the target contour is obtained based on the target contour, the area of ​​the minimum inscribed rectangle is calculated, and the vibration amplitude pixel value is calculated by the area of ​​the target contour, the area and width of the minimum inscribed rectangle.

[0043] Another example of this embodiment uses a threshold method to segment the superimposed image, selects a suitable threshold, compares the pixel value of the superimposed image with the threshold, divides the pixels into foreground and background, and obtains a binary image. Then, a contour detection algorithm is used to find the target contour, and the contour area is calculated by the number of pixel values ​​in the target contour. The minimum inscribed rectangle of the target contour is obtained based on the target contour, and the area of ​​the minimum inscribed rectangle is calculated. The vibration amplitude pixel value is calculated by the area of ​​the target contour, the area and width of the minimum inscribed rectangle.

[0044] Step S130, based on the vibration amplitude pixel value, the amplitude is calculated according to the distance between the product to be tested and the camera device.

[0045] In this embodiment, the camera device is a device for collecting vibration images of the product to be tested; the amplitude is the actual vibration amplitude of the product to be tested in the physical world.

[0046] As an optional implementation, the distance between the product to be tested and the camera device is measured, the magnification of the product to be tested in the vibration image is calculated based on the distance and the parameters of the camera device, and the amplitude of the physical world is calculated based on the vibration amplitude pixel value and the magnification.

[0047] Exemplarily, a measuring tool is used to directly measure the distance between the camera device and the product to be tested. The actual physical size corresponding to each pixel in the image, i.e., the scale, is calculated based on the distance between the camera device and the product to be tested, the pixel size and focal length of the camera device. The detected vibration amplitude pixel value is multiplied by the scale in the image to obtain the amplitude of the product to be tested in the physical world.

[0048] Optionally, step S130 includes: Step S131, determining the magnification of the vibration image of the product to be tested according to the distance between the product to be tested and the camera device.

[0049] In this embodiment, the magnification refers to the increase ratio of the image relative to the original size during display or processing.

[0050] As an optional implementation manner, the distance between the product to be tested and the camera device is measured to obtain the magnification of the vibration image of the product to be tested.

[0051] As another optional implementation, the distance between the product to be tested and the camera device is measured, and the magnification is calculated using a basic formula of optical imaging according to the focal length of the camera device.

[0052] Exemplarily, the magnification is calculated by a formula according to the distance between the product to be tested and the camera device, and the focal length of the camera device. The formula is as follows:

[0053] Among them, f is the focal length, D is the object distance, h is the image height, and H is the object height.

[0054] Step S132: Calculate the amplitude of the product to be tested according to the magnification factor and the vibration amplitude pixel value.

[0055] In this embodiment, the amplitude refers to the physical displacement of the product to be tested caused by vibration in the actual space.

[0056] As an optional implementation, the amplitude of the product to be tested is obtained by trigonometric calculation according to the magnification and the pixel value of the vibration amplitude.

[0057] As another optional implementation, the pixel equivalent is calculated according to the magnification of the camera device and the shooting conditions, and the vibration amplitude pixel value is multiplied by the inverse of the pixel equivalent to obtain the actual physical amplitude. The pixel equivalent refers to the actual physical size represented by a pixel in the image.

[0058] The present embodiment provides a method for detecting product amplitude. The present embodiment first detects the product contour and determines the pixel value of the vibration amplitude by performing difference superposition on the vibration image of the product to be measured, and calculates the true amplitude according to the distance between the product to be measured and the camera device. The technical defects of low accuracy of contact measurement and high cost of non-contact measurement are overcome, and the accuracy of vibration measurement is ensured while reducing costs.

[0059] Based on the first embodiment, the second embodiment of the present application proposes a product amplitude detection method, referring to Figure 2 , step S110 includes: Step S210, performing a difference operation on the vibration images of adjacent frames of the product to be tested according to the preset dimension to determine a difference image.

[0060] In this embodiment, the preset dimension is a pre-set dimension for performing difference operation on the vibration image, including dimensions such as pixel value and grayscale value; adjacent frames refer to two adjacent frames, including two consecutive frames and two frames selected at a certain interval; the difference operation is to perform a difference operation on the preset dimension of the vibration image of adjacent frames, and the result is a difference image.

[0061] As an optional implementation, a difference operation of pixel values ​​is performed on images of adjacent frames, the difference of pixel values ​​of corresponding pixels is calculated, and a difference image is generated according to the difference operation result.

[0062] Exemplarily, two variables are initialized to store the vibration images of the current frame and the previous frame, and each frame in the vibration image is traversed. For each pair of adjacent frames in the sequence, the current frame is stored in the first variable and the previous frame is stored in the second variable. The adjacent frames stored in the two variables are subjected to a pixel-by-pixel difference operation, and the pixel value at the corresponding position of the previous frame is subtracted from each pixel value of the current frame, thereby obtaining a difference image of the two frames.

[0063] As another optional implementation, the vibration image is grayed to determine the gray image, grayscale values ​​of adjacent frames are subjected to grayscale value difference calculation, the difference in grayscale values ​​of corresponding pixels is calculated, and a difference image is generated based on the difference calculation result.

[0064] Exemplarily, the vibration image is grayed, the grayed result is filtered to obtain a gray image, the gray values ​​of two adjacent frames are subtracted to determine a difference image of the gray images of adjacent frames.

[0065] Prior to this, adjacent frames may be two adjacent frames or two frames extracted at a certain interval.

[0066] As an optional implementation, a fixed frame interval is determined, a vibration image is selected according to the interval, a pixel value difference operation is performed, the difference of the pixel values ​​of corresponding pixels is calculated, and a difference image is generated according to the difference operation result.

[0067] As another optional implementation, the vibration image is grayed out to determine the grayscale image, a fixed frame interval is determined, the grayscale image is selected based on the interval, a grayscale value difference operation is performed, the difference in grayscale values ​​of corresponding pixels is calculated, and a difference image is generated based on the difference operation result.

[0068] Optionally, in step S210, the preset dimension includes any one of the following: Step S211 , the preset dimension is the gray value, and a difference operation is performed on the gray-scale results of the vibration images of adjacent frames of the product to be tested to determine a gray value difference image.

[0069] In this embodiment, the gray value difference image is a difference image obtained by performing a gray value difference operation on the gray image converted from the vibration image.

[0070] As an optional implementation, the vibration image is grayed to determine the grayscale image, the grayscale images of adjacent frames are subjected to a grayscale value difference operation, the difference in the grayscale values ​​of corresponding pixels is calculated, the difference operation result is corroded to remove noise from the result, and then a dilation operation is performed to determine the difference image.

[0071] Step S212, the preset dimension is pixel value, and a difference operation is performed on the pixelization results of the vibration images of adjacent frames of the product to be tested to determine a pixel value difference image.

[0072] In this embodiment, the pixel value difference image is a difference image obtained by performing a pixel value difference operation based on the vibration image.

[0073] As an optional implementation, a pixel value difference operation is performed on the vibration images of adjacent frames to calculate the difference in pixel values ​​of corresponding pixels, an erosion operation is performed on the difference operation result to remove noise in the result, and then an expansion operation is performed to determine a difference image.

[0074] Step S220, superimposing the difference images according to a preset number to determine a difference superposition result.

[0075] In this embodiment, the preset number is the number of images to be superimposed that is preset; and superposition is to combine the preset number of difference images into a single image.

[0076] As an optional implementation, a preset number of difference images are selected, the difference images are superimposed, and a difference superposition result is determined.

[0077] Step S230, binarizing the result of the difference superposition to determine a superimposed image.

[0078] In this embodiment, the binarization process is to convert the result of difference superposition into an image containing only two pixel values.

[0079] As an optional implementation, the difference superposition result is binarized according to a preset threshold to determine a superposition image. The preset threshold is a suitable threshold selected in advance according to the difference superposition result, and the preset threshold is compared with the pixel in the superposition result, and the pixel value of the pixel is changed according to the comparison result to obtain a binarized superposition image.

[0080] Exemplarily, a suitable threshold is selected, each pixel of the superposition result is traversed, and compared with the threshold. According to the comparison result, the pixel values ​​of pixels less than or equal to the threshold are set to 0, and the pixel values ​​of pixels greater than the threshold are set to 255, so as to obtain the superposition image after binarization processing.

[0081] As another optional implementation, the difference superposition result of the grayscale image is binarized according to the grayscale average value of the local area of ​​the image as the threshold of the area to determine the superposition image.

[0082] As an example of an embodiment of the present application, turn on the camera of the detection equipment, open the test software, turn off the product to be tested and place it on the detection table, turn on the vibration function of the product to be tested, capture the vibration image of the product to be tested, use Gaussian filtering to reduce image noise, perform difference operation on the vibration images of the most recent 25 adjacent frames, perform open operation on the difference operation result to remove noise, save the difference operation result for superposition, select a fixed threshold, binarize the superposition result according to this threshold, emphasize the vibration area, detect the contour in the image, calculate the minimum inscribed rectangle of the contour with the largest area, calculate the vibration amplitude pixel value, vibration amplitude pixel value = rectangle width * contour area / minimum inscribed rectangle area, measure the distance between the product to be tested and the camera equipment, and calculate the amplitude through trigonometric functions according to the distance.

[0083] The present embodiment provides a product amplitude detection method. The present embodiment first performs a difference operation on the vibration image of the product to be tested through a preset dimension, which can effectively extract the changes in the vibration images of adjacent frames and obtain vibration information. By superimposing a preset number of difference operation results, false detections caused by random noise can be reduced. Through binarization processing, the boundary of the vibration area can be more clearly identified. The change area is first extracted through difference operation and superposition and then further processed, which can significantly improve the calculation efficiency.

[0084] Based on the first embodiment, the third embodiment of the present application proposes a product amplitude detection method, referring to Figure 3 , step S120 includes: Step S310: determining the target contour in the superimposed image.

[0085] In this embodiment, the target contour is the contour with the largest area in the superimposed image.

[0086] As an optional implementation, a function is used to detect contours in the superimposed image, a set of coordinate points of the contours is determined, features of the contours are determined based on the set of coordinate points, the area of ​​each contour is calculated, and the contour with the largest area is determined to be the target contour.

[0087] As another optional implementation, an edge detection algorithm is used to calculate the difference in grayscale value between each pixel in the grayscale value superposition image and its neighboring pixels, the edge position is identified, each contour is determined according to the edge position, the area of ​​each contour is calculated, and the contour with the largest area is determined to be the target contour.

[0088] Optionally, step S310 includes: Step S311, identifying all contours in the superimposed image.

[0089] In this embodiment, the contour is a boundary of a white or black pixel area identified based on the binarized superimposed image.

[0090] As an optional implementation, the boundaries of the white pixel areas in the image are identified by a contour detection algorithm, and the coordinate point set of the contour is returned to determine all contours.

[0091] Step S312: According to the area of ​​each contour, determine the contour with the largest area as the target contour.

[0092] In this embodiment, the area of ​​the contour is calculated by counting the number of pixels inside the contour.

[0093] As an optional implementation, the contour area is determined by calculating the number of pixels in each contour, and the areas of all contours are compared to determine the contour with the largest area as the target contour.

[0094] Step S320: Calculate the minimum inscribed rectangle area according to the target contour.

[0095] In this embodiment, the minimum inscribed rectangle refers to a rectangle that can completely contain the outline and has the smallest area.

[0096] As an optional implementation, the minimum inscribed rectangle is determined according to the target contour, and the area is calculated according to the width and height of the minimum inscribed rectangle.

[0097] Step S330: determining the pixel value of the vibration amplitude according to the minimum inscribed rectangle and the contour area of ​​the target contour.

[0098] In this embodiment, the contour area refers to the size of the region enclosed by the contour, which is measured in pixels and calculated by counting the number of pixels inside the contour.

[0099] As an optional implementation, the vibration amplitude pixel value is calculated according to the area of ​​the largest contour and the width and area of ​​the smallest inscribed rectangle in the superimposed image, and the formula is as follows:

[0100] As another optional implementation, the scale factor is determined by analyzing actual cases, and the pixel value of the vibration amplitude is calculated based on the scale factor and the area of ​​the contour with the largest area, where the pixel value of the vibration amplitude = maximum contour area * scale factor.

[0101] Optionally, step S330 includes: Step S331, determining the product of the width of the inscribed rectangle and the area of ​​the contour.

[0102] In this embodiment, the width of the inscribed rectangle is the width of the minimum inscribed rectangle of the target contour.

[0103] Step S332: determining the vibration amplitude pixel value based on the product and the area of ​​the minimum inscribed rectangle.

[0104] As an optional implementation, the calculation formula of the vibration amplitude pixel value is as follows:

[0105] This embodiment provides a product amplitude detection method. This embodiment first provides clear boundary information by determining the target contour in the superimposed image, and accurately quantifies the target contour by calculating the area of ​​the minimum inscribed rectangle. This method calculates the vibration amplitude pixel value without contact, greatly improving the accuracy of measurement and calculation.

[0106] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the amplitude detection method of the product of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0107] The present application provides a product amplitude detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the product amplitude detection method in the above-mentioned embodiment 1.

[0108] Reference below Figure 4, which shows a schematic diagram of the structure of a product amplitude detection device suitable for implementing the embodiment of the present application. The product amplitude detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The product amplitude detection device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0109] like Figure 4 As shown, the product amplitude detection device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the product amplitude detection device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the product amplitude detection device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a product amplitude detection device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0110] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0111] The product amplitude detection device provided by the present application adopts the product amplitude detection method in the above embodiment, which can solve the technical problem of how to reduce costs while ensuring the accuracy of vibration measurement. Compared with the prior art, the beneficial effects of the product amplitude detection device provided by the present application are the same as the beneficial effects of the product amplitude detection method provided by the above embodiment, and the other technical features in the product amplitude detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0112] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0113] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0114] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the product amplitude detection method in the above-mentioned embodiment.

[0115] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0116] The computer-readable storage medium may be included in the product amplitude detection device; or may exist independently without being assembled into the product amplitude detection device.

[0117] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the product amplitude detection device, the product amplitude detection device can write computer program codes for performing the operations of the present application in one or more programming languages ​​or a combination thereof. The programming languages ​​include object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

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

[0119] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0120] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned product amplitude detection method, and can solve the technical problem of how to reduce costs while ensuring the accuracy of vibration measurement. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the product amplitude detection method provided in the above-mentioned embodiment, and will not be repeated here.

[0121] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A product amplitude detection method, characterized in that: The product amplitude detection method comprises: Based on the vibration images of adjacent frames of the product to be tested, difference superposition is performed through a preset dimension to determine a superimposed image; Determining a vibration amplitude pixel value according to a contour area of ​​the superimposed image; Based on the vibration amplitude pixel value, the amplitude is calculated according to the distance between the product to be tested and the camera device.

2. The product amplitude detection method according to claim 1, characterized in that: The step of performing difference superposition based on the vibration images of adjacent frames of the product to be tested by preset dimensions to determine the superimposed image comprises: Performing a difference operation on the vibration images of adjacent frames of the product to be tested according to the preset dimension to determine a difference image; Superimposing the difference images according to a preset number to determine a difference superposition result; The result of the difference superposition is binarized to determine a superimposed image.

3. The product amplitude detection method according to claim 2, characterized in that: The step of performing a difference operation on the vibration images of adjacent frames of the product to be tested through the preset dimension to determine the difference image, wherein the preset dimension includes any one of the following: The preset dimension is a grayscale value, and a difference operation is performed on the grayscale results of the vibration images of adjacent frames of the product to be tested to determine a grayscale value difference image; The preset dimension is a pixel value, and a difference operation is performed on the pixelation results of the vibration images of adjacent frames of the product to be tested to determine a pixel value difference image.

4. The product amplitude detection method according to claim 1, characterized in that: The step of determining the pixel value of the vibration amplitude according to the contour area in the superimposed image comprises: Determining a target contour in the superimposed image; According to the target contour, calculating the minimum inscribed rectangle area; The vibration amplitude pixel value is determined according to the minimum inscribed rectangle and the contour area of ​​the target contour.

5. The product amplitude detection method according to claim 4, characterized in that: The step of determining the target contour in the superimposed image comprises: identifying all contours in the superimposed image; According to the area of ​​each contour, the contour with the largest area is determined as the target contour.

6. The product amplitude detection method according to claim 4, characterized in that: The step of determining the pixel value of the vibration amplitude according to the minimum inscribed rectangle and the contour area of ​​the target contour comprises: Determine the product of the width of the inscribed rectangle and the area of ​​the contour; The vibration amplitude pixel value is determined based on the product and the area of ​​the minimum inscribed rectangle.

7. The product amplitude detection method according to claim 1, characterized in that: The step of calculating the amplitude based on the vibration amplitude pixel value according to the distance between the product to be tested and the camera device comprises: Determining the magnification of the vibration image of the product to be tested according to the distance between the product to be tested and the camera device; The amplitude of the product to be tested is calculated according to the magnification factor and the vibration amplitude pixel value.

8. The product amplitude detection method according to claim 1, characterized in that: Before the step of performing difference superposition based on the vibration images of adjacent frames of the product to be tested through a preset dimension to determine the superimposed image, the method includes: Place the product to be tested on the testing table and turn on the vibration state; The vibration image of each frame of the product to be tested is collected by the camera device.

9. A product amplitude detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the product amplitude detection method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the product amplitude detection method according to any one of claims 1 to 8 are implemented.