Image acquisition method and device, electronic equipment and storage medium
By setting the first polarizer and the rotatable second polarizer in the imaging device and adjusting the shutter time according to the period of light intensity change, the problem of poor image quality in the CMOS image sensor under specific lighting conditions is solved, and high-quality image acquisition is achieved.
Patent Information
- Application Number
- CN202311786319.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-06-24
AI Technical Summary
When the CMOS progressive scan image sensor collects images, when the light frequency or screen frequency is not an integer multiple of the half-period, it leads to poor image quality and light and dark fringes.
By adopting an imaging device provided with a first polarizer and a rotatable second polarizer, by rotating the second polarizer, scanning is performed based on the shutter time to ensure that the shutter time is an integer multiple of the period of change in the light intensity passing through the shutter.
It is achieved by taking into account both stripe suppression and screen non-exposure, and the captured image quality is improved to obtain a target image without stripes.
Smart Images

Figure CN120201277A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image acquisition, and in particular, to an image acquisition method, apparatus, electronic device, and storage medium. Background Art
[0002] When a CMOS (Complementary Metal Oxide Semiconductor) progressive scan image sensor acquires an image, if the light frequency or screen frequency is not an integer multiple of half the shutter period, the image quality will be poor; for example, when the shutter period is small, there will be bright and dark stripes in the image scanned by the CMOS progressive scan image sensor. If the shutter period is increased, the image will be overexposed;
[0003] Therefore, how to improve the quality of the acquired image has become an urgent problem to be solved. Summary of the Invention
[0004] The present invention provides an image acquisition method, apparatus, electronic device, and storage medium to solve the defect of poor image quality in the prior art and achieve the improvement of image quality.
[0005] The present invention provides an image acquisition method applied to a camera device. The shutter of the camera device is provided with a first polarizer and a rotatable second polarizer. The method includes:
[0006] Rotating the second polarizer and scanning based on the shutter time of the shutter to obtain a target image;
[0007] Wherein, the shutter time is an integer multiple of the light intensity change period passing through the shutter.
[0008] According to the image acquisition method provided by the present invention, the method further includes:
[0009] Based on the generation time of the maximum energy value or the minimum energy value, determining the rotation starting polarization direction of the second polarizer and the scanning starting time of the target image;
[0010] Wherein, the maximum energy value or the minimum energy value is the maximum or minimum value of the energy values generated during the scanning of any frame of scanned image.
[0011] According to the image acquisition method provided by the present invention, determining the rotation starting polarization direction of the second polarizer based on the generation time of the maximum energy value or the minimum energy value includes:
[0012] Determine the rotation starting polarization direction of the second polarizer so that the polarization direction of the second polarizer is perpendicular to the polarization direction of the first polarizer at the moment of generating the maximum energy value, and the polarization direction of the second polarizer is parallel to the polarization direction of the first polarizer at the moment of generating the minimum energy value.
[0013] According to an image acquisition method provided by the present invention, the determining step of the generation moment of the maximum energy value or the minimum energy value includes:
[0014] Determine the scanning starting moment of the reference frame image, where the reference frame image is obtained by scanning before the target image;
[0015] Delay the scanning starting moment by a first offset to obtain the generation moment of the maximum energy value or the minimum energy value;
[0016] Wherein, the first offset is calculated based on the difference between the scanning starting moment and the reference moment; the reference moment is: the generation moment of the maximum or minimum value of the energy generated during the scanning of the reference frame image.
[0017] According to an image acquisition method provided by the present invention, the method further includes:
[0018] Determine the scanning starting moment of the reference frame image, and based on the scanning starting moment of the reference frame image, determine the rotation starting time of the second polarizer;
[0019] Based on the polarization direction of the first polarizer and the scanning starting moment of the reference frame image, determine the rotation starting polarization direction of the second polarizer.
[0020] According to an image acquisition method provided by the present invention, the determining the scanning starting moment of the reference frame image includes:
[0021] Based on a first expression regarding the scanning starting moment and a second expression regarding the scanning starting moment, obtain the scanning starting moment;
[0022] Wherein, the first expression is used to represent: the total energy within an energy period corresponding to the energy generated during the scanning of the reference frame image; the second expression is used to represent: the energy generated respectively within a preset number of shutter periods within the one energy period.
[0023] According to an image acquisition method provided by the present invention, the obtaining the scanning starting moment based on the first expression regarding the scanning starting moment and the second expression regarding the scanning starting moment includes:
[0024] Obtain the ratio between the energy generated within each of the preset number of shutter periods and the total energy based on the ratio between the brightness corresponding to each of the preset number of shutter periods and the total brightness of the reference frame image.
[0025] Based on the ratio between the energy generated within each of the preset number of shutter periods and the total energy, the first expression, and the second expression, obtain the scanning start time.
[0026] The present invention also provides an image acquisition method, which is applied to a camera device. The shutter of the camera device is provided with a first polarizer and a rotatable second polarizer. The method includes:
[0027] When starting to rotate the second polarizer, start to execute at least one image acquisition process, and obtain the target image output by the at least one image acquisition process.
[0028] Wherein, the image acquisition process includes:
[0029] Rotate the second polarizer, and perform scanning based on the shutter time of the shutter to obtain a target image.
[0030] Wherein, the shutter time is an integer multiple of the light intensity change period of the shutter.
[0031] The present invention also provides an image acquisition device, which is applied to a camera device. The shutter of the camera device is provided with a first polarizer and a rotatable second polarizer. The device includes:
[0032] A scanning module, configured to rotate the second polarizer and perform scanning based on the shutter time to obtain a target image.
[0033] Wherein, the shutter time is an integer multiple of the light intensity change period of the shutter.
[0034] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the image acquisition method as described in any one of the above.
[0035] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the image acquisition method as described in any one of the above.
[0036] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the image acquisition method as described in any one of the above.
[0037] The image acquisition method, device, electronic device and storage medium provided by the present invention adopt a camera device equipped with dual polarizers to control the rotation of one of the polarizers, shorten the light intensity variation period, expand the selection range of shutter time, and perform scanning based on shutter time that is an integer multiple of the light intensity variation period, so as to achieve the effect of both stripe suppression and non-overexposure of the picture, thereby obtaining a target image without stripes and improving the quality of the acquired image. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 This is one of the flowcharts of the image acquisition method provided by the embodiment of the present invention;
[0040] Figure 2 is a schematic diagram of an energy value waveform generated during a scanning process provided by an embodiment of the present invention;
[0041] Figure 3 is a schematic diagram of energy values within two shutter cycles provided by an embodiment of the present invention;
[0042] Figure 4 is a schematic diagram of an energy variation function generated when different scanning start times respectively pass through a shutter cycle provided by an embodiment of the present invention;
[0043] Figure 5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0044] Figure 6 is a schematic diagram of the arrangement of a first polarizer and a second polarizer provided in an embodiment of the present invention;
[0045] Figure 7 is a schematic diagram of the arrangement of the first polarizer direction and the second polarizer direction provided by an embodiment of the present invention;
[0046] Figure 8 It is a structural schematic diagram of an image acquisition device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts belong to the scope of protection of the present invention.
[0048] The following describes the image acquisition method, device, electronic device, and storage medium of the present invention in conjunction with the accompanying drawings.
[0049] Figure 1 FIG. 1 is one of the flow diagrams of the image acquisition method provided by an embodiment of the present invention. The image acquisition method is applied to a camera device. A first polarizer and a rotatable second polarizer are provided in cooperation with the shutter of the camera device. As Figure 1 shown, the image acquisition method includes the following steps:
[0050] Step 100, rotate the second polarizer, and perform scanning based on the shutter time of the shutter to obtain a target image;
[0051] Wherein, the shutter time is an integer multiple of the light intensity change period passing through the shutter;
[0052] Specifically, the image acquisition method is applied to a camera device, such as a camera; wherein, the camera device at least includes an image sensor that can adjust the scanning time of each frame of image. A first polarizer and a rotatable second polarizer are provided in cooperation with the shutter of the camera device, and the rotation period of the rotatable second polarizer is adjustable;
[0053] Optionally, the rotation period of the second polarizer can be determined based on the light source frequency. For example, it can generally be adjusted to two energy periods.
[0054] Optionally, the first polarizer and the second polarizer may be detachable or non-detachable relative to the camera device.
[0055] For example, if the light frequency is 60HZ, an image sensor that supports at least 60fps per second can be used, and the image sensor supports adjusting the scanning time of each frame of image. One frame of the picture corresponds to 2 energy periods, and the rotation period of the second polarizer can be 1 / 60 second.
[0056] For example, if the user determines that the light frequency is 60HZ through the input on the input interface of the camera device, the camera device can determine the rotation period of the second polarizer to be 1 / 60 second.
[0057] For example, if the user determines that the light frequency is 50 HZ through the input of the input interface of the imaging device, the imaging device can determine the rotation period of the second polarizer as 1 / 50 second.
[0058] In one embodiment, Figure 7 is a schematic diagram of the setting of the first polarizer direction and the second polarizer direction provided by the embodiment of the present invention, Figure 6 is a schematic diagram of the setting of the first polarizer and the second polarizer provided by the embodiment of the present invention. As Figure 7 and Figure 6 shown, the first polarizer does not rotate, and the second polarizer is rotatable. Assuming the energy of the light source is E, the energy E1 passing through the first polarizer is E1 = 0.5×E, and the energy E2 passing through the second polarizer is E2 = E1×cos 2 θ; when the light frequency is 60 HZ, θ = 120πt (the period is 1 / 60 second).
[0059] Specifically, when two polarizers are stacked together, when natural light passes through the first polarizer, the transmitted light has only one vibration direction that is the same as the polarization direction of the first polarizer. When the transmitted light passes through the second polarizer, if their directions are not perpendicular, some light can be projected. If their directions are perpendicular, no light can pass through; in order to improve the quality of the captured image, the rotation of the second polarizer can be controlled so that there are no bright and dark stripes in the scanned target image, that is, a target image without dark stripes is obtained.
[0060] It should be noted that when the scanning of the first frame of the video starts, the second polarizer starts to rotate.
[0061] In one embodiment, let Et be the energy change function of the light, Et1 be the energy change function after passing through the first polarizer, and Et2 be the energy change function after passing through the second polarizer; where:
[0062] Et = Um×Im×sin 2 (120πt);
[0063]
[0064]
[0065] That is:
[0066]
[0067] Therefore, in the dual-polarizer mode where the shutter is provided with a first polarizer and a rotatable second polarizer, the light intensity change period of the light passing through the shutter (i.e., the energy period corresponding to the dual-polarizer mode) becomes 1 / 2 of the energy period of the non-polarizer mode; furthermore, the shutter time can be set as an integer multiple of the light intensity change period of the shutter, so as to achieve overexposure and stripe suppression with a smaller shutter.
[0068] In one embodiment, there may be multiple rotatable second polarizers. For each newly added second polarizer, the light intensity change period of the light passing through the shutter is reduced by 1 / 2; for example, in the triple-polarizer mode, the light intensity change period of the light passing through the shutter (i.e., the energy period corresponding to the triple-polarizer mode) becomes 1 / 4 of the energy period of the non-polarizer mode, and the shutter time can be an integer multiple of the energy period corresponding to the triple-polarizer mode.
[0069] The image acquisition method provided by the present invention uses an imaging device provided with dual polarizers, controls the rotation of one of the polarizers, shortens the light intensity change period, expands the selection range of the shutter time, and scans based on the shutter time that is an integer multiple of the light intensity change period, so as to achieve the effects of both stripe suppression and non-overexposure of the image, obtain a target image without stripes, and improve the quality of the acquired image.
[0070] In some embodiments, the method further includes:
[0071] Based on the generation time of the maximum energy value or the minimum energy value, determine the rotation starting polarization direction of the second polarizer and the scanning starting time of the target image;
[0072] Wherein, the maximum energy value or the minimum energy value is: the maximum or minimum value of the energy values generated during the scanning of any frame of the scanned image.
[0073] It should be noted that for the same imaging device with unchanged shooting parameters in the same shooting scene, the waveforms formed by the energy values generated during each frame of scanning are the same, and the moments corresponding to the maximum energy value or the minimum energy value of the waveforms formed by the energy values generated during each frame of scanning are the same.
[0074] Specifically, when the sensor of the shooting device starts to scan the image formally, the second polarizer starts to rotate. The rotation starting time of the second polarizer can be determined before scanning as: the moment when the energy value generated during the scanning of this imaging device is the maximum energy value or the minimum energy value, and at this moment, the sensor of the shooting device formally starts to scan the first frame of the image.
[0075] In some embodiments, based on the generation time of the maximum energy value or the minimum energy value, determining the rotation starting polarization direction of the second polarizer includes:
[0076] Determine the initial polarization direction of rotation of the second polarizer such that the polarization direction of the second polarizer is perpendicular to the polarization direction of the first polarizer at the moment of generation of the maximum energy value, and the polarization direction of the second polarizer is parallel to the polarization direction of the first polarizer at the moment of generation of the minimum energy value.
[0077] Specifically, based on the polarization direction of the first polarizer and the moment of the maximum energy value, the second polarizer can be started to rotate, that is, the initial polarization direction of rotation is perpendicular to the polarization direction of the first polarizer.
[0078] Specifically, based on the polarization direction of the first polarizer and the moment of the minimum energy value, the second polarizer can be started to rotate, that is, the initial polarization direction of rotation is parallel to the polarization direction of the first polarizer.
[0079] Taking the light frequency f as 60 HZ and a shutter period T as 1 / 360 second as an example, Figure 2 is a schematic diagram of the energy value waveform generated during the scanning process provided by an embodiment of the present invention, as Figure 2 shown, the moments corresponding to the maximum energy value include 1 / 240 second and 3 / 240 second, and the moments corresponding to the minimum energy value include 1 / 120 second and 1 / 60 second.
[0080] For example, it can be determined that the scanning start time corresponding to the target image and the initial rotation moment of the second polarizer are 1 / 240 second or 3 / 240 second, and the initial polarization direction of rotation of the second polarizer is perpendicular to the polarization direction of the first polarizer.
[0081] For example, it can be determined that the scanning start time corresponding to the target image and the initial rotation moment of the second polarizer are 1 / 120 second or 1 / 60 second, and the initial polarization direction of rotation of the second polarizer is parallel to the polarization direction of the first polarizer.
[0082] In some embodiments, the step of determining the moment of generation of the maximum energy value or the minimum energy value includes:
[0083] Determine the scanning start moment of the reference frame image, which is obtained by scanning before the target image;
[0084] Delay the scanning start moment by a first offset to obtain the moment of generation of the maximum energy value or the minimum energy value;
[0085] Wherein, the first offset is calculated based on the difference between the scanning start moment and the reference moment; the reference moment is: the moment of generation of the maximum or minimum value of the energy value generated during the scanning process of the reference frame image.
[0086] Specifically, in order to adjust the scanning start time of the target image to the time when the energy value generated during the scanning of the imaging device is the maximum energy value or the minimum energy value, the first frame image scanned by the imaging device under the current parameters can be used as a reference frame image first, the scanning start time of the reference frame image can be calculated, and a delay can be performed based on the scanning start time of the reference frame image. Specifically, a first offset can be delayed to obtain the scanning start time offset of the next frame (which can be used as the target image) of the scanned image, so that the scanning start time of the next frame of the scanned image (target image) is the time when the energy value generated during the scanning of the imaging device is the maximum energy value or the minimum energy value.
[0087] In some embodiments, the method further includes:
[0088] Determine the scanning start time of the reference frame image, and based on the scanning start time of the reference frame image, determine the rotation start time of the second polarizer;
[0089] Based on the polarization direction of the first polarizer and the scanning start time of the reference frame image, determine the rotation start polarization direction of the second polarizer.
[0090] Specifically, the rotation start time of the second polarizer can be determined according to the scanning start time t of the reference frame image;
[0091] Specifically, the rotation start polarization direction of the second polarizer can be determined according to the position corresponding to the scanning start time t of the reference frame image;
[0092] For example, the included angle between the rotation start polarization direction of the second polarizer and the polarization direction of the first polarizer can be 120πt.
[0093] For example, if t = 1 / 360, then the included angle between the second polarizer and the first polarizer can be set to π / 3 as the rotation start direction.
[0094] In some embodiments, the determining the scanning start time of the reference frame image includes:
[0095] Based on a first expression regarding the scanning start time and a second expression regarding the scanning start time, obtain the scanning start time;
[0096] Wherein, the first expression is used to represent: the total energy within an energy period corresponding to the energy value generated during the scanning process of the reference frame image; the second expression is used to represent: the energy generated respectively within a preset number of shutter periods within the one energy period.
[0097] Specifically, for the time period corresponding to one frame of the scanned image, it can include 2 energy periods;
[0098] For example, if f = 60HZ, an energy cycle can be 1 / 120 seconds, and 1.5 energy cycles can be used for scanning, that is, the scanning duration is (1 / 60 - 1 / 240) seconds. The energy generated in the first 1 - 120 seconds can form an energy cycle, and the last 2 shutter cycles of the first energy cycle can be used to calculate the scanning start time.
[0099] As Figure 2 shown, taking the shutter cycle as 1 / 360s and an energy cycle including 3 shutter cycles as an example, an energy cycle is 1 / 120 seconds, that is, a first expression for the scanning start time t can be obtained to represent the total energy within an energy cycle.
[0100] Figure 3 is a schematic diagram of the energy values within 2 shutter cycles provided by an embodiment of the present invention. As Figure 3 shown, a second expression for the scanning start time t can be obtained to represent the energy generated respectively within a preset number of shutter cycles.
[0101] Specifically, since the ratio between the energy generated within each shutter cycle and the total energy can be determined based on the ratio between the brightness within this shutter cycle and the total brightness, and the brightness value of the imaging device at each moment is known, the scanning start time t can be calculated based on the first expression and the second expression for the scanning start time t.
[0102] In some embodiments, obtaining the scanning start time based on the first expression for the scanning start time and the second expression for the scanning start time includes:
[0103] Obtaining the ratio between the energy generated respectively within the preset number of shutter cycles and the total energy based on the ratio between the brightness corresponding to each of the preset number of shutter cycles and the total brightness of the reference frame image;
[0104] Obtaining the scanning start time based on the ratio between the energy generated respectively within the preset number of shutter cycles and the total energy, the first expression, and the second expression.
[0105] Specifically, the ratio between the energy generated within a shutter cycle and the total energy can be first determined based on the ratio between the brightness within a shutter cycle and the total brightness; the expression of the ratio between the energy generated within this shutter cycle and the total energy can also be obtained based on the second expression and the first expression, that is, an equation can be formed to solve for the scanning start time;
[0106] For example, a unique solution can be obtained based on the ratio of the brightness of two adjacent shutter cycles after an integer number of energy cycles from the scan start time to the total brightness, and the scan start time can be calculated accordingly.
[0107] Figure 4 is a schematic diagram of the energy change function generated when different scanning start times provided by an embodiment of the present invention respectively pass through a shutter cycle, wherein f=60HZ, shutter cycle T=1 / 360 seconds, and the time period corresponding to a frame of scanned image may include 2 energy cycles, i.e., 6 shutter cycles, and 1.5 of the energy cycles may be used for scanning, i.e., the scanning duration is (1 / 60-1 / 240) seconds, wherein the first 120 seconds may form an energy cycle, i.e., the first energy cycle, and the last 2 shutter cycles of the first energy cycle are used to calculate the scanning start time; Figure 4 As shown, one energy value corresponds to two t values, that is, based on the above ratio, the second expression corresponding to one shutter cycle and the equation formed by the first expression, two solutions can be obtained. If it is necessary to determine the exact scanning start time t, taking the preset number of shutter cycles including the last two shutter cycles (shutter cycle A and shutter cycle B) of the above first energy cycle as an example, equation 1 and equation 2 can be combined to obtain a unique solution t;
[0108] Wherein, equation 1 is an equation formed by the ratio of energy E1 generated in shutter period A to total energy E, the second expression corresponding to shutter period A and the first expression, and equation 2 is an equation formed by the ratio of energy E2 generated in shutter period B to total energy E, the second expression corresponding to shutter period B and the first expression; equation 1 and equation 2 can be specifically described as follows:
[0109]
[0110] Where t is time.
[0111] In some embodiments, when the second polarizer starts to rotate, at least one image acquisition process may be started to obtain a target image output by the at least one image acquisition process;
[0112] The image acquisition process includes:
[0113] Rotating the second polarizer to scan based on the shutter time of the shutter to obtain a target image;
[0114] The shutter time is an integer multiple of the light intensity variation period passing through the shutter.
[0115] In one embodiment, if a user uses a camera to take a photo, the image acquisition process may be performed only once, and a frame of target image may be obtained, which is the photo taken by the user.
[0116] In one embodiment, the user uses a camera to capture video. When the second polarizer starts to rotate, multiple image capture processes can be performed continuously (during which the second polarizer continues to rotate), and continuous multiple frames of images can be obtained to form a video.
[0117] The image acquisition device provided by the present invention is described below. The image acquisition device described below and the image acquisition method described above can be referenced to each other.
[0118] Figure 8 is a schematic diagram of the structure of an image acquisition device provided by an embodiment of the present invention, such as Figure 8 As shown, the image acquisition device 800 is applied to a camera device, and the shutter of the camera device is provided with a first polarizer and a rotatable second polarizer. The image acquisition device 800 includes: a scanning module 810; wherein:
[0119] The scanning module 810 is used to rotate the second polarizer and perform scanning based on the shutter time to obtain a target image;
[0120] The shutter time is an integer multiple of the light intensity variation period passing through the shutter.
[0121] The image acquisition device provided by the present invention adopts a camera device provided with dual polarizers, controls the rotation of one of the polarizers, shortens the light intensity variation period, expands the selection range of shutter time, and performs scanning based on shutter time that is an integer multiple of the light intensity variation period, thereby achieving the effect of both stripe suppression and image non-overexposure, and can obtain a target image without stripes, thereby improving the quality of the acquired image.
[0122] It should be noted that the image acquisition device provided by the present invention can implement the embodiments corresponding to all the above-mentioned image acquisition methods and produce the same technical effects, which will not be described in detail here.
[0123] Figure 5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the image acquisition method, which is applied to a camera device, wherein the shutter of the camera device is provided with a first polarizer and a rotatable second polarizer, and the method includes:
[0124] Rotate the second polarizer and perform scanning based on the shutter time of the shutter to obtain a target image;
[0125] Wherein, the shutter time is an integer multiple of the light intensity change period passing through the shutter.
[0126] In addition, when the logical instructions in the above-mentioned memory 530 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0127] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the image acquisition method provided by the above-mentioned various methods. This method is applied to a camera device. The shutter of the camera device is provided with a first polarizer and a rotatable second polarizer. The method includes:
[0128] Rotate the second polarizer and perform scanning based on the shutter time of the shutter to obtain a target image;
[0129] Wherein, the shutter time is an integer multiple of the light intensity change period passing through the shutter.
[0130] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the image acquisition method provided by the above-mentioned various methods. This method is applied to a camera device. The shutter of the camera device is provided with a first polarizer and a rotatable second polarizer. The method includes:
[0131] Rotate the second polarizer and perform scanning based on the shutter time of the shutter to obtain a target image;
[0132] Wherein, the shutter time is an integer multiple of the light intensity change period passing through the shutter.
[0133] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0134] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image acquisition method, characterized in that, Applied to a camera device, a first polarizer and a rotatable second polarizer are provided in the shutter of the camera device, and the method includes: Rotating the second polarizer, scanning based on the shutter time of the shutter, and obtaining a target image; Wherein, the shutter time is an integer multiple of the light intensity change period passing through the shutter.
2. The image acquisition method according to claim 1, wherein The method further includes: Based on the generation time of the maximum energy value or the minimum energy value, determining the rotation starting polarization direction of the second polarizer and the scanning starting time of the target image; Wherein, the maximum energy value or the minimum energy value is: the maximum or minimum value of the energy values generated during the scanning of any frame of the scanned image.
3. The image acquisition method according to claim 2, characterized in that Based on the generation time of the maximum energy value or the minimum energy value, determining the rotation starting polarization direction of the second polarizer includes: Determining the rotation starting polarization direction of the second polarizer so that the polarization direction of the second polarizer is perpendicular to the polarization direction of the first polarizer at the generation time of the maximum energy value, and the polarization direction of the second polarizer is parallel to the polarization direction of the first polarizer at the generation time of the minimum energy value.
4. The image acquisition method according to claim 2, characterized in that The determining step of the generation time of the maximum energy value or the minimum energy value includes: Determining the scanning starting time of a reference frame image, where the reference frame image is obtained by scanning before the target image; Delaying the scanning starting time by a first offset to obtain the generation time of the maximum energy value or the minimum energy value; Wherein, the first offset is calculated based on the difference between the scanning starting time and a reference time; the reference time is: the generation time of the maximum or minimum value of the energy values generated during the scanning of the reference frame image.
5. The image acquisition method according to claim 1, wherein The method further includes: Determining the scanning starting time of a reference frame image, and based on the scanning starting time of the reference frame image, determining the rotation starting time of the second polarizer; Based on the polarization direction of the first polarizer and the scanning starting time of the reference frame image, determining the rotation starting polarization direction of the second polarizer.
6. The image acquisition method according to claim 4 or 5, characterized in that The determining the scanning starting time of the reference frame image includes: Based on a first expression regarding the scanning starting time and a second expression regarding the scanning starting time, obtaining the scanning starting time; Wherein, the first expression is used to represent: the total energy within an energy period corresponding to the energy value generated during the scanning of the reference frame image; the second expression is used to represent: the energy generated respectively within a preset number of shutter periods within the one energy period.
7. The image acquisition method according to claim 6, characterized in that, The obtaining the scanning starting time based on the first expression regarding the scanning starting time and the second expression regarding the scanning starting time includes: Based on the ratios of the brightnesses respectively corresponding to the preset number of shutter periods to the total brightness of the reference frame image, obtaining the ratios of the energies generated respectively within the preset number of shutter periods to the total energy; Based on the ratios of the energies generated respectively within the preset number of shutter periods to the total energy, the first expression and the second expression, obtaining the scanning starting time.
8. An image acquisition method, characterized in that, Applied to a camera device, a first polarizer and a rotatable second polarizer are provided on a shutter of the camera device, and the method includes: When starting to rotate the second polarizer, start to execute at least one image acquisition process to obtain a target image output by the at least one image acquisition process; Wherein, the image acquisition process includes: Rotating the second polarizer and scanning based on the shutter time of the shutter to obtain a target image; Wherein, the shutter time is an integer multiple of the light intensity change period passing through the shutter.
9. An image acquisition device, characterized in that, Applied to a camera device, a first polarizer and a rotatable second polarizer are provided on a shutter of the camera device, and the device includes: A scanning module, configured to rotate the second polarizer and scan based on the shutter time to obtain a target image; Wherein, the shutter time is an integer multiple of the light intensity change period passing through the shutter.
10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the image acquisition method according to any one of claims 1 to 8.