A moiré pattern removal method, device and equipment
By adjusting the automatic focus according to the optical characteristics of the smart device camera, the problem of molar patterns when shooting the display screen is solved, and high-quality image shooting is achieved.
Patent Information
- Application Number
- CN202010697763.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-20
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2040-07-20
AI Technical Summary
When shooting and displaying screens, smart device cameras are prone to color high-frequency irregular stripes (molar patterns), which affects image clarity and cannot meet users' requirements for high-quality images.
By determining the target focus adjustment information based on the optical characteristics of the camera, autofocus adjustment is performed, and the adjusted camera is used to capture the display screen to obtain an image without molar patterns.
It realizes automatic removal of molar patterns when shooting and display screens, improves image clarity, meets users' needs for high-quality images, is simple to operate and has strong practicality.
Smart Images

Figure CN113962869B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to a moiré removal method, apparatus and device. Background Art
[0002] With the popularization of intelligent devices, using the shooting function of intelligent devices to take pictures has become a part of daily life. However, when using the camera of an intelligent device to shoot a display screen that is being displayed, since the photosensitive element of the intelligent device will be affected by high-frequency interference, the captured image will appear with colorful high-frequency irregular stripes (this stripe is called moiré), which affects the clarity of the image, resulting in a decline in image quality and cannot meet the user's requirements for high-quality captured images.
[0003] Therefore, the prior art needs to be further improved. Summary of the Invention
[0004] The present invention provides a moiré removal method, apparatus and device, which are used to perform an automatic focus adjustment on a camera once according to target focus adjustment information determined based on the optical characteristics of the camera, and use the camera after the focus adjustment to shoot a display screen in a display state to obtain an image without moiré.
[0005] In a first aspect, the present embodiment provides a moiré removal method, which is applied to a terminal device including one or more cameras, and includes:
[0006] Determine target focus adjustment information according to the optical characteristics of the camera;
[0007] Perform an automatic focus adjustment on the camera according to the target focus adjustment information;
[0008] Use the camera after the focus adjustment to shoot a display screen in a display state to obtain a first image.
[0009] Optionally, before determining the target focus adjustment information according to the optical characteristics of the camera, the method further includes:
[0010] When it is detected that the camera is in a shooting mode, collect a plurality of luminance values within a preset time period;
[0011] Calculate a target luminance change rate according to the plurality of luminance values;
[0012] If the target luminance change rate belongs to a preset set of luminance change rates, it is determined that the camera is pre-shooting the display screen; wherein, the preset set of luminance change rates includes a plurality of display screen refresh frequencies.
[0013] Optionally, the optical characteristics of the camera include the target camera type and the preset resolution adjustment information. Determining the target focus adjustment information according to the optical characteristics of the camera includes:
[0014] Determining the target MTF test result corresponding to the target camera type according to the mapping relationship between the pre-stored camera type and the MTF test result;
[0015] Determining the target focus adjustment direction and the target focus adjustment distance according to the preset resolution adjustment information and the target MTF test result, where the target focus adjustment direction and the target focus adjustment distance are the target focus adjustment information.
[0016] Optionally, the preset resolution adjustment information includes the target resolution adjustment direction and the target resolution adjustment size, and the target MTF test result includes the relationships between the resolution adjustment direction and size corresponding to the target camera type and the focus adjustment direction and distance respectively;
[0017] Determining the target focus adjustment direction and the target focus adjustment distance according to the preset resolution adjustment information and the target MTF test result includes:
[0018] Determining the target focus adjustment direction corresponding to the target resolution adjustment direction according to the relationship between the resolution adjustment direction corresponding to the target camera type and the focus adjustment direction;
[0019] Determining the target focus adjustment distance corresponding to the target resolution adjustment size according to the relationship between the resolution adjustment size corresponding to the target camera type and the focus adjustment distance.
[0020] Optionally, if the resolution adjustment direction is to decrease, the focus adjustment direction is for the camera to move closer to the display screen.
[0021] Optionally, after using the camera after focus adjustment to capture the display screen in the display state to obtain the first image, the method further includes:
[0022] Performing image sharpening processing on the first image to obtain an intermediate image after image sharpening processing;
[0023] Performing image contrast enhancement processing on the intermediate image to obtain a second image after image contrast enhancement processing.
[0024] In a second aspect, the present embodiment further provides a moiré removal device, which is applied to a terminal device including one or more cameras, and includes:
[0025] An adjustment information acquisition module, configured to determine target focus adjustment information according to the optical characteristics of the camera;
[0026] A focus adjustment module, configured to perform automatic focus adjustment on the camera according to the target focus adjustment information.
[0027] An image capturing module, configured to capture a display screen in a display state by using a camera after focus adjustment, so as to obtain a first image.
[0028] In a third aspect, the present embodiment further provides a terminal device, which includes a processor and a storage medium communicatively connected to the processor. The storage medium is adapted to store a plurality of instructions. The processor is adapted to call the instructions in the storage medium to execute the steps of implementing the moiré removal method.
[0029] In a fourth aspect, the present embodiment further provides a computer-readable storage medium. The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the moiré removal method.
[0030] Beneficial effects: The present invention provides a moiré removal method, apparatus and device. The target focus adjustment information is determined based on the optical characteristics of the camera, the camera is automatically focused based on the target focus adjustment information, and the display screen in the display state is captured by using the camera after focus adjustment to obtain a first image. By using the embodiment of the present invention, it is possible to perform an automatic focus adjustment on the camera once based on the target focus adjustment information determined based on the optical characteristics of the camera, and capture the display screen in the display state by using the camera after one focus adjustment to obtain an image without moiré. Description of the Drawings
[0031] Figure 1 It is a schematic diagram of moiré appearing in an image captured by using a camera in the prior art;
[0032] Figure 2 It is a flowchart of the steps of the moiré removal method provided by the present invention;
[0033] Figure 3 It is an MTF test chart of a camera module;
[0034] Figure 4 It is an image obtained when a camera in the prior art captures a display screen;
[0035] Figure 5
[0036] Figure 6 It is a structural principle block diagram of the device in the embodiment of the present invention;
[0037] Figure 7 It is a principle structure diagram of the terminal device of the present invention. Detailed Embodiments
[0038] To make the objectives, technical solutions and advantages of the present invention more clear and definite, the following further describes the present invention in detail with reference to the accompanying drawings and by way of examples. It should be understood that the specific examples described herein are only for explaining the present invention and are not used to limit the present invention.
[0039] Those skilled in the art of the present technology can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present invention means the presence of features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more related listed items.
[0040] Those skilled in the art of the present technology can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.
[0041] More and more users use the camera function of smart devices to record the beautiful moments in life. Sometimes when seeing a wonderful picture being played on a user's electronic device and wanting to use a smart device to take a picture of it, however, when taking a picture of a display screen that is being displayed, such as a TV display screen, a computer monitor display screen, a mobile phone display screen, a tablet computer display screen, or an LED display screen, the same problem will occur. The problem is that the captured image will have colored or black-and-white stripes, as Figure 1 shown, which affects the original clarity of the picture and the aesthetics. Although the moiré effect can be reduced by changing the shooting angle or shooting distance, it will change the original desired shooting angle and cause inconvenience to the user when using it.
[0042] In order to overcome the problems in the prior art of shooting display screen images, this embodiment discloses a moiré removal method, which realizes automatically eliminating the moiré generated in the image when using a smart device to shoot an image of a display screen and obtaining a clear display screen image.
[0043] Specifically, for the moiré removal method provided in this embodiment, when the camera starts pre-shooting, the optical characteristics of the camera are obtained, the focus adjustment information is obtained based on the optical characteristics of the camera, the focus position of the current shooting is adjusted according to the focus adjustment information, and the display screen is shot according to the adjusted focus position to obtain the first image, that is, the display screen image without moiré.
[0044] In this embodiment, by adjusting the focus position of the shooting, it is avoided that the camera photosensitive element generates moiré due to the influence of high-frequency signals, and a display screen image without moiré can be automatically shot. Moreover, in this embodiment, it is necessary to obtain the target focus adjustment information, and the focus position is adjusted only once according to the target focus adjustment information, so as to achieve the purpose of removing moiré in the image when shooting the display screen later. Therefore, while obtaining a clear display screen picture for the user, it is convenient to implement and has strong practicability.
[0045] The following will explain the method disclosed in the present invention in more detail with reference to the accompanying drawings.
[0046] Exemplary method
[0047] In the first aspect, this embodiment discloses a moiré removal method, as Figure 2 shown, including:
[0048] Step S1: The terminal device determines the target focus adjustment information according to the optical characteristics of the camera.
[0049] Since when the user uses the camera of the terminal device to shoot the display screen that is being displayed, moiré will appear in the captured image. Therefore, before performing the step of determining the target focus adjustment information according to the optical characteristics of the camera in this step, it also includes determining whether the camera of the terminal device used by the user is in the pre-shooting state of shooting the display screen that is being displayed. If so, the focus position of the camera is adjusted in the next step. If not, the focus position of the camera is not adjusted.
[0050] Specifically, the step of determining whether the terminal device is currently pre-shooting the display screen in the display state includes:
[0051] Step S01: When it is detected that the camera is in the shooting mode, the terminal device collects multiple brightness values within a preset time period.
[0052] First, it is determined whether the camera is in the shooting mode. If the camera is not turned on, the current smart device is not pre-shooting the display screen. If the camera is in the shooting mode, the brightness value corresponding to the brightness signal collected by the camera is obtained. When the camera is in the shooting state, it can obtain the corresponding brightness signal, and according to the magnitude of the brightness signal, the brightness value of the brightness signal is obtained. The shooting mode of the camera is the mode in which the camera is started and in the working state. The shooting mode of the camera can be an automatic shooting mode or a manual shooting mode that starts shooting according to the received shooting control instruction.
[0053] Step S02: The terminal device calculates the target brightness change rate according to multiple brightness values.
[0054] Calculate the brightness change rate according to the multiple brightness values collected in the above step S01. Specifically, the brightness change rate is obtained by calculating the difference between the brightness values of two adjacent frames of images obtained.
[0055] Step S03: If the target brightness change rate belongs to the preset brightness change rate set, the terminal device determines that the camera is pre-shooting the display screen; where the preset brightness change rate set includes multiple display screen refresh frequencies.
[0056] Since the refresh frequencies of the currently displayed display screen are 60Hz, 90Hz, and 120Hz, it can be obtained whether the brightness change rate collected during the pre-shooting of the camera is consistent with the refresh frequency of the display screen by analyzing the target brightness change rate collected during the pre-shooting of the camera. If they are consistent, it means that the current user is currently shooting the display screen. If the brightness change rate shows a periodic decrease every 1 / 60s, it means that the refresh frequency of the currently collected light source is 60Hz. If the target brightness change rate shows a periodic decrease every 1 / 90s, it means it is 90Hz, and so on.
[0057] If the brightness change rate calculated in this step belongs to the preset brightness change rate set, the terminal device pre-shoots the display screen in the display state.
[0058] In order to accurately determine whether the collected light comes from the display screen, the refresh frequency of the display screen when it is in the display state is pre-saved to the brightness change rate set. When it is calculated that the brightness change rate of the currently collected brightness value is consistent with the brightness change rate emitted by the display screen when it is in the display state, it means that the brightness value collected by the current user comes from the display screen in the display state, and the current state of the terminal is pre-shooting the currently displayed display screen.
[0059] When it is determined in the above steps that the camera of the current terminal device is currently pre-shooting a display screen in a display state, then this step of determining the target focus adjustment information according to the optical characteristics of the camera is executed.
[0060] In this step, the target focus adjustment information can be calculated from the relevant data information that can be obtained, or it can be directly obtained from the pre-stored data in the memory, or it can be data obtained from other intelligent devices or from the cloud server.
[0061] Specifically, since the target focus adjustment information is to eliminate the moiré pattern that appears in the captured image when the original camera takes a focused shot, and it is the adjustment information for adjusting the focus position of the original camera.
[0062] Furthermore, the adjustment direction is the direction in which the camera moves closer to the display screen to be photographed or the direction in which the camera moves away from the display screen to be photographed. Since the camera moves in the direction of approaching the display screen, the resolution of the camera decreases. Therefore, if the target focus adjustment direction is to decrease the camera resolution, the target focus adjustment direction is the direction in which the camera moves closer to the display screen.
[0063] After it is recognized that the current camera is shooting a display screen that is being displayed, in this step, the focus distance is automatically changed through the focus adjustment information, so that a small range of offset is made at the original focus position, and the offset direction and distance are determined by the optical characteristics of the selected camera module. The optical characteristics of the camera module refer to the physical properties formed by its optical structure, mainly including: parameters such as focal length, field of view angle, and relative aperture. Among them, the longer the focal length of the camera, the smaller the field of view angle, and the shorter the focal length, the larger the field of view angle.
[0064] Furthermore, the optical characteristics of the camera include the target camera type and the preset resolution adjustment information. Among them, the target camera type varies according to its product model or manufacturer. Generally, the target camera type can be marked on the shell of the camera module. If there is no category mark on the shell of the camera module, since each camera corresponds to a product manual, the manufacturer generally attaches the type of the camera module to the product manual and provides it to the mobile phone developer. Therefore, it can be directly found in the product description document. The preset resolution adjustment information includes: the target resolution adjustment direction and the target resolution adjustment size. The target MTF test result includes the relationship between the resolution adjustment direction and size corresponding to the target camera type and the focus adjustment direction and distance respectively.
[0065] Specifically, the steps for the terminal device to determine the target focus adjustment information according to the optical characteristics of the camera include:
[0066] Step S11: The terminal device determines the target MTF test result corresponding to the target camera type according to the mapping relationship between the pre-stored camera module type and the MTF test result.
[0067] To obtain the corresponding focus adjustment information according to the light characteristics of the camera, in this implementation, the mapping relationship between various different types of camera modules and their corresponding modulation transfer function (MTF) test results is pre-stored. According to the known type of the camera module, the corresponding MTF test result can be obtained. The MTF test result can be, for example, Figure 3 the MTF test chart of the camera module as shown, where the abscissa represents the physical position of the lens (distance from the center of the lens), and the ordinate is the resolution. The MTF test result can also be a table representing the correspondence between the center point position information of the camera and the camera resolution. The MTF test Figure 1 is generally attached to the product manual by the camera module manufacturer, so it can be directly found in the instruction document.
[0068] Step S12: The terminal device determines the target focus adjustment direction and the target focus adjustment distance according to the preset resolution adjustment information and the target MTF test result. The target focus adjustment direction and the target focus adjustment distance are the target focus adjustment information.
[0069] After obtaining the target MTF test result corresponding to the target camera type in the above step S11, the target MTF test result can be combined with the preset resolution adjustment information to determine the target focus adjustment information.
[0070] Specifically, the target focus adjustment information includes two aspects: the target focus adjustment direction and the target focus adjustment distance. Only by adjusting the direction and distance can the focus position be adjusted. Different target focus adjustment directions correspond to different changes in the size of the target resolution adjustment, and different target focus adjustment distances correspond to different sizes of the resolution adjustment. Therefore, it is necessary to determine both the target focus adjustment distance and the target focus adjustment direction to accurately adjust the focus position.
[0071] In this step, the terminal device determines the target focus adjustment direction and the target focus adjustment distance according to the preset resolution adjustment information and the target MTF test result, including:
[0072] Step S121: The terminal device determines the target focus adjustment direction corresponding to the target resolution adjustment direction according to the relationship between the resolution adjustment direction and the focus adjustment direction corresponding to the target camera type.
[0073] First, adjust the direction according to the resolution corresponding to the target camera type to determine the target focus adjustment direction. Based on the principle that if the resolution adjustment direction is to decrease, the focus adjustment direction is the direction in which the camera moves closer to the display screen. If the target resolution adjustment direction is to decrease, the target focus adjustment direction is to move the camera closer to the display screen.
[0074] Step S122: The terminal device determines the target focus adjustment distance corresponding to the target resolution adjustment size according to the relationship between the resolution adjustment size corresponding to the target camera type and the focus adjustment distance.
[0075] Based on the relationship between the resolution adjustment size corresponding to the camera type and the focus adjustment distance, when the resolution is adjusted to decrease to the target resolution, the focus adjustment distance is the target distance corresponding to the camera moving closer to the display screen or the distance away from the display screen. Taking the MTF test chart of the camera module given in Figure 3 as an example, where the solid line represents the horizontal resolution of the camera and the dashed line represents the vertical resolution of the camera at 5pls. When reducing the resolution of the camera by 10%, that is, taking the position of 90% of the numerical value at the relative vertex on the MTF curve, the center point of the camera deviates from the focus position by 5pls to achieve the effect of eliminating moiré.
[0076] From the target MTF test chart, it can be obtained that when the focus position is adjusted, since the resolution of the lens decreases, its resolution is less than the spatial frequency of the photosensitive element, thus achieving the purpose of eliminating moiré in the captured image.
[0077] Step S2: The terminal device performs automatic focus adjustment on the camera according to the target focus adjustment information.
[0078] After obtaining the target focus adjustment information in the above step S1, adjust the focus position of the camera. The specific adjustment includes driving the focus position of the camera in the direction of moving closer to the display screen and the moving distance. For example, moving 5pls to obtain the camera after automatic focus adjustment.
[0079] In this step, perform an automatic focus adjustment on the focus position of the camera once according to the target focus adjustment information. The step of performing an automatic focus adjustment on the focus position of the camera in this step can be driven by the camera driver in the CPU of the camera. According to the target focus adjustment information, drive the camera module to adjust its shooting parameters to achieve focus adjustment.
[0080] Step S3: The terminal device uses the camera after focus adjustment to take a picture of the display screen in the display state to obtain a first image.
[0081] Use the camera after focus adjustment to take a picture of the currently displayed display screen, obtaining a display screen image without moiré, which is the first image in this embodiment.
[0082] Since changing the focus position has a certain impact on the clarity of the captured image, compared with the image captured before changing the focus position, the clarity of the captured image decreases. Therefore, at the image post-processing end, it is necessary to compensate for this loss by enhancing the sharpening intensity and contrast. After post-processing, a clear picture without moiré can be obtained.
[0083] Specifically, after the step S3 where the terminal device uses the camera after focus adjustment to take a picture of the display screen in the display state and obtains the first image, it further includes:
[0084] The terminal device performs image sharpening processing on the first image to obtain an intermediate image after image sharpening processing;
[0085] The terminal device performs image contrast enhancement processing on the intermediate image to obtain a second image after image contrast enhancement processing.
[0086] In this step, first, an image enhancement algorithm for sharpening the image is used to perform image sharpening processing on the first image respectively to obtain an intermediate image after image sharpening processing, and then the intermediate image is processed to enhance the contrast to obtain a second image after image sharpening processing and contrast enhancement processing. In this step, the degree of image sharpening processing and the degree of contrast enhancement are determined according to the loss of the image caused by changing the focus position, and are determined by the loss of image contrast in the above steps. For example, in the above steps, the resolution of the camera is reduced by 10% to eliminate the moiré appearing in the image. Then, in this step, the sharpness intensity contrast is increased by approximately 10% compared with the original design value, and the obtained result is basically consistent with that before weakening. Finally, a captured image of the display screen without moiré and clear is obtained.
[0087] Because the automatic focus function of the mobile phone will make the focus on the screen when taking pictures of the screen, and the clarity of the object being photographed is proportional to its spatial frequency, which will make the resolution of the lens close to the spatial frequency of the photosensitive element, resulting in a serious moiré phenomenon. As Figure 4 it can be seen from the square box in the figure that there is a certain amount of moiré in the image. The main purpose of the embodiment of the present invention is to use the method of changing the focus point to reduce the lens resolution, overcome the moiré appearing in the captured image, and obtain the purpose of obtaining a clear display screen image, and its effect is as Figure 5 shown.
[0088] Exemplary device
[0089] This embodiment discloses a moiré removal device, as Figure 6 shown, including:
[0090] An adjustment information acquisition module 610, configured to determine target focus adjustment information according to the optical characteristics of the camera of the terminal device; its function is to implement the corresponding steps in step S1.
[0091] A focus adjustment module 620, configured to perform automatic focus adjustment on the camera according to the target focus adjustment information; its function is to implement the corresponding steps in step S2.
[0092] An image capture module 630, configured to capture the display screen in the display state by using the camera after focus adjustment to obtain a first image, and its function is to implement the corresponding steps in step S3.
[0093] This embodiment discloses a terminal device, which includes a processor and a storage medium communicatively connected to the processor. The storage medium is adapted to store multiple instructions; the processor is adapted to call the instructions in the storage medium to execute the steps of implementing the moiré removal method.
[0094] Based on the above method, this embodiment also discloses a terminal device, including a processor and a storage medium communicatively connected to the processor. The storage medium is adapted to store multiple instructions; the processor is adapted to call the instructions in the storage medium to execute the moiré removal method. In one implementation, the terminal device provided in this embodiment may be a mobile phone, a tablet computer or a smart TV.
[0095] Specifically, as Figure 7 shown, the terminal device includes at least one processor 20 and a memory 22, and may further include a display screen 21, a communication interface 23 and a bus 24. Among them, the processor 20, the display screen 21, the memory 22 and the communication interface 23 can complete mutual communication through the bus 24. The display screen 21 is set to display a user guidance interface preset in the initial setting mode. The communication interface 23 can transmit information. The processor 20 can call the logical instructions in the memory 22 to execute the moiré removal method in the above embodiment.
[0096] In addition, when the logical instructions in the above-mentioned memory 22 are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium.
[0097] The memory 22 is a computer-readable storage medium, which can be configured to store software programs and computer-executable programs, such as the program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 30 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 22, that is, the methods in the above embodiments are implemented.
[0098] The memory 22 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include a high-speed random access memory and may also include a non-volatile memory. For example, various media that can store program codes, such as USB flash drives, external hard drives, read-only memories (ROM), random access memories (RAM), magnetic disks or optical discs, etc., may also be transient storage media.
[0099] On the other hand, a computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the moiré removal method for images.
[0100] The present invention provides a moiré removal method, device and equipment, which determine the target focus adjustment information of the terminal device according to the optical characteristics of the camera of the terminal device; automatically adjust the focus of the camera according to the target focus adjustment information; use the camera after the focus adjustment to capture the display screen in the display state to obtain a first image. The method provided in this embodiment adjusts the focus position of the captured image according to the light characteristics of the camera when shooting the display screen, overcomes the defect that moiré appears in the captured image when using the original focus position, improves the clarity of the image obtained when shooting the display screen, and only needs to adjust the focus position of the camera once by using the method provided by the present invention to solve the problem of moiré that appears when the camera captures the display screen image again. The operation is simple and has high practicability.
[0101] It can be understood that for those of ordinary skill in the art, equivalent substitutions or changes can be made according to the technical solutions and inventive concepts of the present invention, and all such changes or substitutions should fall within the protection scope of the claims attached to the present invention.
Claims
1. A moiré removal method, characterized in that, it is applied to a terminal device including one or more cameras, and the method includes: determining target focus adjustment information according to the optical characteristics of the camera; the optical characteristics of the camera include the target camera type and preset resolution adjustment information, and determining the target focus adjustment information according to the optical characteristics of the camera includes: determining the target MTF test result corresponding to the target camera type according to the mapping relationship between the pre-stored camera type and the MTF test result; determining the target focus adjustment direction and the target focus adjustment distance according to the preset resolution adjustment information and the target MTF test result, and the target focus adjustment direction and the target focus adjustment distance are the target focus adjustment information; performing automatic focus adjustment on the camera according to the target focus adjustment information; using the camera after focus adjustment to capture a display screen in a display state to obtain a first image.
2. The method according to claim 1, characterized in that, before determining the target focus adjustment information according to the optical characteristics of the camera, the method further includes: when it is detected that the camera is in a shooting mode, collecting a plurality of brightness values within a preset time period; calculating a target brightness change rate according to the plurality of brightness values; if the target brightness change rate belongs to a preset brightness change rate set, determining that the camera is pre-shooting at the display screen; wherein, the preset brightness change rate set includes a plurality of display screen refresh frequencies.
3. The method according to claim 2, characterized in that, the preset resolution adjustment information includes a target resolution adjustment direction and a target resolution adjustment size, and the target MTF test result includes the relationships between the resolution adjustment direction and size corresponding to the target camera type and the focus adjustment direction and distance respectively; determining the target focus adjustment direction and the target focus adjustment distance according to the preset resolution adjustment information and the target MTF test result includes: determining the target focus adjustment direction corresponding to the target resolution adjustment direction according to the relationship between the resolution adjustment direction corresponding to the target camera type and the focus adjustment direction; determining the target focus adjustment distance corresponding to the target resolution adjustment size according to the relationship between the resolution adjustment size corresponding to the target camera type and the focus adjustment distance.
4. The method according to claim 3, characterized in that, if the resolution adjustment direction is to decrease, the focus adjustment direction is for the camera to move closer to the display screen.
5. The method according to any one of claims 1-4, characterized in that, after using the camera after focus adjustment to capture a display screen in a display state to obtain a first image, the method further includes: performing image sharpening processing on the first image to obtain an intermediate image after image sharpening processing; performing image contrast enhancement processing on the intermediate image to obtain a second image after image contrast enhancement processing.
6. A moiré removal device, characterized in that, Applied to a terminal device including one or more cameras, the device includes: An adjustment information acquisition module, configured to determine target focus adjustment information according to the optical characteristics of the camera; The optical characteristics of the camera include a target camera type and preset resolution adjustment information. Determining the target focus adjustment information according to the optical characteristics of the camera includes: Determining the target MTF test result corresponding to the target camera type according to the mapping relationship between the pre-stored camera type and the MTF test result; Determining a target focus adjustment direction and a target focus adjustment distance according to the preset resolution adjustment information and the target MTF test result, where the target focus adjustment direction and the target focus adjustment distance are the target focus adjustment information; A focus adjustment module, configured to perform an automatic focus adjustment on the camera according to the target focus adjustment information; An image capture module, configured to capture a display screen in a display state by using the camera after the focus adjustment to obtain a first image.
7. The device according to claim 6, wherein, the device further includes: A shooting state determination module, configured to collect a plurality of brightness values within a preset time period when it is detected that the camera is in a shooting mode; calculate a target brightness change rate according to the plurality of brightness values; and determine that the camera is pre-shooting at the display screen if the target brightness change rate belongs to a preset brightness change rate set, where the preset brightness change rate set includes a plurality of display screen refresh frequencies.
8. A terminal device, wherein, it includes a processor and a storage medium communicatively connected to the processor. The storage medium is adapted to store a plurality of instructions; the processor is adapted to call the instructions in the storage medium to execute the steps of implementing the moiré removal method according to any one of claims 1-5 above.
9. A computer-readable storage medium, wherein, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the moiré removal method according to any one of claims 1-5.
Citation Information
Patent Citations
Moire detecting and suppression method and device
CN104486534A
Lens apparatus and method implemented in same
CN105959568A