Projection display method, projection equipment and storage medium
By setting the image projection mode in the projection device and processing the image accordingly, and then projecting the target image after generating the target image, the problem that existing projection devices cannot paint the image, improving the convenience and efficiency of user painting creation.
Patent Information
- Application Number
- CN202411845130.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-02-28
AI Technical Summary
Existing projection devices cannot draw images, resulting in inconvenience in user painting creation.
A projection display method is provided, by acquiring an image and setting an image projection mode in response to a user operation, processing the image to generate a target image, and then projecting it by an optical machine. Specific processing includes grid mode, sketch mode, comic mode and black and white mode.
The function of artistic processing of images and then projecting them is realized, improving the convenience and efficiency of user painting creation.
Smart Images

Figure CN119544937A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of projection equipment, and in particular to a projection display method, a projection equipment and a storage medium. Background Art
[0002] At present, projectors can only project received images. For example, a projector can receive images sent by computers and other devices that have been processed with artistic effects, so that it can project images with artistic effects. Existing projectors do not have the function of projecting images after artistic processing, which causes inconvenience to users in painting creation. Summary of the invention
[0003] The embodiments of the present application provide a projection display method, a projection device, and a storage medium to solve the problem that the projection device cannot perform painting processing on the image, causing inconvenience to the user in painting creation.
[0004] In a first aspect, an embodiment of the present application provides a projection display method, which is applied to a projection device, wherein the projection device includes an optical machine, and the method includes: acquiring an image; setting an image projection mode in response to a user's operation; processing the image according to the image projection mode to obtain a target image; and projecting the target image through the optical machine.
[0005] In some embodiments of the present application, the image projection mode includes a gridding mode, and processing the image according to the image projection mode to obtain a target image includes: configuring the number of rows and columns of the grid, and determining the height and width of the grid; drawing grid lines on the image based on the number of rows and columns of the grid and the height and width of the grid to obtain a grid image.
[0006] In some embodiments of the present application, the image projection mode includes a sketch mode, and processing the image according to the image projection mode to obtain a target image includes: converting the image into a grayscale image; performing Gaussian blur processing and denoising processing on the grayscale image; extracting the edge of the grayscale image using a first preset edge detection algorithm; converting the color of the edge in the grayscale image to obtain a sketch image.
[0007] In some embodiments of the present application, the image projection mode includes a cartoon mode, and processing the image according to the image projection mode to obtain a target image includes: obtaining a corresponding grayscale image based on the image; performing median filtering and denoising on the grayscale image; extracting the edge of the grayscale image using a second preset edge detection algorithm; dilating the edge to thicken the lines in the grayscale image; performing bilateral filtering on the image; and superimposing the edge in the grayscale image with the image to obtain a cartoon image.
[0008] In some embodiments of the present application, the image projection mode includes a black and white mode, and processing the image according to the image projection mode to obtain a target image includes: converting the image into a grayscale image; and binarizing the grayscale image according to a preset binarization algorithm to obtain a black and white image.
[0009] In some embodiments of the present application, after the target image is projected through the optical machine, the method further includes: obtaining a tilt angle of the projection device; performing preset processing on the target image according to the tilt angle to eliminate trapezoidal distortion of the projection screen of the target image.
[0010] In some embodiments of the present application, after the target image is projected through the optical machine, the method also includes: obtaining the inclination angle of the projection device; obtaining the projection screen of the target image; if it is determined that the projection screen has a first trapezoidal distortion, processing the target image through a vertical trapezoidal correction method to eliminate the first trapezoidal distortion of the projection screen; if it is determined that the projection screen has a second trapezoidal distortion, processing the target image through a horizontal trapezoidal correction method to eliminate the second trapezoidal distortion of the projection screen.
[0011] In some embodiments of the present application, after the target image is projected through the optical machine, the method further includes: detecting whether there is an obstacle in the projection path, wherein the projection path represents the illumination range formed by the target image when it is projected; if the obstacle is detected, identifying the object information of the obstacle and adjusting the lens of the optical machine according to the object information, so that the optical machine avoids the obstacle when projecting the target image.
[0012] In some embodiments of the present application, after the target image is projected through the optical machine, the method also includes: acquiring a projection picture of the target image; identifying an edge position of a projection screen in the projection picture; identifying the projection picture, and if it is determined that the image content of the projection picture exceeds the edge position of the projection screen, determining an adjustment position, an adjustment angle, and a focal length adjustment value of the lens of the optical machine; adjusting the lens of the optical machine according to the adjustment position, the adjustment angle, and the focal length adjustment value so that the projection picture of the target image is within the area of the projection screen.
[0013] In some embodiments of the present application, a fan is provided in the optical machine, and the method further includes: obtaining the temperature of the optical machine; if the temperature of the optical machine is greater than or equal to a first temperature threshold, controlling to start the fan.
[0014] In some embodiments of the present application, the method further includes: after starting the fan, adjusting the rotation speed of the fan so that the temperature is lower than the first temperature threshold.
[0015] In a second aspect, an embodiment of the present application provides a projection device, comprising: an optical machine, a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the above-mentioned projection display method.
[0016] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned projection display method is implemented.
[0017] The projection device in the present application can respond to user operations, set an image projection mode, process the image according to the image projection mode to obtain a target image, and project the target image through an optical machine, so that the image can be converted into image content corresponding to the image projection mode for projection according to user needs, thereby solving the problem that existing projection devices cannot process images for painting, causing inconvenience to users in their painting creation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 A hardware structure diagram of a projection device provided for some embodiments of the present application.
[0020] Figure 2 A software structure diagram of a projection device provided for some embodiments of the present application.
[0021] Figure 3 A schematic flow chart of a projection display method provided in some embodiments of the present application.
[0022] Figure 4 A schematic diagram of a mode setting interface provided for some embodiments of the present application.
[0023] Figure 5 A flow chart of a method for processing a target image provided in some embodiments of the present application.
[0024] Figure 6 A flow chart of a method for processing a target image provided in some embodiments of the present application.
[0025] Figure 7 A flow chart of a method for processing a target image provided in some other embodiments of the present application.
[0026] Figure 8 A flow chart of a method for processing a target image provided in some other embodiments of the present application.
[0027] Fig. 9 A structural diagram of a projection display device provided in some embodiments of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, "at least one" refers to one or more. "Multiple" refers to two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.
[0031] The functional units and modules in the above embodiments may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the above integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
[0032] At present, projectors can only project received images. For example, a projector can receive images sent by computers and other devices that have been processed with artistic effects, so that it can project images with artistic effects. Existing projectors do not have the function of projecting images after artistic processing, which makes it inconvenient for users to draw images based on the images projected by the projector.
[0033] The embodiments of the present application provide a projection display method, a projection device, and a storage medium to solve the problem that the projection device cannot perform artistic processing on images, causing inconvenience to users.
[0034] refer to Figure 1 As shown, it is a hardware structure diagram of the projection device provided in some embodiments of the present application. The projection device 10 includes an optical machine 11, a motor 12, a fan 13, a sensor 14, a communication unit 15, a memory 16 and a processor 17. The optical machine 11 is used to project an image. In some embodiments of the present application, the optical machine can be a digital light processing (Digital Light Processing, DLP) optical machine, a liquid crystal display (Liquid Crystal Display, LCD) optical machine or a silicon-based liquid crystal (Liquid Crystal On Silicon, LCOS). In some embodiments of the present application, the projection device includes a projector. It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the projection device 10. In other embodiments of the present application, the projection device 10 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0035] In some embodiments of the present application, the number of motors 12 is multiple. For the convenience of description, the multiple motors 12 are divided into a first motor and a second motor. The first motor is connected to the lens of the optical machine 11 and is used to adjust the zoom of the lens. Zoom refers to the function of changing the size of the projection screen of the projection device 10. In some embodiments of the present application, the lens of the optical machine 11 is zoomed by the first motor, so that the size of the projection screen is adjusted by changing the position of the lens. The second motor is connected to the fan 13, which is used to control the fan starter and adjust the speed of the fan 13. In some embodiments of the present application, the optical machine 11 can be a closed space, and the optical components of the optical machine can all be placed in the closed space. In some embodiments of the present application, the fan 13 can be set in the internal space of the optical machine 11, or in the external space of the optical machine 11, or the fan 13 is set in both the internal space and the external space of the optical machine. By starting the fan 13, the operating temperature of the optical machine 11 can be reduced, thereby ensuring the quality of the projection screen and improving the projection quality.
[0036] In some embodiments of the present application, the sensor 14 includes a gyro sensor, a distance sensor, a proximity light sensor, a temperature sensor and a camera. In some embodiments of the present application, the gyro sensor can be used to determine the motion posture of the projection device 10. In some embodiments, the tilt angle of the projection device 10 can be determined by the gyro sensor, and the tilt angle of the present application represents the tilt angle of the projection device 10 relative to the horizontal plane. The distance sensor is used to measure the distance. The projection device 10 can measure the distance by infrared or laser. The distance sensor can be an infrared sensor or a laser sensor.
[0037] The proximity light sensor may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The projection device 10 emits infrared light outward through the light emitting diode. The projection device 10 uses a photodiode to detect infrared reflected light from a nearby object. When sufficient reflected light is detected, it can be determined that there is an object near the projection device 10. When insufficient reflected light is detected, the projection device 10 can determine that there is no object near the projection device 10. The temperature sensor is used to detect temperature. In some embodiments of the present application, the projection device 10 uses a temperature sensor to detect temperature.
[0038] The communication unit 15 is used to communicate with an external device. In some embodiments of the present application, the external device may include a server. When the projection device 10 is connected to the server through the communication unit 15, the communication unit 15 may provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks) applied to the projection device 10. In other embodiments of the present application, the external device may be a remote controller. When the projection device 10 is connected to the remote controller through the communication unit 15, the communication unit 15 may be at least one of an infrared communication module, a radio frequency communication module, a Bluetooth communication module, and a local area network communication module.
[0039] In some embodiments of the present application, the memory 16 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; the non-volatile memory may include a disk storage device, a flash memory (flash memory).
[0040] In some embodiments of the present application, the processor 17 is connected to the memory 16, the communication unit 15, the sensor 14, the fan 13, the motor 12 and the optical machine 11. The processor 17 may include one or more processing units, for example: the processor 17 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. The controller can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0041] The processor 17 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 17 is a cache memory. The memory may store instructions or data that have just been used or are used cyclically by the processor 17. If the processor 17 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 17, and thus improves the efficiency of the system.
[0042] refer to Figure 2 As shown, it is a software structure diagram of the projection device provided in some embodiments of the present application. The projection device 10 includes an Android projection operating system, a drawing application, an image algorithm library and an optical machine 11. In the embodiment of the present application, through the Android projection operating system, the user can choose to install the corresponding application program according to the needs to realize more functions of the projection device 10. In the embodiment of the present application, the user can install a drawing application on the projection device 10, and convert the image into a target image corresponding to the image projection mode through the drawing application according to the corresponding image projection mode, and project the target image to the place where the user needs to create paintings (such as walls, easels, desktops and other projection screens), so that the user can copy, doodle, restore cultural relics and other painting creations. In the embodiment of the present application, the image algorithm library includes a variety of image algorithms. The drawing application can select the corresponding image algorithm from the image algorithm library to process the image to obtain the target image. The drawing application projects the target image through the optical machine 11. The following will be combined Figure 1 and Figure 2 The specific steps of the projection display method in the embodiment of the present application are specifically introduced.
[0043] refer to Figure 3 , which is a flow chart of a projection display method provided in some embodiments of the present application, and the projection display method is applied in a projection device. Figure 3 The method of the example includes one or more steps, but does not constitute a limitation of the present application. In addition, the order of the steps of the method is only an example, and the order of the steps can be changed. Additional steps can be added or steps can be reduced without departing from the content disclosed in the present application. The method includes the following steps.
[0044] S301, acquiring an image.
[0045] In some embodiments of the present application, the projection device 10 can receive an image sent by an external device through the communication unit 15. For example, the projection device 10 can receive an image sent by an external device based on a Local Send transmission tool. Local Send is a cross-platform LAN file transfer tool that can achieve secure communication between devices by using the Representational State Transfer Application Programming Interface (REST API) and Hyper Text Transfer Protocol Secure (HTTPS) encryption technology. Image data can be shared quickly and securely through a local network without the need for an Internet connection or a third-party server.
[0046] S302, responding to the user's operation, setting the image projection mode.
[0047] In some embodiments of the present application, the projection device projects or displays a mode setting interface, and sets the image projection mode through the mode setting interface. Figure 4 As shown, it is a schematic diagram of the mode setting interface provided in an embodiment of the present application. The mode setting interface 40 includes a first control 41, a second control 42, a third control 43 and a fourth control 44. If it is detected that the user selects the first control 41, such as the user selects the first control through the remote control, the projection device 10 sets the image projection mode to the grid mode. The grid mode represents a mode in which the content of the image is divided into a plurality of grid contents and the grid contents are projected.
[0048] If it is detected that the user selects the second control 42, the projection device 10 sets the image projection mode to the sketch mode. The sketch mode refers to a mode in which the content of the image is converted by lines or shapes and the converted image is projected.
[0049] If it is detected that the user selects the third control 43, the projection device 10 sets the image projection mode to the comic mode. The comic mode refers to a mode in which the content of the image is converted into comics or cartoons and the converted comics or cartoons are projected.
[0050] If it is detected that the user selects the fourth control 44, the projection device 10 sets the image projection mode to the black-and-white mode. The black-and-white mode refers to a mode in which the content of the image is converted into a black-and-white image and the black-and-white image is projected.
[0051] In other embodiments of the present application, a button (not shown) may also be set on the projection device 10, and the user may set the image projection mode by operating the button. For example, the image projection mode may be set to any one of a grid mode, a sketch mode, a cartoon mode, and a black and white mode by operating the button.
[0052] S303, processing the image according to the image projection mode to obtain a target image.
[0053] S304, projecting the target image through an optical machine.
[0054] In some embodiments of the present application, the projection device 10 may use an open source computer vision (OpenCV) library to process an image in a gridding mode to obtain a target image.
[0055] In some embodiments of the present application, if the user selects the grid mode as the image projection mode, the projection device 10 configures the number of rows and columns of the grid through the OpenCV library, and determines the height and width of each grid; draws grid lines on the image based on the number of rows and columns, the height and width of the grid to obtain a grid image, and uses the grid image as the target image; and projects the target image onto the projection screen through the optical machine 11.
[0056] In some embodiments of the present application, the number of rows and columns of the grid can be configured according to the resolution of the image, wherein the higher the resolution, the more rows and columns are configured. The embodiments of the present application configure the number of rows and columns of the grid according to the resolution of the image, so that an image with grid lines drawn according to the number of rows and columns of the grid can be clearly projected on the projection screen.
[0057] In the embodiment of the present application, the image is converted into a grid image through a projection device, and the grid image is projected onto the projection screen through the optical machine 11. The user can refer to the content of each grid of the projected grid image to draw, which can improve the efficiency of copying the image.
[0058] In some embodiments of the present application, if the user selects the sketch mode as the image projection mode, the projection device 10 converts the image into a grayscale image through the OpenCV library; performs Gaussian blur processing on the grayscale image and reduces the noise in the grayscale image; uses a first preset edge detection algorithm to extract the edge of the grayscale image; converts the color of the edge in the grayscale image to obtain a sketch image, and uses the sketch image as the target image; and projects the target image onto the projection screen through the optical machine 11.
[0059] The embodiment of the present application can reduce noise and make subsequent edge detection smoother through Gaussian blur processing. The first preset edge detection algorithm in the embodiment of the present application can use the Canny edge detection algorithm to extract the edge in the image. In the embodiment of the present application, converting the color of the edge in the grayscale image includes: if the background of the grayscale image is black and the edge is white, then converting the background to white and converting the edge to black; if the background of the grayscale image is white and the edge is black, then converting the background to black and converting the edge to white.
[0060] In the embodiment of the present application, the image is converted into a sketch image through a projection device, and the sketch image is projected onto a projection screen through an optical machine 11. The user can draw with reference to the projected sketch image, and can better understand the information expressed by the image during the user's drawing process.
[0061] In some embodiments of the present application, if the user selects the cartoon mode as the image projection mode, the projection device 10 projects a grayscale image corresponding to the image determined by the OpenCV library; performs median filtering on the grayscale image and reduces noise; uses a second preset edge detection algorithm to extract the edges of the grayscale image; dilates the edges to thicken the lines in the grayscale image; performs bilateral filtering on the image to reduce the number of colors in the image; superimposes the edges in the grayscale image with the image to obtain a cartoon image, and uses the cartoon image as the target image; and projects the target image onto the projection screen through the optical machine 11.
[0062] In the embodiment of the present application, the median filter process can reduce noise and make subsequent edge detection smoother. In the embodiment of the present application, the second preset edge detection algorithm can use the Canny edge detection algorithm to extract the edge in the image. In the embodiment of the present application, the edge in the grayscale image is superimposed with the image to obtain the comic image, including: the edge in the grayscale image and the image are calculated by weighted sum to obtain the comic image.
[0063] In the embodiment of the present application, the image is converted into a comic image through a projection device, and the comic image is projected onto a projection screen through an optical machine 11. The user can draw with reference to the projected comic image, making it convenient for the user to perform artistic drawing with only the comic image.
[0064] In some embodiments of the present application, if the user selects the black and white mode as the image projection mode, the projection device 10 converts the image into a grayscale image through the OpenCV library; binarizes the grayscale image according to a preset binarization algorithm to obtain a black and white image, and uses the black and white image as the target image; and projects the target image onto the projection screen through the optical machine 11. The preset binarization algorithm in the embodiment of the present application includes one of an adaptive threshold binarization algorithm and an Otsu binarization algorithm.
[0065] In the embodiment of the present application, the image is converted into a black and white image by a projection device, and the black and white image is projected onto a projection screen by an optical machine 11. The user can refer to the projected black and white image for painting, which facilitates the user to create art based on the black and white image.
[0066] In some embodiments of the present application, after step S305, the method further includes: obtaining the temperature of the optical engine, and if the temperature of the optical engine is greater than or equal to the first temperature threshold, controlling to start the fan 13 to reduce the temperature of the optical engine 11 and the projector 10. In some embodiments of the present application, the projection device 10 can obtain the temperature of the optical engine 11 through a temperature sensor. The temperature sensor can be a negative temperature coefficient thermistor (NTC) sensor. When it is detected that the temperature of the optical engine 11 is greater than or equal to the first temperature threshold, the projection device 10 controls the second motor to drive the fan 13 to rotate to reduce the temperature of the optical engine 11 and the projector 12.
[0067] In some embodiments of the present application, in order to quickly reduce the temperature of the optical engine 1, the projection device 10 also adjusts the wind speed of the fan 13 according to the temperature of the optical engine 11, wherein the higher the temperature of the optical engine 11, the higher the wind speed of the fan 13. For example, the projection device 10 stores a correspondence table between temperature and fan, in which different temperatures correspond to different wind speeds. The projection device 10 searches the correspondence table according to the temperature of the optical engine 11 to determine the target wind speed corresponding to the temperature of the machine 11, and adjusts the speed of the second motor according to the target wind speed, so that the fan reaches the target wind speed.
[0068] In some embodiments of the present application, the method described in step S304 also includes: if it is detected that the projection screen of the target image has trapezoidal distortion, the target image is preset processed and the trapezoidal distortion of the projection screen is eliminated, thereby achieving automatic trapezoidal correction of the projection screen of the target image.
[0069] refer to Figure 5 FIG. 1 is a flow chart of a method for processing a target image provided by some embodiments of the present application. The method comprises the following steps.
[0070] S501, obtaining a tilt angle of a projection device.
[0071] In some embodiments of the present application, the projection device 10 obtains the tilt angle of the projection device 10 relative to the horizontal plane through an accelerometer or a gyroscope sensor.
[0072] S502, performing preset processing on the target image according to the tilt angle to eliminate the trapezoidal distortion of the projection screen of the target image.
[0073] In some embodiments of the present application, the trapezoidal distortion indicates that at least one set of opposite sides of the projection screen of the target image is unequal, for example, the upper side of the projection screen is longer than the lower side, or the left side is longer than the right side.
[0074] In some embodiments of the present application, if the tilt angle of the projection device 10 is greater than or equal to the preset angle, the target image is subjected to preset processing to eliminate the trapezoidal distortion of the projection screen. The present application can adjust the shape of the target image by performing preset processing on the target image, thereby eliminating the trapezoidal distortion of the projection screen of the target image. In some embodiments of the present application, the preset processing includes at least one of stretching, compression, rotation, scaling, and translation.
[0075] refer to Figure 6 FIG. 1 is a flow chart of a method for processing a target image provided by some embodiments of the present application. The method comprises the following steps.
[0076] S601, obtaining a tilt angle of a projection device.
[0077] S602, obtaining a projection picture of a target image.
[0078] In some embodiments of the present application, the projection device 10 projects the target image on the projection screen. The projection device 10 obtains the projection picture of the target image displayed on the projection screen through a camera.
[0079] S603: If it is determined that the projection image has a first trapezoidal distortion, the target image is processed by a vertical trapezoidal correction method to eliminate the first trapezoidal distortion of the projection image.
[0080] In some embodiments of the present application, the first trapezoidal distortion means that the upper side of the projected image is longer than the lower side or the lower side is longer than the upper side, so that the projected image is in a trapezoidal shape as a whole. In some embodiments of the present application, processing the target image by vertical trapezoidal correction to eliminate the first trapezoidal distortion of the projected image includes: adjusting the vertical projection angle of the lens of the optical machine so that the upper and lower edges of the projected image of the target image are parallel to the projection screen when projected.
[0081] S604: If it is determined that the projection image has a second trapezoidal distortion, the target image is processed by a horizontal trapezoidal correction method to eliminate the second trapezoidal distortion of the projection image.
[0082] In some embodiments of the present application, the second trapezoidal distortion means that the left side of the projected image is longer than the right side or the right side is longer than the left side, so that the projected image is in a trapezoidal shape as a whole. In some embodiments of the present application, processing the target image by horizontal trapezoidal correction to eliminate the first trapezoidal distortion of the projected image includes: adjusting the horizontal projection angle of the lens of the optical machine so that the left and right edges of the projected image of the target image are parallel to the projection screen when projected.
[0083] In the embodiment of the present application, the problem of projection image distortion caused by improper placement or angle of the projection device can be corrected through vertical keystone correction and horizontal keystone correction.
[0084] In some embodiments of the present application, the method described in step S304 also includes: receiving an adjustment instruction input by a user; and correcting the projection screen of the target image according to the adjustment instruction. The user can select a trapezoidal correction mode and a correction value corresponding to the trapezoidal correction mode through a remote control, generate an adjustment instruction according to the trapezoidal correction mode and the corresponding correction value, and send the adjustment instruction to the projection device. The projection device receives the adjustment instruction sent by the remote control, and corrects the projection screen of the target image according to the adjustment instruction. In some embodiments of the present application, the trapezoidal correction mode includes a horizontal trapezoidal correction mode and a vertical trapezoidal correction mode. The correction value corresponding to the horizontal trapezoidal correction mode includes a horizontal projection angle, and the correction value corresponding to the vertical trapezoidal correction mode includes a vertical projection angle.
[0085] refer to Figure 7 FIG. 1 is a flow chart of a method for processing a target image provided by some other embodiments of the present application. The method comprises the following steps.
[0086] S701, after projecting the target image through the optical machine, detecting whether there is an obstacle in the projection path.
[0087] The projection path in the present application refers to the illumination range formed by the target image when it is projected. In some embodiments of the present application, the projection device 10 can detect whether there is an obstacle in the projection path through an infrared sensor. For example, the projection device 10 emits infrared light into the projection path through an infrared sensor, and detects infrared reflected light from nearby objects through a light detector. When sufficient reflected light is detected, it can be determined that there is an obstacle near the projection device 10.
[0088] In other embodiments of the present application, the projection device 10 can capture an image of the projection path through a camera, and identify whether there is an obstacle in the image of the projection path through an image recognition algorithm. For example, the projection device 10 identifies whether there is a shadow area or an occlusion area in the image of the projection path through an image recognition algorithm, and if there is a shadow area or an occlusion area in the image of the projection path, it is determined that there is an obstacle corresponding to the shadow area or the occlusion area in the image of the projection path.
[0089] S702: If an obstacle is detected, identify the object information of the obstacle.
[0090] S703, adjusting the lens of the optical machine according to the object information so that the optical machine avoids obstacles when projecting the target image.
[0091] In some embodiments of the present application, the object information includes at least one of position, size, and contour. In some embodiments of the present application, adjusting the lens of the optical machine according to the object information so that the optical machine avoids obstacles when projecting the target image includes: determining the adjustment position, adjustment angle, and focal length adjustment value of the lens of the optical machine according to at least one of the object information of position, size, and contour; adjusting the lens of the optical machine according to the adjustment position, adjustment angle, and focal length adjustment value to avoid obstacles on the projection path of the optical machine.
[0092] In some embodiments of the present application, the method further includes: determining an image reduction ratio based on at least one object information of position, size and contour; and reducing the projection screen of the target image according to the image reduction ratio.
[0093] In an embodiment of the present application, when a target image is projected through an optical machine, if an obstacle is detected in the projection path, the lens of the optical machine can be adjusted or the projection screen of the target image can be reduced according to the object information of the obstacle, so that the optical machine avoids the obstacle when projecting the target image, thereby realizing an automatic obstacle avoidance function and ensuring that the target image has good continuity and visibility during projection.
[0094] In some embodiments of the present application, the projection device can also notify the user of the presence of an obstacle in a preset manner when detecting an obstacle. After receiving the notification, the user can manually adjust the position of the projection device or remove the obstacle, so that the projection device has a better projection effect.
[0095] refer to Figure 8 FIG. 1 is a flow chart of a method for processing a target image provided by some other embodiments of the present application. The method comprises the following steps.
[0096] S801, after projecting the target image onto the projection screen through the optical machine, obtaining the projection picture of the target image.
[0097] In some embodiments of the present application, the projection device 10 obtains a projection picture when the target image is projected onto the projection screen through a camera or an optical sensor, wherein the projection picture includes the projection screen.
[0098] S802, identifying the edge position of the projection screen in the projection image.
[0099] In the embodiment of the present application, the projection device 10 can identify the edge position of the projection screen in the projection picture through an edge detection algorithm. For example, the edge position of the projection screen in the captured image can be identified through an edge detection algorithm based on the color, texture, and size of the projection screen.
[0100] S803, identifying the projection picture, and if it is determined that the image content of the projection picture exceeds the edge position of the projection screen, determining the adjustment position, adjustment angle and focal length adjustment value of the lens of the optical machine.
[0101] In the embodiments of the present application, the adjustment position, adjustment angle and focal length adjustment value of the lens of the optical machine can be determined according to the relative position of the projection image and the edge position of the projection screen.
[0102] S804, adjusting the lens of the optical machine according to the optical machine adjustment position, adjustment angle and focal length adjustment value, so that the projection picture of the target image is located within the area of the projection screen.
[0103] In the embodiment of the present application, the lens of the optical machine can be adjusted according to the adjustment position, adjustment angle and focal length adjustment value to move the position of the projection picture or reduce the size of the projection picture, so that the projection picture of the target image is located within the area of the projection screen.
[0104] When the embodiment of the present application projects the target image onto the projection screen through the optical machine to form a projection picture, the projection picture is obtained, the edge position of the projection screen in the image is identified, and when it is determined that the projection picture exceeds the edge position of the projection screen, the lens of the optical machine can be adjusted according to the position, angle and focal length adjustment value of the optical machine, so that the target image can be projected within the area of the projection screen. In this way, the projection picture of the target image can perfectly fill the entire projection screen, avoiding distortion or deformation of the projection picture.
[0105] See also Fig. 9 , which is a structural diagram of a projection display device provided in some embodiments of the present application. The projection display device can implement the details of the projection display method in the above embodiments and achieve the same effect. The projection display device 90 includes the following modules.
[0106] The acquisition module 91 is used to acquire images.
[0107] The mode setting module 92 is used to respond to user operations and set the image projection mode.
[0108] The image processing module 93 is used to process the image according to the image projection mode to obtain a target image.
[0109] The projection module 94 is used to project the target image through an optical machine.
[0110] It should be noted that the projection display device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0111] The functional units and modules in the above embodiments may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the above integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
[0112] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. The computer-readable storage medium may be a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or any other medium that can store program codes. The storage medium is used to store the program, and the processor executes the program after receiving the execution instruction. The method executed by the electronic device defined by the process disclosed in any embodiment of the present invention may be applied to the processor or implemented by the processor.
[0113] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms. It should be understood that the information interaction, execution process and other contents between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. The specific functions and technical effects brought about can be specifically referred to the method embodiment part, which will not be repeated here. For the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit, and the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the scope of protection of the present application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0114] Alternatively, the present invention may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the present invention may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part.
[0115] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A projection display method, applied to a projection device, wherein the projection device includes an optical machine, characterized in that: The method comprises: Get the image; Responding to user operations, setting image projection mode; Processing the image according to the image projection mode to obtain a target image; The target image is projected through the optical machine.
2. The projection display method according to claim 1, characterized in that: The image projection mode includes a gridding mode, and the processing of the image according to the image projection mode to obtain a target image includes: Configure the number of rows and columns of the grid, and determine the height and width of the grid; Based on the number of rows and columns of the grid and the height and width of the grid, grid lines are drawn on the image to obtain a grid image.
3. The projection display method according to claim 1, characterized in that: The image projection mode includes a sketch mode, and the processing of the image according to the image projection mode to obtain a target image includes: converting the image into a grayscale image; Performing Gaussian blur processing and denoising processing on the grayscale image; Extracting the edge of the grayscale image using a first preset edge detection algorithm; The colors of the edges in the grayscale image are converted to obtain a sketch image.
4. The projection display method according to claim 1, characterized in that: The image projection mode includes a cartoon mode, and the processing of the image according to the image projection mode to obtain a target image includes: Based on the image, obtaining a corresponding grayscale image; Performing median filtering and denoising on the grayscale image; Extracting the edge of the grayscale image using a second preset edge detection algorithm; Performing dilation processing on the edge to thicken the lines in the grayscale image; Performing bilateral filtering on the image; The edges in the grayscale image are superimposed on the image to obtain a comic image.
5. The projection display method according to claim 1, characterized in that: The image projection mode includes a black and white mode, and the processing of the image according to the image projection mode to obtain a target image includes: converting the image into a grayscale image; The grayscale image is binarized according to a preset binarization algorithm to obtain a black and white image.
6. The projection display method according to claim 1, characterized in that: After projecting the target image through the optical machine, the method further includes: Obtaining the tilt angle of the projection device; The target image is processed in a preset manner according to the tilt angle to eliminate the trapezoidal distortion of the projection screen of the target image.
7. The projection display method according to claim 1, characterized in that: After projecting the target image through the optical machine, the method further includes: Obtaining the tilt angle of the projection device; Acquire a projection picture of the target image; If it is determined that the projection image has a first trapezoidal distortion, the target image is processed by a vertical trapezoidal correction method to eliminate the first trapezoidal distortion of the projection image; If it is determined that the projection image has a second trapezoidal distortion, the target image is processed by a horizontal trapezoidal correction method to eliminate the second trapezoidal distortion of the projection image.
8. The projection display method according to claim 1, characterized in that: After projecting the target image through the optical machine, the method further includes: Detecting whether there is an obstacle in a projection path, wherein the projection path represents a lighting range formed by the target image when being projected; If the obstacle is detected, identifying object information of the obstacle; The lens of the optical machine is adjusted according to the object information so that the optical machine avoids the obstacle when projecting the target image.
9. The projection display method according to claim 1, characterized in that: After projecting the target image through the optical machine, the method further includes: Acquire a projection picture of the target image; Identifying an edge position of a projection screen in the projection picture; Identify the projection picture, and if it is determined that the image content of the projection picture exceeds the edge position of the projection screen, determine the adjustment position, adjustment angle and focal length adjustment value of the lens of the optical machine; The lens of the optical machine is adjusted according to the adjustment position, the adjustment angle and the focal length adjustment value, so that the projection picture of the target image is located within the area of the projection screen.
10. The projection display method according to claim 1, characterized in that: A fan is arranged in the optical machine, and the method further comprises: Obtaining the temperature of the optical machine; If the temperature of the optical engine is greater than or equal to a first temperature threshold, the fan is controlled to be started.
11. The projection display method according to claim 10, characterized in that: The method further comprises: After starting the fan, the rotation speed of the fan is adjusted to make the temperature lower than the first temperature threshold.
12. A projection device, characterized in that: include: An optical machine, a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the projection display method according to any one of claims 1 to 11.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the projection display method according to any one of claims 1 to 11 is implemented.