A face size determination method and apparatus
By acquiring the tilt angle and pixel value of a circular reference object, and combining different image acquisition distances and multi-camera technology, the problem of low accuracy in face size measurement was solved, enabling more accurate mask selection and improved wearing comfort.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BMC (TIANJIN) MEDICAL CO LTD
- Filing Date
- 2021-01-25
- Publication Date
- 2026-06-05
AI Technical Summary
The current technology has low accuracy in measuring facial dimensions, and existing methods cannot accurately obtain the 3D contour information of the patient's face, resulting in an unsuitable mask selection, which affects the treatment effect and wearing comfort.
By acquiring facial images of the target object, obtaining the tilt angle and pixel values of a circular reference object, and combining the actual size and pixel ratio, the facial size is determined; the facial size is calculated using different image acquisition distances and focal lengths; and the facial size is determined by using a multi-camera device to obtain the incident tilt angle and camera distance.
It improves the accuracy of face size measurement, simplifies the measurement operation, reduces manual measurement errors, and ensures the suitability of mask selection.
Smart Images

Figure CN117292416B_ABST
Abstract
Description
[0001] This application is a divisional application of invention patent application 202110100112.4, filed on January 25, 2021, entitled "A method and apparatus for determining face size". Technical Field
[0002] This invention relates to the field of image processing technology, and in particular to a method and apparatus for determining face size. Background Technology
[0003] Non-invasive positive pressure ventilation (CPAP) is widely used for conditions such as obstructive sleep apnea syndrome (OSA) and chronic obstructive pulmonary disease (COPD). It eliminates the need for surgical insertion of a tube into the patient's airway. Instead, a blower delivers continuous pressure ventilation (CPAP) or variable pressure ventilation (VPS) through tubing and a patient interface device. VPS can be bi-level pressure (BLP) that varies with the patient's respiratory cycle or autoregulatory pressure (APP) that changes based on patient monitoring. This pressure support therapy is also commonly used for conditions such as obstructive sleep hypoventilation, upper airway resistance syndrome (UARS), or congestive heart failure.
[0004] Non-invasive ventilation therapy involves an interface device on the patient's face, typically a mask that surrounds the patient's nose and mouth to form a seal. During treatment, an external blower, such as a ventilator, acts as a pressure support device. The patient interface device connects the gas pressure provided by the ventilator to the patient's airway, delivering airflow into the patient's airway.
[0005] To accommodate different facial sizes, face masks are typically available in large, medium, and small sizes. For more effective treatment, it's crucial to select a mask that fits the patient's face size. Using an ill-fitting mask can cause air leaks, affecting comfort and reducing treatment effectiveness. Therefore, easily and quickly measuring the patient's face size to select the appropriate mask is extremely important. For patients with facial deformities, standard-sized masks are unsuitable. Custom-made masks based on the patient's facial contours are necessary. In such cases, easily and quickly obtaining the patient's 3D facial contour information is essential.
[0006] The selection or personalized design of medical face masks mostly uses, for example... Figure 1 The nasal measuring card shown is used to measure nasal width. In existing technologies, nasal measuring cards used to measure nasal width are mostly cards with a sizing to accommodate the patient's nose. For example... Figure 1 The nasal measurement card shown has three grooves (10-12) for small (S), medium (M), and large (L) masks, depending on the applicable mask size. Below each groove is a corresponding size label 2. In use, the patient places the nasal measurement card on their nose and selects the appropriate mask size based on the size label 2.
[0007] In existing technologies, the selection of medical face masks or the personalized design of medical face masks can also utilize, for example... Figure 2 The diagram shows the direct measurement of specific dimensions of the patient's face using measuring tools such as a ruler (e.g., Figure 2 (5 dimensions in the face). Based on these dimensions, the mask can be selected or customized.
[0008] The existing method of measuring nasal width using a nasal measuring card can only provide an approximate range of the patient's nasal width, making it unsuitable for personalized mask customization. Furthermore, when using only nasal width for mask selection, the factors considered are limited, which may result in unsuitable fits in other areas such as the bridge of the nose or chin.
[0009] The existing method of directly measuring the patient's face size with a ruler is cumbersome to record data, troublesome to operate, and prone to large errors due to manual measurement.
[0010] There is currently no effective solution to the above problems. Summary of the Invention
[0011] This invention provides a method and apparatus for determining face size, which can accurately measure the face size of the target to be measured, thereby solving the technical problem of low accuracy in face size measurement in the prior art.
[0012] In a first aspect, embodiments of the present invention provide a method for determining face size, the method comprising: collecting a first face image of a target to be tested, wherein the first face image includes the first face of the target to be tested and a circular reference object; obtaining a first pixel value of the first face to be tested and a second pixel value of the circular reference object; if the roundness of the circular reference object is greater than a preset roundness threshold, obtaining the standard major axis of the circular reference object, wherein the standard major axis is the longest diameter of the circular reference object when the roundness is greater than the preset roundness threshold; obtaining the median of the circular reference object. The first major axis in the first direction and the second major axis in the second direction are defined as follows: the first direction is the straight line connecting the centers of the two eyes in the first face image, and the second direction is the straight line connecting the center of the eyebrows and the tip of the nose in the first face image; the horizontal tilt angle of the circular reference object is determined based on the standard major axis and the first major axis; the vertical tilt angle of the circular reference object is determined based on the standard major axis and the second major axis; and the first size of the first face to be tested is determined based on the first pixel value, the second pixel value, the horizontal tilt angle, the vertical tilt angle, and the actual size of the circular reference object.
[0013] Secondly, embodiments of the present invention also provide a method for determining face size, the method comprising: acquiring a second face image and a third face image of a target to be tested using a second image acquisition device, wherein the image acquisition distance of the second face image to be tested is different from that of the third face image to be tested; obtaining a second pixel value in the second face image to be tested and a third pixel value in the third face image to be tested; and determining a second size of the second face of the target to be tested based on the difference in image acquisition distance between the second face image to be tested and the third face image to be tested, the focal length of the second image acquisition device, the second pixel value, and the third pixel value.
[0014] Thirdly, embodiments of the present invention also provide a method for determining face size, the method comprising: acquiring a fourth face image of the target to be tested using a third image acquisition device, wherein the image acquisition device includes at least two cameras; acquiring at least two sets of incident tilt angles corresponding to information acquisition points in the fourth face image to be tested, wherein the incident tilt angles are obtained based on the third image acquisition device when the information acquisition points diffusely reflect light into the at least two cameras; determining the position of the information acquisition point according to the at least two sets of incident tilt angles and the camera distance between the at least two cameras; and determining a third size of the third face to be tested in the fourth face image to be tested according to the position of the information acquisition point.
[0015] Fourthly, embodiments of the present invention also provide a method for determining a mask model, the method comprising: obtaining a target face size according to the face size determination method described in any one of the first, second, and third aspects; and determining the mask model of the target to be tested according to multiple sets of preset mask reference values and the target face size, wherein the multiple sets of mask reference values correspond to multiple mask models respectively.
[0016] Fifthly, embodiments of the present invention also provide a face size determination device, the device comprising: a first acquisition unit, configured to acquire a first face image of a target to be tested, wherein the first face image includes the first face of the target to be tested and a circular reference object; a first acquisition unit, configured to acquire a first pixel value of the first face to be tested and a second pixel value of the circular reference object; a second acquisition unit, configured to acquire the tilt angle of the circular reference object when the roundness of the circular reference object is greater than a preset roundness threshold; and a first determination unit, configured to determine a first size of the first face to be tested based on the first pixel value, the second pixel value, the tilt angle, and the actual size of the circular reference object.
[0017] Sixthly, embodiments of the present invention also provide a face size determination device, the device comprising: a second acquisition unit, configured to acquire a second face image and a third face image of a target to be tested respectively through a second image acquisition device, wherein the image acquisition distance of the second face image to be tested is different from the image acquisition distance of the third face image to be tested; a third acquisition unit, configured to acquire a second pixel value in the second face image to be tested and a third pixel value in the third face image to be tested; and a second determination unit, configured to determine a second size of the second face of the target to be tested based on the difference in image acquisition distance between the second face image to be tested and the third face image to be tested, the focal length of the second image acquisition device, the second pixel value, and the third pixel value.
[0018] In a seventh aspect, embodiments of the present invention also provide a face size determination device, the device comprising: a third acquisition unit, configured to acquire a fourth face image of the target to be tested via a third image acquisition device, wherein the image acquisition device includes at least two cameras; a fourth acquisition unit, configured to acquire at least two sets of incident tilt angles corresponding to information acquisition points in the fourth face image to be tested, wherein the incident tilt angles are obtained based on the third image acquisition device when the information acquisition points diffusely reflect light into the at least two cameras; a third determination unit, configured to determine the position of the information acquisition point based on the at least two sets of incident tilt angles and the camera distance between the at least two cameras; and a fourth determination unit, configured to determine a third size of the third face to be tested in the fourth face image to be tested based on the position of the information acquisition point.
[0019] The embodiments of the present invention have the following advantages:
[0020] In this embodiment of the invention, a first image of a target face is acquired, comprising the target face and a circular reference object. A first pixel value of the target face and a second pixel value of the circular reference object are obtained. If the roundness of the circular reference object is greater than a preset roundness threshold, the horizontal and vertical tilt angles of the circular reference object are obtained based on its standard major axis. A first size of the target face is determined based on the first pixel value, the second pixel value, the horizontal tilt angle, the vertical tilt angle, and the actual size of the circular reference object. By using the proportional relationship between the actual size of the circular reference object and the pixel values in the first image of the target face, and by determining the first size of the target face based on the tilt angle of the circular reference object, the measurement operation steps in the prior art are simplified, and the accuracy of face size measurement is improved.
[0021] Furthermore, in another embodiment of the present invention, a second image acquisition device acquires a second and a third image of the target face to be measured, wherein the image acquisition distance of the second and third image of the target face is different; the second pixel value in the second image of the target face and the third pixel value in the third image of the target face are obtained; based on the difference in image acquisition distance between the second and third image of the target face, the focal length of the second image acquisition device, the second pixel value, and the third pixel value, the second size of the target face to be measured is determined. By capturing multiple image images of the target face at different image acquisition distances, and then determining the second size of the target face to be measured based on the difference in image acquisition distance and the pixel values of the different image images, the accuracy of measuring face size is further improved.
[0022] Furthermore, in another embodiment of the present invention, a fourth face image of the target to be tested is acquired by a third image acquisition device, wherein the image acquisition device includes at least two cameras; at least two sets of incident tilt angles corresponding to the information acquisition points in the fourth face image to be tested are obtained, wherein the incident tilt angles are obtained based on the third image acquisition device when the information acquisition points diffusely reflect light into the at least two cameras; the position of the information acquisition point is determined according to the at least two sets of incident tilt angles and the camera distance between the at least two cameras; the third size of the third face to be tested in the fourth face image to be tested is determined according to the position of the information acquisition point, avoiding manual measurement of the face using a ruler, simplifying the measurement operation, and at the same time, the third size of the third face to be tested can be determined based on the camera distance between the cameras by using the fourth face image to be tested captured by multiple lenses, ensuring the accuracy of the face size measurement. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A schematic diagram of a nose measurement card in the related art is shown;
[0025] Figure 2 A schematic diagram is shown of a related technology that uses measuring tools such as a ruler to directly measure specific dimensions of a patient's face;
[0026] Figure 3 A flowchart of a face size determination method according to the present invention is shown;
[0027] Figure 4 A schematic diagram of a first face image to be tested at a non-standard angle according to the present invention is shown;
[0028] Figure 5 A schematic diagram of a first test face image containing a circular reference object with a roundness greater than a preset threshold is shown according to the present invention.
[0029] Figure 6 A schematic diagram of a circular reference object with a roundness greater than a preset threshold is shown according to the present invention.
[0030] Figure 7 A schematic diagram of a first face image to be tested at a standard angle according to the present invention is shown;
[0031] Figure 8 A flowchart of a second embodiment of the method for determining face size according to the present invention is shown;
[0032] Figure 9 A schematic diagram of a second image acquisition device of the present invention acquiring images of a human face at different image acquisition distances is shown.
[0033] Figure 10 A flowchart of a third embodiment of the method for determining face size according to the present invention is shown;
[0034] Figure 11 A schematic diagram of a method for obtaining the incident tilt angle of an information acquisition point based on a dual-camera image acquisition device according to the present invention is shown;
[0035] Figure 12 A schematic diagram illustrating the present invention provides a method for acquiring distances between multiple information acquisition points using a dual-camera image acquisition device.
[0036] Figure 13 A schematic diagram of a method for determining face size based on a three-camera image acquisition device according to the present invention is shown;
[0037] Figure 14 A schematic diagram of a face model of a target under test is shown in an embodiment of the present invention;
[0038] Figure 15 A structural block diagram of a face size determination device according to a first embodiment of the present invention is shown;
[0039] Figure 16 A structural block diagram of a second embodiment of the face size determination device of the present invention is shown;
[0040] Figure 17 A structural block diagram of a third embodiment of the face size determination device of the present invention is shown;
[0041] Figure 18 A structural block diagram of an electronic device according to the present invention is shown. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] Method Example 1
[0044] Reference Figure 3 The flowchart illustrates a method for determining face size according to the present invention, which may specifically include:
[0045] Step 301: Acquire the first test face image of the target to be tested, wherein the first test face image includes the first test face of the target to be tested and a circular reference object;
[0046] Step 302: Obtain the first pixel value of the first face to be tested and the second pixel value of the circular reference object;
[0047] Step 303: When the roundness of the circular reference object is greater than a preset roundness threshold, obtain the standard major axis of the circular reference object, wherein the standard major axis is the longest diameter of the circular reference object when the roundness is greater than the preset roundness threshold.
[0048] Step 304: Obtain the first major axis in the first direction and the second major axis in the second direction of the circular reference object, wherein the first direction is the straight line connecting the centers of the two eyes in the first face image, and the second direction is the straight line connecting the center of the eyebrows and the tip of the nose in the first face image.
[0049] Step 305: Determine the horizontal tilt angle of the circular reference object based on the standard major axis and the first major axis; determine the vertical tilt angle of the circular reference object based on the standard major axis and the second major axis;
[0050] Step 306: Determine the first size of the first face to be tested based on the first pixel value, the second pixel value, the horizontal tilt angle, the vertical tilt angle, and the actual size of the circular reference object.
[0051] In this embodiment, a first image of the target face is acquired. This first image can be a full or partial photograph of the human body. The first image includes the face to be measured and a preset reference object. Examples include a full-body photograph, an upper-body photograph, a head or face photograph, etc. In this embodiment, no limitation is made. The first image acquisition device in this embodiment generally acquires a planar image of the target face. The first image acquisition device includes, but is not limited to, a camera, a video camera, and other devices with image acquisition capabilities.
[0052] In this embodiment, circular reference objects include, but are not limited to, coins, circular cup lids, and discs. Furthermore, preset reference objects also include, but are not limited to, circular stickers of known dimensions. In this embodiment, there are no limitations on the specific type or shape of the circular reference object. In this embodiment, roundness is the difference in radii between two concentric circles that encompass the actual outline of the same cross-section and have the smallest possible radius difference. The smaller the value, the closer it is to a standard circle; the larger the value, the further it deviates from a standard circle.
[0053] Furthermore, if the circular reference object is less than or equal to a preset roundness threshold, then the plane of the current circular reference object is considered parallel to the plane where the image acquisition device is located. Figure 4 The circular reference object is placed on the forehead. In specific applications, the circular reference object includes, but is not limited to, coins, circular stickers, etc. When the image acquisition angle of the acquisition device is a standard angle when acquiring the first image of the face to be tested, for example, when the central axis of the camera lens is perpendicular to the plane of the circular reference object, or when the plane of the camera is parallel to the plane of the circular reference object, the circular reference object will appear as a standard circle in the first image of the face to be tested.
[0054] When the image acquisition angle of the first face image of the target being measured is non-standard when the acquisition device acquires the image, the roundness of the circular reference object is greater than the preset roundness threshold. Therefore, it is necessary to obtain the tilt angle of the circular reference object. Figure 5 The diagram illustrates a first face image to be measured at a non-standard angle according to the present invention. When the image acquisition angle is non-standard, the roundness of the circular reference object will increase, and the circular reference object will appear as an ellipse. If the first size of the first face is determined based on the pixel value and actual size of the circular reference object, a measurement deviation will occur.
[0055] If the roundness of the circular reference object exceeds a preset roundness threshold, and the first face to be tested, including the circular reference object, is determined to have been captured at a non-standard angle, then the image of the first face to be tested is considered a projection onto a photograph / film. Therefore, it is necessary to determine the tilt angle of the circular reference object to correct for tilt deviation. Thus, if the roundness of the circular reference object in the first face to be tested image exceeds the preset roundness threshold, the tilt angle of the circular reference object must be determined. After determining the tilt angle, the first size of the first face to be tested is then determined based on the tilt angle.
[0056] In other examples of this embodiment, the coin placed on the forehead of the target is replaced with a credit card, or it can be a round, non-standardized object whose size is easy to measure (including but not limited to a round piece of paper). The implementation and calculation process of other examples in this embodiment are the same as the principle of using a coin as a preset reference object, and will not be repeated here.
[0057] It should be noted that, through this embodiment, a first test face image of the target to be tested is acquired, wherein the first test face image includes the first test face of the target to be tested and a circular reference object; the first pixel value of the first test face and the second pixel value of the circular reference object are obtained; when the roundness of the circular reference object is greater than a preset roundness threshold, the tilt angle of the circular reference object is obtained; wherein the tilt angle includes a vertical tilt angle and a horizontal tilt angle.
[0058] In this embodiment, when the roundness is greater than a preset roundness threshold, the tilt angle of the circular reference object is determined, including but not limited to: obtaining the standard major axis of the circular reference object, wherein the standard major axis is the longest diameter of the circular reference object when the roundness is greater than the preset roundness threshold; and obtaining the first major axis in the first direction and the second major axis in the second direction of the circular reference object, wherein the first direction is the straight line connecting the centers of the two eyes in the first face image, and the second direction is the straight line connecting the center of the eyebrows and the tip of the nose in the first face image; determining the horizontal tilt angle of the circular reference object based on the standard major axis and the first major axis; and determining the vertical tilt angle of the circular reference object based on the standard major axis and the second major axis.
[0059] Specifically, refer to Figure 4 The diagram illustrates a first test face image with a coin as the preset reference object. This is due to the tilt angle between the first image acquisition device and the test face during the acquisition of the first test face image. The photograph can be considered as a projection of the first test face contour onto the paper plane (the plane containing the negative or film). In the projection direction, the aforementioned tilt angle can be considered to consist of a horizontal tilt angle α and a vertical tilt angle β. Figure 4 As shown, in the plane of the target face, the line connecting the centers of the two eyes is defined as l1, and the line connecting the center of the eyebrows, the tip of the nose, and the philtrum (the indentation in the center above the upper lip) is defined as l2. In spatial coordinates, the horizontal tilt angle α refers to the angle between l1 in the face plane and its projection onto the paper plane, and the vertical tilt angle β refers to the angle between l2 in the face plane and its projection onto the paper plane.
[0060] Reference Figure 5 as well as Figure 6 ,in, Figure 5 The diagram illustrates a first test face image comprising a circular reference object with a roundness greater than a preset threshold, according to the present invention. Figure 6 A schematic diagram of a circular reference object according to the present invention is shown. The pixel value g of the standard major axis (diameter of the longest direction of the circular reference object) of the circular reference object in the photograph is identified; the pixel value k of the circular reference object along the l1 direction in the first test face image is identified; and the pixel value i of the circular reference object along the l2 direction in the first test face image is identified. It is readily apparent that the pixel value g of the standard major axis of the circular reference object is equal to the pixel value of the diameter when there is no tilt angle (the camera and face plane are parallel). It can be understood that the pixel value k is equal to the projection of the major axis pixel value g in the l1 direction, and the pixel value i is equal to the projection of the major axis pixel value g in the l2 direction. Therefore, the horizontal tilt angle and the vertical tilt angle can be determined by the following formula:
[0061]
[0062]
[0063] The first size of the first face to be measured is determined based on the first pixel value, the second pixel value, the tilt angle, and the actual size of the circular reference object. By using the proportional relationship between the actual size of the circular reference object and the pixel values in the image of the first face to be measured, and by determining the first size of the first face to be measured based on the tilt angle of the circular reference object, the measurement operation steps in the prior art are simplified, and the accuracy of face size measurement is improved.
[0064] Optionally, in this embodiment, the method includes, but is not limited to: determining the first size based on the first pixel value, the second pixel value, and the actual size when the roundness is less than or equal to a preset roundness threshold.
[0065] Specifically, in one example, refer to Figure 7 The diagram illustrates a standard angle first test face image of the present invention. It uses a standardized coin as a preset reference. When acquiring the first test face image at the standard angle, the coin is pressed against the center of the forehead of the test target. Since the coin is pressed against the center of the forehead, it can be understood that the coin and the face are in the same plane. As a known condition, the diameter of a one-yuan coin is 22.25 mm. When acquiring the image at the standard angle, it can be assumed that the camera is parallel to the plane containing the test target's face. In this case, the pixel value f of the coin's diameter in the first test face image is measured. Based on the ratio of the actual size to the pixel value in the first test face image, we can obtain:
[0066]
[0067] Using the above formula, the actual dimensions of each specific location in the first face to be tested can be obtained:
[0068]
[0069] Through the above example, when the roundness of the circular reference object is less than the preset roundness threshold, the first size of the first face to be tested can be determined based on the first pixel value, the second pixel value, and the actual size of the circular reference object, thereby improving the accuracy of the obtained face size.
[0070] Optionally, in this embodiment, the first size of the face to be tested is determined based on the first pixel value, the second pixel value, and the actual size of the preset reference object, including but not limited to: determining the first size based on the first pixel value, the second pixel value, the horizontal tilt angle, the vertical tilt angle, and the actual size.
[0071] Specifically, taking a one-yuan coin as the circular reference point, the diameter of the one-yuan coin is 22.25 mm. Figure 4Based on the ratio between the actual size of a one-yuan coin and the pixel value, it is easy to obtain the projection distance between the centers of the two eyes on l1 as follows:
[0072] The actual distance between the centers of the two eyes in space is:
[0073]
[0074] In formula (5) Substituting, we get:
[0075]
[0076] Similarly, based on Figure 5 We can obtain:
[0077]
[0078] Optionally, in this embodiment, before acquiring the first face image of the target to be tested, the method includes, but is not limited to: displaying auxiliary lines on the image preview interface of the first image acquisition device used to acquire the first face image to be tested, wherein the auxiliary lines are used to indicate the spatial position and image acquisition angle of the first image acquisition device.
[0079] Specifically, to effectively reduce the errors caused by acquiring images of the target face at non-standard image acquisition angles, shooting assistance measures can be set on the first image acquisition device. For example, when acquiring an image of the target face, auxiliary lines can be displayed in the lens image preview screen to guide the user to adjust the camera position to reduce the aforementioned horizontal and vertical tilt angles. These auxiliary lines can be horizontal lines, guiding the user to align their eyes with the horizontal line when shooting; or they can be rectangular or circular auxiliary lines with similar functions, to place a preset reference object within the range of the auxiliary lines, etc.
[0080] Optionally, in this embodiment, the circular reference object includes, but is not limited to, the iris in the first face image to be tested.
[0081] This embodiment acquires a first image of the target face, including the target face and a circular reference object. It obtains a first pixel value of the target face and a second pixel value of the circular reference object. If the roundness of the circular reference object exceeds a preset roundness threshold, its tilt angle is obtained. Based on the first pixel value, the second pixel value, the tilt angle, and the actual size of the circular reference object, a first size of the target face is determined. By using the ratio between the actual size of the circular reference object and the pixel values in the first image of the target face, and by determining the first size of the target face based on the tilt angle of the circular reference object, the measurement operation steps in the prior art are simplified, and the accuracy of face size measurement is improved.
[0082] Method Example 2
[0083] Reference Figure 8 The flowchart illustrates a second embodiment of the method for determining face size according to the present invention, which may specifically include:
[0084] Step 801: Acquire the second and third face images of the target under test using the second image acquisition device, respectively. The image acquisition distance of the second face image and the image acquisition distance of the third face image are different.
[0085] Step 802: Obtain the second pixel value in the second face image to be tested and the third pixel value in the third face image to be tested;
[0086] Step 803: Determine the second size of the second face of the target to be tested based on the difference in image acquisition distance between the second face image to be tested and the third face image to be tested, the focal length of the second image acquisition device, the second pixel value, and the third pixel value.
[0087] In this embodiment, the second and third face images of the target to be measured include, but are not limited to, full or partial photos of the human body. The second or third face images include the second face to be measured, such as a full-body photo, an upper-body photo, a head or face photo, etc. In this embodiment, no specific photo type is limited.
[0088] In this embodiment, the second image acquisition device generally acquires a planar image of the target to be tested. This second image acquisition device includes, but is not limited to, cameras, video cameras, and other devices with image acquisition capabilities. It should be noted that during the acquisition of the second and third face images of the target, the image acquisition distances for the second and third face images are different, but the image acquisition angles are the same. To maintain the accuracy of the acquired second face size, the camera needs to be kept parallel to the face plane of the second face to be tested.
[0089] In addition, optionally, in this embodiment, the second and third face images to be tested are obtained by the second image acquisition device at two different distances. It may also include, but is not limited to, at least two face images obtained by the second image acquisition device at at least two different distances, such as the second and third face images to be tested and other face images to be tested obtained at three different distances. By acquiring multiple face images to be tested, the accuracy of the actual measurement of the second face to be tested can be increased and errors can be reduced.
[0090] Reference Figure 9 This diagram illustrates a second image acquisition device of the present invention acquiring images of a face under test at different image acquisition distances. The camera in the image acquisition device is essentially a convex lens. The point where a beam of parallel light converges after passing through a convex lens is called the focal point, and the distance from the focal point to the center of the convex lens is called the focal length, denoted by the letter f. The focal length f of the camera is determined by the curvature of the convex lens itself; convex lenses with different curvatures have different focal lengths f. The focal length f of commonly used video cameras or camera lenses can be obtained from the product manual or manufacturer, or it can be preset. During image acquisition, the distance from the target to the center of the convex lens of the camera is the image acquisition distance μ; the distance from the film (imaging point) to the center of the convex lens of the camera is the image distance υ. When the second image acquisition device is working, the object is beyond twice the focal length (μ>2f), and the film (imaging point) is between one and two times the focal length (f<υ<2f), forming an inverted, reduced image.
[0091] exist Figure 9 In the example, the second face of the target being tested, containing a specified object of size h, at position 1 with an image acquisition distance of μ1, has an image size of n at point A, with an image distance of υ1. At position 2 with an image acquisition distance of μ2, the image size at point B is n′, with an image distance of υ2. Based on the principle of convex lens imaging, we can deduce:
[0092]
[0093]
[0094] exist Figure 9 In this case, by the principle of similarity of right triangles, we can obtain:
[0095]
[0096]
[0097] In most cases, measuring the image acquisition distances μ1 and μ2 is relatively complicated. Let's define the difference between the two image acquisition distances as:
[0098] △X=μ1-μ2 (14)
[0099] By combining equations (10) and (14), the dimensions of the object can be obtained:
[0100]
[0101] As can be seen from formula (15), by measuring the difference ΔX between the image acquisition distances, and the dimensions n and n′ of the same object on two different images, the true size of the specified object in the second face to be tested can be estimated. It is understandable that when the object size h is multiple feature sizes of the patient's face surface, the true size of multiple features can be estimated separately.
[0102] In practical applications, when dimensional accuracy requirements are not high, the image distance υ2 is approximately equal to the focal length f (υ2≈f). This allows for the estimation of the image acquisition distance from a specified object to the camera.
[0103]
[0104] When the specified object is a small feature of the target to be measured, the distance from the small feature to the camera can be estimated.
[0105] Similarly, the image acquisition distance of each small feature (e.g., point feature, line feature) of the target's face can be estimated to the camera. By processing the image distances of each point feature and line feature of the target's face to the camera, a 3D contour map of the target's face can be obtained, thus yielding the second dimension of the target's second face.
[0106] Optionally, in this embodiment, the second image acquisition device acquires the second and third face images of the target to be tested, including but not limited to: determining the image acquisition distance difference based on the first position sensor in the second image acquisition device and the second position sensor in the target to be tested.
[0107] Specifically, a first position sensor and a second position sensor are respectively set in the second image acquisition device and the target to be tested. The first image acquisition distance corresponding to the second face image to be tested and the second image acquisition distance corresponding to the third face image to be tested are determined by the first position sensor and the second position sensor. Then, the difference between the first image acquisition distance and the second image acquisition distance is obtained.
[0108] It should be noted that the first and second position sensors in this embodiment include, but are not limited to, positioning sensors, infrared sensors, etc. When the first and second position sensors are positioning sensors, the real-time positions of the image acquisition device and the target under test can be determined based on the first and second position sensors, thereby determining the image acquisition distance difference. When the first and second position sensors are infrared sensors, the distance between the first and second position sensors can be obtained, thereby determining the image acquisition distance difference. In this embodiment, no specific category is limited for the first and second position sensors.
[0109] Optionally, in this embodiment, the second image acquisition device acquires a second face image and a third face image of the target to be tested, respectively, including but not limited to: after acquiring the second face image of the target to be tested by the second image acquisition device, controlling the second image acquisition device to move a first distance, wherein the first distance is the same as the difference distance between the image acquisition distances; or, after acquiring the second face image of the target to be tested by the second image acquisition device, controlling the target to be tested to move a first distance.
[0110] Specifically, in this embodiment, there are two ways to change the image acquisition distance: the first way is to keep the position of the target unchanged and move the second image acquisition device a first distance relative to the target; the second way is to keep the position of the second image acquisition device unchanged and control the target to move a first distance relative to the second image acquisition device. It should be noted that after the second image acquisition device or the target moves a first distance, it is necessary to keep the camera in the second image acquisition device parallel to the face plane of the target.
[0111] In this embodiment, a second image acquisition device acquires a second and a third image of the target face, respectively, with the acquisition distances of the second and third image faces differing. The second pixel value in the second image and the third pixel value in the third image are obtained. Based on the difference in acquisition distances between the second and third image faces, the focal length of the second image acquisition device, the second pixel value, and the third pixel value, the second size of the target face is determined. By capturing multiple face images of the target face at different acquisition distances, and then determining the second size of the second face face using the difference in acquisition distances and the pixel values of the different face images, the accuracy of face measurement is further improved.
[0112] Method Example 3
[0113] Reference Figure 10 The flowchart of a third embodiment of the method for determining face size according to the present invention is shown, which may specifically include:
[0114] Step 1001: Acquire a fourth face image of the target to be tested using a third image acquisition device, wherein the image acquisition device includes at least two cameras;
[0115] Step 1002: Obtain at least two sets of incident tilt angles corresponding to the information collection points in the fourth face image to be tested. The incident tilt angles are obtained based on the third image acquisition device when the information collection points diffusely reflect light into at least two cameras.
[0116] Step 1003: Determine the location of the information collection point based on at least two sets of incident tilt angles and the camera distance between at least two cameras;
[0117] Step 1004: Determine the third size of the third face in the fourth face image to be tested based on the location of the information collection point.
[0118] In this embodiment, the fourth face image to be tested includes, but is not limited to, a full or partial photograph of the human body. The fourth face image to be tested includes a third face to be tested that needs to be measured, such as a full-body photograph, an upper-body photograph, a head or face photograph, etc. In this embodiment, no specific photograph type is limited.
[0119] The third image acquisition device in this embodiment includes, but is not limited to, cameras, video cameras, and other devices with image acquisition functions. The third image acquisition device includes at least two cameras, each with data processing capabilities, capable of acquiring the incident angle of light. Preferably, the at least two cameras in the third image acquisition device are arranged in a preset layout. For example, in the case of a dual-camera image acquisition device, the line connecting the two cameras is a vertical or horizontal line, parallel to the plane containing the face of the target object. In the case of an image acquisition device with three or more cameras, all three or more cameras are arranged on the same plane, positioned at the vertices of a polygon. The number of sides of the polygon is the same as the number of cameras. For example, in a three-camera image acquisition device, the three cameras are positioned at the vertices of a triangle; the four cameras are positioned at the vertices of a square.
[0120] In this embodiment, the camera in the third image acquisition device has a data processing function and can obtain the incident tilt angle of light. In fact, the distance between multiple cameras can be obtained by the position layout of the cameras in the third image acquisition device. Then, the position of the information acquisition point can be determined based on the distance between multiple cameras and the information acquisition point in the face of the target being tested.
[0121] In specific application scenarios, multiple information collection points are pre-set on the face of the target being tested. By acquiring the positions of these multiple information collection points, a 3D model of the target's face is established. The number and specific locations of the information collection points can be set based on practical experience. For example, the information collection points can be set according to the needs of the breathing mask in actual applications, such as the distance between the eyes, the distance from the tip of the nose to the eyes, and the height of the bridge of the nose. This embodiment does not impose any limitations on these aspects.
[0122] Optionally, in this embodiment, the third image acquisition device includes a first camera and a second camera, and the information acquisition points include the first endpoint and the second endpoint of the preset connection line of the fourth face image to be tested. The acquisition of at least two sets of incident tilt angles corresponding to the information acquisition points in the fourth face image to be tested includes, but is not limited to: acquiring the incident tilt angle corresponding to the first endpoint and the incident tilt angle corresponding to the second endpoint. The preset connection line is parallel to the connection line of the first camera and the second camera.
[0123] Specifically, when the third image acquisition device contains only two cameras, the distance between the acquired information acquisition points and the first and second cameras is actually a relative distance. The line connecting the first and second cameras is parallel to a preset line, and the information acquisition points within this preset line lie within the plane formed by the first camera, the second camera, the first endpoint, and the second endpoint. The relative positions of the first and second endpoints are determined by acquiring the incident tilt angles of at least two information acquisition points within the preset line—the first endpoint and the second endpoint—using the third image acquisition device with two cameras.
[0124] Optionally, in this embodiment, obtaining the incident tilt angle corresponding to the first endpoint and the incident tilt angle corresponding to the second endpoint includes, but is not limited to: obtaining the first incident tilt angle of the first endpoint entering the first camera and the second incident tilt angle of the first endpoint entering the second camera; obtaining the third incident tilt angle of the second endpoint entering the first camera and the fourth incident tilt angle of the second endpoint entering the second camera.
[0125] Specifically, refer to Figure 11 This diagram illustrates a method for obtaining the incident tilt angle of an information acquisition point based on a dual-camera image acquisition device according to the present invention. A dual-lens processing system is used to obtain the size information of the target to be measured. The dual-camera image acquisition device includes camera A and camera B, and has data processing capabilities. The distance between camera A and camera B is a known condition, denoted by the letter 'd'. Cameras A and B can capture light and sense the incident tilt angle of the light. The face of the target to be measured is taken as the first endpoint M in a preset line, and its diffusely reflected light enters camera A and camera B respectively. Camera A captures the light ray MA from the first endpoint M and calculates its incident tilt angle γ; camera B captures the light ray MB from the first endpoint M and calculates its incident tilt angle λ. Based on the same logic and calculation method as the first endpoint M, the incident tilt angle of the second endpoint in the preset line can also be obtained, which will not be elaborated here.
[0126] Optionally, in this embodiment, the location of the information collection point is determined based on at least two sets of incident tilt angles and the camera distance between at least two cameras, including but not limited to: determining a first distance between the first endpoint and the first camera based on the first incident tilt angle, and determining a second distance between the first endpoint and the second camera based on the first incident tilt angle; determining a third distance between the second endpoint and the first camera based on the second incident tilt angle, and determining a fourth distance between the second endpoint and the second camera based on the second incident tilt angle; establishing a planar coordinate system based on the straight line where the first camera and the second camera are located; determining the planar coordinate position of the first endpoint based on the first distance, the second distance, the first incident tilt angle, the second incident tilt angle, and the camera distance in the planar coordinate system; and determining the planar coordinate position of the second endpoint based on the third distance, the fourth distance, the third incident tilt angle, the fourth incident tilt angle, and the camera distance in the planar coordinate system.
[0127] Specifically, refer to Figure 12 This diagram illustrates a method for obtaining the distance between a first endpoint and a second endpoint using a dual-camera image acquisition device according to the present invention. Figure 11 The example provides a method for obtaining the incident tilt angle of the first endpoint M and the second endpoint N. Figure 12 Taking the first endpoint M as an example, if we construct triangle MAB in the plane, then using the triangle sine theorem, we can obtain:
[0128]
[0129]
[0130] To further determine the position of the first endpoint M, this invention provides the following preferred logical calculation method. Using camera B as the origin, the direction of the line connecting camera B and camera A as the Y-axis, and the normal to the line connecting camera B and camera A as the X-axis, a Cartesian coordinate system XOY(…) is established. Figure 10 It is understandable that the coordinates of camera B are (0,0) and the coordinates of camera A are (0,d). Let the coordinates of the data collection point M be (x,y), then the following vector relationship can be obtained:
[0131] BA=(0,d); BM=(x,y); AB=(0,-d); AM=(x,yd) (19)
[0132]
[0133]
[0134] Combining formulas (20) and (21), we can obtain:
[0135]
[0136]
[0137] That is, the position coordinates of the first endpoint M in the coordinate system XOY are Using the same logical calculation method, the position coordinates of the second endpoint N of the patient's face can be obtained, which will not be elaborated here in this embodiment.
[0138] Optionally, in this embodiment, the size of the third face to be tested in the fourth face image to be tested is determined according to the location of the information collection point, including but not limited to: obtaining the pixel value of the preset connecting line and the pixel value of the second face to be tested in the fourth face image to be tested; determining the size of the preset connecting line according to the coordinate position of the first endpoint and the coordinate position of the second endpoint; and determining the third size according to the size of the preset connecting line, the pixel value of the preset connecting line and the pixel value of the third face to be tested.
[0139] Specifically, in one example, if the coordinates of the second endpoint N are set to (m, n), then the position coordinates of the second endpoint N in the XOY coordinate system can be obtained, and thus the distance between the first endpoint M and the second endpoint N of the preset line connecting the target face can be obtained as follows:
[0140]
[0141] Using the aforementioned dual-lens processing system, the distance between any two information collection points on the face of the target can be obtained to determine the third dimension of the third face to be tested, which can be used to guide the target to select a suitable mask or to make a suitable mask.
[0142] Optionally, in this embodiment, the third image acquisition device includes at least three cameras located on the same plane; the fourth face image to be tested includes multiple information acquisition points, which are allocated in the fourth face image to be tested according to a preset density threshold; wherein, the information acquisition points in the fourth face image to be tested are acquired, and diffuse reflection illuminates at least two sets of incident tilt angles corresponding to at least two cameras, including but not limited to: acquiring at least three sets of incident tilt angles corresponding to the information acquisition points.
[0143] Specifically, refer to Figure 13This diagram illustrates a method for determining face size based on a three-camera image acquisition device according to the present invention. The third image acquisition device includes three lenses: camera A, camera B, and camera C, and has data processing capabilities. The plane containing cameras A, B, and C is denoted by the Greek letter θ. Cameras A, B, and C can capture light and sense the incident angle of the light relative to plane θ. An arbitrary information acquisition point M is taken on the target face, and its diffusely reflected light enters camera A, camera B, and camera C respectively. Camera A captures the light ray MA from information acquisition point M and calculates its incident angle γ relative to plane θ; camera B captures the light ray MB from information acquisition point M and calculates its incident angle λ relative to plane θ; camera C captures the light ray MC from information acquisition point M and calculates its incident angle ξ relative to plane θ.
[0144] Optionally, in this embodiment, the location of the information collection point is determined based on at least two sets of incident tilt angles and the camera distance between at least two cameras, including but not limited to: obtaining at least three sets of distances between each information collection point and at least three cameras; establishing a spatial coordinate system based on the plane where at least three cameras are located; and determining the spatial coordinate position of the information collection point based on the spatial coordinate system, according to the camera distance between at least three cameras and at least three sets of incident angles.
[0145] Specifically, as mentioned above Figure 13 Taking the example below, to facilitate the determination of the location of the information collection point M, this embodiment provides the following preferred logical calculation method. A spatial rectangular coordinate system is established, and the coordinate positions of cameras A, B, and C are defined as A(0,-1,0), B(0,1,0), and C(0,0,1), respectively. Let the coordinates of the information collection point M be (x,y,z). It is easy to see that the projection point of the information collection point M onto the plane θ is P(0,y,z).
[0146] The following vector relationship can then be obtained:
[0147] AP=(0,y+1,z); AM=(x,y+1,z); (25)
[0148] BP=(0,y-1,z); BM=(x,y-1,z); (26)
[0149] CP=(0,y,z-1); CM=(x,y,z-1) (27)
[0150]
[0151]
[0152]
[0153] By combining the above formulas (28)-(30), we can obtain the values of x, y, and z, which gives us the spatial coordinates of the information collection point M.
[0154] Optionally, in this embodiment, the size of the third face to be tested in the fourth face image to be tested is determined according to the location of the information collection points, including but not limited to: establishing a face model of the third face to be tested based on the spatial coordinate positions corresponding to multiple information collection points, so as to determine the third size.
[0155] Specifically, refer to the appendix Figure 14 This illustration shows a schematic diagram of a face model of a target under test according to an embodiment of the present invention. In this embodiment, the curved surface of the target's face is composed of multiple information acquisition points, the specific number of which can be set based on practical experience. All data from the information acquisition points of the target's face are collected and processed by a third image acquisition device of a three-lens processing system to obtain the spatial coordinates of each information acquisition point, thereby forming a 3D face model of the target. In specific application scenarios, the 3D face model can be used by a computer to automatically identify specific size information for selecting a mask suitable for the target's face; it can also be used to design personalized masks based on the 3D face model of the target.
[0156] It should be noted that in specific application scenarios, especially for test targets with facial deformities, designing a matching mask based on the test target's facial information will effectively increase sealing performance and improve wearing comfort.
[0157] In this embodiment, a fourth face image of the target to be tested is acquired by a third image acquisition device, wherein the image acquisition device includes at least two cameras; at least two sets of incident tilt angles corresponding to the information acquisition points in the fourth face image to be tested are obtained; the position of the information acquisition point is determined based on the at least two sets of incident tilt angles and the camera distance between the at least two cameras; the third size of the third face to be tested in the fourth face image to be tested is determined based on the position of the information acquisition point, avoiding manual measurement of the face using a ruler, simplifying the measurement operation, and at the same time, the third size of the third face to be tested can be determined based on the camera distance between the cameras by using the fourth face image to be tested captured by multiple lenses, ensuring the accuracy of face measurement.
[0158] Method Example 4
[0159] This embodiment also proposes a method for determining the size of a face mask, which may specifically include the following steps:
[0160] Step S1: Obtain the target face size according to any one or more of the face size determination methods in Method Embodiment 1, Method Embodiment 2, or Method Embodiment 3;
[0161] Step S2: Determine the mask model of the target to be tested based on multiple sets of preset mask reference values and the target face size. The multiple sets of mask reference values correspond to multiple mask models.
[0162] The target face size is obtained based on the methods described in the aforementioned Method Embodiment 1, Method Embodiment 2, or Method Embodiment 3. The specific process of obtaining the target face size will not be elaborated in this embodiment.
[0163] Then, in specific application scenarios, different models of masks correspond to different ranges of face sizes, and each range of face sizes corresponds to a set of preset mask reference values. If the relevant parameters of the target face size fall within the range of face sizes corresponding to the preset mask reference values, then the mask model corresponding to the current preset mask reference value is determined to be the mask model that matches the target to be tested.
[0164] Specifically, in this embodiment, the mask reference values include, but are not limited to, parameters such as nose width, the first distance between the inner corners of the eyes, and the second distance between the center of the eyebrows and the philtrum. The specific types of facial parameters can be set based on practical experience, and this embodiment does not impose any limitations on them.
[0165] Optionally, in this embodiment, the mask reference value includes a first reference value corresponding to a first face part and a second reference value corresponding to a second face part, and the target face size includes multiple part sizes corresponding to the first face part and the second face part, respectively. The mask model of the target to be tested is determined based on multiple sets of mask reference values and the target face size, including but not limited to: when the part size corresponding to the first face part matches the first reference value, the mask model corresponding to the first reference value is determined.
[0166] In specific application scenarios, facial features are divided according to airtightness priority. Facial features with higher airtightness priority and / or higher comfort weight value are classified as the first facial feature, and facial features with lower airtightness priority and / or lower comfort weight value are classified as the second facial feature. The higher the airtightness priority, the better the airtightness of the mask, and the higher the comfort weight value, the higher the user's comfort.
[0167] In this embodiment, since the reference values corresponding to different parts are different, there may be cases where the facial parts of the target face do not completely match the reference value of a mask model. In this case, the corresponding mask model is determined according to the first reference value matched by the first facial part to ensure the airtightness and comfort of the mask.
[0168] Optionally, in this embodiment, the mask model of the target to be tested is determined based on multiple sets of mask reference values and the target face size, including but not limited to: when multiple parts of the target face size match all multiple parts of the mask reference values, the mask model corresponding to the mask reference value is selected; or, when multiple parts of the target face size partially match multiple parts of the mask reference values, if the number of matching parts of the reference values is greater than or equal to a preset number threshold, the mask model corresponding to the mask reference value is selected.
[0169] Specifically, in this embodiment, determining the mask model for the target based on multiple sets of mask reference values and the target face size involves matching multiple feature dimensions of the target face with multiple feature reference values of the mask. If all feature dimensions of the target face match the multiple feature reference values of the mask, the mask model corresponding to the mask reference value is selected. If only some feature dimensions of the target face match the multiple feature reference values of the mask, and the number of matched feature reference values is greater than or equal to a preset threshold, the mask model corresponding to the mask reference value is selected.
[0170] In one example, the target person's face dimensions—nose width, the first distance between the inner corners of their eyes, and the second distance between their eyebrows and philtrum—are matched against a mask reference value. If the nose width, the first distance, and the second distance all match the reference value for mask model A, then the mask model matched to the target person is determined to be model A. If the nose width matches the reference value for mask model A, and the first distance and the second distance both match the reference value for mask model B, then the mask model matched to the target person is determined to be model B.
[0171] Through the above embodiments, the mask model of the target to be tested is determined based on multiple sets of preset mask reference values and the target face size, so as to ensure the airtightness and comfort of the mask.
[0172] Device Example 1
[0173] Reference Figure 15 The diagram shows a structural block diagram of a face size determination device according to a first embodiment of the present invention, which may specifically include:
[0174] 1) The first image acquisition module 1501 is used to acquire a first face image of the target to be tested, wherein the first face image to be tested includes the first face of the target to be tested and a circular reference object.
[0175] 2) The first acquisition module 1502 is used to acquire the first pixel value of the first face to be tested and the second pixel value of the circular reference object;
[0176] 3) The second acquisition module 1503 is used to acquire the tilt angle of the circular reference object when the roundness of the circular reference object is greater than a preset roundness threshold.
[0177] 4) The first determining module 1504 is used to determine the first size of the first face to be tested based on the first pixel value, the second pixel value, the tilt angle and the actual size of the circular reference object.
[0178] Optionally, specific examples in this embodiment can refer to the examples described in the first method embodiment above, and will not be repeated here.
[0179] Device Example 2
[0180] Reference Figure 16 The diagram shows a structural block diagram of a second embodiment of the face size determination device of the present invention, which may specifically include:
[0181] 1) The second image acquisition module 1601 is used to acquire a second face image and a third face image of the target to be tested through a second image acquisition device, wherein the image acquisition distance of the second face image to be tested is different from that of the third face image to be tested.
[0182] 2) The third acquisition module 1602 is used to acquire the second pixel value in the second face image to be tested and the third pixel value in the third face image to be tested;
[0183] 3) The second determining module 1603 is used to determine the second size of the second face of the target to be tested based on the difference in image acquisition distance between the second face image to be tested and the third face image to be tested, the focal length of the second image acquisition device, the second pixel value and the third pixel value.
[0184] Optionally, specific examples in this embodiment can refer to the examples described in the second method embodiment above, and will not be repeated here.
[0185] Device Example 3
[0186] Reference Figure 17 The diagram shows a structural block diagram of a third embodiment of the face size determination device of the present invention, which may specifically include:
[0187] 1) The third image acquisition module 1701 is used to acquire a fourth face image of the target to be tested through a third image acquisition device, wherein the image acquisition device includes at least two cameras;
[0188] 2) The fourth acquisition module 1702 is used to acquire at least two sets of incident tilt angles corresponding to the information acquisition points in the fourth face image to be tested, wherein the incident tilt angles are obtained based on the third image acquisition device when the information acquisition points diffusely reflect light into the at least two cameras.
[0189] 3) The third determining module 1703 is used to determine the location of the information collection point based on the at least two sets of incident tilt angles and the camera distance between the at least two cameras;
[0190] 4) The fourth determining module 1704 is used to determine the third size of the third face to be tested in the fourth face image to be tested based on the location of the information collection point.
[0191] Optionally, specific examples in this embodiment can refer to the examples described in the above method embodiment three, and will not be repeated here.
[0192] Device Example 4
[0193] This embodiment also proposes a mask model determination device, the device comprising:
[0194] 1) Acquisition unit, used to determine the target face size based on any face size in Device Embodiment 1, Device Embodiment 2 or Device Embodiment 3;
[0195] 2) Determining unit, used to determine the mask model of the target to be tested based on multiple sets of preset mask reference values and the target face size, wherein the multiple sets of mask reference values correspond to multiple mask models respectively.
[0196] Optionally, specific examples in this embodiment can refer to the examples described in the above method embodiment four, and will not be repeated here.
[0197] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0198] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0199] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0200] Embodiments of this application also provide an electronic device, see [link to relevant documentation]. Figure 18The system includes: a processor 1801, a memory 1802, and a computer program 18021 stored in the memory and executable on the processor. When the processor executes the program, it implements the face size determination method of the foregoing embodiments.
[0201] Embodiments of this application also provide a readable storage medium, which, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to perform the face size determination method of the foregoing embodiments.
[0202] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0203] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of this application are not directed to any particular programming language. It should be understood that the embodiments of this application described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best implementation of the embodiments of this application.
[0204] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0205] Similarly, it should be understood that, in order to streamline this application and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present application, various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed embodiments of the present application require more features than expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the present application.
[0206] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0207] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the sequencing device according to the embodiments of this application. Embodiments of this application can also be implemented as device or apparatus programs for performing part or all of the methods described herein. Such programs implementing embodiments of this application can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form. It should be noted that the above embodiments are illustrative of embodiments of this application and not limiting of embodiments of this application, and those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of this application can be implemented using hardware comprising several different elements and a suitably programmed computer. In the unit claims listing several means, several of these means may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0208] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0209] The above description is merely a preferred embodiment of the present application and is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the embodiments of the present application should be included within the protection scope of the embodiments of the present application.
[0210] The above descriptions are merely specific implementations of embodiments of this application, and the protection scope of the embodiments of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this application should be included within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application should be determined by the protection scope of the claims.
Claims
1. A method for determining face size, characterized in that, The method includes: Acquire a first test face image of the target to be tested, wherein the first test face image includes the first test face of the target to be tested and a circular reference object; Obtain the first pixel value of the first face to be tested and the second pixel value of the circular reference object; When the roundness of the circular reference object is greater than a preset roundness threshold, the standard major axis of the circular reference object is obtained, wherein the standard major axis is the longest diameter of the circular reference object when the roundness is greater than the preset roundness threshold. Obtain the first major axis in the first direction and the second major axis in the second direction of the circular reference object, wherein the first direction is the straight line connecting the centers of the two eyes in the first face image, and the second direction is the straight line connecting the center of the eyebrows and the tip of the nose in the first face image; The horizontal tilt angle of the circular reference object is determined based on the standard major axis and the first major axis; the vertical tilt angle of the circular reference object is determined based on the standard major axis and the second major axis. The first size of the first face to be tested is determined based on the first pixel value, the second pixel value, the horizontal tilt angle, the vertical tilt angle, and the actual size of the circular reference object. Prior to acquiring the first face image of the target to be tested, the process also includes: On the image preview interface of the first image acquisition device that acquires the first face image to be tested, auxiliary lines are displayed. The auxiliary lines are used to indicate the spatial position and image acquisition angle of the first image acquisition device.
2. The method according to claim 1, characterized in that, Also includes: If the roundness is less than or equal to a preset roundness threshold, the first size is determined based on the first pixel value, the second pixel value, and the actual size.
3. The method according to claim 1, characterized in that, The circular reference object includes the iris in the first image of the face to be tested.
4. A method for determining face size, characterized in that, The method includes: A second image acquisition device is used to acquire a second face image and a third face image of the target to be tested, wherein the image acquisition distance of the second face image and the image acquisition distance of the third face image are different. Obtain the second pixel value in the second face image to be tested, and the third pixel value in the third face image to be tested; The image acquisition distance difference between the second face image to be tested and the third face image to be tested is determined based on the first position sensor in the second image acquisition device and the second position sensor in the target to be tested. Based on the image acquisition distance difference, the focal length of the second image acquisition device, the second pixel value, and the third pixel value, the second size of the second face of the target to be tested is determined. Wherein, when the first position sensor and the second position sensor are positioning sensors, the real-time positions of the image acquisition device and the target under test are determined based on the first position sensor and the second position sensor respectively, and the image acquisition distance difference is determined. When the first position sensor and the second position sensor are infrared sensors, the distance between the first position sensor and the second position sensor is obtained, and the image acquisition distance difference is determined.
5. The method according to claim 4, characterized in that, The second image acquisition device acquires a second and a third face image of the target object, including: After acquiring the second face image of the subject through the second image acquisition device, the second image acquisition device is controlled to move a first distance, wherein the first distance is the same as the difference between the second image acquisition distance and the second image acquisition distance; or, After acquiring the second face image of the subject through the second image acquisition device, the subject is controlled to move the first distance.
6. A method for determining the model of a face mask, characterized in that, The method includes: The face size determination method according to any one or more of claims 1-3 or 4-5 is used to obtain the target face size; The mask model of the target to be tested is determined based on multiple sets of preset mask reference values and the target face size, wherein the multiple sets of mask reference values correspond to multiple mask models.
7. The method according to claim 6, characterized in that, The mask reference values include a first reference value corresponding to a first facial region and a second reference value corresponding to a second facial region. The target face size includes multiple region sizes corresponding to the first and second facial regions, respectively. The mask model of the target to be tested is determined based on multiple sets of mask reference values and the target face size, including: If the size of the part corresponding to the first face part matches the first reference value, the mask model corresponding to the first reference value is determined.
8. The method according to claim 7, characterized in that, The mask model of the target to be tested is determined based on multiple sets of mask reference values and the target face size, including: If all dimensions of multiple parts in the target face size match all reference values of multiple parts in the mask reference values, select the mask model corresponding to the mask reference value; or, If multiple dimensions of the target face part partially match multiple reference values of the mask part, and the number of matching reference values of the part is greater than or equal to a preset threshold, then the mask model corresponding to the mask reference value is selected.
9. A face size determination device, characterized in that, The device includes: A module for performing the acquisition of a first test face image of a target to be tested, wherein the first test face image includes the first test face of the target to be tested and a circular reference object; A module for performing the task of acquiring the first pixel value of the first face to be tested and the second pixel value of the circular reference object; This module is used to obtain the standard major axis of the circular reference object when the roundness of the circular reference object is greater than a preset roundness threshold, wherein the standard major axis is the longest diameter of the circular reference object when the roundness is greater than the preset roundness threshold. A module for performing the acquisition of the first major axis in the first direction and the second major axis in the second direction of the circular reference object, wherein the first direction is the straight line connecting the centers of the two eyes in the first face image, and the second direction is the straight line connecting the center of the eyebrows and the tip of the nose in the first face image. A module for performing the following: determining the horizontal tilt angle of the circular reference object based on the standard major axis and the first major axis; and determining the vertical tilt angle of the circular reference object based on the standard major axis and the second major axis. A module for performing the task of determining the first size of the first face to be tested based on the first pixel value, the second pixel value, the horizontal tilt angle, the vertical tilt angle, and the actual size of the circular reference object; Prior to acquiring the first face image of the target to be tested, the process also includes: On the image preview interface of the first image acquisition device that acquires the first face image to be tested, auxiliary lines are displayed. The auxiliary lines are used to indicate the spatial position and image acquisition angle of the first image acquisition device.
10. A face size determination device, characterized in that, The device includes: This module is used to perform the acquisition of a second and a third face image of the target under test through a second image acquisition device, wherein the image acquisition distance of the second face image and the image acquisition distance of the third face image are different. A module for performing the task of acquiring the second pixel value in the second face image to be tested and the third pixel value in the third face image to be tested; A module for performing the task of determining the image acquisition distance difference between the second face image to be tested and the third face image to be tested based on a first position sensor in the second image acquisition device and a second position sensor in the target to be tested; A module for performing the task of determining the second size of the second face of the target to be tested based on the image acquisition distance difference, the focal length of the second image acquisition device, the second pixel value, and the third pixel value; Wherein, when the first position sensor and the second position sensor are positioning sensors, the real-time positions of the image acquisition device and the target under test are determined based on the first position sensor and the second position sensor respectively, and the image acquisition distance difference is determined. When the first position sensor and the second position sensor are infrared sensors, the distance between the first position sensor and the second position sensor is obtained, and the image acquisition distance difference is determined.