Mirror mounting confirmation method, device, medium, and electronic device
Patent Information
- Application Number
- CN202310640054.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2043-05-31
AI Technical Summary
[0003]目前,反射镜一般由磁吸件实现与伴学类电子设备的安装,安装操作简单,但由于反射镜或伴学类电子设备内部需要设置磁铁,所以增加了物料成本和组装成本,另外磁铁有可能影响伴学类电子设备内部的陀螺仪、霍尔、摄像头等器件,对整机的器件布局要求比较高
[0044]通过上述技术方案,在确定距离传感器未被遮挡时,通过获取通过所述摄像头拍摄的图像,并确定所述图像中是否包括所述电子设备的支脚的支脚图像,若包括所述支脚图像,则确定所述反射镜安装成功,进而通过本公开,无需在电子设备中额外安装霍尔元件,即无需在电子设备中放置磁吸装置,进而无需在电子设备的生产过程中,因为磁吸装置增加重新设计与开模的成本,降低安装反射镜的成本。
Smart Images

Figure CN116760967B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electronic equipment technology, and more specifically, to a method, apparatus, medium, and electronic equipment for verifying the installation of a reflector. Background Technology
[0002] A reflector is an accessory used in educational electronic devices such as learning machines and e-readers. It is installed at the camera of the educational electronic device. When in use, the content of the imaging area on the desktop is reflected into the reflector, and the camera achieves functions such as taking pictures of questions by shooting the content inside the reflector.
[0003] Currently, reflectors are generally installed with learning-assist electronic devices using magnetic attachments. Installation is simple, but the need for magnets inside the reflector or the electronic device increases material and assembly costs. Furthermore, magnets may interfere with internal components such as gyroscopes, Hall effect sensors, and cameras, requiring precise component layout. However, traditional reflectors without magnetic attachments suffer from unstable installation.
[0004] Therefore, how to provide a low-cost and securely installed reflector has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this disclosure is to provide a method, apparatus, medium, and electronic device for verifying the installation of a reflector.
[0006] To achieve the above objectives, in a first aspect, this disclosure provides a method for confirming the installation of a reflector, applied to an electronic device, wherein the reflector is used in conjunction with the camera of the electronic device for taking pictures, comprising:
[0007] When it is determined that the distance sensor is not obstructed, the image captured by the camera is obtained;
[0008] Determine whether the image includes an image of the feet of the electronic device;
[0009] If the image of the support legs is included, then the reflector is confirmed to have been successfully installed.
[0010] Optionally, the method further includes:
[0011] If the leg image is not included, then determine whether the image includes a mirror image;
[0012] If the images are mirror images, then the mirror is considered to have been successfully installed.
[0013] Optionally, the method further includes:
[0014] Once it is determined that the distance sensor is blocked for a preset duration, it is confirmed that the electronic device has installed the reflector.
[0015] Optionally, determining whether the image includes an image of the feet of the electronic device includes:
[0016] The target image is obtained by cropping a portion of the image specified in the image.
[0017] When it is determined that the target image has the image feature of the foot, and the image feature indicates that the position of the foot included in the target image is the set position of the foot, the image includes the foot image of the electronic device.
[0018] Otherwise, determine that the image does not include the pin image of the electronic device.
[0019] Optionally, determining whether the image includes mirror images includes:
[0020] Traverse each row of pixels in the image to determine if there is a mirrored pixel row, which can divide the image into a first image and a second image that are mirror images of each other;
[0021] If present, then the image is determined to include images that are mirror images of each other;
[0022] If not, then the image does not include mirror images.
[0023] Secondly, this disclosure provides a device for confirming the installation of a reflector, applied to an electronic device, wherein the reflector is used in conjunction with the camera of the electronic device for taking pictures, including:
[0024] The acquisition module is used to acquire images captured by the camera when it is determined that the distance sensor is not obstructed;
[0025] The first judgment module is used to determine whether the image includes the image of the support foot of the electronic device;
[0026] The second judgment module is used to determine that the reflector is successfully installed if the image of the support leg is included.
[0027] Optionally, the device further includes:
[0028] The third judgment module is used to determine whether the image includes a mirror image if the leg image is not included.
[0029] If the images are mirror images, then the mirror is considered to have been successfully installed.
[0030] Optionally, the device further includes:
[0031] The fourth judgment module is used to determine that the distance sensor is blocked, and after a preset time, it determines that the electronic device has installed the reflector.
[0032] Optionally, the first determining module determines whether the image includes an image of the electronic device's feet using the following method:
[0033] The target image is obtained by cropping a portion of the image specified in the image.
[0034] When it is determined that the target image has the image feature of the foot, and the image feature indicates that the position of the foot included in the target image is the set position of the foot, the image includes the foot image of the electronic device.
[0035] Otherwise, determine that the image does not include the pin image of the electronic device.
[0036] Optionally, the third determination module determines whether the image includes mirror images of each other in the following manner:
[0037] Traverse each row of pixels in the image to determine if there is a mirrored pixel row, which can divide the image into a first image and a second image that are mirror images of each other;
[0038] If present, then the image is determined to include images that are mirror images of each other;
[0039] If not, then the image does not include mirror images.
[0040] Thirdly, this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in any of the first aspects.
[0041] Fourthly, this disclosure provides an electronic device, comprising:
[0042] A memory on which computer programs are stored;
[0043] A processor for executing the computer program in the memory to implement the steps of the method of any one of the first aspects.
[0044] By using the above technical solution, when it is determined that the distance sensor is not obstructed, the image captured by the camera is obtained, and it is determined whether the image includes the image of the support leg of the electronic device. If the image of the support leg is included, it is determined that the reflector is successfully installed. Thus, through this disclosure, there is no need to install a Hall element in the electronic device, that is, there is no need to place a magnetic suction device in the electronic device. Consequently, the cost of redesigning and molding due to the magnetic suction device is reduced during the production process of the electronic device, thereby reducing the cost of installing the reflector.
[0045] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0046] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:
[0047] Figure 1 This is a flowchart illustrating a method for verifying the installation of a reflector according to an exemplary embodiment.
[0048] Figure 2 This is a block diagram illustrating a mirror installation verification device according to an exemplary embodiment.
[0049] Figure 3 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0050] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0051] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.
[0052] Figure 1 This is a flowchart illustrating a method for verifying the installation of a reflector according to an exemplary embodiment, such as... Figure 1 As shown, the method for verifying the installation of a reflector is applied to electronic devices. The reflector is used in conjunction with the camera of the electronic device for taking pictures. The method for verifying the installation of a reflector includes the following steps.
[0053] In step S11, when it is determined that the distance sensor is not obstructed, an image captured by the camera is obtained.
[0054] In step S12, it is determined whether the image includes the pin image of the electronic device.
[0055] In step S13, if the image of the support legs is included, it is determined that the reflector has been successfully installed.
[0056] The electronic devices mentioned in this disclosure may be mobile phones, tablets, learning machines, or laptops, etc.
[0057] In this disclosure, data collected by the proximity sensor can be acquired each time the electronic device is powered on to determine whether the proximity sensor is obstructed. If the proximity sensor is determined to be obstructed and this obstruction persists for a preset duration, it indicates that the electronic device has installed the reflector. If the proximity sensor is not obstructed, an image frame is extracted every few seconds by the front-facing camera to obtain the image captured by the camera.
[0058] Typically, educational electronic devices are equipped with a base, which includes one or more feet to ensure the stability of the device. Therefore, after a reflector is installed on the educational electronic device (hereinafter referred to as the electronic device), the front-facing camera of the electronic device can directly see the image of the feet on the base through the reflector. Based on the image including the feet, it can be determined that the reflector has been successfully installed.
[0059] In one embodiment, for example, it can be determined whether the image includes an image of the foot of the electronic device by: cropping a set portion of the image to obtain a target image; when it is determined that the target image has the image feature of the foot, and the image feature indicates that the position of the foot included in the target image is the set position of the foot, it is determined that the image includes an image of the foot of the electronic device; otherwise, it is determined that the image does not include an image of the foot of the electronic device.
[0060] Since the camera captures an image including the support leg after the electronic device is mounted, the image captured by the camera is at the top of the image. Therefore, a specific portion of the image can be directly cropped, such as the upper half of the image, to obtain the target image (the upper half image).
[0061] Since the two-dimensional wavelet decomposition algorithm can accurately detect obvious horizontal and vertical edge features of an image, and because the support shape features are obvious and the position is fixed, the two-dimensional wavelet decomposition algorithm can accurately determine whether the target image has the image features of the support, and whether the image features indicate that the position of the support included in the target image is the set position of the support. If both of these conditions are met, it indicates that the reflector is installed successfully and accurately.
[0062] In addition, the method for confirming the installation of the reflector also includes: if the image does not include the image of the support legs, the electronic device may not have a base installed. Therefore, it is necessary to further determine whether the image includes mirror images. If mirror images are included, the reflector is confirmed to be successfully installed. If mirror images are not included, the electronic device is confirmed not to have a reflector installed.
[0063] In one implementation, for example, it can be determined whether the image includes mirror images by: traversing each row of pixels in the image and determining whether there is a row of mirror pixels that can divide the image into a first image and a second image that are mirror images; if such a row exists, it is determined that the image includes mirror images; if not, it is determined that the image does not include mirror images.
[0064] For example, the existence of a mirrored pixel row can be determined by traversing each row of pixels in the image as follows:
[0065] Traverse each row of pixels in the image. For each row of pixels, divide the image into a first image and a second image by dividing the image into a first image and a second image. Crop the first and second images into two images of the same size. Calculate whether the cropped first and second images of the same size are mirror images. If they are, determine that the image has mirror pixel rows. If they are not, determine that the image does not have mirror pixel rows.
[0066] In an exemplary embodiment of this disclosure, when it is determined that the distance sensor is not obstructed, an image captured by the camera is acquired, and it is determined whether the image includes an image of the support leg of the electronic device. If the image of the support leg is included, it is determined that the reflector is successfully installed. Thus, through this disclosure, it is not necessary to install a Hall element in the electronic device, that is, it is not necessary to place a magnetic suction device in the electronic device. Consequently, it is not necessary to increase the cost of redesign and mold opening in the production process of the electronic device due to the magnetic suction device, thereby reducing the cost of installing the reflector.
[0067] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0068] Figure 2 This is a block diagram illustrating a mirror installation verification device 200 according to an exemplary embodiment. (Refer to...) Figure 2 A reflector installation confirmation device 200 is used in an electronic device, wherein the reflector is used in conjunction with the camera of the electronic device for taking pictures, and includes:
[0069] The acquisition module 201 is used to acquire images captured by the camera when it is determined that the distance sensor is not obstructed;
[0070] The first judgment module 202 is used to determine whether the image includes the image of the support foot of the electronic device;
[0071] The second judgment module 203 is used to determine that the reflector is successfully installed if the image of the support leg is included.
[0072] Optionally, the device further includes:
[0073] The third judgment module is used to determine whether the image includes a mirror image if the leg image is not included.
[0074] If the images are mirror images, then the mirror is considered to have been successfully installed.
[0075] Optionally, the device further includes:
[0076] The fourth judgment module is used to determine that the distance sensor is blocked, and after a preset time, it determines that the electronic device has installed the reflector.
[0077] Optionally, the first determining module 202 determines whether the image includes the pin image of the electronic device in the following manner:
[0078] The target image is obtained by cropping a portion of the image specified in the image.
[0079] When it is determined that the target image has the image feature of the foot, and the image feature indicates that the position of the foot included in the target image is the set position of the foot, the image includes the foot image of the electronic device.
[0080] Otherwise, determine that the image does not include the pin image of the electronic device.
[0081] Optionally, the third determination module determines whether the image includes mirror images of each other in the following manner:
[0082] Traverse each row of pixels in the image to determine if there is a mirrored pixel row, which can divide the image into a first image and a second image that are mirror images of each other;
[0083] If present, then the image is determined to include images that are mirror images of each other;
[0084] If not, then the image does not include mirror images.
[0085] Figure 3This is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. Figure 3 As shown, the electronic device 700 may include a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0086] The processor 701 controls the overall operation of the electronic device 700 to complete all or part of the steps in the above method. The memory 702 stores various types of data to support the operation of the electronic device 700. This data may include, for example, instructions for any application or method operating on the electronic device 700, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 703 may include a screen and audio components. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 702 or transmitted via communication component 705. The audio component also includes at least one speaker for outputting audio signals. I / O interface 704 provides an interface between processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.
[0087] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0088] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the method described above. For example, the computer-readable storage medium may be the memory 702 including the program instructions described above, which may be executed by the processor 701 of the electronic device 700 to perform the method described above.
[0089] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0090] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0091] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
Claims
1. A method for confirming the installation of a reflector, applied to an electronic device, wherein the reflector is used in conjunction with the camera of the electronic device for taking pictures, characterized in that, include: When it is determined that the distance sensor is not obstructed, the image captured by the camera is obtained; Determine whether the image includes an image of the feet of the electronic device; If the image of the support legs is included, then the reflector is confirmed to have been successfully installed. If the leg image is not included, then determine whether the image includes a mirror image; If the images are mirror images, then the mirror is confirmed to have been installed successfully. The step of determining whether the image includes mirror images includes: Traverse each row of pixels in the image to determine if there is a mirrored pixel row, which can divide the image into a first image and a second image that are mirror images of each other; If present, then the image is determined to include images that are mirror images of each other; If not, then the image does not include mirror images.
2. The method according to claim 1, characterized in that, The method further includes: Once it is determined that the distance sensor is blocked for a period of time longer than a preset duration, it is determined that the electronic device has installed the reflector.
3. The method according to claim 1, characterized in that, The step of determining whether the image includes an image of the pins of the electronic device includes: The target image is obtained by cropping a portion of the image specified in the image. When it is determined that the target image has the image feature of the foot, and the image feature indicates that the position of the foot included in the target image is the set position of the foot, the image includes the foot image of the electronic device. Otherwise, determine that the image does not include the pin image of the electronic device.
4. A device for confirming the installation of a reflector, applied to an electronic device, wherein the reflector is used in conjunction with the camera of the electronic device for taking pictures, characterized in that, include: The acquisition module is used to acquire images captured by the camera when it is determined that the distance sensor is not obstructed; The first judgment module is used to determine whether the image includes the image of the support foot of the electronic device; The second judgment module is used to determine that the reflector is successfully installed if the image of the support leg is included. The third judgment module is used to determine whether the image includes a mirror image if the leg image is not included. If the images are mirror images, then the mirror is confirmed to have been installed successfully. The third determination module determines whether the image includes mirror images of each other in the following ways: Traverse each row of pixels in the image to determine if there is a mirrored pixel row, which can divide the image into a first image and a second image that are mirror images of each other; If present, then the image is determined to include images that are mirror images of each other; If not, then the image does not include mirror images.
5. The apparatus according to claim 4, characterized in that, The device further includes: The fourth judgment module is used to determine that the distance sensor is blocked, and after a preset time, it determines that the electronic device has installed the reflector.
6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-3.
7. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-3.
Citation Information
Patent Citations
Terminal detection method and device and storage medium
CN108918528A
Reading mirror and electronic equipment
CN216526688U