Search

WO-2026091731-A1 - DETECTION METHOD, ELECTRONIC DEVICE, STORAGE MEDIUM, AND PROGRAM PRODUCT

WO2026091731A1WO 2026091731 A1WO2026091731 A1WO 2026091731A1WO-2026091731-A1

Abstract

Provided in the present disclosure are a detection method, an electronic device, a storage medium, and a program product. The method comprises: acquiring a first echo signal, wherein the first echo signal is reflected by a cover plate back to a ToF sensor after the ToF sensor emits a light source signal; determining a first signal strength of the first echo signal; and on the basis of the first signal strength and a second signal strength, determining a detection result of the cover plate, wherein the second signal strength is the signal strength of an echo signal reflected by the cover plate in a first state back to the ToF sensor after the ToF sensor emits the light source signal, and a pollutant index of the cover plate in the first state is less than a preset threshold value. According to the embodiments of the present disclosure, a ToF sensor can be used to emit a light source signal, and detection is implemented on a cover plate by means of a first echo signal reflected by the cover plate, thereby improving efficiency. In addition, the method is not limited by scenarios, and detection accuracy is improved.

Inventors

  • CHANG, Zhongcan
  • WU, Runhao
  • FENG, XIAOGANG

Assignees

  • 荣耀终端股份有限公司

Dates

Publication Date
20260507
Application Date
20250731
Priority Date
20241031

Claims (14)

  1. A detection method, characterized in that it includes: Acquire the first echo signal, which is the light source signal emitted by the ToF sensor and reflected back to the ToF sensor by the cover plate; Determine the first signal strength of the first echo signal; The detection result of the cover plate is determined based on the first signal strength and the second signal strength. The second signal strength is the signal strength of the echo signal reflected back to the ToF sensor after the ToF sensor emits a light source signal and is reflected back to the ToF sensor through the cover plate in the first state. The pollutant index of the cover plate in the first state is less than a preset threshold.
  2. According to the method of claim 1, the cover plate covers the ToF sensor, the cover plate covers the camera, and the detection result of the cover plate is used to characterize the detection result of the camera.
  3. The method according to claim 1 or 2, characterized in that, determining the detection result of the cover plate based on the first signal strength and the second signal strength includes: The detection result of the cover plate is determined based on the ratio or difference between the first signal strength and the second signal strength.
  4. The method according to claim 1 or 2, characterized in that, determining the detection result of the cover plate based on the first signal strength and the second signal strength includes: When the ratio of the first signal strength to the second signal strength is greater than or equal to the first strength threshold, the cover plate is determined to be in the second state, and the pollutant index of the cover plate in the second state is greater than or equal to the preset threshold. When the ratio between the first signal strength and the second signal strength is less than the first strength threshold, the cover plate is determined to be in the first state.
  5. The method according to claim 1 or 2, characterized in that, determining the detection result of the cover plate based on the first signal strength and the second signal strength includes: When the difference between the first signal strength and the second signal strength is greater than or equal to the second strength threshold, the cover plate is determined to be in the second state, and the pollutant index of the cover plate in the second state is greater than or equal to the preset threshold. When the difference between the first signal strength and the second signal strength is less than the second strength threshold, the cover plate is determined to be in the first state.
  6. The method according to claim 1, wherein the ToF sensor is a single-point dToF sensor, and before determining the first signal strength of the first echo signal, the method further includes: Acquire the second echo signal, which is the light source signal emitted by the single-point dToF sensor and reflected back to the single-point dToF sensor by the target object; Based on the reception time of the second echo signal and the emission time of the light source signal, a first distance value between the target object and the single-point dToF sensor is determined; The first distance value is determined to be greater than or equal to a third distance threshold, wherein the third distance threshold is greater than or equal to the minimum distance at which the first echo signal and the second echo signal can be distinguished.
  7. The method according to claim 1, wherein the ToF sensor is a multi-point dToF sensor, and before determining the first signal strength of the first echo signal, the method further includes: Multiple third echo signals are acquired, which are signals emitted by the multi-point dToF sensor at one time and reflected back to the multi-point dToF sensor by the target object; Based on the reception time of the plurality of third echo signals and the emission time of the plurality of light source signals, a plurality of second distance values between the target object and the multi-point dToF sensor are determined; The number of second distance values that are greater than or equal to the fourth distance threshold is greater than or equal to the second number threshold, wherein the fourth distance threshold is greater than or equal to the minimum distance at which the first echo signal and the third echo signal can be distinguished.
  8. The method according to any one of claims 1-5, characterized in that the ToF sensor is a single-point dToF sensor, and the method further includes: Acquire the second echo signal, which is the light source signal emitted by the single-point dToF sensor and reflected back to the single-point dToF sensor by the target object; Based on the reception time of the second echo signal and the emission time of the light source signal, a first distance value between the target object and the single-point dToF sensor is determined; When the first distance value is less than or equal to the first distance threshold, the cover plate is determined to be in the second state, and the pollutant index of the cover plate in the second state is greater than or equal to the preset threshold.
  9. The method according to any one of claims 1-5, wherein the ToF sensor is a multi-point dToF sensor, and the method further comprises: Multiple third echo signals are acquired, which are signals emitted by the multi-point dToF sensor at one time and reflected back to the multi-point dToF sensor by the target object; Based on the reception time of the plurality of third echo signals and the emission time of the plurality of light source signals, a plurality of second distance values between the target object and the multi-point dToF sensor are determined; When the number of the plurality of second distance values less than or equal to the second distance threshold is greater than or equal to the first quantity threshold, the cover plate is determined to be in a second state, and the pollutant index of the cover plate in the second state is greater than or equal to the preset threshold.
  10. The method according to any one of claims 2-9, characterized in that the method further comprises: In response to a shooting command, the ToF sensor is triggered to emit a light source signal; The first prompt message is displayed on the shooting interface, which is used to indicate the detection result of the cover plate.
  11. The method according to any one of claims 2-9, characterized in that the method further comprises: In response to the user's action, open the first application and display the first interface; In response to an operation on the first interface, the ToF sensor is triggered to emit a light source signal; The second interface is displayed, which includes a second prompt message indicating the detection result of the cover plate.
  12. An electronic device, characterized in that it comprises: A camera, a ToF sensor, and a cover plate, the cover plate covering the camera and the ToF sensor. At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the detection method as described in any one of claims 1-11.
  13. A computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the detection method as described in any one of claims 1-11.
  14. A computer program product, characterized in that it includes computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the detection method as described in any one of claims 1-11.

Description

Testing methods and electronic devices, storage media, and software products This application claims priority to Chinese Patent Application No. 202411548999.3, filed with the State Intellectual Property Office of China on October 31, 2024, entitled "Detection Method and Electronic Device, Storage Medium and Program Product", the entire contents of which are incorporated herein by reference. Technical Field This disclosure relates to the field of computer technology, and in particular to a detection method, electronic device, storage medium, and program product. Background Technology When users take photos with mobile phones or other electronic devices, the camera area is easily dirty, which affects the image quality. For example, fingerprints, oil stains, dust, etc. In related technologies, the image quality can usually be judged based on the image quality of the captured RGB image. However, this method is more limited by the scene, has low accuracy, and is prone to false detection or false negative. Summary of the Invention This disclosure provides a testing method, an electronic device, a storage medium, and a program product. In a first aspect, embodiments of this disclosure provide a detection method, comprising: emitting a light source signal based on a ToF sensor, acquiring a first echo signal reflected back to the ToF sensor via a cover plate; determining a first signal intensity of the first echo signal; and determining a detection result of the cover plate based on the first signal intensity and a second signal intensity. The second signal strength is the signal strength of the echo signal reflected back to the ToF sensor after the ToF sensor emits a light source signal and is reflected by the cover plate in the first state. When the cover plate is in the first state, the pollutant index is less than a preset threshold, which can also be understood as the first state being a clean state. The second signal strength in the first state can be pre-calibrated, and then, during actual detection, the ToF sensor can emit a light source signal, and the first signal strength and the second signal strength of the first echo signal reflected by the cover plate can be compared to determine the detection result of the cover plate. For example, it can be determined whether the cover plate is in the first state or in the second state with pollutants. When the cover plate is in the second state, the pollutant index is greater than or equal to the preset threshold. This method is simple and convenient to implement, requires less computation, and compared with the method based on the quality of the captured image, the detection method disclosed herein is not limited by the scene and improves the detection accuracy. In one alternative implementation, a cover plate covers the ToF sensor and the camera. In this way, the detection results of the cover plate can be used to characterize the detection results of the camera. That is, the detection of the cover plate can be used to determine whether there are contaminants in the camera and whether the camera's shooting is affected by contaminants, thereby improving accuracy. In one alternative implementation, the signal strength of the echo signal reflected by the cover plate is different under different conditions of contamination and no contamination. Therefore, the detection result of the cover plate can be determined according to the ratio or difference between the first signal strength and the second signal strength, which is simple to implement and improves the detection efficiency. In one optional implementation, when determining the detection result of the cover plate based on the ratio of the first signal intensity to the second signal intensity, specifically, it can be determined whether the ratio of the first signal intensity to the second signal intensity is greater than or equal to a first intensity threshold; when the ratio of the first signal intensity to the second signal intensity is greater than or equal to the first intensity threshold, the cover plate is determined to be in a second state; when the ratio of the first signal intensity to the second signal intensity is less than the first intensity threshold, the cover plate is determined to be in a first state. This method improves efficiency by determining the detection result through comparison of the ratio of the first signal intensity to the second signal intensity. In one optional implementation, when determining the detection result of the cover plate based on the difference between the first signal strength and the second signal strength, specifically, it is determined whether the difference between the first signal strength and the second signal strength is greater than or equal to a second strength threshold. When the difference between the first signal strength and the second signal strength is greater than or equal to the second strength threshold, the cover plate is determined to be in a second