Method and device for measuring human ear characteristic distance

By automatically identifying feature points and reference objects in the human ear image and calculating the feature distance of the human ear, the problems of low measurement accuracy and high learning cost in the prior art are solved, and efficient and accurate measurement of the feature distance of the human ear are achieved.

CN111932604BActive Publication Date: 2025-01-14TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010858219.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-24
Publication Date
2025-01-14
Estimated Expiration
2040-08-24

AI Technical Summary

Technical Problem

In the prior art, the measurement of human ear characteristic distance requires users to learn relevant knowledge, which is costly and has low accuracy in manual measurement.

Method used

By acquiring human ear images, identifying human ear feature points, combining the pixel size and actual size of the reference object, the characteristic distance of the human ear is automatically calculated, and automated measurement is achieved using OpenCV and ASM models.

Benefits of technology

It reduces the learning cost of users, improves the accuracy of human ear feature distance measurement, simplifies the data acquisition process, and provides accurate data support for HRTF modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111932604B_ABST
    Figure CN111932604B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for measuring the characteristic distance of a human ear, which belongs to the field of image processing technology. The method comprises: obtaining a human ear image, wherein the human ear image comprises a human ear and a preset reference object; identifying each human ear characteristic point in the human ear, and determining the human ear characteristic pixel distance based on the each human ear characteristic point; determining the pixel size of the reference object and the actual size of the reference object; determining the human ear characteristic distance of the human ear based on the human ear characteristic pixel distance, the pixel size of the reference object and the actual size of the reference object. By adopting the present application, the human ear characteristic distance can be automatically determined by a computer device, thereby reducing the user's learning cost and improving the accuracy of the human ear characteristic distance measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method and device for measuring a characteristic distance of a human ear. Background Art

[0002] HRTF (Head Related Transfer Function) is used to describe the frequency response system of any point sound source in space reaching the eardrums of both ears. By adopting HRTF processing technology, users can experience realistic stereo surround sound when using headphones. In the data preparation stage of HRTF modeling, it is necessary to count the characteristic distance of the human ear. Since the shapes of ears of different people are different, in order to improve the accuracy of HRTF, it is necessary to count a large number of characteristic distances of human ears.

[0003] In the related art, manual measurement is usually used to obtain the required human ear characteristic distance. In the process of implementing this application, the applicant found that there are at least the following problems in the related art: users need to learn knowledge related to human ear characteristic distance before measuring human ear characteristic distance, and the learning cost of users is high. In addition, the accuracy of manual measurement is also low. Summary of the invention

[0004] The embodiment of the present application provides a method and device for measuring the characteristic distance of human ears, which can solve the technical problems existing in the related art. The technical solution of the method and device for measuring the characteristic distance of human ears is as follows:

[0005] In a first aspect, a method for measuring a human ear characteristic distance is provided, the method comprising:

[0006] Acquiring a human ear image, wherein the human ear image includes a human ear and a preset reference object;

[0007] Identifying each human ear feature point in the human ear, and determining a human ear feature pixel distance based on each human ear feature point;

[0008] Determining a pixel size of the reference object and an actual size of the reference object;

[0009] The human ear characteristic distance of the human ear is determined based on the human ear characteristic pixel distance, the pixel size of the reference object and the actual size of the reference object.

[0010] In a possible implementation, acquiring the human ear image includes:

[0011] Shoot a video containing the human ear and preset reference objects;

[0012] Detecting in real time whether the video contains a human ear image that meets a set standard;

[0013] If a human ear image that meets the set standard is detected, the human ear image is acquired.

[0014] In a possible implementation, the real-time detection of whether the video contains a human ear image that meets a set standard includes:

[0015] For each video frame in the video, based on a human ear detector in OpenCV, detecting a human ear in the video frame;

[0016] Among the one or more detected human ears, determine the human ear with the largest size as the target human ear;

[0017] Determine whether the position and size of the target human ear in the video frame are within a set position range and size range respectively;

[0018] Based on the magnitude of the change in the size and position of the target human ear in the video segment containing the video frame, it is determined whether the video frame is in a stable state.

[0019] In a possible implementation, the method further includes:

[0020] If after the set shooting time, a human ear image that meets the set standard is still not detected, a prompt message is output, and the prompt message is used to guide the user to change the shooting posture.

[0021] In a possible implementation manner, the identifying each human ear feature point in the human ear includes:

[0022] Based on the human ear detector in OpenCV, determine the position and size of the human ear in the human ear image;

[0023] Initializing and configuring an ASM (Active Shape Model) model based on the position and size of the human ear;

[0024] Based on the ASM model after initialization configuration, each human ear feature point in the human ear is identified.

[0025] In a possible implementation manner, after determining the human ear feature pixel distance based on the human ear feature points, the method further includes:

[0026] The individual human ear feature points are displayed in the human ear image, and marks of the human ear feature pixel distances are displayed.

[0027] In a possible implementation manner, after displaying the individual human ear feature points in the human ear image and displaying the marks of the human ear feature pixel distances, the method further includes:

[0028] receiving an adjustment instruction of a mark corresponding to the characteristic pixel distance of the human ear;

[0029] Based on the adjustment instruction, the determined human ear feature pixel distance is adjusted.

[0030] In a possible implementation manner, determining the human ear characteristic distance of the human ear based on the human ear characteristic pixel distance, the pixel size of the reference object, and the actual size of the reference object includes:

[0031] Determining a mapping ratio based on the actual size of the reference object and the pixel size of the reference object;

[0032] The human ear feature distance is determined based on the human ear feature pixel distance and the mapping ratio.

[0033] In a possible implementation, the human ear characteristic distance includes one or more of the height of the external ear cavity, the width of the external ear cavity, the height of the ear cavity, the height of the external auricle, and the width of the external auricle.

[0034] In a second aspect, a device for measuring a characteristic distance of a human ear is provided, the device comprising:

[0035] An acquisition module, used for acquiring a human ear image, wherein the human ear image includes a human ear and a preset reference object;

[0036] An identification module, used to identify each human ear feature point in the human ear, and determine the human ear feature pixel distance based on each human ear feature point;

[0037] A determination module, used to determine the pixel size of the reference object and the actual size of the reference object;

[0038] The determination module is further used to determine the human ear characteristic distance of the human ear based on the human ear characteristic pixel distance, the pixel size of the reference object and the actual size of the reference object.

[0039] In a possible implementation, the acquisition module is used to:

[0040] Shoot a video containing the human ear and preset reference objects;

[0041] Detecting in real time whether the video contains a human ear image that meets a set standard;

[0042] If a human ear image that meets the set standard is detected, the human ear image is acquired.

[0043] In a possible implementation, the acquisition module is used to:

[0044] For each video frame in the video, based on a human ear detector in OpenCV, detecting a human ear in the video frame;

[0045] Among the one or more detected human ears, determine the human ear with the largest size as the target human ear;

[0046] Determine whether the position and size of the target human ear in the video frame are within a set position range and size range respectively;

[0047] Based on the magnitude of the change in the size and position of the target human ear in the video segment containing the video frame, it is determined whether the video frame is in a stable state.

[0048] In a possible implementation, the device further includes a display module, and the display module is used to:

[0049] If after the set shooting time, a human ear image that meets the set standard is still not detected, a prompt message is output, and the prompt message is used to guide the user to change the shooting posture.

[0050] In a possible implementation, the identification module is used to:

[0051] Based on the human ear detector in OpenCV, determine the position and size of the human ear in the human ear image;

[0052] Initializing and configuring the ASM model based on the position and size of the human ear;

[0053] Based on the ASM model after initialization configuration, each human ear feature point in the human ear is identified.

[0054] In a possible implementation, the device further includes a display module, and the display module is used to:

[0055] The individual human ear feature points are displayed in the human ear image, and marks of the human ear feature pixel distances are displayed.

[0056] In a possible implementation manner, the device further includes an adjustment module, and the adjustment module is configured to:

[0057] receiving an adjustment instruction of a mark corresponding to the characteristic pixel distance of the human ear;

[0058] Based on the adjustment instruction, the determined human ear feature pixel distance is adjusted.

[0059] In a possible implementation manner, the determining module is used to:

[0060] Determining a mapping ratio based on the actual size of the reference object and the pixel size of the reference object;

[0061] The human ear feature distance is determined based on the human ear feature pixel distance and the mapping ratio.

[0062] In a possible implementation, the human ear characteristic distance includes one or more of the height of the external ear cavity, the width of the external ear cavity, the height of the ear cavity, the height of the external auricle, and the width of the external auricle.

[0063] In a third aspect, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for measuring human ear feature distance as described in the first aspect.

[0064] In a fourth aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is loaded and executed by a processor to implement the method for measuring the human ear feature distance as described in the first aspect.

[0065] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0066] The method for measuring the human ear feature distance provided in the embodiment of the present application identifies each human ear feature point in the human ear image and determines the human ear feature pixel distance based on the human ear feature point. Afterwards, the human ear feature distance of the human ear in the human ear image can be automatically determined based on the human ear feature pixel distance and the actual size and pixel size of the reference object in the human ear image. Thus, by adopting the technical solution provided by the present application, the user's learning cost can be reduced and the accuracy of the human ear feature distance measurement can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0068] Figure 1 is a flow chart of a method for measuring a human ear characteristic distance provided by an embodiment of the present application;

[0069] Figure 2 is a schematic diagram of an image including human ear feature points provided in an embodiment of the present application;

[0070] Figure 3 is a schematic diagram of an image including human ear feature points provided in an embodiment of the present application;

[0071] Figure 4is a schematic diagram of an image including human ear feature points provided in an embodiment of the present application;

[0072] Figure 5 is a schematic diagram of an image including human ear feature points provided in an embodiment of the present application;

[0073] Figure 6 is a schematic diagram of an image including human ear feature points provided in an embodiment of the present application;

[0074] Figure 7 is a schematic diagram of an image including human ear feature points provided in an embodiment of the present application;

[0075] Figure 8 It is a structural schematic diagram of a device for measuring a characteristic distance of a human ear provided in an embodiment of the present application;

[0076] Fig. 9 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;

[0077] Fig.10 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0078] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0079] The present application embodiment provides a method for measuring the distance of a human ear feature, which can be implemented by a terminal, or by a server, or by both a server and a terminal. Figure 1 Steps 101-104 may all be executed by the terminal, or all be executed by the server, or some steps may be executed by the terminal and some steps may be executed by the server. For example, step 101 may be executed by the terminal, and steps 102-104 may be executed by the server.

[0080] The method for measuring the characteristic distance of human ears provided by the embodiment of the present application can be used to automatically determine the characteristic distance of human ears in human ear images. For users, it is only necessary to provide standard-compliant human ear images. The technical solution provided by the embodiment of the present application clarifies the physical definition of the characteristic distance of human ears to be measured by realizing the automatic measurement of the characteristic distance of human ears, avoids the ambiguity of human understanding, and makes the definition of the characteristic distance of human ears no longer the main cause of measurement errors. Whether it is a professional surveyor or the user himself, there is no need to invest time cost to understand the definition of these characteristic distances, which greatly reduces the measurement threshold of the characteristic distance of human ears and improves the efficiency of data collection. In addition, the measurement of the characteristic distance of human ears is converted into indirect feature point annotation, which can significantly improve the accuracy of the measurement of the characteristic distance of human ears. Provide accurate and efficient data support for subsequent HRTF (Head Related Transfer Function) modeling.

[0081] like Figure 1 As shown, the processing flow of the method for measuring the human ear characteristic distance provided in the embodiment of the present application may include the following steps:

[0082] In step 101, a human ear image is acquired, where the human ear image includes a human ear and a preset reference object.

[0083] There may be multiple types of preset reference objects. In order to make it easier and more accurate to determine the actual size of the reference object, an object of standard size may be selected as a reference object. For example, it may be a bank card, banknotes, coins, etc. In order to improve the applicability of the method for measuring the human ear characteristic distance provided in the embodiment of the present application, multiple reference objects may be supported.

[0084] In implementation, when determining the human ear feature distance in the human ear image, the computer device first needs to obtain the human ear image, and the human ear image must meet certain standards. The computer device can be a terminal or a server.

[0085] In a possible implementation, step 101 may be performed by a terminal, and the corresponding processing process of step 101 may be as follows: shooting a video containing a human ear and a preset reference object. Detecting in real time whether the video contains a human ear image that meets a set standard. If a human ear image that meets the set standard is detected, acquiring the human ear image.

[0086] In implementation, in order to simplify the user's operation and improve the quality of the acquired human ear image, it is possible to detect in real time whether a video shot by the user containing a human ear and a reference object contains a human ear image that meets the set standard. When a human ear image that meets the set standard is detected, the human ear image is acquired.

[0087] Exemplarily, when shooting a video, in order to improve the success rate of detecting human ear images that meet the set standards, the terminal can guide the user to slowly pose the suggested action. For example, prompt the user to hold the terminal with both hands, look directly at the camera (optionally, the terminal can be a mobile phone, then the camera can be a front camera), and place his own head portrait in the center of the mobile phone screen. Keep the shoulders and arms still, slowly turn the head 90 degrees to the left, and keep it for a set time (such as 3 seconds), then turn the head 90 degrees to the right, and keep it for a set time (such as 3 seconds). In addition, the user can also be guided to place a reference object of known actual size at a set position in the picture. For example, the terminal can prompt the user to place a reference object in the upper right corner of the picture. It should be noted that the suggested action is only an example and is not limited to this. In addition, when the terminal guides the user to pose the suggested action, the presentation form of the corresponding prompt information can be a text description, a voice prompt, or an animation, etc., which is not limited to this application.

[0088] When shooting a video, the terminal can detect in real time whether the video contains a human ear image that meets the set standards. Below, a possible detection process is provided: for each video frame in the video, detect the human ears in the video frame based on the human ear detector in OpenCV. Among the one or more detected human ears, determine the largest human ear as the target human ear. Determine whether the position and size of the target human ear in the video frame are within the set position range and size range, respectively. Based on the change amplitude of the size and position of the target human ear in the video segment containing the video frame, determine whether the video frame is in a stable state. Among them, OpenCV is a cross-platform computer vision library released under the BSD license (open source), which implements many common algorithms in image processing and computer vision.

[0089] In implementation, when it is determined that the position of the target human ear contained in the video frame is within a set position range, the size of the target human ear is within a set size range, and the video frame is in a stable state, it means that the video frame includes a human ear image that meets the set standard. Then, a human ear image that meets the set standard can be obtained from the video frame.

[0090] The following is a description of the specific process of the detection process:

[0091] (1) OpenCV ear detection

[0092] The terminal reads a real-time video from the camera. The video consists of multiple continuous video frames, and each video frame is regarded as a picture frame. Using the human ear detector of OpenCV, human ear detection is performed on each video frame, and the position and size of the detected human ear can be returned. Optionally, the position and size of the human ear can be expressed in the position and size of the external rectangular frame of the human ear.

[0093] Among them, OpenCV is an open source algorithm tool library for image processing and computer vision, which can implement some commonly used algorithms related to image processing. In addition, the human ear detectors used by the left and right ears are different, such as haarcascade_mcs_leftear.xml and haarcascade_mcs_rightear.xml.

[0094] (2) Eliminate false detection interference items

[0095] The ear detector supports detecting multiple ears at the same time. Therefore, multiple ears may be returned in one video frame. According to the prior knowledge of the application scenario here, only one ear in a video frame is the target ear. The rest may be ears of other people in the background image, or things that are mistakenly detected as ears. Therefore, it is necessary to remove unnecessary interference items.

[0096] Since the human ear image is obtained by selfie, the user's ear in each video frame should be closest to the camera, and its corresponding external rectangular frame is the largest among all external rectangular frames. Find the one with the highest height or the widest width among many external rectangular frames, and its corresponding width, height and position coordinates belong to the target human ear. That is, among the one or more detected human ears, determine the largest ear as the target human ear.

[0097] Among them, the method of eliminating interference items is:

[0098] [earHeightBig, earHeightBigIndex]=max(ear[i].Height);

[0099] earHeight=ear[earHeightBigIndex].Height;

[0100] earWidth=ear[earHeightBigIndex].Width;

[0101] earX=ear[earHeightBigIndex].X; earY=ear[earHeightBigIndex].Y.

[0102] (3) Detect whether the target ear is within the set position range

[0103] In order to improve the accuracy of the determined ear feature distance, the position of the ear in the ear image is often required. Specifically, the method of detecting whether the position of the target ear is within the set position range can be as follows:

[0104] Calculate the geometric center position of the human ear in the human ear image according to the information of the circumscribed rectangle of the human ear:

[0105] center.X = earX + earWidth / 2; center.Y = earY + earHeight / 2.

[0106] Among them, center.X is the coordinate of the center point of the human ear on the X-axis, and center.Y is the coordinate of the center point of the human ear on the Y-axis. earWidth is the width of the circumscribed rectangle of the human ear, and earHeight is the height of the circumscribed rectangle of the human ear. earX is the coordinate of the lower left vertex of the circumscribed rectangle of the human ear on the X-axis, and earY is the coordinate of the lower left vertex of the circumscribed rectangle of the human ear on the Y-axis.

[0107] Set the boundaries of the center point of the human ear on the X-axis and Y-axis to be: XUp, XDown, YUp, YDown. When the position of the center point of the human ear meets: XDown < center.X < XUp and YDown < center.Y < YUp, it is considered that the detected ear position is within the set position range.

[0108] (4) Detect whether the size of the target human ear is within the set size range

[0109] In implementation, the size of the human ear can be represented by the circumscribed rectangle of the human ear returned by the human ear detector in OpenCV. Specifically, the method for detecting whether the size of the target human ear is within the set size range can be described as follows:

[0110] The set size range of the human ear is: the maximum value of the width: widthUp, the minimum value of the width: widthDown; the maximum value of the height: heightUp, the minimum value of the height: heightDown.

[0111] When the width and height of the circumscribed rectangle of the human ear meet: widthDown < earWidth < widthUp and heightDown < earHeight < heightUp, it is considered that the size of the detected human ear is within the set size range, where earWidth is the width of the circumscribed rectangle of the human ear and earHeight is the height of the circumscribed rectangle of the human ear.

[0112] (5) Detection of the stable state of the human ear image

[0113] To ensure that the obtained human ear image is stable and clear, the stable state of the video frame can also be detected.

[0114] Exemplarily, the method for detecting whether the human ear image is in a stable state can be described as follows:

[0115] On the premise that the size and position of the human ear of a certain video frame (the video frame can be called the target video frame) meet the requirements, the position and size of the human ear can be used as the data basis for stable state detection. That is, it can be determined whether the video frame is in a stable state based on the change range of the size and position of the target human ear in the video segment containing the video frame. If the size or position of the human ear changes greatly in the video segment, it means that the video frame is not in a stable state.

[0116] The center point, width and height of the circumscribed rectangular box of the human ear in the current video frame are recorded as centerNew, earWidthNew and earHeightNew respectively, and the center point, width and height of the circumscribed rectangular box of the human ear in the previous video frame are recorded as center, earWidth and earHeight respectively.

[0117] If the position of the center point of the human ear in the current video frame meets:

[0118] (center.X–alpha1×earWidth) <centerNew.X<(center.X+alpha1×earWidth);

[0119] (center.Y–belta1×earHeight) <centerNew.Y<(center.Y+belta1×earHeight)。

[0120] And the width and height of the human ear meet:

[0121] (1-alpha2)×earWidth <earWidthNew<(1+alpha2)×earWidth

[0122] And (1–belta2)×earHeight <earHeightNew<(1+belta2)×earHeight

[0123] The current video frame is considered to be in an alternative stable state in the video.

[0124] Among them, centerNew.X is the coordinate of the center point of the circumscribed rectangular box of the human ear in the current video frame on the X-axis, centerNew.Y is the coordinate of the center point of the circumscribed rectangular box of the human ear in the current video frame on the Y-axis; center.X is the coordinate of the center point of the circumscribed rectangular box of the human ear in the previous video frame on the X-axis, center.Y is the coordinate of the center point of the circumscribed rectangular box of the human ear in the previous video frame on the Y-axis.

[0125] The four parameters alpha1, belta1, alpha2, and belt2 take values ​​between 0 and 0.5. The closer the value is to 0, the higher the requirement for the user's stable state is, and the closer the value is to 0.5, the lower the requirement for the stable state is.

[0126] Among a set number (e.g., 30) of continuous video frames including the target video frame, if the number of frames satisfying the alternative stable state reaches a certain proportion (e.g., 25 of the 30 video frames satisfy the alternative stable state), it is determined that the target video frame is in a stable state that meets the requirements for photographing.

[0127] It can be seen that the present application has designed a state accumulation method to determine whether the human ear image is in a stable state in the video, thereby avoiding obtaining some images that meet the requirements briefly but are blurred due to fast movement.

[0128] (6) Acquisition of human ear images that meet set standards.

[0129] When it is detected that the target video frame meets the set standard, the target video frame can be used as the acquired human ear image.

[0130] In addition, in order to improve the accuracy of the acquired human ear image, the image including the human ear can be cut out from the target video frame and displayed. The user can observe the image including the human ear to determine whether the image is really a human ear, and when it is determined that the image is not a human ear, the user can operate to re-acquire the human ear image. At the same time, the user can also adjust the size of the circumscribed rectangular frame of the human ear.

[0131] Specifically, the pseudo code of the clipping process may be:

[0132] Rect rectEar(centerNew.X–earWidthNew / 2, centerNew.Y–earHeightNew / 2, earWidthNew, earHeightNew);

[0133] ROIEar=frame(rectEar);

[0134] Among them, rectEar contains information such as the position, width and height of the external rectangular frame, frame represents the image data of the current frame, and ROIEar represents the image data of the local ear after interception.

[0135] In addition, it should be supplemented that the target video frame also needs to include a reference object. If no reference object is detected in the video frame, it is also considered that the video frame does not meet the set standard.

[0136] If after the set shooting time, a human ear image that meets the set standard is still not detected, a prompt message is output, and the prompt message is used to guide the user to change the shooting posture.

[0137] Among them, the shooting duration can be set by the developer based on actual experience, and this application does not limit this.

[0138] The prompt information may be prompt information for display, such as text information and image information, etc. The prompt information may also be voice information, and the terminal may play the voice information. In addition, the prompt information may also be a combination of voice information and prompt information for display.

[0139] In implementation, if the human ear image that meets the set standard cannot be detected for a long time, the terminal can output a prompt message to guide the user to change the shooting posture. Specifically, when guiding the user to change the shooting posture, the corresponding prompt message can be output according to which standard the detected video frame does not meet. Below, several possible implementation methods are provided:

[0140] When it is detected that the size of the target human ear is within the set size range, but the position of the target human ear is not within the set position range, the terminal can guide the user to move toward the target position.

[0141] When it is detected that the size of the target human ear is not within the set size range, but the position of the target human ear is within the set position range, the terminal can guide the user to move the terminal closer or move the terminal.

[0142] When it is detected that the size of the target human ear is not within the set size range, and the position of the target human ear is not within the set position range, the terminal can first guide the user to move toward the target position, and then guide the user to zoom in or out of the terminal; or it can first guide the user to zoom in or out of the terminal, and then guide the user to move toward the target position.

[0143] When it is detected that the image where the target ear is located is not in a stable state, the terminal guides the user to try not to shake himself.

[0144] When it is detected that the video frame does not include a reference object, the terminal guides the user to place the reference object at a set position, and the user can also select the type of reference object on the terminal to improve the accuracy of the actual size of the reference object.

[0145] The embodiment of the present application provides a method for a terminal to obtain human ear images, which changes from requiring users to strike a fixed posture in the past to instantaneous snapshots in a moving picture. The "fool-style" operation reduces the user's learning cost, realizes a fully automatic snapshot process, improves the fluency of interaction, and reduces the difficulty of shooting. The user only needs to make the suggested action, and the terminal can automatically capture human ear images that meet the set standards from the video. This greatly reduces the user's learning cost and shooting difficulty, and also makes it simple and easy to modify the set standards.

[0146] The method for the terminal to obtain the human ear image described above is only an example. In actual processing, the terminal may also use other methods to obtain the human ear image, and this application does not limit this.

[0147] In another possible implementation, step 101 may also be executed by the server, and the corresponding processing procedure of step 101 may be described as follows: receiving the human ear image sent by the terminal.

[0148] In implementation, the terminal may execute the above method to obtain the human ear image, and send the human ear image to the server, and the server may receive the human ear image sent by the terminal, so that the server obtains the human ear image.

[0149] In step 102, each ear feature point in the human ear is identified, and based on each ear feature point, a human ear feature pixel distance is determined.

[0150] The human ear feature pixel distance refers to the pixel size of the human ear feature distance in the human ear image. After determining the human ear feature pixel distance, the corresponding human ear feature distance also needs to be calculated.

[0151] In implementation, the acquired human ear image can be detected according to the human ear detector in OpenCV to obtain the circumscribed rectangular frame of the human ear in the human ear image, and the position and size of the human ear can be determined according to the position and size of the circumscribed rectangular frame. That is, based on the human ear detector in OpenCV, the position and size of the human ear in the human ear image can be determined.

[0152] Then, according to the position and size of the human ear, the initial position of the ASM (Active Shape Model) model is set, and the size of the ASM model is adjusted to match the size of the human ear. That is, the ASM model is initialized and configured based on the position and size of the human ear.

[0153] Finally, the ASM model after initialization configuration is used to identify the ear feature points in the ear image. For example, the position coordinates of a preset number of ear feature points, such as 24, can be returned, and the 24 ear feature points can be marked in the ear image (such as Figure 2-Figure 7As shown in the figure, the left ear is taken as an example). Among them, the points numbered 1-12 in the figure represent the outline of the human ear, and the remaining points represent some texture features of the human ear. After being updated by the ASM model, these ear feature points have converged from the public model position to the actual position in each human ear image.

[0154] Afterwards, based on the identified preset number, such as 24 human ear feature points, any human ear feature pixel distance can be determined.

[0155] After determining the human ear characteristic pixel distance, a mark of the human ear characteristic pixel distance may also be displayed in the human ear image. Figure 3-Figure 7 As shown, black bidirectional arrows can be used to indicate the marking of the characteristic pixel distance of the human ear.

[0156] Below, we take the five common human ear feature distances that affect HRTF as an example to explain the human ear feature pixel distance:

[0157] The height of the external ear cavity (d1ASM): the distance from the 18th point to the center of the 17th and 20th points, such as Figure 3 shown.

[0158] Width of the external ear cavity (d2ASM): the distance from point 17 to the center of points 19 and 20, such as Figure 4 shown.

[0159] The height of the ear cavity (d3ASM): the distance from the center of the 15th and 16th points to the center of the 22nd and 23rd points, such as Figure 5 shown.

[0160] The height of the auricle (d4ASM): the maximum value of the distance from the 2nd and 3rd points to the 9th, 10th and 11th points respectively, such as Figure 6 As shown, Figure 6 The height of the auricle is the distance from the 2nd point to the 11th point.

[0161] Width of the auricle (d5ASM): Connect the two highest points of the auricle (points 2 and 11) into a straight line, and draw parallel lines through points 5, 6, 7, 13, and 14 respectively. The distance between the five straight lines that is farthest from each other ( Figure 7 The distance between the straight line passing through the 6th point and the straight line passing through the 13th point is the width of the auricle.

[0162] In addition, in a possible implementation, if the mark of the human ear feature pixel distance in the human ear image has an observable deviation, it can be manually adjusted to a suitable position, so that the human ear feature pixel distance is more accurate. The corresponding processing process can be as follows: receiving an adjustment instruction corresponding to the mark of the human ear feature pixel distance; adjusting the determined human ear feature pixel distance based on the adjustment instruction.

[0163] In step 103, the pixel size of the reference object and the actual size of the reference object are determined.

[0164] Among them, the actual size refers to the size of the object in the real world, which can be understood as the size actually measured by a measuring tool (such as a ruler). The pixel size refers to the size of the object in the image.

[0165] In practice, the process of determining the pixel size of the reference object can be as follows:

[0166] The outline of the reference object in the human ear image is detected, and the pixel size of the reference object is determined based on the outline. Exemplarily, when determining the pixel size of the reference object, the outline of the reference object can be detected by image processing means such as edge detection, dilation and erosion. Then, the pixel width and pixel height are calculated respectively.

[0167] The process of determining the actual size of the reference object can be described as follows:

[0168] In one possible implementation, the actual size corresponding to a preset reference object may be pre-stored in a computer device, and the computer device may detect a human ear image including the specific category and model of the reference object, and then query the size corresponding to the reference object as the actual size of the reference object.

[0169] In another possible implementation, when taking a human ear image, the user may input information such as the specific category and model of the preset reference object used. Then, the computer device directly queries the size corresponding to the reference object based on the specific category and model of the reference object as the actual size of the reference object.

[0170] It should be noted that the embodiment of the present application does not limit the execution order of step 102 and step 103. Step 102 may be executed first, or step 103 may be executed first, or step 102 and step 103 may be executed simultaneously.

[0171] In step 104, the human ear characteristic distance of the human ear is determined based on the human ear characteristic pixel distance, the pixel size of the reference object and the actual size of the reference object.

[0172] In implementation, first, a mapping ratio is determined based on the actual size and pixel size of the reference object, and then a human ear characteristic distance is determined based on the human ear characteristic pixel distance and the mapping ratio.

[0173] Exemplarily, the process of determining the mapping ratio may be as follows:

[0174] scaleWidth = actual width of the reference object / cardWidth, where cardWidth represents the pixel width of the reference object;

[0175] scaleHeight = actual height of reference object / cardHeight, where cardHeight represents the pixel height of the reference object;

[0176] scale=0.5×scaleWidth+0.5×scaleHeight.

[0177] The parameter scale is the mapping ratio, which represents a mapping relationship from pixel size to actual size. Its unit is mm / pixel. This mapping ratio takes into account the height mapping ratio (scaleHeight) and the width mapping ratio (scaleWidth) to make the mapping ratio more accurate and reasonable. It should be noted that the weight value (i.e. 0.5) in the mapping ratio calculation formula is only an example, and other values ​​can be set according to actual needs.

[0178] Then, the human ear feature pixel distance is multiplied by the mapping ratio to obtain the corresponding human ear feature distance. Taking the above five human ear feature pixel distances as an example, the corresponding human ear feature distance is:

[0179] d1=d1ASM×scale; d2=d2ASM×scale; d3=d3ASM×scale; d4=d4ASM×scale;

[0180] d5=d5ASM×scale.

[0181] The embodiment of the present application provides a method for measuring the characteristic distance of human ears, which converts the characteristic distance of human ears into an indirect representation of multiple characteristic points of human ears, making it possible to automatically measure the characteristic distance of human ears. In addition, pixel-level annotation can be achieved by using image key point information annotation algorithms such as ASM, thereby improving the accuracy of the measured characteristic distance of human ears.

[0182] In addition, the ear feature points and ear feature pixel distances are displayed in real time, which facilitates the user's understanding of the definition of ear feature distances and also provides the possibility for manual adjustment of measurement results. In the case of large deviations, it can be quickly corrected by simply adjusting the ear feature distances.

[0183] Based on the same technical concept, the embodiment of the present application also provides a device for measuring the characteristic distance of a human ear, which can be the terminal or server in the above embodiment, such as Figure 8 As shown, the device comprises:

[0184] An acquisition module 801 is used to acquire a human ear image, where the human ear image includes a human ear and a preset reference object;

[0185] The recognition module 802 is used to recognize each ear feature point in the human ear, and determine the ear feature pixel distance based on each ear feature point;

[0186] A determination module 803, configured to determine the pixel size of the reference object and the actual size of the reference object;

[0187] The determination module 803 is further configured to determine the human ear characteristic distance of the human ear based on the human ear characteristic pixel distance, the pixel size of the reference object and the actual size of the reference object.

[0188] In a possible implementation, the acquisition module 801 is used to:

[0189] Shoot a video containing the human ear and preset reference objects;

[0190] Real-time detection of whether the video contains human ear images that meet the set standards;

[0191] If a human ear image meeting the set standard is detected, the human ear image is acquired.

[0192] In a possible implementation, the acquisition module 801 is used to:

[0193] For each video frame in the video, detect the human ear in the video frame based on the human ear detector in OpenCV;

[0194] Among the one or more detected human ears, determine the human ear with the largest size as the target human ear;

[0195] Determine whether the position and size of the target ear in the video frame are within a set position range and size range respectively;

[0196] Based on the magnitude of changes in the size and position of the target human ear in the video segment containing the video frame, it is determined whether the video frame is in a stable state.

[0197] In a possible implementation, the device further includes a display module, and the display module is used to:

[0198] If after the set shooting time, a human ear image that meets the set standard is still not detected, a prompt message is output, and the prompt message is used to guide the user to change the shooting posture.

[0199] In a possible implementation, the identification module 802 is configured to:

[0200] Determine the position and size of the ear in the ear image based on the ear detector in OpenCV;

[0201] Initialize the ASM model based on the position and size of the human ear;

[0202] Based on the ASM model after initialization configuration, each ear feature point in the human ear is identified.

[0203] In a possible implementation, the device further includes a display module, and the display module is used to:

[0204] Display each ear feature point in the ear image and display the mark of the ear feature pixel distance.

[0205] In a possible implementation manner, the device further includes an adjustment module, and the adjustment module is used to:

[0206] receiving an adjustment instruction of a mark corresponding to a characteristic pixel distance of a human ear;

[0207] Based on the adjustment instruction, the determined human ear feature pixel distance is adjusted.

[0208] In a possible implementation, the determining module 803 is configured to:

[0209] Determine the mapping scale based on the actual size of the reference object and the pixel size of the reference object;

[0210] Based on the human ear feature pixel distance and the mapping ratio, the human ear feature distance is determined.

[0211] In a possible implementation, the characteristic distance of the human ear includes one or more of the height of the external ear cavity, the width of the external ear cavity, the height of the ear cavity, the height of the external auricle, and the width of the external auricle.

[0212] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0213] It should be noted that: the device for measuring the characteristic distance of the human ear provided in the above embodiment only uses the division of the above functional modules as an example when measuring the characteristic distance of the human ear. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for measuring the characteristic distance of the human ear provided in the above embodiment and the method embodiment for measuring the characteristic distance of the human ear belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0214] Fig. 9 900 is a block diagram of a terminal provided in an embodiment of the present application. The terminal 900 may be a portable mobile terminal, such as a smart phone or a tablet computer. The terminal 900 may also be called a user equipment, a portable terminal, or other names.

[0215] Typically, the terminal 900 includes a processor 901 and a memory 902 .

[0216] The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0217] The memory 902 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one instruction, which is used to be executed by the processor 901 to implement the method for measuring the human ear feature distance provided in the present application.

[0218] In some embodiments, the terminal 900 may further include: a peripheral device interface 903 and at least one peripheral device. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904 , a display screen 905 , a camera assembly 906 , an audio circuit 907 , a positioning assembly 908 and a power supply 909 .

[0219] The peripheral device interface 903 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0220] The radio frequency circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 904 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 904 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 904 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0221] The display screen 905 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. The display screen 905 also has the ability to collect touch signals on the surface or above the surface of the display screen 905. The touch signal may be input to the processor 901 as a control signal for processing. The display screen 905 is used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 905 may be one, and the front panel of the terminal 900 is set; in other embodiments, the display screen 905 may be at least two, which are respectively set on different surfaces of the terminal 900 or are folded; in still other embodiments, the display screen 905 may be a flexible display screen, which is set on the curved surface or folded surface of the terminal 900. Even, the display screen 905 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 905 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0222] The camera assembly 906 is used to capture images or videos. Optionally, the camera assembly 906 includes a front camera and a rear camera. Typically, the front camera is used to realize video calls or selfies, and the rear camera is used to realize the shooting of photos or videos. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, and a wide-angle camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, and the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting functions. In some embodiments, the camera assembly 906 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0223] The audio circuit 907 is used to provide an audio interface between the user and the terminal 900. The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 901 for processing, or input them into the radio frequency circuit 904 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 900. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 907 may also include a headphone jack.

[0224] The positioning component 908 is used to locate the current geographical location of the terminal 900 to implement navigation or LBS (Location Based Service). The positioning component 908 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system or Russia's Galileo system.

[0225] The power supply 909 is used to power various components in the terminal 900. The power supply 909 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 909 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0226] In some embodiments, the terminal 900 further includes one or more sensors 910 , including but not limited to: an acceleration sensor 911 , a gyroscope sensor 912 , a pressure sensor 913 , a fingerprint sensor 914 , an optical sensor 915 , and a proximity sensor 916 .

[0227] The acceleration sensor 911 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 900. For example, the acceleration sensor 911 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 911. The acceleration sensor 911 can also be used to collect motion data of games or users.

[0228] The gyro sensor 912 can detect the body direction and rotation angle of the terminal 900, and the gyro sensor 912 can cooperate with the acceleration sensor 911 to collect the user's 3D actions on the terminal 900. The processor 901 can implement the following functions based on the data collected by the gyro sensor 912: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0229] The pressure sensor 913 can be set in the side frame of the terminal 900 and / or the lower layer of the display screen 905. When the pressure sensor 913 is set in the side frame of the terminal 900, it can detect the user's holding signal of the terminal 900, and perform left and right hand recognition or shortcut operation according to the holding signal. When the pressure sensor 913 is set in the lower layer of the display screen 905, the operability control on the UI interface can be controlled according to the user's pressure operation on the display screen 905. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0230] The fingerprint sensor 914 is used to collect the user's fingerprint to identify the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 901 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 914 can be set on the front, back, or side of the terminal 900. When a physical button or a manufacturer logo is set on the terminal 900, the fingerprint sensor 914 can be integrated with the physical button or the manufacturer logo.

[0231] The optical sensor 915 is used to collect the ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the display screen 905 according to the ambient light intensity collected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is reduced. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera component 906 according to the ambient light intensity collected by the optical sensor 915.

[0232] The proximity sensor 916, also called a distance sensor, is usually arranged on the front of the terminal 900. The proximity sensor 916 is used to collect the distance between the user and the front of the terminal 900. In one embodiment, when the proximity sensor 916 detects that the distance between the user and the front of the terminal 900 is gradually decreasing, the processor 901 controls the display screen 905 to switch from the screen-on state to the screen-off state; when the proximity sensor 916 detects that the distance between the user and the front of the terminal 900 is gradually increasing, the processor 901 controls the display screen 905 to switch from the screen-off state to the screen-on state.

[0233] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the terminal 900, and the terminal 900 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0234] Fig.10 It is a structural diagram of a server provided in an embodiment of the present application. The server 1000 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 1001 and one or more memories 1002, wherein the memory 1002 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 1001 to implement the above-mentioned method for measuring the characteristic distance of the human ear.

[0235] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the method for measuring the distance of human ear characteristics in the above embodiment. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0236] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0237] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for measuring human ear characteristic distance, characterized in that: The method comprises: Acquiring a human ear image, wherein the human ear image includes a human ear and a preset reference object; Based on the human ear detector in OpenCV, the acquired human ear image is detected to obtain an external rectangular frame of the human ear in the human ear image, and the position and size of the human ear in the human ear image are determined according to the position and size of the external rectangular frame; Initializing and configuring the ASM model based on the position and size of the human ear; Based on the ASM model after initialization configuration, identifying each human ear feature point in the human ear, and determining the human ear feature pixel distance based on the each human ear feature point; Determining a pixel size of the reference object and an actual size of the reference object; Determining the human ear characteristic distance of the human ear based on the human ear characteristic pixel distance, the pixel size of the reference object and the actual size of the reference object; After determining the human ear feature pixel distance based on the various human ear feature points, the method further includes: displaying the various human ear feature points in the human ear image and displaying a mark of the human ear feature pixel distance; receiving an adjustment instruction corresponding to the mark of the human ear feature pixel distance; and adjusting the determined human ear feature pixel distance based on the adjustment instruction.

2. The method according to claim 1, characterized in that The step of acquiring a human ear image comprises: Shoot a video containing the human ear and preset reference objects; Detecting in real time whether the video contains a human ear image that meets a set standard; If a human ear image that meets the set standard is detected, the human ear image is acquired.

3. The method according to claim 2, characterized in that The real-time detection of whether the video contains a human ear image that meets a set standard includes: For each video frame in the video, based on a human ear detector in OpenCV, detecting a human ear in the video frame; Among the one or more detected human ears, determine the human ear with the largest size as the target human ear; Determine whether the position and size of the target human ear in the video frame are within a set position range and size range respectively; Based on the magnitude of the change in the size and position of the target human ear in the video segment containing the video frame, it is determined whether the video frame is in a stable state.

4. The method according to claim 3, characterized in that The method further comprises: If after the set shooting time, a human ear image that meets the set standard is still not detected, a prompt message is output, and the prompt message is used to guide the user to change the shooting posture.

5. The method according to any one of claims 1 to 4, characterized in that: The determining the human ear characteristic distance of the human ear based on the human ear characteristic pixel distance, the pixel size of the reference object and the actual size of the reference object includes: Determining a mapping ratio based on the actual size of the reference object and the pixel size of the reference object; The human ear feature distance is determined based on the human ear feature pixel distance and the mapping ratio.

6. The method according to any one of claims 1 to 4, characterized in that: The characteristic distance of the human ear includes one or more of the height of the external ear cavity, the width of the external ear cavity, the height of the ear cavity, the height of the external auricle and the width of the external auricle.

7. A device for measuring the characteristic distance of human ears, characterized in that: The device comprises: An acquisition module, used for acquiring a human ear image, wherein the human ear image includes a human ear and a preset reference object; The recognition module is used to detect the acquired human ear image based on the human ear detector in OpenCV, obtain the circumscribed rectangular frame of the human ear in the human ear image, and determine the position and size of the human ear in the human ear image according to the position and size of the circumscribed rectangular frame; initialize the ASM model based on the position and size of the human ear; based on the ASM model after the initialization configuration, identify each human ear feature point in the human ear, and determine the human ear feature pixel distance based on each human ear feature point; A determination module, used to determine the pixel size of the reference object and the actual size of the reference object; The determination module is further configured to determine the human ear characteristic distance of the human ear based on the human ear characteristic pixel distance, the pixel size of the reference object, and the actual size of the reference object; The device also includes a display module and an adjustment module; The display module is used to: display each of the human ear feature points in the human ear image, and display a mark of the human ear feature pixel distance; The adjustment module is used to: receive an adjustment instruction corresponding to the mark of the human ear feature pixel distance; and adjust the determined human ear feature pixel distance based on the adjustment instruction.

8. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for measuring the human ear characteristic distance as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for measuring the human ear characteristic distance as described in any one of claims 1-6.

Citation Information

Patent Citations

  • A video data processing method and a related device

    CN109697416A

  • Method for acquiring feature parameters of ear conchae

    WO2016201769A1