An intelligent mirror and height measurement method, device and electronic equipment
Patent Information
- Application Number
- CN202211203178.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2042-09-29
AI Technical Summary
但增加专用摄像头,会出现智能镜生产成本过高的问题
[0030]上述第二方面至第五方面中的各个方面以及各个方面可能达到的技术效果请参照上述针对第一方面或第一方面中的各种可能方案可以达到的技术效果说明,这里不再重复赘述。
Smart Images

Figure CN117814778B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home device technology, and in particular to a smart mirror and a height measurement method, device, and electronic device. Background Technology
[0002] Smart mirrors are a new type of product that needs to support the measurement of human body parameters, such as height, arm length, and chest circumference. Existing measurement solutions all require dedicated cameras to achieve the measurements. Examples include direct measurement using depth cameras, RGB image inference algorithms, and millimeter-wave radar measurement. However, adding dedicated cameras leads to excessively high production costs for smart mirrors. Summary of the Invention
[0003] This application provides a smart mirror and a height measurement method, device, and electronic device, which can realize the function of measuring the user's height through a single camera, thereby reducing the production cost of the smart mirror.
[0004] In a first aspect, embodiments of this application provide a smart mirror, including: a display, a processor, and a camera; the display is used for displaying information; the camera is used for capturing user images and sending them to the processor; the user image is an image containing the user's face; The processor is configured to perform the following processing: perform specified facial feature recognition on the user image; determine the unit pixel distance in physical space for each pixel in the user image based on the number of pixels corresponding to the length and / or height of the identified specified facial feature and a preset reference length and / or reference height for the specified facial feature; determine the user's height based on the unit pixel distance, according to a pre-calibrated camera height and the number of pixels in the user image between the specified facial feature and a first center point in the vertical direction; the first center point is the center point of the user image.
[0005] In existing technologies, the height measurement function of smart mirrors often requires the use of multiple cameras or specialized cameras. However, the smart mirror provided in this application can achieve the function of measuring the user's height with a single camera, thereby avoiding the increased production cost of smart mirrors caused by using specialized cameras to achieve the height measurement function.
[0006] In one possible implementation, the designated facial region includes pupils; when the processor performs designated facial region recognition on the user image, and determines the unit pixel distance in physical space for each pixel in the user image based on the number of pixels corresponding to the length and / or height of the identified designated facial region and a preset reference length and / or reference height for the designated facial region, it is configured to: recognize pupils in the user image, determine a first number of pixels between the user's two pupils; and determine the unit pixel distance in physical space for each pixel in the user image based on a preset pupil distance reference value and the first number.
[0007] Based on the above scheme, since the distance between the two pupils is usually within a fixed range relative to other organs of the human face, the unit pixel distance corresponding to each pixel in the user image in physical space can be determined relatively accurately by using the preset pupil distance reference value.
[0008] In one possible implementation, the designated facial region includes the lowest point of the chin; when the processor determines the user's height based on a pre-calibrated camera height, the number of pixels between the designated facial region and a first center point in the vertical direction, and the unit pixel distance, it is configured to: determine a second number of pixels in the user image between the first center point and a second center point in the vertical direction, based on the camera resolution; the second center point represents the midpoint of the line connecting the user's two pupils in the user image; determine the height of the user's pupils from the ground based on the unit pixel distance, the second number, and the pre-calibrated camera height; determine a third number of pixels between the second center point and the lowest point of the chin in the vertical direction; determine the height between the top of the user's head and the pupils based on the third number and the unit pixel distance; and determine the user's height based on the sum of the height of the user's pupils from the ground and the height between the top of the user's head and the pupils.
[0009] Based on the above method, determining the height between the user's head and pupil by measuring the height between the lowest point of the user's chin and the pupil avoids situations where the top of the user's head cannot be accurately identified due to hair. This makes the measurement of the user's height more accurate.
[0010] In one possible implementation, the pre-calibrated camera height is determined by the processor performing the following operations: determining the field of view of the camera based on the height of the center point of the image captured by the camera in physical space; determining a third distance between the camera and the user when capturing the user image based on the camera resolution, the unit pixel distance, and the field of view; determining an image height deviation based on the deviation angle between the third distance and the camera; the deviation angle being used to represent the angle between the camera orientation and the horizontal direction; and determining the pre-calibrated camera height based on a preset theoretical height of the camera above the ground and the image height deviation.
[0011] Because cameras may have an angle deviation, causing them to be not horizontal, the center point of the captured image may not correspond to the theoretically preset camera height above the ground. Based on the above solution, determining a pre-calibrated camera height can avoid this situation, thereby improving the accuracy of height measurement.
[0012] In one possible implementation, when the processor determines the field of view of the camera based on the height of the center point of the image captured by the camera in physical space, it is configured to: determine a first scale value corresponding to the center point of the first image and a second scale value corresponding to the center point of the second image based on a first image and a second image captured by the camera, including a scale placed vertically on the ground; wherein, when capturing the first image, the distance between the smart mirror and the scale is a first distance, and when capturing the second image, the distance between the smart mirror and the scale is a second distance, and the first distance and the second distance are not equal; and determine the field of view of the camera based on the first scale value, the second scale value, the first distance, and the second distance.
[0013] Based on the above solution, this application calibrates the camera of the smart mirror by taking two photos by adjusting the position of the scale. Compared with the prior art, which takes a single image including the scale, this effectively avoids the camera's position relative to the mirror surface and the camera's structure from affecting the calibration results, thereby reducing errors in height measurement.
[0014] In one possible implementation, the deviation angle is determined based on the following method: determining the deviation angle according to the first distance, the first scale value, and a preset theoretical height of the camera above the ground; or, determining the deviation angle according to the second distance, the second scale value, and a preset theoretical height of the camera above the ground.
[0015] Based on the above solution, since the camera may have an angle deviation, causing it to be facing a direction other than horizontal, the center point of the image captured by the camera may not correspond to the theoretical height of the camera above the ground in physical space. Determining the angle deviation can reduce the error caused by this, resulting in a more accurate measurement of the user's height.
[0016] Secondly, embodiments of this application provide a height measurement method applied to a smart mirror, comprising: acquiring a user image; the user image being an image containing the user's face, which may be an image containing the user's face captured by a camera in the smart mirror; performing specified facial feature recognition on the user image, and determining the unit pixel distance in physical space corresponding to each pixel in the user image based on the number of pixels corresponding to the length and / or height of the identified specified facial feature and a preset reference length and / or reference height for the specified facial feature; determining the user's height based on the number of pixels between the specified facial feature and a first center point in the vertical direction, and the unit pixel distance, based on a pre-calibrated camera height; the first center point being the center point of the user image.
[0017] In one possible implementation, the designated facial region includes pupils; the step of recognizing the designated facial region in the user image, and determining the unit pixel distance in physical space for each pixel in the user image based on the number of pixels corresponding to the length and / or height of the recognized designated facial region and a preset reference length and / or reference height for the designated facial region, includes: recognizing pupils in the user image and determining a first number of pixels between the two pupils of the user; and determining the unit pixel distance in physical space for each pixel in the user image based on a preset pupil distance reference value and the first number.
[0018] In one possible implementation, the designated facial region includes the lowest point of the chin; determining the user's height based on the number of pixels between the designated facial region and a first center point in the vertical direction, and the unit pixel distance, based on a pre-calibrated camera height, includes: determining a second number of pixels between the first center point and a second center point in the vertical direction in the user image, according to the camera resolution; the second center point represents the midpoint of the line connecting the user's two pupils in the user image; determining the height of the user's pupils from the ground based on the unit pixel distance, the second number, and the pre-calibrated camera height; determining a third number of pixels between the second center point and the lowest point of the chin in the vertical direction; determining the height between the top of the user's head and the pupils based on the third number and the unit pixel distance; and determining the user's height based on the sum of the height of the user's pupils from the ground and the height between the top of the user's head and the pupils.
[0019] In one possible implementation, the pre-calibrated camera height is determined based on the following steps: determining the field of view of the camera according to the height of the center point of the image captured by the camera in physical space; determining a third distance between the camera and the user when capturing the user image according to the camera resolution, the unit pixel distance, and the field of view; determining the image height deviation according to the deviation angle between the third distance and the camera; the deviation angle is used to represent the angle between the camera orientation and the horizontal direction; and determining the pre-calibrated camera height according to the preset theoretical height of the camera above the ground and the image height deviation.
[0020] In one possible implementation, determining the field of view of the camera based on the height of the center point of the image captured by the camera in physical space includes: determining a first scale value corresponding to the center point of the first image and a second scale value corresponding to the center point of the second image based on a first image and a second image captured by the camera, including a scale placed vertically on the ground; wherein, when capturing the first image, the distance between the smart mirror and the scale is a first distance, and when capturing the second image, the distance between the smart mirror and the scale is a second distance, and the first distance and the second distance are not equal; and determining the field of view of the camera based on the first scale value, the second scale value, the first distance, and the second distance.
[0021] In one possible implementation, the deviation angle is determined based on the following method: determining the deviation angle according to the first distance, the first scale value, and a preset theoretical height of the camera above the ground; or, determining the deviation angle according to the second distance, the second scale value, and a preset theoretical height of the camera above the ground.
[0022] Thirdly, embodiments of this application provide a height measuring device, including: The acquisition unit is used to acquire user images; the user images are images containing the user's face. The processing unit is configured to perform the following processing: perform specified facial feature recognition on the user image; determine the unit pixel distance in physical space for each pixel in the user image based on the number of pixels corresponding to the length and / or height of the identified specified facial feature and a preset reference length and / or reference height for the specified facial feature; determine the user's height based on the number of pixels between the specified facial feature and a first center point in the vertical direction, and the unit pixel distance, based on a pre-calibrated camera height; the first center point is the center point of the user image.
[0023] In one possible implementation, the designated facial region includes pupils; when the processing unit performs designated facial region recognition on the user image, and determines the unit pixel distance in physical space for each pixel in the user image based on the number of pixels corresponding to the length and / or height of the identified designated facial region and a preset reference length and / or reference height for the designated facial region, the processing unit is configured to: recognize pupils in the user image and determine a first number of pixels between the user's two pupils; and determine the unit pixel distance in physical space for each pixel in the user image based on a preset pupil distance reference value and the first number.
[0024] In one possible implementation, the designated facial region includes the lowest point of the chin; when the processing unit determines the user's height based on a pre-calibrated camera height, the number of pixels between the designated facial region and a first center point in the vertical direction, and the unit pixel distance, it is configured to: determine a second number of pixels between the first center point and a second center point in the vertical direction in the user image according to the camera resolution; the second center point is used to represent the midpoint of the line connecting the user's two pupils in the user image; determine the height of the user's pupils from the ground according to the unit pixel distance, the second number, and the pre-calibrated camera height; determine a third number of pixels between the second center point and the lowest point of the chin in the vertical direction; determine the height between the top of the user's head and the pupils according to the third number and the unit pixel distance; and determine the user's height according to the sum of the height of the user's pupils from the ground and the height between the top of the user's head and the pupils.
[0025] In one possible implementation, the pre-calibrated camera height is determined by the processing unit performing the following operations: determining the field of view of the camera based on the height of the center point of the image captured by the camera in physical space; determining a third distance between the camera and the user when capturing the user image based on the camera resolution, the unit pixel distance, and the field of view; determining an image height deviation based on the deviation angle between the third distance and the camera; the deviation angle being used to represent the angle between the camera orientation and the horizontal direction; and determining the pre-calibrated camera height based on a preset theoretical height of the camera above the ground and the image height deviation.
[0026] In one possible implementation, when the processing unit determines the field of view of the camera based on the height of the center point of the image captured by the camera in physical space, it is configured to: determine a first scale value corresponding to the center point of the first image and a second scale value corresponding to the center point of the second image based on a first image and a second image captured by the camera, including a scale placed vertically on the ground; wherein, when capturing the first image, the distance between the smart mirror and the scale is a first distance, and when capturing the second image, the distance between the smart mirror and the scale is a second distance, and the first distance and the second distance are not equal; and determine the field of view of the camera based on the first scale value, the second scale value, the first distance, and the second distance.
[0027] In one possible implementation, the deviation angle is determined based on the following method: determining the deviation angle according to the first distance, the first scale value, and a preset theoretical height of the camera above the ground; or, determining the deviation angle according to the second distance, the second scale value, and a preset theoretical height of the camera above the ground.
[0028] Fourthly, embodiments of this application provide an electronic device, including: Memory, used to store computer instructions; A processor, connected to the memory, is configured to execute computer instructions in the memory, and, in executing the computer instructions, implement the method as described in any one of the second aspects.
[0029] Fifthly, embodiments of this application provide a computer-readable storage medium, comprising: The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of the second aspects.
[0030] For the various aspects of the second to fifth aspects mentioned above, and the technical effects that each aspect may achieve, please refer to the above description of the technical effects that can be achieved for the first aspect or the various possible solutions in the first aspect, which will not be repeated here. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application.
[0032] Figure 1 This application provides a hardware configuration block diagram of a smart mirror according to an embodiment of the present application; Figure 2 A software configuration block diagram of a smart mirror provided in an embodiment of this application; Figure 3 This is a schematic diagram of the smart mirror structure provided in an embodiment of this application; Figure 4 One of the schematic diagrams of the display content provided in the embodiments of this application; Figure 5 One of the schematic diagrams of the display content provided in the embodiments of this application; Figure 6 One of the exemplary flowcharts of a height measurement method provided in this application embodiment; Figure 7 This is one of the user image illustrations provided in the embodiments of this application; Figure 8An exemplary flowchart of the camera calibration method provided in the embodiments of this application; Figure 9 This is a schematic diagram showing the placement of the ruler in an embodiment of this application; Figure 10 A first image schematic diagram provided for an embodiment of this application; Figure 11A This is one of the schematic diagrams of the deviation angle provided in the embodiments of this application; Figure 11B This is one of the schematic diagrams of the deviation angle provided in the embodiments of this application; Figure 12 This is a schematic diagram of image height deviation provided in an embodiment of this application; Figure 13 An exemplary flowchart illustrating the image height deviation and pre-calibrated camera height determination method provided in this application embodiment; Figure 14 An exemplary flowchart of a user height determination method provided in an embodiment of this application; Figure 15 This is one of the user image illustrations provided in the embodiments of this application; Figure 16 A schematic diagram illustrating the capture of a user image by a camera according to an embodiment of this application; Figure 17 This is one of the user image illustrations provided in the embodiments of this application; Figure 18 One of the exemplary flowcharts of a height measurement method provided in this application embodiment; Figure 19 A schematic diagram of a height measuring device provided in an embodiment of this application; Figure 20 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.
[0034] The terms "first" and "second" in the embodiments of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more; the embodiments of this application do not impose any limitations.
[0035] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0036] Currently, smart mirrors often use LiDAR, depth cameras, and structured light stereo cameras to obtain human body parameters such as height, arm length, and chest circumference. However, LiDAR, depth cameras, and structured light stereo cameras are expensive, which further increases production costs, especially for mass-produced smart mirrors.
[0037] In view of this, this application provides a height measurement method that can be applied to smart mirrors. The method may include: acquiring a user image through the smart mirror's camera; performing specified facial feature recognition on the user image to determine the physical pixel distance of each pixel in the user image; and then determining the user's height based on a pre-calibrated camera height and the number of pixels in the vertical direction between the specified facial feature and the center point of the user image. This method allows smart mirrors to measure user height using only a single camera, thus avoiding the increased production costs associated with using specialized cameras for height measurement.
[0038] See Figure 1 This is a hardware configuration block diagram of a smart mirror provided in an embodiment of this application. For example... Figure 1 As shown, the smart mirror 100 includes a processor 110, a detector 120, a communication interface 130, a display 140, a user input / output interface 150, an audio output interface 160, a memory 170, and a power supply 180.
[0039] Processor 110 includes CPU processor 111, RAM 112, ROM 113, graphics processor 114, communication interface 115, and communication bus. RAM 112, ROM 113, CPU processor 111, graphics processor 114, video processor 116, audio processor 117, and communication interface 115 are connected via the communication bus. Communication interface 115 may include a first interface 115-1 to an nth interface 115-n. These interfaces may also be network interfaces connected to external devices via a network.
[0040] ROM 113 is used to store various system startup instructions. For example, when a power-on signal is received, the smart mirror 100 starts up, and the CPU processor 111 executes the system startup instructions in the ROM, copying the operating system stored in memory 170 to RAM 112 to start running the operating system. After the operating system has started, the CPU processor 111 copies various application programs from memory 170 to RAM 112, and then starts running the various application programs.
[0041] The graphics processor 114 is used to generate various graphical objects, such as icons, operation menus, and graphics displayed based on user input commands. It includes an arithmetic logic unit (ALU) that performs calculations based on various user-input interactive commands and displays various objects according to display attributes. It also includes a renderer that generates various objects based on the ALU's results and displays the rendering results on the monitor 140.
[0042] In some embodiments, the video processor 116 is configured to receive external video signals and perform at least one of the following video processing operations according to the standard encoding and decoding protocol of the input signals: decompression, decoding, scaling, noise reduction, frame rate conversion, resolution conversion, image synthesis, etc., to obtain a signal that can be directly displayed or played on the display 140.
[0043] In some embodiments, the video processor 116 includes at least one of a demultiplexing module, a video decoding module, an image compositing module, a frame rate conversion module, and a display formatting module. The demultiplexing module is used to demultiplex the input audio and video data streams. The video decoding module is used to process the demultiplexed video signal, including decoding and scaling. The image compositing module, such as an image synthesizer, is used to superimpose and mix a GUI signal generated by a graphics generator based on user input or its own generation with the scaled video image to generate a displayable image signal. The frame rate conversion module is used to convert the input video frame rate. The display formatting module is used to change the received frame rate-converted video output signal to conform to a display format, such as outputting an RGB data signal.
[0044] In some embodiments, the audio processor 117 is configured to receive external audio signals, perform decompression and decoding according to a standard codec protocol of the input signal, and at least one of the following processes: noise reduction, digital-to-analog conversion, and amplification, to obtain a sound signal that can be played in a speaker.
[0045] CPU processor 111 is used to execute operating system and application instructions stored in memory 170, as well as various applications, data, and content based on various interactive instructions received from external input, in order to ultimately display various graphical content.
[0046] In some exemplary embodiments, the CPU processor 111 may include multiple processors. These multiple processors may include a main processor and multiple or one sub-processors. The main processor is used to perform some operations of the smart mirror 100 in a pre-powered mode and / or to display images in a normal mode. The multiple or one sub-processors are used for one operation in a standby mode or other states.
[0047] Detector 120 is used by the smart mirror 100 to collect signals from the external environment or to interact with the outside world. Detector 120 includes an image acquisition device 121, such as a camera or webcam, which can be used to capture images of the external environment and to capture images of the user's attributes or clothing.
[0048] In some other exemplary embodiments, the detector 120 may also include a sound collector 122, such as a microphone, which can be used to receive the user's voice, including voice signals of the user's control commands to the smart mirror 100, or to collect ambient sounds for identifying the type of environmental scene.
[0049] In some other exemplary embodiments, detector 120 may also include weather collector 123, such as an air temperature detector, for collecting current weather temperature or weather and climate attribute data such as the current season.
[0050] Communication interface 130 is a component used to communicate with external devices or external servers according to various communication protocol types. For example, communication interface 130 can be a Wi-Fi module 131, a Bluetooth module 132, a wired Ethernet module 133, a USB module 134, or other network communication protocol modules or near-field communication protocol modules.
[0051] The smart mirror 100 can establish a communication interface 130 to send and receive control signals and data signals with external control devices or content providing devices.
[0052] The display 140 includes a display component for presenting images and a driving component for driving the image display, and may be a screen. The displayed image content may be image content processed by the processor 110, or it may display various image content received from a network server via a network communication protocol.
[0053] In addition, the display 140 displays a user interface generated in the smart mirror 100 and used to control the smart mirror 100.
[0054] User input / output interface 150 includes a user input interface for receiving user input signals and then sending these signals to processor 110. This includes at least one of other input interfaces, such as a voice device (not shown, e.g., a microphone) or a touchscreen (not shown). For example, a user can input commands via voice or touch. The input interface converts the received analog signals into digital signals and then into corresponding command signals before sending them to processor 110. The user output interface outputs user commands received by the user input interface to processor 110, or outputs images processed by processor 110. The user output interface may include an LED interface and a display 140 for outputting images. For example, the user output interface receives the output signal processed by processor 110 and displays it as an image on display 140.
[0055] For example, a user inputs a command via a touchscreen or voice device, and the user input interface responds to the user's input via the processor 110.
[0056] In some embodiments, a user can input user commands on a graphical user interface (GUI) displayed on a display 140, and the user input interface receives user input commands through the graphical user interface (GUI).
[0057] The processor 110 controls the operation of the smart mirror 100 and responds to user operations through various software control programs stored in the memory 170.
[0058] In some embodiments, the audio output interface 160 is used to output audio signals to other devices, and may include components such as a speaker 161 and an external audio output terminal 162 for playing or transmitting audio. For example, it can output audio signals to a speaker to play audio, or output audio signals to other audio devices for playback or amplification.
[0059] The memory 170 is used to store various operating programs, data, and applications that drive and control the smart mirror 100. The memory 170 can store various control signal instructions input by the user. It includes storing various software modules used to drive the smart mirror 100. For example, the various software modules stored in the memory 170 include: a basic module, a detection module, a display control module, a communication module, etc.
[0060] The system includes the following modules: a basic module for signal communication between various hardware components in the smart mirror 100 and a low-level software module for sending processing and control signals to higher-level modules; a detection module for collecting various information from various detectors or user input interfaces, performing digital-to-analog conversion, and analysis; a display control module for controlling the display 140 to display image content, including multimedia images and UI information; and a communication module for control and data communication with external devices.
[0061] Meanwhile, the memory 170 can also be used to store received external data and user data, images in various user interfaces, and visual effect diagrams, etc.
[0062] Additionally, the memory 170 is specifically used to store the running program of the processor 110 in the smart mirror 100, as well as various applications built into the smart mirror 100, various applications downloaded by the user from external devices, various graphical user interfaces related to the applications, various objects related to the graphical user interfaces, user data information, and various internal data supporting the applications. The memory 170 is also used to store system software such as the OS kernel, middleware, and applications, as well as drivers and related data for the display 140, communication interface 130, and detector 120 input / output interfaces, or to store other user data.
[0063] The power supply 180 provides power to the various components in the smart mirror 100 for startup and operation. It can take the form of a battery and related control circuitry. Under user operation, it provides power to the smart mirror 100 from an external power source. The power supply 180 can include a built-in power circuit installed inside the smart mirror 100, or it can be an external power source installed in the smart mirror 100, providing an external power interface within the smart mirror 100.
[0064] It should be noted that, Figure 1 The hardware configuration block diagram of the smart mirror shown is merely exemplary. The smart mirror may also include other hardware structures not shown in the diagram, such as a lighting lamp, and this application does not limit this.
[0065] See Figure 2 This is a software configuration block diagram of a smart mirror provided in an embodiment of this application. For example... Figure 2As shown, the memory 170 may include an operating system 171, an interface layout manager 172, an event transmission system 173, and an application program 174.
[0066] Operating system 171 includes execution software for handling various basic system services and for performing hardware-related tasks, acting as a medium for data processing between applications and hardware components, such as the Android operating system. In some embodiments, a portion of the operating system kernel may contain a series of software for managing the hardware resources of the smart mirror 100 and providing services to other programs or software code.
[0067] In other embodiments, a portion of the operating system kernel may include one or more device drivers. A device driver can be a set of software code within the operating system that helps operate or control devices or hardware associated with the smart mirror. The driver may contain code that operates video, audio, and / or other multimedia components. Examples include a display screen, camera, Flash, and WiFi.
[0068] The accessibility module 1711 is used to access or modify the application to enable accessibility of the application and operability of its displayed content.
[0069] The communication module 1712 is used to connect to other peripherals via a relevant communication interface and communication network.
[0070] User interface module 1713 provides objects for displaying the user interface, making them accessible to various applications and enabling user operability. For example, the front-end interactive interface of a smart mirror.
[0071] Control application 1714 is used for controllable process management, including runtime applications, etc.
[0072] The event transmission system 173 can be implemented in the operating system 171 or in the application 174. In some embodiments, it is implemented in both the operating system 171 and the application 174. It is used to listen for various user input events and to implement one or more sets of predefined operations based on the identification results of various events or sub-events.
[0073] The event listening module 1731 is used to listen for user input events or sub-events; the event recognition module 1732 is used to define various events input through various user input interfaces, identify various events or sub-events, and transmit them to the processor 110 for execution of one or more sets of corresponding processing programs. For example, the processor 110 processes the corresponding events or sub-events according to the logic program and core algorithm stored in the smart mirror 100, and presents the processed results on the display 140.
[0074] Here, an event or sub-event refers to an input detected by one or more detectors in the smart mirror 100. For example, various sub-events of user voice input or various sub-events of input via touchscreen operation.
[0075] The interface layout manager 172 directly or indirectly receives events or sub-events from user inputs listened to by the event transmission system 173, and uses them to update the layout of the user interface, including but not limited to the position of each control or sub-control in the interface, as well as the size or position and hierarchy of containers and other execution operations related to the interface layout.
[0076] It should be noted that, Figure 2 The software configuration diagram of the smart mirror shown is merely exemplary and is not intended to limit the scope of this application.
[0077] See Figure 3 This is a schematic diagram of the structure of a smart mirror provided in an embodiment of this application. The smart mirror 300 includes: Figure 1 The diagram shows a display 140, a processor 110, and a camera 320 in a detector 120. The camera 320 is used to capture user images and send them to the processor 110. The processor 110 is used to determine the user's height based on the user images captured by the camera 320.
[0078] In this application, the processor 110 is connected to the camera 320, and the camera 320 can perform... Figure 3 The camera 320 is positioned on the left side of the monitor 140, but it can also be positioned on the right side of the monitor 140 or in other locations, as long as it can capture an image of the user's face. It should be noted that, to reduce costs, the camera 320 in this application can be a visible light imaging sensor RGB camera. Figure 3 The structure of the smart mirror in this application is merely exemplary. The smart mirror 300 may also include multiple cameras. This application does not specifically limit the number of cameras or the position of each camera.
[0079] The processor 110 in this application can be a microprocessor (Micro Controller Unit, MCU), which can be located on the back of the smart mirror 300. The processor 110 is connected to the display 140 and can be used to control the display content of the display 140. When the processor 110 controls the display 140 to display a mirror image, the display 140 can... Figure 4 As shown, only the user's image is displayed. When the processor 110 controls the display 140 to display specified content, the display 140 can, as shown... Figure 5As shown, a corresponding display area is allocated on the display 140 for specified content. The specified content includes weather, news, user images captured by a camera, and the determined user's height. Additionally, the processor 110 can also control the display 140 to display video footage within the specified area.
[0080] See Figure 6 This is one of the exemplary flowcharts of a height measurement method provided in an embodiment of this application. This method can be applied to... Figure 1-3 The smart mirror shown may include the following processes: S601, a smart mirror that acquires user images.
[0081] Smart mirrors can obtain through Figure 3 The user images captured in real time by the camera shown can also be obtained from pre-stored images, such as... Figure 1 The image shown is a user image stored in the memory. This user image is an image of the user's face captured by the smart mirror's camera.
[0082] S602, the smart mirror performs specified facial feature recognition on the user image, and determines the unit pixel distance in physical space for each pixel in the user image based on the number of pixels corresponding to the length and / or height of the recognized specified facial feature and the preset reference length and / or reference height for the specified facial feature.
[0083] Smart mirrors can be used to... Figure 3 The processor shown uses a keypoint recognition algorithm to identify specified facial features of the user. These specified facial features may include the user's pupils, the lowest point of the chin, the tip of the nose, etc. It should be understood that the keypoint recognition algorithm can be any existing algorithm that can be used to identify specified facial features in a user image, such as the Media Pipe algorithm, and this application does not limit it.
[0084] Specifically, the unit pixel distance corresponding to each pixel in the user image in physical space can be represented by formula (1): Formula (1) In the formula, Used to represent the unit pixel distance in physical space corresponding to each pixel in a user image. Used to indicate the preset reference length and / or reference height of a specified facial region. Used to represent the number of pixels corresponding to the length and / or height of a specified facial region.
[0085] In one example, the smart mirror can use a key point recognition algorithm to identify the user's two pupils in the user image and determine the number of pixels corresponding to the user's interpupillary distance. Since the interpupillary distance ranges from 58 to 65 mm in the statistics of adult residents in China, a preset interpupillary distance benchmark value of 61.5 mm can be used. Then, based on the number of pixels corresponding to the user's interpupillary distance and the preset interpupillary distance benchmark value, the unit pixel distance corresponding to each pixel in the user image in physical space is determined, satisfying formula (2).
[0086] Formula (2)
[0087] In the formula, 61.5 is the preset interpupillary distance reference value. The number of pixels corresponding to the user's interpupillary distance.
[0088] In another example, the smart mirror can use a key point recognition algorithm to identify any pupil of the user in the user image and determine the number of pixels corresponding to the user's pupil diameter. Since the diameter of a human pupil is usually 11.7 ± 0.5 mm, a baseline value of 11.7 mm can be preset for the pupil diameter. Then, based on the number of pixels corresponding to the user's pupil diameter and the preset baseline value of the pupil diameter, the unit pixel distance corresponding to each pixel in the user image in physical space is determined, satisfying formula (3).
[0089] Formula (3)
[0090] In the formula, 11.7 is the preset baseline value for pupil diameter. The number of pixels corresponding to the user's pupil diameter.
[0091] The S603 smart mirror determines the user's height based on the number of pixels between the face and a first center point in the vertical direction, as well as the unit pixel distance, using a pre-calibrated camera height.
[0092] Smart mirrors can be used to... Figure 3 The processor of the smart mirror shown determines the user's height based on a pre-calibrated camera height, specifying the number of pixels between the facial features and a first center point in the vertical direction, and the unit pixel distance determined in S602. Here, the first center point is the center point of the user's image. Specifying the number of pixels between the facial features and the first center point in the vertical direction can also be done by specifying the number of pixels between a specific feature point of the facial features and the first center point in the vertical direction. See also... Figure 7 This is one of the user image illustrations provided in the embodiments of this application. Figure 7In this model, the user's pupils are designated as the facial region, and the midpoint of the line connecting the two pupils is used as the feature point of the designated facial region. Point A is the midpoint of the user's two pupils, and point B is the first center point. Since points A and B are not on the same straight line in the vertical direction, a straight line m can be drawn perpendicularly through point B, and a perpendicular line can be drawn from point A to line m, with the foot of the perpendicular at point C. The number of pixels between points C and B is the same as the number of pixels between points A and B in the vertical direction, which is also the number of pixels between the designated facial region and the first center point.
[0093] Based on the above solution, the smart mirror can measure the user's height with a single camera, thus avoiding the increased production cost of the smart mirror caused by using a professional camera to achieve the height measurement function.
[0094] In one possible implementation, to reduce errors, before the camera captures the user's image, it can be done by, for example... Figure 8 The procedure shown calibrates the camera to determine its field of view and offset angle.
[0095] S801, the camera captures the first and second images.
[0096] Place the ruler at a first distance from the smart mirror and capture a first image containing the ruler. Then place the ruler at a second distance from the smart mirror and capture a second image containing the ruler. Note that the first and second distances are not equal. It should be noted that the point where the ruler intersects the ground is the position where the scale value on the ruler is 0. Furthermore, the maximum scale value of the ruler is greater than or equal to the preset theoretical height of the camera above the ground.
[0097] It should be understood that the first distance and the second distance can be preset based on actual conditions and experience, and the first distance can be greater than or less than the second distance. For example, the first distance can be 45cm and the second distance can be 60cm, or the first distance can be 60cm and the second distance can be 45cm. This application does not limit this.
[0098] See Figure 9 This is a schematic diagram illustrating the placement of the ruler provided in an embodiment of this application. Figure 9 As shown, the ruler and the smart mirror are located on the same ground, with the ruler perpendicular to the ground. A first image is captured when the ruler is at position A1, and a second image is captured when the ruler is at position A2. When the ruler is at position A1, the distance between the ruler and the smart mirror is l1. When the ruler is at position A2, the distance between the ruler and the smart mirror is l2.
[0099] S802, determine the first scale value and the second scale value.
[0100] Determine the first scale value corresponding to the center point of the first image and the second scale value corresponding to the center point of the second image. It should be noted that, in either the first or second image, the scale value corresponding to the center point refers to the scale value aligned with the line perpendicular to the scale where the center point is located.
[0101] In one example, see Figure 10 This is a schematic diagram of a first image provided for an embodiment of this application. (See attached image.) Figure 10 As shown, line K is the line perpendicular to the ruler where the center point O of the first image is located. Since the scale value aligned with line K on the ruler is 165cm, the scale value corresponding to the center point O of the image is 165cm.
[0102] S803 determines the camera's field of view and offset angle.
[0103] The field of view of the camera can be determined based on the first scale value and the second scale value, the first distance and the second distance, satisfying formula (4).
[0104] Formula (4)
[0105] In the formula, Indicates the camera's field of view. Indicates the second scale value. This indicates the first scale value. Indicates the second distance. Indicates the first distance.
[0106] In some embodiments, the deviation angle of the camera can be determined based on a first distance, a first scale value, and a preset theoretical height of the camera above the ground, satisfying formula (5).
[0107] Formula (5)
[0108] In the formula, For the camera's deviation angle, H 1 This is the preset theoretical height of the camera above the ground.
[0109] It should be noted that the calculated result of the deviation angle can be positive, negative, or 0. For example... Figure 11A As shown, when the deviation angle A positive value indicates that the first scale value is greater than the preset theoretical height of the camera above the ground. The dotted line represents the camera's orientation, showing that the camera is pointing upwards in the horizontal direction. For example... Figure 11B As shown, when the deviation angle A negative value indicates that the first scale value is less than the preset theoretical height of the camera above the ground. The dashed line represents the camera's orientation, showing that the camera is pointing downwards in the horizontal direction. When the deviation angle is 0, it means that the first scale value is equal to the preset theoretical height of the camera above the ground, meaning that the camera's orientation coincides with the horizontal direction.
[0110] In other embodiments, the camera's deviation angle can also be determined based on a second distance, a second scale value, and a preset theoretical height of the camera above the ground, satisfying formula (6).
[0111] Formula (6)
[0112] Based on the above solution, this application calibrates the camera by taking two images after adjusting the position of the scale. Compared to the prior art which takes a single image including the scale, this effectively avoids the camera's orientation relative to the mirror and the camera's structure from affecting the calibration results, thereby reducing errors in height measurement.
[0113] In some embodiments, due to potential camera angular deviations, the camera may not be oriented horizontally. Consequently, the center point of the captured image may not correspond to the theoretically preset camera height above the ground, resulting in an image height deviation. See also Figure 12 This is a schematic diagram of image height deviation provided in the embodiments of this application, such as... Figure 12 As shown, the dashed line indicates the direction the camera is facing. The deviation angle of the camera. Point O is the center point of the user image when the camera is facing horizontally, and point P is the actual center point of the user image. The distance between point O and point P is the image height deviation.
[0114] Therefore, to improve accuracy, smart mirrors can use methods such as... Figure 13 The process shown determines the image height deviation and the pre-calibrated camera height: S1301, determine the third distance between the camera and the user when capturing an image of the user.
[0115] The smart mirror can determine the third distance between the camera and the user when capturing an image, based on the camera's resolution, unit pixel distance, and field of view, satisfying formula (7). The method for determining the unit pixel distance can be found in... Figure 6 The relevant descriptions in the method embodiments shown, and the method for determining the field of view, can be found in, for example... Figure 8 The relevant descriptions in the method embodiments shown will not be repeated here.
[0116] Formula (7)
[0117] In the formula, Used to represent the third distance, Used to indicate the resolution of a camera.
[0118] S1302, determine the image height deviation of the user image.
[0119] The smart mirror can determine the image height deviation of the user image based on the third distance determined by S1301 and the deviation angle of the camera determined when calibrating the camera, satisfying formula (8).
[0120] Formula (8)
[0121] In the formula, Used to indicate image height deviation.
[0122] S1303, determine the pre-calibrated camera height.
[0123] The smart mirror determines the pre-calibrated camera height based on the theoretical height of the camera above the ground and the image height deviation, satisfying formula (9).
[0124] Formula (9)
[0125] In the formula, The pre-calibrated camera height.
[0126] It should be noted that since the deviation angle can be positive, negative, or 0, the image height deviation can also be positive, negative, or 0. A positive image height deviation indicates that the pre-calibrated camera height is greater than the preset theoretical height of the camera above the ground. A negative image height deviation indicates that the pre-calibrated camera height is less than the preset theoretical height of the camera above the ground. A zero image height deviation indicates that the pre-calibrated camera height is equal to the preset theoretical height of the camera above the ground.
[0127] In one possible implementation, see [link to relevant documentation]. Figure 14 This is an exemplary flowchart of a user height determination method provided in an embodiment of this application, based on the unit pixel distance determined using interpupillary distance and such as Figure 8 The camera calibration process shown, where the smart mirror determines the user's height based on a pre-calibrated camera height, specifying the number of pixels between the facial area and a first center point in the vertical direction, and the unit pixel distance, can include the following steps: S1401, determine the number of pixels between the second center point in the vertical direction and the upper edge of the user image.
[0128] The second center point is used to represent the midpoint of the line connecting the user's two pupils in the user image.
[0129] Specifically, the smart mirror can determine the number of pixels between the recognized second center point and the top edge of the user image in the vertical direction. (See also...) Figure 15 This is one of the user image illustrations provided in the embodiments of this application. For example... Figure 15 As shown, point A is the second center point, and point B is the first center point. A perpendicular line is drawn from point A to the top edge of the user image, with the foot of the perpendicular at point D. The number of pixels between points A and D is the same as the number of pixels between the second center point and the top edge of the user image in the vertical direction.
[0130] S1402, determine the second number of pixels between the first center point and the second center point in the vertical direction in the user image based on the resolution of the camera.
[0131] The second quantity is determined by the difference between the number of pixels between the first center point and the top edge of the user image and the number of pixels between the second center point and the top edge of the user image in the vertical direction, satisfying formula (10). Specifically, in the vertical direction, the number of pixels between the first center point and the top edge of the user image is half the vertical resolution of the camera. For example, if the vertical resolution of the camera is 1920, then the number of pixels between the first center point and the top edge of the user image is 960.
[0132] Formula (10)
[0133] In the formula, Second quantity, This refers to the vertical resolution of the camera. This represents the number of pixels between the second center point in the vertical direction and the top edge of the user image.
[0134] S1403, determine the height of the user's pupil from the ground.
[0135] The height of the user's pupil from the ground is determined based on the unit pixel distance, the second quantity, and the pre-calibrated camera height, satisfying formula (11).
[0136] Formula (11)
[0137] In the formula, Used to indicate the height of a user's pupil from the ground, such as Figure 16 As shown. Figure 16 In the middle, the camera is oriented as if... Figure 8The process shown is determined during camera calibration, where H3 is based on... Figure 13 The process shown calculates the pre-calibrated camera height.
[0138] It should be noted that, due to It can be greater than , It can also be smaller than , It can also equal to . Less than This indicates that the user's pupil is at a height greater than the pre-calibrated camera height. Greater than This indicates that the user's pupil is at a height greater than the pre-calibrated camera height. equal When the height of the user's pupil from the ground is equal to the pre-calibrated camera height, it indicates that the height of the user's pupil from the ground is equal to the pre-calibrated camera height. Since the second quantity is a scalar and cannot be negative, it cannot be used to represent the relationship between the height of the user's pupil from the ground and the pre-calibrated camera height. Therefore, the second quantity calculated using formula (10) in formula (11) cannot be directly substituted into it. .
[0139] S1404, determine the height between the top of the user's head and the pupil.
[0140] Since a user's height is equal to the sum of the height of their pupil from the ground and the height between the top of their head and their pupil, and the human pupil is typically located at about half the height of the face, as... Figure 17 As shown, for the user image, the height between the second center point A and the lowest point E of the chin is approximately equal to the height between the user's second center point A and the top of the head F. The height of the top of the head (F) needs to be adjusted to remove the influence of hair. Therefore, to avoid inaccurate identification of the top of the user's head due to hair, the height between the top of the user's head and the pupil can be determined by measuring the height between the lowest point of the user's chin and the pupil.
[0141] Specifically, the smart mirror can determine the third number of pixels between the second center point and the lowest point of the chin in the vertical direction, satisfying formula (12).
[0142] Formula (12)
[0143] In the formula, As the third quantity, This represents the number of pixels between the lowest point of the user's chin and the top edge of the user's image in the vertical direction.
[0144] Then, based on the third quantity and the unit pixel distance, the height between the top of the user's head and the pupil is determined, satisfying formula (13).
[0145] Formula (13)
[0146] In the formula, Used to indicate the height between the top of the user's head and their pupil.
[0147] S1405, determine the user's height.
[0148] The user's height is determined by the sum of the height of the user's pupil from the ground and the height between the top of the user's head and the pupil, satisfying formula (14).
[0149] Formula (14)
[0150] In the formula, Used to indicate the user's height.
[0151] Below, in order to more clearly understand the solution proposed in the embodiments of this application, a height measurement method provided by this application will be introduced in conjunction with specific embodiments.
[0152] See Figure 18 This is one of the exemplary flowcharts of a height measurement method provided in this application embodiment, specifically including the following process: S1801, calibrate the camera.
[0153] It can be done as follows Figure 8 The camera calibration procedure shown calibrates the camera to determine its field of view and deviation angle. The first distance can be 45cm, and the second distance can be 60cm. Since the average height of an adult resident's pupil from the ground is close to 165cm, the theoretical height of the camera above the ground can be set to 165cm. The specific procedure will not be detailed here.
[0154] S1802, determine the unit pixel distance.
[0155] The smart mirror can use the user's pupils as designated facial features, and as shown in formula (2), determine the unit pixel distance in physical space corresponding to each pixel in the user's image based on the pupil distance reference value. For specific methods, please refer to... Figure 6 The relevant descriptions in the method embodiments shown will not be repeated here.
[0156] S1803, calculate the image height deviation.
[0157] The smart mirror can determine the image height deviation of the user's image based on the camera's deviation angle and field of view determined by S1801, and the unit pixel distance determined by S1802. The method for determining the image height deviation can be found in [reference needed]. Figure 13 The relevant descriptions in the method embodiments shown will not be repeated here.
[0158] S1804, determine the height of the user's pupil from the ground.
[0159] The smart mirror can determine a pre-calibrated camera height based on the image height deviation determined by S1803. It then determines a second number of pixels between the first center point and the second center point in the user image in the vertical direction, based on the camera's resolution. Finally, it determines the height of the user's pupil from the ground based on the unit pixel distance, the second number, and the pre-calibrated camera height. For a detailed method for determining the pre-calibrated camera height, please refer to [reference needed]. Figure 13 The relevant descriptions in the method embodiments shown, and the specific methods for determining the height of the user's pupil from the ground, can be found in, for example... Figure 14 The relevant descriptions in the method embodiments shown will not be repeated here.
[0160] S1805, determine the height of the user's pupil from the lowest point of the chin.
[0161] The method by which smart mirrors determine the height of a user's pupil from the lowest point of their chin can be found in [reference needed]. Figure 14 The relevant descriptions in the method embodiments shown will not be repeated here.
[0162] S1806, determine the user's height.
[0163] The smart mirror can determine a user's height based on the sum of the height of the user's pupils from the ground and the height of the user's pupils from the lowest point of their chin, and can display this height on the smart mirror's display screen.
[0164] Based on the same concept as the above method, see [link to relevant documentation]. Figure 19 This application provides a height measuring device 1900, which includes a data acquisition unit 1901 and a processing unit 1902. The device 1900 is capable of performing the steps of the above-described method; to avoid repetition, these steps will not be described in detail here.
[0165] Based on the same concept as the above method, see [link to relevant documentation]. Figure 20 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device includes at least one processor 2002 and a memory 2001 connected or coupled to the at least one processor 2002. In addition, the electronic device may also include a communication interface 2003. The electronic device can interact with other devices through the communication interface 2003.
[0166] For example, the communication interface 2003 can be a transceiver, circuit, bus, module, pin, or other type of communication interface. When the electronic device is a chip-based device or circuit, the communication interface 2003 in the electronic device can also be an input / output circuit, which can input information (or receive information) and output information (or send information). The processor is an integrated processor, a microprocessor, an integrated circuit, or a logic circuit, and the processor can determine the output information based on the input information.
[0167] The coupling in this application embodiment is an indirect coupling or communication connection between devices, units, or modules, which can be electrical, mechanical, or other forms, used for information exchange between devices, units, or modules. The processor 2002 may operate in conjunction with the memory 2001 and the communication interface 2003. This application does not limit the specific connection medium between the processor 2002, the memory 2001, and the communication interface 2003.
[0168] Optional, see Figure 20 The processor 2002, the memory 2001, and the communication interface 2003 are interconnected via a bus. This bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 20 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0169] In this embodiment, memory 2001, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 2001 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory 2001 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. Memory 2001 in this embodiment may also be a circuit or any other device capable of implementing storage functions for storing instructions, computer programs, and / or data.
[0170] In this application embodiment, the processor 2002 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the various methods, steps, and logic block diagrams disclosed in this application embodiment. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the height measurement method disclosed in this application embodiment can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0171] By designing and programming the processor 2002, the code corresponding to the height measurement method described in the foregoing embodiments can be embedded into the chip, so that the chip can execute the steps of the aforementioned height measurement method when running. How to design and program the processor 2002 is a well-known technique to those skilled in the art, and will not be described in detail here.
[0172] In one or more embodiments, memory 2001 stores instructions that can be executed by at least one processor 2002, which can implement the steps of any of the above methods by calling the instructions or computer programs stored in memory 2001.
[0173] This application also provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the steps of any of the above methods.
[0174] In some embodiments, various aspects of the height measurement method provided in this application may also be implemented in the form of a computer program product, which includes program code that, when the computer program product is run on an electronic device, causes the electronic device to perform the steps of any of the methods described above in this specification.
[0175] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0176] While specific embodiments of this application have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this application is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this application, and all such changes and modifications fall within the scope of protection of this application. Although preferred embodiments of this application have been described, those skilled in the art, once they understand the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0177] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A smart mirror, characterized in that, The smart mirror includes: A display, the display being used for making a display; The camera, used to capture user images and send them to the processor; the user image is an image containing the user's face; The processor is used to perform the following processes: Identify the pupils in the user image and determine a first number of pixels between the user's two pupils; The unit pixel distance in physical space corresponding to each pixel in the user image is determined based on the preset interpupillary distance reference value and the first quantity. The second number of pixels between the first center point and the second center point in the vertical direction in the user image is determined based on the resolution of the camera; the first center point is the center point of the user image, and the second center point is used to represent the midpoint of the line connecting the two pupils of the user in the user image; The height of the user's pupil from the ground is determined based on the unit pixel distance, the second quantity, and the pre-calibrated camera height; Determine the third number of pixels between the second center point and the lowest point of the chin in the vertical direction; The height between the top of the user's head and the pupil is determined based on the third quantity and the unit pixel distance; The user's height is determined by the sum of the height of the user's pupil from the ground and the height between the top of the user's head and the pupil.
2. The smart mirror according to claim 1, characterized in that, The pre-calibrated camera height is determined by the processor performing the following operations: The field of view of the camera is determined based on the height of the center point of the image captured by the camera in physical space. The third distance between the camera and the user when capturing the user image is determined based on the camera's resolution, the unit pixel distance, and the field of view. The image height deviation is determined based on the deviation angle between the third distance and the camera; the deviation angle represents the angle between the camera's orientation and the horizontal direction. The pre-calibrated camera height is determined based on the preset theoretical height of the camera above the ground and the image height deviation.
3. The smart mirror according to claim 2, characterized in that, When the processor determines the field of view of the camera based on the height of the center point of the image captured by the camera in physical space, it is configured as follows: Based on the first image and the second image captured by the camera, which include a ruler placed vertically on the ground, a first scale value corresponding to the center point of the first image and a second scale value corresponding to the center point of the second image are determined; wherein, when the first image is captured, the distance between the smart mirror and the ruler is a first distance, and when the second image is captured, the distance between the smart mirror and the ruler is a second distance, and the first distance and the second distance are not equal; The field of view of the camera is determined based on the first scale value, the second scale value, the first distance, and the second distance.
4. The smart mirror according to claim 3, characterized in that, The deviation angle is determined based on the following method: The deviation angle is determined based on the first distance, the first scale value, and the preset theoretical height of the camera above the ground; or, The deviation angle is determined based on the second distance, the second scale value, and the preset theoretical height of the camera above the ground.
5. A method for measuring height, characterized in that, include: Use a camera to capture the user's image; The user image is an image containing the user's face; Identify the pupils in the user image and determine a first number of pixels between the user's two pupils; The unit pixel distance in physical space corresponding to each pixel in the user image is determined based on the preset interpupillary distance reference value and the first quantity. The second number of pixels between the first center point and the second center point in the vertical direction in the user image is determined based on the resolution of the camera; the first center point is the center point of the user image, and the second center point is used to represent the midpoint of the line connecting the two pupils of the user in the user image; The height of the user's pupil from the ground is determined based on the unit pixel distance, the second quantity, and the pre-calibrated camera height; Determine the third number of pixels between the second center point and the lowest point of the chin in the vertical direction; The height between the top of the user's head and the pupil is determined based on the third quantity and the unit pixel distance; The user's height is determined by the sum of the height of the user's pupil from the ground and the height between the top of the user's head and the pupil.
6. A height measuring device, characterized in that, include: The acquisition unit is used to acquire user images using a camera; The user image is an image containing the user's face; The processing unit is used to perform the following processes: Identify the pupils in the user image and determine a first number of pixels between the user's two pupils; The unit pixel distance in physical space corresponding to each pixel in the user image is determined based on the preset interpupillary distance reference value and the first quantity. The second number of pixels between the first center point and the second center point in the vertical direction in the user image is determined based on the resolution of the camera; the first center point is the center point of the user image, and the second center point is used to represent the midpoint of the line connecting the two pupils of the user in the user image; The height of the user's pupil from the ground is determined based on the unit pixel distance, the second quantity, and the pre-calibrated camera height; Determine the third number of pixels between the second center point and the lowest point of the chin in the vertical direction; The height between the top of the user's head and the pupil is determined based on the third quantity and the unit pixel distance; The user's height is determined by the sum of the height of the user's pupil from the ground and the height between the top of the user's head and the pupil.
7. An electronic device, characterized in that, include: Memory, used to store computer instructions; A processor, connected to the memory, is configured to execute computer instructions in the memory, and, in executing the computer instructions, implement the method of claim 5.
8. A computer-readable storage medium, characterized in that, include: The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in claim 5.
Citation Information
Patent Citations
Human body height measuring method, human body height measuring device and intelligent mirror
CN106377264A
Height measurement method, device, and equipment based on image recognition, and storage medium
CN111387987A