Measurement method based on a television remote control, storage medium, and television
Patent Information
- Application Number
- CN202310681347.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-06-08
AI Technical Summary
因此,摄像头的用途较为单一,难以满足用户的多样化需求
[0034] In this embodiment, the contour of the part of the target object to be measured can be obtained more accurately through the movement path of the TV remote control, so as to accurately obtain the target size of the target object through the first ratio and the contour of the part of the target object to be measured, thereby enriching the uses of the camera device.
Smart Images

Figure CN117409066B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of television, and particularly relates to a measurement method, storage medium, and television based on a television remote control. Background Technology
[0002] As the home appliance industry moves towards intelligentization, televisions are beginning to incorporate intelligent modules such as cameras and microphones.
[0003] In related technologies, cameras are mainly used for taking pictures and video communication. Therefore, the uses of cameras are relatively limited and cannot meet the diverse needs of users. Summary of the Invention
[0004] This application provides a measurement method, storage medium, and television based on a television remote control, enabling the television to measure the size information of a target object through a camera device, thereby enriching the uses of the camera device.
[0005] In a first aspect, embodiments of this application provide a measurement method based on a television remote control, applied to a television equipped with a camera device, comprising the following steps:
[0006] Obtain a first ratio of the target object at a first position, wherein the first ratio is the ratio of the actual size of the target object to the size of the target object in the image captured by the camera device;
[0007] When the TV remote control moves along the surface of the target object at the first position, a first movement path is obtained, and the first movement path is the movement path of the TV remote control in the imaging screen of the camera device;
[0008] The target size of the target object is obtained based on the first ratio and the first movement path.
[0009] Optionally, the television remote control is equipped with a gyroscope;
[0010] Before obtaining the target size of the target object based on the first ratio and the first movement path, the measurement method further includes: receiving measurement information from the gyroscope; obtaining a first intermediate size based on the measurement information from the gyroscope, wherein the first intermediate size is the actual movement distance of the TV remote control during the movement along the first movement path;
[0011] The step of obtaining the target size of the target object based on the first ratio and the first movement path includes: obtaining a second intermediate size based on the first ratio and the first movement path; and determining one of the first intermediate size and the second intermediate size as the target size based on the difference between the second intermediate size and the first intermediate size.
[0012] Optionally, determining the target size based on the difference between the first intermediate size and the second intermediate size includes:
[0013] If the difference between the first intermediate dimension and the second intermediate dimension is greater than a first preset value, then the first intermediate dimension is determined to be the target dimension;
[0014] If the difference between the first intermediate dimension and the second intermediate dimension is less than or equal to the first preset value, then the second intermediate dimension is determined to be the target dimension.
[0015] Optionally, the television remote control is provided with a first infrared component; obtaining the first movement path includes: determining the movement path of the first infrared component in the imaging screen of the camera device as the first movement path.
[0016] Optionally, the television remote control further includes a second infrared component; obtaining the first ratio of the target object at the first position includes:
[0017] Obtain a first distance, which is the actual distance between the first infrared component and the second infrared component;
[0018] When the distance between the TV remote control and the target object at the first position is less than a second preset value, the camera device is controlled to capture a third image.
[0019] A second distance is obtained based on the third image, whereby the second distance is the distance between the first infrared component and the second infrared component in the third image.
[0020] The first ratio is obtained based on the first distance and the second distance.
[0021] Optionally, the television remote control includes a first infrared component and a second infrared component spaced apart; obtaining the first ratio of the target object at the first position includes:
[0022] Obtain the actual size of the TV remote control;
[0023] The third distance is obtained based on the actual size of the TV remote control. The third distance is the actual moving distance of the first infrared component when the TV remote control rotates a preset angle at the second position. The distance between the TV remote control at the second position and the target object at the first position is less than the third preset value.
[0024] The fourth distance is obtained based on the image captured by the camera device. The fourth distance is the distance the first infrared component moves when the TV remote control rotates the preset angle at the second position in the image captured by the camera device.
[0025] The first ratio is obtained based on the third distance and the fourth distance.
[0026] Optionally, after obtaining the target size of the target object, the measurement method further includes:
[0027] Calculate the mid-area of the measured portion of the target object based on the target dimensions;
[0028] The area of the measured portion of the target object is determined by rounding down the intermediate area.
[0029] Optionally, after obtaining the target size of the target object, the measurement method further includes:
[0030] Calculate the intermediate volume of the measured portion of the target object based on the target dimensions;
[0031] The intermediate volume is rounded down to determine the volume of the portion of the target object that is being measured.
[0032] Secondly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is executed by a processor to implement the measurement method as described above.
[0033] Thirdly, this application also provides a television, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the measurement method as described above.
[0034] In this embodiment, the contour of the part of the target object to be measured can be obtained more accurately through the movement path of the TV remote control, so as to accurately obtain the target size of the target object through the first ratio and the contour of the part of the target object to be measured, thereby enriching the uses of the camera device. Attached Figure Description
[0035] The technical solution and its beneficial effects will become apparent from the following detailed description of specific embodiments of this application, in conjunction with the accompanying drawings.
[0036] Figure 1 A flowchart of a measurement method based on a TV remote control provided in an embodiment of this application.
[0037] Figure 2 This is a schematic diagram of a first method for obtaining the first ratio in an embodiment of this application.
[0038] Figure 3 This is a schematic diagram of a second method for obtaining the first ratio in an embodiment of this application. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0040] This application provides a measurement method based on a television remote control, applied to a television equipped with a camera. The television can then capture images through the camera.
[0041] In some implementations, the television remote control may include a first infrared component.
[0042] For example, the first infrared component may include an infrared transmitter, allowing the TV remote control to transmit information to the TV via infrared light. For instance, the TV remote control can send control commands to the TV via the first infrared component.
[0043] In some implementations, the television remote control may also include a second infrared component.
[0044] For example, the second infrared component may include an infrared receiver, allowing the TV remote control to receive information transmitted by the TV via infrared light. For instance, after the TV remote control sends a control command to the TV via the first infrared component, it can receive feedback information from the TV via the second infrared component.
[0045] Of course, both the first infrared component and the second infrared component can be infrared emitters, and this application does not limit this.
[0046] In some implementations, the TV remote control may also include a gyroscope. This allows the TV remote control to directly detect changes in its direction and speed, facilitating the subsequent calculation of the distance traveled by the remote control based on these changes. Consequently, users can interact with the TV using the remote control to perform motion-sensing games.
[0047] The method of obtaining the distance moved by an object based on its direction and speed changes is a conventional technique in the prior art, and will not be elaborated upon in the embodiments of this application.
[0048] In some embodiments, the TV remote control may also include a Bluetooth module, which allows the TV remote control to establish a communication connection with the TV and transmit data detected by the gyroscope. Of course, in other embodiments, the TV remote control may also transmit the gyroscope data via the aforementioned first infrared component or a Wi-Fi (Wireless Fidelity) module; this application does not limit the specific implementation of these embodiments.
[0049] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a measurement method based on a television remote control provided in an embodiment of this application. Applying this measurement method, a first ratio can be obtained for a target object at a first position. This first ratio is the ratio of the actual size of the target object to its size in the image captured by the camera device. When the television remote control moves along the surface of the target object at the first position, a first movement path is obtained. This first movement path is the movement path of the television remote control in the image captured by the camera device. Finally, the target size of the target object is obtained based on the first ratio and the first movement path. Furthermore, the movement path of the television remote control allows for a more accurate determination of the edge contour of the target object, avoiding errors when directly identifying the edge contour. This enables the television to accurately determine the target size of the target object based on the first movement path, or the edge contour of the target object.
[0050] It should be noted that the target object can be a mobile phone, a book, a water cup, a piece of fabric, etc., and the target object can also be a person. This application does not limit this.
[0051] The following provides a detailed description of each step. It should be noted that the order of the following embodiments is not intended to limit the preferred order of the embodiments. The measurement method based on a television remote control may include the following steps:
[0052] 110. Obtain the first ratio of the target object at the first position. The first ratio is the ratio of the actual size of the target object to the size of the target object in the imaging screen of the camera device.
[0053] For example, please continue to refer to Figure 2 , Figure 2 This is a schematic diagram of a first method for obtaining a first ratio in an embodiment of this application. Obtaining the first ratio of a target object at a first position may include the following steps:
[0054] 1111. Obtain the first distance, which is the actual distance between the first infrared component and the second infrared component.
[0055] For example, the first distance can be obtained by acquiring the model number of the TV remote control and then determining the correspondence between the TV remote control model and the first distance.
[0056] Of course, the first distance can also be obtained by receiving the first distance information sent by the TV remote control, but this application embodiment does not limit this.
[0057] 1112. When the distance between the TV remote control and the target object at the first position is less than the second preset value, control the camera device to capture the third image.
[0058] Specifically, the second preset value can be 3 mm, 2.5 mm, 2 mm, 1 mm, or 0.5 mm, etc., and this application embodiment does not limit this. Therefore, it can also be understood that when the TV remote control is close to the target object at the first position, it controls the camera device to capture a third image.
[0059] In practical use, the television may prompt the user to place the remote control close to the surface of the target object, allowing the user to move the remote control until the distance between it and the target object at the first position is less than a second preset value. Alternatively, in some other implementations, automated equipment may move the remote control to a distance less than the second preset value from the target object at the first position.
[0060] In some embodiments, before controlling the camera device to capture a third image, the control method further includes: receiving a first instruction transmitted by a first infrared component and a second infrared component; and activating the camera device according to the first instruction.
[0061] In other words, when controlling the camera device to capture the third image, the camera device can capture images of the first infrared component and the second infrared component emitting light. This makes the first and second infrared components more resistant to environmental interference when determining the second distance based on image recognition technology, thus making the obtained second distance more accurate.
[0062] Specifically, the first instruction can be generated by the user pressing a button on the TV remote control.
[0063] 1113. The second distance is obtained from the third image. The second distance is the distance between the first infrared component and the second infrared component in the third image.
[0064] 1114. Obtain the first ratio based on the first distance and the second distance.
[0065] Specifically, the first ratio can be obtained by dividing the first distance by the second distance. Of course, it can also be obtained by dividing the second distance by the first distance; this embodiment of the application does not limit this.
[0066] It is understandable that when the distance between the TV remote control and the target object at the first position is very small, or when the TV remote control is adjacent to the target object at the first position, the first ratio is approximately the ratio of the actual size of the TV remote control to its size in the image captured by the camera device. Therefore, this embodiment of the application obtains the aforementioned first ratio by using the first and second infrared components of the TV remote control itself as a reference. In other words, when the specific size of the TV remote control is known, this embodiment of the application can obtain the first ratio without adding a costly depth camera, thereby further calculating the target size of the target object. Thus, the measurement method of this embodiment not only has the advantage of high accuracy but also the advantage of low cost.
[0067] It is also understandable that, in order to facilitate the interaction between the TV remote control and the TV via the infrared component, the user usually holds the TV remote control in a more comfortable posture when the infrared component is facing the TV. Therefore, compared to selecting other parts of the TV remote control, such as buttons, as a reference to obtain the first ratio, the embodiment of this application can not only make the user's grip more comfortable during the measurement process, but also avoid the camera device being unable to capture the reference object during the movement of the TV remote control.
[0068] Replaceable, please refer to further information. Figure 3 , Figure 3 This is a schematic diagram of a second method for obtaining the first ratio in an embodiment of this application. Obtaining the first ratio of the target object at the first position may further include the following steps:
[0069] 1121. Obtain the actual size of the TV remote control.
[0070] For example, one could obtain the model number of the TV remote control and then determine its actual size based on the correspondence between the model number and the actual size.
[0071] Of course, the actual size of the TV remote control can also be obtained by receiving the first size information sent by the TV remote control; this application embodiment does not limit this.
[0072] 1122. The third distance is obtained based on the actual size of the TV remote control. The third distance is the actual moving distance of the first infrared component when the TV remote control rotates at a preset angle in the second position. The distance between the TV remote control in the second position and the target object in the first position is less than the third preset value.
[0073] The third preset value can be 3 mm, 2.5 mm, 2 mm, 1 mm, or 0.5 mm, etc., and this application embodiment does not limit this. Therefore, it can also be understood that the TV remote control at the second position is close to or adjacent to the target object at the first position.
[0074] In practical use, the television may prompt the user to move the TV remote control to the second position and rotate it by a preset angle. Of course, in some other implementations, an automated device may move the TV remote control to the second position and rotate it by a preset angle; this application does not limit this approach.
[0075] The process of obtaining the third distance based on the actual size of the TV remote control may include multiplying the distance from the first infrared component to the rotation axis of the TV remote control by the rotation angle of the TV remote control to obtain the third distance.
[0076] The preset angle can be 30 degrees, 60 degrees, 90 degrees, 114 degrees or 180 degrees, and this application embodiment does not limit it.
[0077] 1123. The fourth distance is obtained from the image of the camera device. The fourth distance is the distance the first infrared component moves when the TV remote control rotates a preset angle at the second position in the image of the camera device.
[0078] For example, obtaining the fourth distance based on the image captured by the camera device may include: controlling the camera device to capture a first image when the TV remote control is positioned at a first angle in a second position; controlling the camera device to capture a second image when the TV remote control is rotated to a second angle in a second position; and obtaining the fourth distance based on the position of the first infrared component in the first image and the position of the first infrared component in the second image.
[0079] Therefore, the difference between the first placement angle and the second placement angle is the aforementioned preset angle. Specifically, the preset angle can be 30 degrees, 60 degrees, 90 degrees, 114 degrees, or 180 degrees, and this application embodiment does not limit this.
[0080] In some embodiments, before obtaining the fourth distance based on the image captured by the camera device, the control method further includes: receiving a second instruction transmitted by the first infrared component; and activating the camera device according to the second instruction.
[0081] In other words, the first infrared component is emitting light in the imaging screen of the camera device, so that when determining the fourth distance based on image recognition technology, the first infrared component can be identified more accurately, thereby making the fourth distance more accurate.
[0082] Specifically, the second instruction can be generated by pressing a button on the TV remote control.
[0083] 1124. The first ratio is obtained based on the third and fourth distances.
[0084] Specifically, the first ratio can be obtained by dividing the third distance by the fourth distance. Of course, it can also be obtained by dividing the fourth distance by the third distance; this application does not limit this.
[0085] It is understandable that when the distance between the TV remote control at the second position and the target object at the first position is very small, or in other words, when the TV remote control at the second position is adjacent to the target object at the first position, the first ratio is approximately the ratio of the actual size of the TV remote control to its size in the image captured by the camera device. Therefore, this embodiment can obtain the aforementioned first ratio by using the first infrared component of the TV remote control itself as a reference. That is, when the specific size of the TV remote control is known, this embodiment can obtain the first ratio without adding a costly depth camera, thereby further calculating the target size of the target object. Thus, the measurement method of this embodiment not only has the advantage of high accuracy but also the advantage of low cost.
[0086] It is also understandable that, in order to facilitate the interaction between the TV remote control and the TV via the infrared component, the user usually holds the TV remote control in a more comfortable posture when the infrared component is facing the TV. Therefore, compared to selecting other parts of the TV remote control, such as buttons, as a reference to obtain the first ratio, the embodiment of this application can not only make the user's grip more comfortable during the measurement process, but also avoid the camera device being unable to capture the reference object during the movement of the TV remote control.
[0087] Furthermore, in practical use, the image captured by the camera is often interfered with by various ambient lights and walls with complex colors, resulting in a low accuracy rate in recognizing the complete outline of a TV remote control in the image captured by the camera. However, in this embodiment, during the measurement process by the camera, the anti-interference capability of the reference object can be improved by using the infrared light from the first infrared component and / or the second infrared component.
[0088] Of course, in some other implementations, obtaining the first ratio of the target object at the first position may also include: obtaining the depth information of the target object at the first position through a camera device; and obtaining the first ratio based on the depth information of the target object.
[0089] It is understandable that obtaining the depth information of the target object at the first position through the camera device means that the distance from the target object at the first position to the camera device can be obtained, and thus the first ratio can be determined based on the distance from the target object at the first position to the camera device.
[0090] In some implementations, before obtaining the first ratio at the first position of the target object, the measurement method may further include: obtaining the type of the target object; and prompting the corresponding measurement steps based on the type of the target object.
[0091] For example, prompting the user with the corresponding measurement steps based on the type of the target object could include: when the target object is a cuboid, prompting the user to measure the length, width, and height of the cuboid.
[0092] In some implementations, prompting the corresponding measurement steps may include displaying the corresponding measurement steps on a television screen.
[0093] Optionally, prompting the corresponding measurement steps may also include broadcasting the corresponding measurement steps through the sound output device of the television; however, this embodiment of the application does not limit this.
[0094] 120. When the TV remote control moves along the surface of the target object at the first position, the first movement path is obtained. The first movement path is the movement path of the TV remote control in the imaging screen of the camera device.
[0095] In some embodiments, when the TV remote control moves along the surface of the target object, the TV remote control may be attached to the surface of the target object, or the TV remote control may have a certain gap with the surface of the target object. For example, the gap between the TV remote control and the surface of the target object may be less than 5 millimeters. This application does not limit this.
[0096] In some implementations, obtaining the first movement path may include: determining the movement path of the first infrared component in the imaging screen of the camera device as the first movement path.
[0097] Understandably, to facilitate interaction between the TV remote control and the TV via the infrared component, users can typically hold the remote control in a more comfortable posture when the infrared component is facing the TV. Therefore, compared to using other components of the TV remote control, such as buttons, as reference points, the embodiments of this application not only make the user's grip more comfortable during measurement but also prevent the camera device from failing to capture the reference point while the TV remote control is being moved.
[0098] Furthermore, in practical use, the image captured by the camera device is often affected by various ambient lights and complex wall colors, resulting in a low accuracy rate in recognizing the complete outline of the TV remote control in the image captured by the camera device. However, in this embodiment, during the measurement process of the camera device, the anti-interference capability of image recognition of the first infrared component can be improved by using the infrared light of the first infrared component.
[0099] In some implementations, when the TV remote control moves along the surface of the target object, obtaining a first movement path may include: when the TV remote control moves along at least two sides of the surface of the target object, obtaining at least two first sub-movement paths, where different first sub-movement paths correspond to the movement paths of the TV remote control along different sides of the surface of the target object in the imaging screen of the camera device.
[0100] Taking a cuboid as an example, different first sub-movement paths could correspond to the movement paths of the TV remote control along the side of the target object in the length, width, or height direction. This allows us to obtain the dimensions of multiple sides of the target object, which can then be used to derive more parameters of the target object later.
[0101] In some implementations, when the TV remote control moves along the surface of the target object, the user can press a button on the TV remote control to make the first infrared component light up, thereby making the anti-interference capability stronger when determining the first movement path based on image recognition technology, or in other words, the obtained first movement path is more accurate.
[0102] In some implementations, acquiring at least two first sub-movement paths when the TV remote control moves along at least two sides of the surface of the target object may further include: determining whether to switch to measuring different first sub-movement paths based on the luminous state of the first infrared component.
[0103] Specifically, while switching to measure different first sub-movement paths, the TV remote control can turn off the first infrared component.
[0104] For example, a user can first press and hold a button on the TV remote control while moving the remote along the long side of the target object. This allows the TV to obtain a first sub-movement path based on the illuminated first infrared component, which represents the length of the target object. Then, the user releases the button, and the TV can determine the first sub-movement path corresponding to the target object's length based on the deactivated first infrared component. Next, the user can press and hold the button a second time while moving the remote along the short side of the target object. This allows the TV to obtain a second sub-movement path based on the illuminated second infrared component, which represents the width of the target object. Then, the user releases the button, and the TV can determine the first sub-movement path corresponding to the target object's width based on the deactivated first infrared component.
[0105] 130. Obtain the target size of the target object based on the first ratio and the first movement path.
[0106] For example, the target size of the target object can be obtained directly by multiplying the length of the first movement path by a first ratio.
[0107] Furthermore, by moving along the path of the TV remote control, the edge contour of the target object can be obtained more accurately, thus avoiding errors when directly identifying the edge contour of the target object. This allows the TV to accurately obtain the target size of the target object based on the first moving path, or the edge contour of the target object.
[0108] In some embodiments, before obtaining the target size of the target object based on the first ratio and the first movement path, the measurement method further includes: receiving measurement information from a gyroscope, and obtaining a first intermediate size based on the measurement information from the gyroscope, wherein the first intermediate size is the actual movement distance of the TV remote control during the movement along the first movement path.
[0109] Accordingly, obtaining the target size of the target object based on the first ratio and the first movement path includes: obtaining a second intermediate size based on the first ratio and the first movement path; and determining one of the first intermediate size and the second intermediate size as the target size based on the difference between the second intermediate size and the first intermediate size.
[0110] In other words, in this embodiment of the application, the gyroscope originally used for interactive operations such as motion-sensing games in the TV remote control can be reused to measure the size of the target object. The size data detected by the gyroscope and the size parameters detected by the camera device are mutually corrected, thereby further improving the accuracy of the TV in measuring the size of the object to be detected.
[0111] For example, determining one of the first intermediate dimensions and the second intermediate dimension as the target dimension based on the difference between the first intermediate dimension and the second intermediate dimension may include: if the difference between the first intermediate dimension and the second intermediate dimension is greater than a first preset value, then the first intermediate dimension is determined as the target dimension; if the difference between the first intermediate dimension and the second intermediate dimension is less than or equal to the first preset value, then the second intermediate dimension is determined as the target dimension.
[0112] It is understandable that the first infrared component and / or the second infrared component may be blocked during the movement of the TV remote control along the surface of the target object. When the first infrared component and / or the second infrared component are blocked, the dimensional parameters measured by the camera device will be incorrect. Therefore, by checking whether the difference between the first intermediate dimension and the second intermediate dimension is greater than a first preset value, it can be determined whether the first infrared component and / or the second infrared component are blocked during the movement of the TV remote control along the surface of the target object.
[0113] Specifically, if the difference between the first intermediate dimension and the second intermediate dimension is greater than a first preset value, it means that the first infrared component and / or the second infrared component are blocked during the movement of the TV remote control along the surface of the target object, resulting in an inaccurate first movement path obtained by the camera device. In this case, to avoid the inaccurate first movement path affecting the accuracy of the measurement results, the result detected by the gyroscope is directly used as the target dimension of the target object.
[0114] Furthermore, if the difference between the first intermediate dimension and the second intermediate dimension is less than or equal to the first preset value, it means that the infrared component is not blocked during the process of the TV remote control moving along the surface of the target object. In this case, the first moving path obtained by the camera device is also accurate, and the second intermediate dimension detected by the camera device can be used as the target dimension of the target object.
[0115] In some implementations, the first preset value can be 5 centimeters. That is, when the difference between the first intermediate dimension and the second intermediate dimension does not exceed 5 centimeters, the second intermediate dimension obtained through the first moving path is considered to be accurate.
[0116] Of course, in some other implementations, the first preset value may be 4 cm, 3 cm or 5.5 cm, and this application embodiment does not limit it.
[0117] In some implementations, after obtaining the target size of the target object, the measurement method further includes: calculating the intermediate area of the portion of the target object to be measured based on the target size; and rounding the intermediate area down to determine the area of the portion of the target object to be measured.
[0118] Taking a square portion of the target object as an example, calculating the central area of the measured portion of the target object based on the target dimensions can include: obtaining the length and width of the measured portion of the target object based on the target dimensions; and multiplying the length and width of the measured portion of the target object to obtain the central area.
[0119] Taking a circular part of the target object as an example, calculating the central area of the measured part of the target object based on the target size can include: obtaining the perimeter of the measured part of the target object based on the target size; obtaining the radius of the measured part of the target object based on the perimeter of the measured part of the target object; and obtaining the central area from the radius of the measured part of the target object.
[0120] Understandably, depending on the shape of the portion of the target object being measured, different calculation steps can be used to obtain the first area based on the corresponding target dimensions. Since measuring the area of a target object, such as a tablecloth, is usually done to cover or wrap other objects, rounding down the middle area to obtain the area of the measured portion of the target object effectively avoids situations where the target object cannot cover or wrap other objects.
[0121] The floor function is to take the largest integer smaller than itself.
[0122] In some implementations, after determining the area of the target object by rounding down the intermediate area, the measurement method further includes: controlling the television to display the area of the target object being measured.
[0123] For example, the area of the measured portion of the target object can be displayed on a television screen to provide a prompt. Alternatively, the area of the measured portion of the target object can be announced via the television's sound output device; this embodiment of the application does not limit this approach.
[0124] In some implementations, after obtaining the target size of the target object, the measurement method further includes: calculating the intermediate volume of the portion of the target object to be measured based on the target size; and rounding the intermediate volume down to determine the volume of the portion of the target object to be measured.
[0125] Taking a cuboid as an example, the intermediate volume of the measured part of the target object can be calculated based on the target dimensions. This can include: obtaining the length, width, and height of the measured part of the target object based on the target dimensions; and multiplying the length, width, and height of the measured part of the target object to obtain the intermediate volume.
[0126] Taking a cylindrical part of the target object as an example, calculating the intermediate volume of the measured part of the target object based on the target dimensions can include: obtaining the perimeter and height of the measured part of the target object based on the target dimensions; obtaining the radius of the measured part of the target object based on the perimeter of the measured part of the target object; and obtaining the intermediate area based on the radius and height of the measured part of the target object.
[0127] Understandably, depending on the shape of the portion of the target object being measured, different calculation steps can be used to obtain the first volume based on the corresponding target dimensions. In this case, since the target object, such as a cup, is primarily used for containing items, rounding up the intermediate volume to obtain the volume of the measured portion effectively avoids situations where the target object cannot hold other items. Furthermore, measuring the volume of the target object might be for mailing purposes, where additional charges typically apply once the mailing volume reaches a certain threshold. In this case, providing a slightly larger value allows the user to be prepared.
[0128] Rounding up means taking the smallest integer that is larger than itself.
[0129] In some implementations, after determining the volume of the measured portion of the target object by rounding down the intermediate volume, the measurement method further includes: controlling a television to display the volume of the measured portion of the target object.
[0130] For example, the volume of the measured portion of the target object can be displayed on a television screen to provide a prompt. Alternatively, the volume of the measured portion of the target object can be announced via the television's sound output device; this embodiment of the application does not limit this approach.
[0131] It is also understood that, in practical applications, the measurement method may only measure the area of the portion of the target object to be measured. Optionally, the measurement method may also only measure the volume of the portion of the target object to be measured. Of course, the measurement method may also simultaneously test the area and volume of a specific portion of the target object, but this application embodiment does not limit this.
[0132] This application embodiment also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the measurement method based on a TV remote control in any of the above embodiments, such as: obtaining a first ratio of a target object at a first position, the first ratio being the ratio of the actual size of the target object to the size of the target object in the imaging screen of the camera device; obtaining a first movement path when the TV remote control moves along the surface of the target object at the first position, the first movement path being the movement path of the TV remote control in the imaging screen of the camera device; and obtaining the target size of the target object based on the first ratio and the first movement path.
[0133] In the embodiments of this application, the computer-readable storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0134] This application embodiment also provides a television, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the measurement method based on a television remote control in any of the above embodiments, such as: obtaining a first ratio of a target object at a first position, the first ratio being the ratio of the actual size of the target object to the size of the target object in the imaging screen of the camera device; obtaining a first movement path when the television remote control moves along the surface of the target object at the first position, the first movement path being the movement path of the television remote control in the imaging screen of the camera device; and obtaining the target size of the target object based on the first ratio and the first movement path.
[0135] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0136] The measurement method, storage medium, and television provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A measurement method based on a television remote control, applied to a television, wherein the television is equipped with a camera device, characterized in that, The television remote control is equipped with a first infrared component and a second infrared component; it includes the following steps: Obtain the first ratio of the target object at the first position; When the TV remote control moves along the surface of the target object at the first position, a first movement path is obtained. The first movement path is the movement path of the first infrared component of the TV remote control in the imaging screen of the camera device. The target size of the target object is obtained based on the first ratio and the first movement path; The step of obtaining the first ratio of the target object at the first position includes: Obtain a first distance, which is the actual distance between the first infrared component and the second infrared component; When the distance between the TV remote control and the target object at the first position is less than a second preset value, the camera device is controlled to capture a third image. A second distance is obtained based on the third image, whereby the second distance is the distance between the first infrared component and the second infrared component in the third image. The first ratio is obtained based on the first distance and the second distance.
2. The measurement method based on a TV remote control according to claim 1, characterized in that, The television remote control is equipped with a gyroscope; Before obtaining the target size of the target object based on the first ratio and the first movement path, the measurement method further includes: receiving measurement information from the gyroscope; obtaining a first intermediate size based on the measurement information from the gyroscope, wherein the first intermediate size is the actual movement distance of the TV remote control during the movement along the first movement path; The step of obtaining the target size of the target object based on the first ratio and the first movement path includes: obtaining a second intermediate size based on the first ratio and the first movement path; and determining one of the first intermediate size and the second intermediate size as the target size based on the difference between the second intermediate size and the first intermediate size.
3. The measurement method based on a television remote control according to claim 2, characterized in that, The step of determining the target size based on the difference between the first intermediate size and the second intermediate size includes: If the difference between the first intermediate dimension and the second intermediate dimension is greater than a first preset value, then the first intermediate dimension is determined to be the target dimension; If the difference between the first intermediate dimension and the second intermediate dimension is less than or equal to the first preset value, then the second intermediate dimension is determined to be the target dimension.
4. The measurement method based on a TV remote control according to claim 1, characterized in that, The step of obtaining the first ratio of the target object at the first position includes: Obtain the actual size of the TV remote control; The third distance is obtained based on the actual size of the TV remote control. The third distance is the actual moving distance of the first infrared component when the TV remote control rotates a preset angle at the second position. The distance between the TV remote control at the second position and the target object at the first position is less than the third preset value. The fourth distance is obtained based on the image captured by the camera device. The fourth distance is the distance the first infrared component moves when the TV remote control rotates the preset angle at the second position in the image captured by the camera device. The first ratio is obtained based on the third distance and the fourth distance.
5. The measurement method according to any one of claims 1 to 4, characterized in that, After obtaining the target size of the target object, the measurement method further includes: Calculate the mid-area of the measured portion of the target object based on the target dimensions; The area of the measured portion of the target object is determined by rounding down the intermediate area.
6. The measurement method according to any one of claims 1 to 4, characterized in that, After obtaining the target size of the target object, the measurement method further includes: Calculate the intermediate volume of the measured portion of the target object based on the target dimensions; The intermediate volume is rounded down to determine the volume of the portion of the target object that is being measured.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is executed by a processor to implement the measurement method as described in any one of claims 1 to 6.
8. A television, characterized in that, The television includes a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the measurement method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Display equipment, and measuring method and device
CN113587812A
Multi-objective processing device and terminal
CN201654982U