Projection equipment and foreign matter detection method
By adjusting the camera brightness and calculating image difference data, the projection equipment can accurately detect foreign objects and adjust the brightness at night or in dark scenes, solving the problems of light interference and poor image quality, and improving user experience.
Patent Information
- Application Number
- CN202210594204.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-05-27
AI Technical Summary
Due to light interference and poor camera image quality, projection equipment cannot accurately detect whether foreign objects enter the light source emission area at night or in dark scenes, resulting in the inability to adjust the projection brightness and reducing the user experience.
Adjust the brightness of the image captured by the camera by obtaining the average gray value of the detection area in the image, and obtain distance and image difference data after adjustment. If the data exceeds the threshold, the light source brightness is reduced to achieve accurate detection and brightness adjustment.
At night or in dark scenes, it ensures that the projection equipment can accurately detect foreign objects and adjust the brightness to protect users' eyes and improve the user experience.
Smart Images

Figure CN114928728B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of display devices, and in particular to a projection device and a foreign body detection method. Background Art
[0002] A projection device is a display device that can project images or videos onto a screen. The projection device can project laser light of a specific color onto the screen through the refraction of an optical lens assembly to form a specific image. Due to the portability of the projection device, users can move it during the projection process to project images or videos in different directions.
[0003] Usually, if the user looks directly at the projection light source or enters the light emitting area of the projection device, the projection light source is likely to irradiate the user's eyes and cause damage. In order to avoid the above accidents, the projection device will perform foreign object detection in real time when it is turned on. If the user approaches the light emitting area, the projection device will lower the projection brightness of the light source to protect the human eye.
[0004] However, when the projection device detects foreign objects at night or in dark scenes, due to light interference and poor image quality captured by the camera, it cannot accurately detect whether foreign objects have entered the light source emission area. As a result, the projection brightness adjustment operation cannot be triggered, which reduces the user experience. Summary of the invention
[0005] In some embodiments of the present application, a projection device and a foreign object detection method are provided to solve the problem that when the projection device performs foreign object detection at night or in dark scenes, due to light interference and poor image quality captured by the camera, it cannot accurately detect whether a foreign object has entered the light source emission area.
[0006] On the one hand, some embodiments of the present application provide a projection device, including:
[0007] light source;
[0008] a distance sensor configured to collect distance data;
[0009] An optical machine is configured to project the playback content onto a projection area in the projection surface;
[0010] A camera configured to capture a corresponding image on the projection surface;
[0011] The controller is configured as:
[0012] Acquire an average grayscale value of a detection area in the image, wherein the detection area is an area in the projection surface excluding the projection area;
[0013] Adjusting the brightness of the image captured by the camera according to the average grayscale value;
[0014] Acquire the images of preset frames after adjusting the brightness and the distance data at the time of shooting the images of preset frames, and calculate the image difference data and the distance change data;
[0015] If the distance change data is greater than a distance threshold, and / or the image difference data is greater than a difference threshold, control is performed to reduce the brightness of the light source.
[0016] On the other hand, some embodiments of the present application further provide a foreign body detection method, which is applied to a projection device, and the method specifically comprises the following steps:
[0017] Acquire an average grayscale value of a detection area in the image, wherein the detection area is an area of the projection surface excluding the projection area;
[0018] Adjusting the brightness of the image captured by the camera according to the average grayscale value;
[0019] Acquire the images of preset frames after adjusting the brightness and the distance data at the time of shooting the images of preset frames, and calculate the image difference data and the distance change data;
[0020] If the distance change data is greater than a distance threshold, and / or the image difference data is greater than a difference threshold, control is performed to reduce the brightness of the light source.
[0021] It can be seen from the above technical solutions that some embodiments of the present application provide a projection device and a foreign body detection method. The present application obtains the average grayscale value of the detection area in the image and adjusts the brightness of the image captured by the camera according to the average grayscale value. Wherein, the detection area is the area in the projection surface except the projection area. After adjusting the image brightness, the image of the preset number of frames after the brightness is adjusted and the distance data at the time of capturing the preset number of frames are obtained, and the image difference data and the distance change data are calculated. If the distance change data is greater than the distance threshold, and / or the image difference data is greater than the difference threshold, the brightness of the light source is controlled to be reduced. In this way, when the projection device performs foreign body detection at night or in a dark scene, even if there is light interference and / or the image quality captured by the camera is poor, it can still accurately detect whether the user enters the light source emission area and trigger the operation of adjusting the projection brightness. Alleviate the damage caused to the user's eyes by the bright light emitted by the light source and improve the user's experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0023] Figure 1 This is a schematic diagram of the projection placement state of the projection device in the embodiment of the present application;
[0024] Figure 2 This is a schematic diagram of the optical path of the projection device in the embodiment of the present application;
[0025] Figure 3 This is a schematic diagram of the circuit architecture of the projection device in the embodiment of the present application;
[0026] Figure 4 This is a schematic diagram of the structure of a projection device in an embodiment of the present application;
[0027] Figure 5 This is a schematic diagram of the lens structure of the projection device in the embodiment of the present application;
[0028] Figure 6 This is a schematic diagram of the distance sensor and camera structure of the projection device in the embodiment of the present application;
[0029] Figure 7 A schematic diagram of a system framework for realizing display control of a projection device in an embodiment of the present application;
[0030] Figure 8 A schematic diagram of a projection device performing foreign body detection in an embodiment of the present application;
[0031] Fig. 9 A schematic diagram of a detection area in a projection surface in an embodiment of the present application;
[0032] Fig.10 A schematic diagram of another detection area in the projection surface in an embodiment of the present application;
[0033] Fig.11 This is a schematic diagram of distance change data calculated by a projection device in an embodiment of the present application;
[0034] Fig.12 This is a schematic diagram of image difference data calculated by a projection device in an embodiment of the present application;
[0035] Fig.13 Schematic diagram of a rectangular area in a projected image in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0037] The brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0038] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0039] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0040] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0041] The embodiments of the present application can be applied to various types of projection devices. The following will take the projection device as an example to explain the projection device and the automatic focusing method.
[0042] Projection equipment is a device that can project images or videos onto a screen. Projection equipment can be connected to computers, broadcasting networks, the Internet, VCD (Video Compact Disc), DVD (Digital Versatile Disc Recordable), game consoles, DV, etc. through different interfaces to play corresponding video signals. Projection equipment is widely used in homes, offices, schools, and entertainment venues.
[0043] Figure 1 The figure shows a schematic diagram of the placement state of a projection device according to an embodiment of the present application. Figure 2 A schematic diagram of the optical path of a projection device according to an embodiment of the present application is shown.
[0044] In some embodiments of the present application, reference Figure 1-2In some embodiments of the present application, a projection device includes a projection screen 1 and a projection device 2. The projection screen 1 is fixed at a first position, and the projection device 2 is placed at a second position, so that the image projected by the projection device 2 matches the projection screen 1. The projection device 2 includes a laser light source 100, an optical machine 200, a lens 300, and a projection medium 400. The laser light source 100 provides illumination for the optical machine 200, and the optical machine 200 modulates the light beam of the light source and outputs it to the lens 300 for imaging, and projects it to the projection medium 400 to form a projection image.
[0045] In some embodiments of the present application, the laser light source 100 of the projection device 2 includes a laser assembly 110 and an optical lens assembly 120. The light beam emitted by the laser assembly 110 can pass through the optical lens assembly 120 to provide lighting for the optical machine 200. For example, the optical lens assembly 120 requires a higher level of environmental cleanliness and airtight sealing; while the chamber in which the laser assembly is installed can be sealed with a lower level of dustproof sealing to reduce the sealing cost.
[0046] In some embodiments of the present application, the light engine 200 of the projection device 2 may be implemented as a blue light engine, a green light engine, a red light engine, and may also include a heat dissipation system, a circuit control system, etc. In some embodiments of the present application, the light-emitting component of the projection device 2 may also be implemented by an LED light source.
[0047] Figure 3 A schematic diagram of the circuit architecture of a projection device according to an embodiment of the present application is shown. In some embodiments of the present application, the projection device 2 may include a display control circuit 10, a laser light source 20, at least one laser driving component 30, and at least one brightness sensor 40. The laser light source 20 may include at least one laser corresponding to the at least one laser driving component 30. The at least one refers to one or more, and the multiple refers to two or more.
[0048] Based on the circuit architecture, the projection device 2 can achieve adaptive adjustment. For example, by setting a brightness sensor 40 in the light output path of the laser light source 20, the brightness sensor 40 can detect a first brightness value of the laser light source and send the first brightness value to the display control circuit 10.
[0049] The display control circuit 10 can obtain the second brightness value corresponding to the driving current of each laser, and when it is determined that the difference between the second brightness value of the laser and the first brightness value of the laser is greater than the difference threshold, it is determined that a COD fault occurs in the laser; the display control circuit can adjust the current control signal of the laser driving component corresponding to the laser until the difference is less than or equal to the difference threshold, thereby eliminating the COD fault of the blue laser; the projection device 2 can eliminate the COD fault of the laser in time, reduce the damage rate of the laser, and improve the image display effect of the projection device 2.
[0050] Figure 4 A schematic structural diagram of a projection device according to an embodiment of the present application is shown.
[0051] In some embodiments of the present application, the laser light source 20 in the projection device 2 may include independently arranged blue laser 201, red laser 202 and green laser 203. The projection device 2 may also be called a three-color projection device. The blue laser 201, the red laser 202 and the green laser 203 are all modular lightweight (Mirai Console Loader, MCL) packaged lasers, which are small in size and conducive to the compact arrangement of the optical path.
[0052] In some embodiments of the present application, the controller includes a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM (Random Access Memory, RAM), ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus (Bus), etc.
[0053] In some embodiments of the present application, after the projection device 2 is started, it can directly enter the display interface of the last selected signal source, or the signal source selection interface, where the signal source can be a preset video on demand program, or at least one of an HDMI interface, a live TV interface, etc. After the user selects a different signal source, the projector can display the content obtained from different signal sources.
[0054] In some embodiments of the present application, the projection device 2 may be equipped with a camera, and the camera is used to work in conjunction with the projection device 2 to achieve adjustment and control of the projection process. For example, the camera configured by the projection device 2 may be specifically implemented as a 3D camera or a binocular camera; when the camera is implemented as a binocular camera, it specifically includes a left camera and a right camera; the binocular camera can obtain the image and playback content presented by the screen corresponding to the projection device 2, that is, the projection surface, and the image or playback content is projected by the optical machine 200 built into the projection device 2.
[0055] The camera can be used to capture the image displayed on the projection surface, and can be a camera. The camera can include a lens assembly, in which a photosensitive element and a lens are provided. The lens refracts light through a plurality of lenses, so that the light of the image of the scene can be irradiated on the photosensitive element. The photosensitive element can be selected based on the detection principle of a charge coupled device or a complementary metal oxide semiconductor according to the specifications of the camera, and converts the light signal into an electrical signal through a photosensitive material, and outputs the converted electrical signal into image data.
[0056] Figure 5 FIG. 2 shows a schematic diagram of the lens structure of the projection device 2 in some embodiments of the present application. In order to support the automatic focusing process of the projection device 2, as shown in FIG. Figure 5 As shown, the lens 300 of the projection device 2 may further include an optical component 310 and a drive motor 320. The optical component 310 is a lens group composed of one or more lenses, which can refract the light emitted by the optical machine 200 so that the light emitted by the optical machine 200 can be transmitted to the projection surface to form a transmission content image.
[0057] The optical assembly 310 may include a lens barrel and a plurality of lenses disposed in the lens barrel. Depending on whether the position of the lens can be moved, the lens in the optical assembly 310 may be divided into a movable lens 311 and a fixed lens 312. By changing the position of the movable lens 311 and adjusting the distance between the movable lens 311 and the fixed lens 312, the overall focal length of the optical assembly 310 may be changed. Therefore, the driving motor 320 may drive the movable lens 311 to move its position by connecting to the movable lens 311 in the optical assembly 310, thereby realizing an automatic focusing function.
[0058] Among them, the focusing process in some embodiments of the present application refers to changing the position of the movable lens 311 by driving the motor 320, thereby adjusting the distance between the movable lens 311 and the fixed lens 312, that is, adjusting the image plane position. Therefore, the imaging principle of the lens combination in the optical component 310, adjusting the focal length is actually adjusting the image distance, but in terms of the overall structure of the optical component 310, adjusting the position of the movable lens 311 is equivalent to adjusting the overall focal length of the optical component 310.
[0059] When the distance between the projection device 2 and the projection surface is different, the lens of the projection device 2 needs to adjust different focal lengths to project a clear image on the projection surface. During the projection process, the distance between the projection device 2 and the projection surface will require different focal lengths due to the different placement positions of the user. Therefore, in order to adapt to different usage scenarios, the projection device 2 needs to adjust the focal length of the optical component 310.
[0060] Figure 6Schematic diagram of distance sensor and camera structure in some embodiments of the present application is shown. Figure 6 As shown, the projection device 2 may also have a built-in or external camera 700, and the camera 700 may capture the image projected by the projection device 2 to obtain the projection content image. The projection device 2 then performs a clarity detection on the projection content image to determine whether the current lens focal length is appropriate, and adjusts the focal length if it is not appropriate. When automatically focusing based on the projection content image captured by the camera 700, the projection device 2 may continuously adjust the lens position and take pictures, and find the focus position by comparing the clarity of the front and back position pictures, thereby adjusting the movable lens 311 in the optical component to a suitable position. For example, the controller 500 may first control the drive motor 320 to gradually move the focus starting position of the movable lens 311 to the focus end position, and continuously obtain the projection content image through the camera 700 during this period. Then, by performing a clarity detection on multiple projection content images, the position with the highest clarity is determined, and finally the drive motor 320 is controlled to adjust the movable lens 311 from the focus terminal to the position with the highest clarity to complete the automatic focusing.
[0061] For the automatic focusing process, after obtaining the automatic focusing instruction, the controller of the projection device 2 can respond to the automatic focusing instruction and obtain the interval distance through the distance sensor 600. Among them, the distance sensor 600 can be a sensor device based on the time of flight (TOF) principle, such as a laser radar, an infrared radar, etc. that can detect the target distance. The distance sensor 600 can be set at the position of the optical machine 200, including a signal transmitter and a receiver. In the process of detecting the interval distance, the transmitter of the distance sensor 600 can transmit a wireless signal in the direction of the projection surface 400. After the wireless signal contacts the projection surface 400, it will be reflected back to the receiving end of the distance sensor 600, so that the signal flight time is calculated according to the time when the transmitter sends the signal and the time when the receiver receives the signal. Combined with the flight speed, the actual flight distance of the wireless signal can be obtained, and then the interval distance between the projection surface 400 and the optical machine 200 is calculated.
[0062] For the automatic focusing process, after obtaining the automatic focusing instruction, the controller of the projection device 2 can respond to the automatic focusing instruction and obtain the interval distance through the distance sensor 600. Among them, the distance sensor 600 can be a sensor device based on the time of flight (TOF) principle, such as a laser radar, an infrared radar, etc. that can detect the target distance. The distance sensor 600 can be set at the position of the optical machine 200, including a signal transmitter and a receiver. In the process of detecting the interval distance, the transmitter of the distance sensor 600 can transmit a wireless signal in the direction of the projection surface 400. After the wireless signal contacts the projection surface 400, it will be reflected back to the receiving end of the distance sensor 600, so that the signal flight time is calculated according to the time when the transmitter sends the signal and the time when the receiver receives the signal. Combined with the flight speed, the actual flight distance of the wireless signal can be obtained, and then the interval distance between the projection surface 400 and the optical machine 200 is calculated.
[0063] Figure 7 A schematic diagram of a system framework for realizing display control of a projection device according to an embodiment of the present application is shown.
[0064] In some embodiments of the present application, the projection device 2 has the characteristics of a telephoto micro-projector, and its controller can control the display of the projection light image through a preset algorithm to achieve functions such as automatic trapezoidal correction of the display screen, automatic screen entry, automatic obstacle avoidance, automatic focusing, and anti-eye-shooting.
[0065] In some embodiments of the present application, the projection device 2 is configured with a gyroscope sensor; when the device is moving, the gyroscope sensor can sense the position movement and actively collect movement data; the collected data is then sent to the application service layer through the system framework layer to support the application data required during the user interface interaction and application interaction process. The collected data can also be used for data calls by the controller in the algorithm service implementation.
[0066] In some embodiments of the present application, the projection device 2 is configured with a distance sensor 600. After the distance sensor 600 collects corresponding data, the data will be sent to the flight time service corresponding to the service layer; after the above-mentioned flight time service obtains the data, it will send the collected data to the application service layer through the process communication framework, and the data will be used for interactive use such as controller data calls, user interfaces, and program applications.
[0067] In some embodiments of the present application, the projection device 2 is configured with a camera 700 for capturing images, and the camera 700 can be implemented as a binocular camera, a depth camera or a 3D camera, etc.; the camera capture data will be sent to the camera service, and then the camera service will send the captured image data to the process communication framework and / or the projection device correction service; the projection device correction service can receive the camera 700 capture data sent by the camera service, and the controller can call the corresponding control algorithm in the algorithm library according to the different functions to be implemented.
[0068] In some embodiments of the present application, data is interacted with the application service through a process communication framework, and then the calculation results are fed back to the correction service through the process communication framework; the correction service sends the obtained calculation results to the projection device operating system to generate control signals, and sends the control signals to the optical machine control driver to control the optical machine working conditions and realize automatic correction of the displayed image.
[0069] In some embodiments of the present application, the correction service sends a signal to the distance sensor 600 to query the current state of the projection device 2, and the controller will receive data feedback from the distance sensor 600. The correction service sends a notification algorithm service to the process communication framework to start the anti-eye-shooting process signal. The process communication framework will call the service capability from the algorithm library to call the corresponding algorithm service. The algorithm may include a photo detection algorithm, a screenshot algorithm, and a foreign object detection algorithm. The process communication framework can return the foreign object detection result to the correction service based on the above algorithm service; for the returned result, if the preset threshold condition is met, the controller will control the user interface to display prompt information and reduce the display brightness.
[0070] In some embodiments of the present application, when the projection device 2 is configured as a children's viewing mode, the controller will automatically turn on the anti-eye switch. After receiving the position movement data sent by the acceleration sensor or receiving the foreign object intrusion data collected by other sensors, the controller controls the projection device 2 to turn on the anti-eye switch. In this way, if the user looks directly at the projection light source or enters the light source emission area of the projection device 2, the projection light source is likely to irradiate the user's eyes and cause damage. In order to avoid the above-mentioned accidents, the projection device 2 will perform foreign object detection in real time when it is turned on. If the user approaches the light source emission area, the projection device 2 will lower the projection brightness of the light source to achieve the effect of protecting the human eye.
[0071] However, when the projection device 2 detects foreign objects at night or in dark scenes, due to light interference and poor image quality captured by the camera, it is not possible to accurately detect whether foreign objects have entered the light source emission area, and thus the projection brightness adjustment operation cannot be triggered, which reduces the user experience.
[0072] To this end, some embodiments of the present application provide a projection device, wherein the projection device 2 includes: a light source, an optical machine 200, a distance sensor 600, a camera 700, and a controller. Among them, the distance sensor 600 is configured to collect distance data; the optical machine 200 is configured to project the playback content to the projection area in the projection surface 400; and the camera 700 is configured to capture the corresponding image in the projection surface 400. The controller pre-adjusts the brightness of the image captured by the camera 700, and obtains the data collected by the distance data sensor 600 and the camera 700 after adjusting the brightness. When the collected data triggers any preset condition, the controller controls the light source to reduce the display brightness. Avoid the situation where the projection device 2 cannot accurately detect whether the foreign object enters the light source emission area due to light interference and poor image quality captured by the camera when performing foreign object detection at night or in dark scenes. Among them, the process of controlling the light source to reduce the display brightness is also the eye protection process. For the convenience of description, the light source here is the above-mentioned laser light source 20.
[0073] The following combination Figure 8 The process of performing foreign object detection on the projection device provided in some embodiments of the present application is further explained.
[0074] In some embodiments of the present application, Figure 8 FIG. 1 is a schematic diagram showing a projection device performing foreign body detection in an embodiment of the present application. Figure 8 , the controller in the projection device 2 is configured as follows:
[0075] S1. Obtain the average grayscale value of the detection area in the image, where the detection area is the area on the projection surface excluding the projection area, and adjust the brightness of the image captured by the camera according to the average grayscale value.
[0076] In some embodiments of the present application, when detecting foreign objects at night or in dark scenes, due to the strong contrast between the projection area and the area other than the projection area in the projection surface, the camera 700 will tend to clearly capture the projection area during the shooting process, while ignoring the information corresponding to the area other than the projection area in the projection surface. In this way, since the corresponding brightness of the area other than the projection area in the projection surface is relatively low, it may not be possible to accurately detect whether foreign objects have entered the light source emission area. At the same time, in the process of detecting foreign objects, users usually enter the projection area from the area other than the projection area in the projection surface 400. Therefore, Fig. 9 A schematic diagram showing a detection area in the projection surface in an embodiment of the present application is shown, see Fig. 9 In this application, detection areas are set around the projection area and the image brightness is increased according to the detection areas, so as to enhance the effective information in the image and improve the detection accuracy of foreign matter detection.
[0077] Fig.10Schematic diagram showing another detection area in the projection surface in an embodiment of the present application. Fig.10 In some embodiments of the present application, the controller is configured to: obtain a homography matrix of the image and the projection area. Calculate the corner point coordinates of the projection area in the camera coordinate system based on the homography matrix. Calculate the width and height of the projection area based on the corner point coordinates. Extend one-third of the width on both sides of the projection area in the width direction to form an extended width area, and extend one-third of the height on both sides of the projection area in the height direction to form an extended height area; generate a detection area based on the extended width area and the extended height area.
[0078] Exemplarily, the controller obtains the coordinate values of the four corner points and the four edge midpoints of the projection area in the optical machine coordinate system based on the image taken by the camera 700. And the angle between the projection surface 400 and the optical machine 200 is obtained by fitting the plane based on the coordinate values. The corresponding coordinates of the four corner points and the four edge midpoints in the world coordinate system of the projection surface 400 are obtained according to the angle relationship. Then, the correction image is projected to the projection surface 400 using the optical machine 200, and the coordinates of the correction image card in the optical machine coordinate system and the coordinates of the corresponding points of the projection surface 400 are obtained, and the homography matrix can be calculated. Finally, the coordinate values of the four corner points and the four edge midpoints of the projection area in the optical machine coordinate system are converted into the corresponding coordinate values in the camera coordinate system through the homography matrix. The position, height, width and area of the projection area in the projection image are determined according to the coordinate values of the four corner points and the four edge midpoints in the camera coordinate system.
[0079] In this way, the controller generates a detection area based on the width and height of the projection area. Exemplarily, when the coordinates of the four corner points of the projection area are (3, 3), (6, 3), (6, 6) and (3, 6), the extended one-third width d1 is 3×1 / 3=1 meter, and the extended one-third height d2 is 3×1 / 3=1 meter. The area is extended on both sides of the width and height directions of the projection area, and the extended height area and the extended width area constitute the detection area, which is the "U" shaped area around the projection area.
[0080] In some other embodiments of the present application, the controller is configured to: calculate the area of the projection area according to the corner point coordinates. Scale the projection area based on the area and a preset ratio to obtain the scaled area. Set detection areas around the projection area, and the area corresponding to the detection area is the scaled area.
[0081] Exemplarily, when the coordinates of the four corner points of the projection area are (3, 3), (6, 3), (6, 6) and (3, 6), respectively, and the preset ratio is one-third, the area of the projection area is 3×3=9 square meters. Then the area of the scaled area is 9×1 / 3=3 square meters. The projection area is extended by 3 square meters around, that is, the area of the detection area is 3 square meters. The detection area can be set according to the actual use and environmental conditions of the projection device 2. For example, the projection area can be extended by an average of three quarters of a square meter around it. It can also be extended around the projection area according to a preset expansion area. For example, the expansion area in the width direction of the projection area is larger than the expansion area in the height direction of the projection area.
[0082] In some embodiments of the present application, in the step of obtaining the average grayscale value of the detection area in the image and adjusting the brightness of the image captured by the camera 700 according to the average grayscale value, the controller is specifically configured as follows: if the average grayscale value is greater than the first grayscale threshold and the average grayscale value is less than the second grayscale threshold, the pixel values of each pixel in the image are normalized to obtain the normalized pixel values. The normalized pixel values are enhanced to obtain the enhanced pixel values. Finally, the brightness of the image captured by the camera 700 is adjusted according to the enhanced pixel values.
[0083] Exemplarily, the first grayscale threshold is 10, and the second grayscale threshold is 15. If the average grayscale value is less than 15 and greater than 10, it means that the grayscale of the image captured by the camera 700 is low. Then, the controller triggers the brightness enhancement process. First, the image is normalized according to the following formula (I).
[0084]
[0085] Among them, normXi represents the pixel value of the i-th pixel in the normalized image, and Xi represents the pixel value of the i-th pixel in the image before normalization.
[0086] In order to enhance the effective information in the image, the controller is further configured to: enhance the image according to the following formula (II). The second preset formula is as follows:
[0087] augXi=(Xi+(1-Xi)*Xi) Formula (II);
[0088] Wherein, augXi represents the pixel value of the i-th pixel in the image after enhancement processing, and Xi represents the pixel value of the i-th pixel in the image before enhancement processing.
[0089] Furthermore, the controller can remove weak light interference in the image by executing a brightness enhancement process. At the same time, the pixel values corresponding to the overall pixel points are increased to enhance the effective information in the image. In order to improve the accuracy of the detection results. Among them, if the average grayscale value is greater than the second grayscale threshold, it means that the image brightness of the image taken by the camera 700 meets the conditions, and the subsequent foreign body detection process can be performed. On the contrary, if the average grayscale value is less than the first grayscale threshold, it means that the image brightness of the image taken by the camera 700 is low. If the images taken subsequently using the original parameters cannot meet the foreign body detection requirements. Therefore, it is necessary to adjust the camera shooting parameters, such as setting the exposure gain and brightness enhancement parameters.
[0090] S2, obtaining the preset frame number of images after adjusting the brightness and the distance data at the time of capturing the preset frame number of images, and calculating the image difference data and the distance change data. If the distance change data is greater than the distance threshold and / or the image difference data is greater than the difference threshold, control to reduce the brightness of the light source.
[0091] In some embodiments of the present application, see Fig.11 , in the step of calculating the distance change data, the controller is configured as:
[0092] S301, parsing the distance value corresponding to the current frame image in the distance data.
[0093] S302: Analyze the distance change value of the preset frame number image relative to the current frame image.
[0094] S303. If the distance value is greater than the distance threshold and the distance change value is greater than the distance change threshold, execute S304; otherwise, execute S305.
[0095] S304: Control to reduce the brightness of the light source, that is, trigger the eye protection process.
[0096] S305: Control the light source to maintain operation in the state before the brightness is reduced, that is, do not trigger the eye protection process.
[0097] In the process of calculating the distance change data by the controller through the distance data at the time of shooting the preset frame number image, for example, at least one distance value is parsed in the distance data, the distance value corresponding to the time of shooting the first frame number image is 3.5 meters, and the distance value corresponding to the time of shooting the second frame number image is 3 meters. Then the distance change value of the second frame image relative to the first frame image is |3-3.5|=0.5 meters, so as to judge whether to reduce the brightness of the light source in the future according to the distance value and the distance change value.
[0098] In some embodiments of the present application, in the step of determining whether to subsequently reduce the brightness of the light source according to the distance value and the distance change value, the controller is configured to: set a first distance range, a second distance range, and a third distance range. The first distance range is smaller than the second distance range, and the second distance range is smaller than the third distance range. And set a first change threshold, a second change threshold, and a third change threshold according to the distance data. The first change threshold is smaller than the second change threshold, and the second change threshold is smaller than the third change threshold.
[0099] Exemplarily, the first change threshold ɑ1, the second change threshold ɑ2 and the third change threshold ɑ3. The first distance range is 0-2 meters, the second distance range is 2 meters-3 meters and the third distance range is 3 meters-4 meters. If the distance value corresponding to the current frame image is within 0-2 meters, the first change threshold ɑ1 is used. If the distance change value is greater than the first change threshold ɑ1, it is determined that an object has invaded, and the brightness of the light source is controlled to be reduced. Similarly, if the distance value corresponding to the current frame image is within 2 meters-3 meters, the second change threshold ɑ2 is used. If the distance change value is greater than the second change threshold ɑ2, it is determined that an object has invaded, and the brightness of the light source is controlled to be reduced. If the distance value corresponding to the current frame image is within 3 meters-4 meters, the third change threshold ɑ3 is used. If the distance change value is greater than the third change threshold ɑ3, it is determined that an object has invaded, and the brightness of the light source is controlled to be reduced. In this way, by setting different change thresholds and dynamically selecting the corresponding change threshold based on the distance value for judgment, it is avoided that when the projection distance is far, there are slight environmental changes that cause inaccurate detection results.
[0100] In some embodiments of the present application, after the step of parsing the data, the controller is configured to: obtain the near-end threshold and the far-end threshold between the projection device 2 and the projection surface 400; if the distance value is greater than the near-end threshold and the distance value is less than the far-end threshold, then execute the subsequent process of calculating the distance change data.
[0101] Exemplarily, the shortest distance between the distance sensor 600 and the projection surface 400 is 0.02 meters, that is, the near-end threshold is 0.02 meters. The farthest distance between the distance sensor 600 and the projection surface 400 is 4 meters, that is, the far-end threshold is 4 meters. Therefore, the trusted distance range of the distance sensor 600 is 0.02 meters to 4 meters. Furthermore, if the distance value in the distance data is within the trusted distance range, the subsequent process of calculating the distance change data is executed. If the distance value is less than 0.02 meters, or greater than 4 meters, it means that the distance value is not within the trusted distance range of the distance sensor 600, that is, the subsequent process of calculating the distance change data is not executed.
[0102] In the above process, when the controller calculates the distance change data, it is not necessary to perform all calculations on the entire projection surface area, but only the distance change data in the projection area needs to be calculated. This application only takes the calculation of the distance change data in the projection area as an example, and can be designed according to the actual calculation scenario and the actual projection environment.
[0103] In some embodiments of the present application, in order to reduce the calculation time of the subsequent calculation of the image difference data, before the step of calculating the image difference data, the controller needs to perform a straight line pre-detection process on the boundary of the projection area. Specifically, the controller is configured to: obtain the image after adjusting the brightness; convert the image format of the image after adjusting the brightness into a YUV format; extract the grayscale component in the YUV format image; binarize the grayscale component of the image using a preset component threshold to obtain a first target image; remove noise from the first target image to obtain a noise-removed image; use an edge detection algorithm to identify the image after noise removal to obtain the edge lines corresponding to the projection area; use a straight line detection algorithm to identify each edge line, and if the edge line is composed of at least three straight lines, then perform the step of obtaining a preset number of frames of images after adjusting the brightness.
[0104] In the above-mentioned pre-detection process of the projection area boundary, when a human body or object enters the projection area, the projection boundary that was originally a straight line will become a broken line or a curve due to the change of the projection reflection medium. Therefore, the subsequent foreign body detection process needs to be performed based on the image of the projection boundary that has become a broken line or a curve.
[0105] In some embodiments of the present application, see Fig.12 , the controller is also configured to:
[0106] S401, analyzing the difference image in the detection area in the image difference data.
[0107] S402: Perform grayscale processing and binarization processing on the difference image in sequence to obtain a second target image.
[0108] S403: extracting a foreground image from the second target image.
[0109] S404: Calculate the ratio of the image area of the foreground image to the area of the detection area.
[0110] S405: If the ratio is greater than the difference threshold, execute S406; otherwise, execute S407.
[0111] S406: Control to reduce the brightness of the light source, that is, trigger the eye protection process.
[0112] S407: Control the light source to maintain operation in the state before the brightness is reduced, that is, do not trigger the eye protection process.
[0113] Exemplarily, the binary image includes a first type of pixel and a second type of pixel, and the value of the first type of pixel in the binary image is a first value such as 1 representing the foreground, and the value of the second type of pixel in the binary image is a second value such as 0 representing the background. A foreground image is generated according to the area where the first type of pixel is located, and a background image is generated according to the area where the second type of pixel is located. By extracting the first type of pixel with a pixel value of 1 and the second type of pixel with a pixel value of 0, the image area of the foreground image and the image area of the background image are calculated to obtain the image area of the binary image. Finally, the ratio of the image area of the foreground image to the image area of the binary image is calculated, and then, the ratio is used to determine whether the eye protection process is triggered subsequently. At the same time, the difference threshold is set to 0.1. If the ratio of the image area of the foreground image to the image area of the binary image is greater than 0.1, the optical machine 200 can be controlled to reduce the brightness.
[0114] In some embodiments of the present application, the controller is further configured to cyclically execute the process of determining the image difference data and the difference threshold. By setting the threshold number β, if the image difference data continuously exceeds the threshold number β and is greater than the difference threshold, the eye protection process is triggered.
[0115] In the process of calculating the image difference data, the controller does not need to calculate all the projection images captured by the camera 700, but only needs to calculate the image difference data in the detection area. This application only takes the calculation of image difference data in the detection area as an example, and can be designed according to the actual calculation scenario and the actual projection environment.
[0116] In some embodiments of the present application, the camera 700 is usually affected by light and / or camera quality when shooting continuously, and the two frames of images shot continuously will have errors in the difference image due to the different overall brightness. In turn, the detection results of the subsequent foreign body detection will be abnormal. To this end, in order to remove the light interference in the image, the controller is also configured to: after the step of parsing the image difference data to obtain the difference image within the detection area, obtain the top area in the difference image, the top area is the area between the top edge of the projection area and the top edge of the difference image; calculate the average brightness value in the top edge area; if the average brightness value is greater than the preset brightness threshold, update the brightness value corresponding to the difference image; wherein the updated brightness value is less than the brightness value before the update.
[0117] For example, see Fig.13 , extract the top area T in the difference image, where the top area T is the rectangular area directly above the projection area. Calculate the average brightness of the rectangular area, and set the preset brightness threshold θ to 25. If the average brightness value is greater than 25, adjust the brightness of the difference image to be consistent according to the following formula (III).
[0118]
[0119] Wherein, normI(X) represents the brightness value of the X-th pixel in the image after brightness adjustment, I(X) represents the brightness value of the X-th pixel in the image before brightness adjustment, and θ is the preset brightness threshold.
[0120] In some embodiments of the present application, usually in dimly lit scenes, since the brightness of the projection area is the highest, the astigmatism of the projection area will hit the detection area. In this way, when the video screen is played in the projection area, the light in the projection area will be projected into the detection area, and the light is constantly changing and affects the detection of foreign objects in the detection area. To this end, the present application removes the projection astigmatism existing in the detection area by utilizing the connected area elimination method. Specifically, the controller is also configured to: in the above-mentioned step of obtaining the second target image, identify the image connected area in the second target image, the image connected area is the area composed of pixels with the same pixel value and adjacent pixel positions in the second target image; calculate the area area of the image connected area; if there is an image connected area whose area is less than the first area threshold, and the area is greater than the second area threshold, then remove the image connected area.
[0121] Exemplarily, the first area threshold is set to occupy 300 pixels, and the second area threshold is set to occupy 3000 pixels. If there is an image connected area whose area occupies less than 300 pixels, the image connected area is determined to be noise interference. If there is an image connected area whose area occupies more than 3000 pixels, the image connected area is determined to be a projection area. In this way, by removing image connected areas that are too large and / or too small, such as removing noise interference areas and projection areas, the accuracy of subsequent detection of foreground images is improved.
[0122] In some embodiments of the present application, in order to avoid the influence of light objects arranged in the environment on the foreign body detection process, the present application avoids the problem of brightness difference in the image taken by the camera 700 during use by utilizing the characteristic that the position of light objects does not change. The controller is also configured to: after parsing the difference image in the detection area in the image difference data, perform denoising on the difference image using the expansion corrosion algorithm. This avoids the situation where the light in the difference image is bright or dark due to the reflection of lights, doors and windows.
[0123] It can be seen from the above scheme that the projection device provided in the above embodiment obtains the average grayscale value of the detection area in the image, and adjusts the brightness of the image captured by the camera 700 according to the average grayscale value. Among them, the detection area is the area in the projection surface 400 except the projection area. After adjusting the image brightness, the image of the preset number of frames after the brightness is adjusted and the distance data at the time of capturing the preset number of frames are obtained, and the image difference data and the distance change data are calculated. If the distance change data is greater than the distance threshold, and / or the image difference data is greater than the difference threshold, the brightness of the light source is controlled to be reduced. In this way, when the projection device 2 performs foreign body detection at night or in a dark scene, even if there is light interference and / or the image quality captured by the camera is poor, it can accurately detect whether the user has entered the light source emission area and trigger the operation of adjusting the projection brightness. Avoid the light source from causing damage to the user's eyes and improve the user's experience.
[0124] The present application also provides a foreign body detection method, which is applied to a projection device 2, wherein the projection device 2 includes a light source, a distance sensor 600, an optical machine 200, a camera 700, and a controller; the foreign body detection method specifically includes the following steps:
[0125] The average grayscale value of the detection area in the image is obtained, and the detection area is the area in the projection surface excluding the projection area. The brightness of the image captured by the camera is adjusted according to the average grayscale value. The image of the preset number of frames after the brightness adjustment and the distance data at the time of the preset number of frames are obtained, and the image difference data and the distance change data are calculated. If the distance change data is greater than the distance threshold, and / or the image difference data is greater than the difference threshold, the brightness of the light source is controlled to be reduced.
[0126] In some embodiments of the present application, the method further includes: in the step of adjusting the brightness of the image captured by the camera according to the average grayscale value, if the average grayscale value is greater than the first grayscale threshold and the average grayscale value is less than the second grayscale threshold, the pixel values of each pixel in the image are normalized to obtain a normalized pixel value. The normalized pixel value is enhanced to obtain an enhanced pixel value. The brightness of the image captured by the camera is adjusted according to the enhanced pixel value.
[0127] In some embodiments of the present application, the method further includes: parsing the distance value corresponding to the current frame image and the distance change value of the preset frame number image relative to the current frame image in the distance data. If the distance value is greater than the distance threshold and the distance change value is greater than the distance change threshold, control to reduce the brightness of the light source.
[0128] In some embodiments of the present application, the method further includes: after the step of parsing the data, obtaining a near-end threshold and a far-end threshold between the projection device and the projection surface. If the distance value is greater than the near-end threshold and the distance value is less than the far-end threshold, a process of judging whether the distance value is greater than the distance threshold and the distance change value is greater than the distance change threshold is performed.
[0129] In some embodiments of the present application, the method further includes: in the step of obtaining the average grayscale value of the detection area in the image, obtaining the homography matrix of the image and the projection area. Based on the homography matrix, the coordinates of the corner points of the projection area in the camera coordinate system are calculated. The width and height of the projection area are calculated according to the coordinates of the corner points. One-third of the width is extended on both sides of the width direction of the projection area to form an extended width area, and one-third of the height is extended on both sides of the height direction of the projection area to form an extended height area. The detection area is generated based on the extended width area and the extended height area.
[0130] In some embodiments of the present application, the method further includes: before the step of acquiring the image with a preset number of frames after adjusting the brightness, acquiring the image with the brightness adjusted. Converting the image format of the image with the brightness adjusted to a YUV format. Extracting the grayscale component in the YUV format image. Binarizing the grayscale component of the image using a preset component threshold to obtain a first target image. De-noising the first target image to obtain an image with the noise removed. Using an edge detection algorithm to identify the image with the noise removed to obtain edge lines corresponding to the projection area. Using a straight line detection algorithm to identify each edge line, if the edge line is composed of at least three straight lines, executing the step of acquiring the image with the preset number of frames after adjusting the brightness.
[0131] In some embodiments of the present application, the method further includes: parsing a difference image in the detection area in the image difference data. Performing grayscale processing and binarization processing on the difference image in sequence to obtain a second target image. Extracting a foreground image in the second target image. Calculating a ratio of an image area of the foreground image to an area of the detection area. If the ratio is greater than a difference threshold, controlling to reduce the brightness of the light source.
[0132] In some embodiments of the present application, the method further includes: after the step of parsing the image difference data to obtain the difference image within the detection area, obtaining the top area in the difference image, the top area being the area between the top edge of the projection area and the top edge of the difference image. Calculating the average brightness value in the top edge area. If the average brightness value is greater than a preset brightness threshold, updating the brightness value corresponding to the difference image; wherein the updated brightness value is less than the brightness value before the update.
[0133] In some embodiments of the present application, the method further includes: in the step of obtaining the second target image, identifying an image connected region in the second target image, where the image connected region is a region composed of pixels having the same pixel value and adjacent pixel positions in the second target image. Calculating the area of the image connected region. If there is an image connected region whose area is less than the first area threshold and whose area is greater than the second area threshold, then removing the image connected region.
[0134] The same and similar parts between the various embodiments in this specification can be referenced to each other and will not be described again here.
[0135] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention or certain parts of the embodiments.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0137] For ease of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are intended to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A projection device, characterized in that: include: light source; a distance sensor configured to collect distance data; An optical machine is configured to project the playback content onto a projection area in the projection surface; A camera configured to capture a corresponding image on the projection surface; The controller is configured as: Acquire an average grayscale value of a detection area in the image, wherein the detection area is an area in the projection surface excluding the projection area; Adjusting the brightness of the image captured by the camera according to the average grayscale value; Acquire the images of preset frames after adjusting the brightness and the distance data at the time of shooting the images of preset frames, and calculate the image difference data and the distance change data; If the distance change data is greater than a distance threshold, and / or the image difference data is greater than a difference threshold, control is performed to reduce the brightness of the light source.
2. The projection device according to claim 1, characterized in that: The controller is configured to: In the step of adjusting the brightness of the image taken by the camera according to the average grayscale value, if the average grayscale value is greater than a first grayscale threshold and the average grayscale value is less than a second grayscale threshold, the pixel value of each pixel in the image is normalized to obtain a normalized pixel value; Performing enhancement processing on the normalized pixel value to obtain an enhanced pixel value; The brightness of the image captured by the camera is adjusted according to the enhanced pixel value.
3. The projection device according to claim 1, characterized in that: The controller is configured to: Analyzing the distance value corresponding to the current frame image and the distance change value of the preset frame number image relative to the current frame image in the distance data; If the distance value is greater than the distance threshold and the distance change value is greater than the distance change threshold, the control reduces the brightness of the light source.
4. The projection device according to claim 3, characterized in that: The controller is configured to: After the step of analyzing the data, obtaining a near-end threshold and a far-end threshold between the projection device and the projection surface; If the distance value is greater than the near-end threshold and the distance value is less than the far-end threshold, a process of determining that the distance value is greater than the distance threshold and the distance change value is greater than the distance change threshold is performed.
5. The projection device according to claim 4, characterized in that: The controller is configured to: In the step of obtaining the average grayscale value of the detection area in the image, obtaining a homography matrix between the image and the projection area; Calculating the coordinates of the corner points of the projection area in the camera coordinate system based on the homography matrix; Calculate the width and height of the projection area according to the corner point coordinates; Extending one third of the width on both sides of the projection area in the width direction to form an extended width area, and extending one third of the height on both sides of the projection area in the height direction to form an extended height area; The detection area is generated based on the extension width area and the extension height area.
6. The projection device according to claim 1, characterized in that: The controller is also configured to: Before the step of acquiring the image of the preset frame number after the brightness is adjusted, acquiring the image after the brightness is adjusted; Converting the image format of the image after adjusting the brightness into a YUV format; Extracting the grayscale component in the YUV format image; Binarizing the grayscale component of the image using a preset component threshold to obtain a first target image; Performing noise removal processing on the first target image to obtain a noise-removed image; Using an edge detection algorithm to identify the image after noise removal, and obtain edge lines corresponding to the projection area; Each edge line is identified by using a straight line detection algorithm. If the edge line is composed of at least three straight lines, a step of acquiring an image of a preset number of frames after adjusting the brightness is performed.
7. The projection device according to claim 1, characterized in that: The controller is also configured to: parsing the difference image within the detection area in the image difference data; Performing grayscale processing and binarization processing on the difference image in sequence to obtain a second target image; extracting a foreground image from the second target image; Calculating the ratio of the image area of the foreground image to the area of the detection area; If the ratio is greater than the difference threshold, the control reduces the brightness of the light source.
8. The projection device according to claim 7, characterized in that: The controller is also configured to: After the step of parsing the image difference data to obtain the difference image within the detection area, a top area in the difference image is obtained, where the top area is an area between a top edge of the projection area and a top edge of the difference image; Calculate the average brightness value in the top edge area; If the average brightness value is greater than a preset brightness threshold, the brightness value corresponding to the difference image is updated; wherein the updated brightness value is less than the brightness value before the update.
9. The projection device according to claim 8, characterized in that: The controller is also configured to: In the step of obtaining the second target image, an image connected region in the second target image is identified, wherein the image connected region is a region consisting of pixels having the same pixel value and adjacent pixel positions in the second target image; Calculate the area of the connected region of the image; If the area of the region where the image connected region exists is smaller than the first area threshold, and the area of the region is larger than the second area threshold, the image connected region is removed.
10. A foreign body detection method, characterized in that: Applied to a projection device, the projection device includes a light source, a distance sensor, an optical machine, a camera and a controller; the method specifically includes the following steps: Obtaining an average grayscale value of a detection area in the image, wherein the detection area is an area on the projection surface excluding the projection area; Adjusting the brightness of the image captured by the camera according to the average grayscale value; Acquire the images of preset frames after adjusting the brightness and the distance data at the time of shooting the images of preset frames, and calculate the image difference data and the distance change data; If the distance change data is greater than a distance threshold, and / or the image difference data is greater than a difference threshold, control is performed to reduce the brightness of the light source.
