CN112055154A - Control method of camera device, camera device and storage medium - Google Patents

Control method of camera device, camera device and storage medium Download PDF

Info

Publication number
CN112055154A
CN112055154A CN202010754239.3A CN202010754239A CN112055154A CN 112055154 A CN112055154 A CN 112055154A CN 202010754239 A CN202010754239 A CN 202010754239A CN 112055154 A CN112055154 A CN 112055154A
Authority
CN
China
Prior art keywords
preview image
image
exposure
brightness
camera device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202010754239.3A
Other languages
Chinese (zh)
Inventor
李媛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qiku Internet Technology Shenzhen Co Ltd
Original Assignee
Qiku Internet Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qiku Internet Technology Shenzhen Co Ltd filed Critical Qiku Internet Technology Shenzhen Co Ltd
Priority to CN202010754239.3A priority Critical patent/CN112055154A/en
Publication of CN112055154A publication Critical patent/CN112055154A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Abstract

The application discloses a control method of an image pickup device, the image pickup device and a storage medium, wherein the method comprises the following steps: correspondingly adjusting exposure parameters of the camera device according to the intensity of the ambient light; acquiring a preview image; and when the preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode. By the mode, the shooting definition of the camera device under strong light can be improved.

Description

Control method of camera device, camera device and storage medium
Technical Field
The present disclosure relates to the field of camera monitoring technologies, and in particular, to a control method for a camera device, and a storage medium.
Background
The camera, the camera and other photographic equipment have been widely used in modern life, and besides being used for recording life in people's daily life, they also play a very important role in the fields of security monitoring and the like, and with the continuous development of society, more and more places need to be monitored and checked in real time by using the camera to solve the security problem in life and work.
However, when an image sensor of the camera encounters strong light, a user preview end corresponding to the camera may not be able to clearly see the current monitoring state, so that the monitoring and viewing requirements are affected, and therefore, how to obtain a clear image under a strong light source becomes a technical problem to be solved urgently.
Disclosure of Invention
In order to solve the above problems, the present application provides a control method of an image pickup apparatus, and a storage medium, which can solve the problem that the image pickup apparatus cannot clearly shoot under strong light.
In order to solve the technical problem, the application adopts a technical scheme that: provided is a method for controlling an image pickup apparatus, the method including: correspondingly adjusting exposure parameters of the camera device according to the intensity of the ambient light; acquiring a preview image; and when the preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode.
Wherein, the method also comprises: acquiring a first preview image; when the first preview image is detected to be in an exposure state, acquiring the intensity of ambient light; acquiring a preview image, comprising: acquiring a second preview image; when detecting that the preview image is in an exposure state, switching a shooting mode of the camera device to an infrared shooting mode, comprising: and when the second preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode.
When detecting that the second preview image is in an exposure state, switching a shooting mode of the camera device to an infrared shooting mode, including: sending the second preview image to a server so that the server performs exposure detection on the second preview image; receiving an exposure detection result sent by a server; and when the exposure detection result shows that the second preview image is in an exposure state, switching the shooting mode of the image pickup device to an infrared shooting mode.
Wherein the exposure detection is to make the server obtain an ISO value of the second preview image; receiving an exposure detection result sent by a server, wherein the exposure detection result comprises: receiving an ISO value of the second preview image sent by the server; when the exposure detection result shows that the second preview image is in an exposure state, the method for switching the shooting mode of the camera device to the infrared shooting mode comprises the following steps: and when the ISO value of the second preview image reaches a preset exposure threshold value, switching the shooting mode of the camera device into an infrared shooting mode.
Wherein, the method also comprises: calculating first brightness values of all pixel points in the first preview image; calculating second brightness values of all pixel points in a second preview image; and generating a target display image based on the magnitude relation of the first brightness value and the second brightness value.
Generating a target display image based on the magnitude relation between the first brightness value and the second brightness value, wherein the generating includes: taking the pixel point corresponding to the brightness value with smaller difference value with the preset brightness threshold value in the pixel points corresponding to the first brightness value and the second brightness value as a target pixel point, and storing the target pixel point; sequentially storing a plurality of target pixel points corresponding to all pixel points in the first preview image and the second preview image; and generating a target display image by the plurality of target pixel points according to the storage sequence.
Generating a target display image based on the magnitude relation between the first brightness value and the second brightness value, wherein the generating includes: acquiring a plurality of exposure pixel points of which the first brightness value is more than n times of a preset brightness threshold value from pixel points of a first preview image; determining a first brightness region in the second preview image according to the positions of the exposure pixel points, and determining a second brightness region in the first preview image; the first brightness area is a corresponding area surrounded by a plurality of exposure pixel points in the second preview image, and the second brightness area is a corresponding area except the first brightness area in the first preview image; the first luminance region and the second luminance region are combined to generate a target display image.
Wherein, the method also comprises: and when the preview image is detected to be in an underexposure state and the image pickup device is in a normal shooting mode, switching the shooting mode of the image pickup device to a light supplement mode.
In order to solve the above technical problem, the present application adopts another technical solution: there is provided an image capturing apparatus comprising a processor and a memory, wherein the processor is electrically coupled to the memory, and the memory is used for storing a computer program, and the computer program is used for implementing the control method of the image capturing apparatus when being executed by the processor.
In order to solve the above technical problem, the present application adopts another technical solution that: there is provided a computer-readable storage medium storing a computer program for implementing the control method of the image pickup apparatus described above when the computer program is executed by a processor.
The beneficial effects of the embodiment of the application are that: different from the prior art, the control method of the camera device according to the application adjusts the exposure parameters of the camera device according to the intensity of the ambient light, continues to acquire the preview image after the corresponding adjustment, and switches the camera mode of the camera device to the infrared shooting mode if the acquired preview image is detected to be still in the exposure state. Through the mode, on the one hand, the exposure parameter of the camera device can be actively adjusted under the condition of strong light so as to improve the definition of the image, and on the other hand, after the exposure parameter is adjusted by the camera device, the camera device is directly switched into the infrared shooting mode under the condition that the next preview image is still in the exposure state, so that the camera device can obtain a clear preview image, and the preview effect of a user end is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
fig. 1 is a schematic structural diagram of an embodiment of an image pickup apparatus provided in the present application;
fig. 2 is a schematic flowchart of an embodiment of a control method of an image capturing apparatus provided in the present application;
FIG. 3 is a graphical illustration of a data model;
fig. 4 is a schematic flowchart of another embodiment of a control method of an image capturing apparatus provided in the present application;
FIG. 5 is a detailed flowchart of step S45 in FIG. 4;
fig. 6 is a schematic flowchart of a control method of an image capturing apparatus according to another embodiment of the present application;
FIG. 7 is a detailed flowchart of step S63 in FIG. 6;
FIG. 8 is another detailed flowchart of step S63 in FIG. 6;
fig. 9 is a schematic structural diagram of another embodiment of the image pickup apparatus provided by the present application;
FIG. 10 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The principles of the present application are applicable to any camera-enabled device, including but not limited to: surveillance cameras, vehicle-mounted cameras, video cameras, mobile phones, and the like. In the following embodiments, the monitoring camera is mainly used as an example for explanation.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an embodiment of an image pickup apparatus provided in the present application, and an image pickup apparatus 10 of the present embodiment includes an image sensor 11, an analog-to-digital converter 12, a processor 13, and a display 14; the image sensor 11 is connected to the analog-to-digital converter 12, and is configured to convert an optical image projected on the photosensitive surface into an electrical signal in a corresponding proportional relationship with the optical image under the action of the lens, and send the electrical signal to the analog-to-digital converter 12; the analog-to-digital converter 12 is connected to the processor 13, and is configured to convert the received electrical signal into a digital image signal, and send the digital image signal to the processor 13; the processor 13 is connected to the display 14, and is configured to perform processing such as optimization on the received digital image signal, and transmit the processed signal to the display 14 through an interface such as a USB for display.
The image sensor 11 may be a CMOS (Complementary Metal-Oxide-Semiconductor) sensor or a CCD (Charge Coupled Device) sensor, and when the image sensor 11 is a CMOS sensor, a digital signal may be directly output, and the imaging Device 10 does not need to be provided with the analog-to-digital converter 12.
The processor 13 may be a DSP (DIGITAL SIGNAL PROCESSING, digital signal PROCESSING chip), and performs optimization PROCESSING on digital image signal parameters mainly through a series of complex mathematical algorithm operations.
Alternatively, the image pickup apparatus 10 may further include a communication unit 15, the communication unit 15 being used for data communication with, for example, a server side; a power supply which is not shown in the figure and supplies power to each component, a bluetooth module and the like can be further included, and the details are not described herein.
Referring to fig. 2, fig. 2 is a schematic flowchart of an embodiment of a method for controlling an image capturing apparatus provided in the present application, where the method mainly includes:
s21: and correspondingly adjusting the exposure parameters of the image pickup device according to the intensity of the ambient light.
In this embodiment, the exposure parameter refers to parameters such as an aperture size, an exposure time, and a luminance gain of the imaging device, and the imaging device can acquire a next frame of preview image according to the adjusted exposure parameter by adjusting the size of any one of the parameters or adjusting the ratio between a plurality of parameters. The size of the aperture and the exposure time determine the light inlet quantity of the image pickup device, and the larger the aperture is, the longer the exposure time is, the more light enters the image pickup device; the brightness gain determines the sensitivity of the image sensor to light, and the amount of light entering the image pickup device and the brightness gain determine the output of the image sensor.
Specifically, the intensities of different ambient lights correspond to different adjustment criteria, and may be embodied by a data model, a curve diagram of the data model is shown in fig. 3, an abscissa in the diagram of fig. 3 represents the intensity of the ambient light, and an ordinate represents a plurality of exposure parameters of the image pickup device corresponding to different ambient light intensities, that is, corresponding to the sizes of parameters such as the aperture size, the exposure time, and the luminance gain, the weaker the ambient light is, the larger the exposure parameter of the image pickup device is, the stronger the ambient light is, and the smaller the exposure parameter of the image pickup device is.
For example, when the ambient light intensity is greater than the preset light intensity threshold, in order to prevent the image obtained by the image pickup device from being whitened, the image pickup device needs to reduce the exposure parameter thereof, which corresponds to the decrease of the curve in the graph, that is, the aperture of the image pickup device can be reduced, so that the light entering amount in unit time is reduced; or the exposure time of the camera device can be reduced, and the light inlet quantity is further reduced by shortening the exposure time; the brightness gain of the light sensing unit in the camera device can be adjusted to reduce the sensitivity of the sensor to the ambient light.
On the contrary, when the ambient light intensity is reduced and is less than the preset light intensity threshold, in order to prevent the image obtained by the image capturing device from being too dark, the image capturing device needs to increase the exposure parameter thereof, which corresponds to the increase of the curve in the figure, that is, by increasing the aperture size, the exposure time, the brightness gain and other parameters, the light input amount is increased and the sensitivity of the sensor to light is improved, thereby improving the brightness of the preview image. Optionally, the three parameters may be adjusted simultaneously, and a certain size ratio relationship is used between the three parameters, so that the image capturing device can obtain a better preview image according to the adjusted exposure parameter, and also can adjust one of the parameters independently.
The preset light intensity threshold value is related to an image sensor of the camera device, and may be the minimum change magnitude or the minimum adjustment trend of the exposure parameter when the ambient light intensity changes by one unit, and the corresponding ambient light intensity is the preset light intensity threshold value at this time.
Further, the data model is used for representing the mapping relation between the ambient light intensity and the exposure parameter, that is, the exposure parameter corresponding to the current ambient light intensity is determined from the data model and is used as the exposure parameter of the next frame image for adjustment setting. The data model in the figure only represents the variation relationship between the ambient light intensity and the exposure parameter, and the specific numerical value correspondence should be well known in the art and will not be described herein.
S22: and acquiring a preview image.
The image displayed by the user side of the preview image is obtained by the image sensor, the electrical signal of the next frame of image is obtained by the image sensor, and after a series of processing, the processor generates the preview image and uploads the preview image to the user side for the user to preview and view. Alternatively, the user terminal may include a mobile terminal app (Application), a computer, and the like.
S23: and when the preview image is detected to be in an exposure state, switching the image pickup mode of the image pickup device to an infrared image pickup mode.
In this embodiment, the preview image state may be detected by sending the preview image to the server for exposure detection, and switching the image capturing mode of the image capturing device to the infrared image capturing mode when the received exposure detection result sent by the server indicates that the preview image is in the exposure state. The exposure state refers to that an overexposed area obviously appears on a picture of a preview image, the brightness of the partial area is too high, the image is whitened, and the detailed part cannot be distinguished, which is usually caused by too large aperture, too long exposure time and the like, and a specific detection mode is described in the following embodiments.
In an application scene, because the image sensor detects the intensity of the current ambient light and correspondingly adjusts the exposure parameters of the camera device according to the intensity of the current ambient light, the acquired preview image should be in an adjusted normal exposure state theoretically, in the normal exposure state, no obvious overexposure or underexposure area exists in the picture of the preview image, and the light input quantity of the image sensor is in a normal range relative to the overexposure state; however, if it is detected that the acquired preview image is still in an exposure state, which indicates that the intensity of ambient light is too high, the problem cannot be solved by a conventional adjustment mode, so that the preview effect of the user end on the preview image will be affected, at this time, the image pickup mode of the image pickup device can be switched to an infrared shooting mode, at this time, an infrared lamp of the image pickup device emits infrared rays to irradiate an object, and since the image sensor is also sensitive to the infrared rays, the reflected infrared rays are received by the image sensor in the infrared shooting mode, and an infrared preview image is formed after a series of processing, and the preview image in the infrared shooting mode will not be affected by the intensity of the ambient light, so that the acquired subsequent image can have a clearer display effect, and the user end can better preview and view the image.
By the mode, after the exposure parameters are adjusted by the camera device, the camera device is directly switched to the infrared shooting mode under the condition that the next preview image is still in the exposure state, so that the camera device can acquire clear preview images, and the preview effect of a user side is improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of another embodiment of a control method of an image capturing apparatus provided in the present application, where the method mainly includes:
s41: a first preview image is acquired.
The first preview image can be understood as a first frame or a preview image acquired by a previous frame processor, and at this time, the first preview image is just sent to the processor by the image sensor and is not uploaded to the user terminal.
S42: and when the first preview image is detected to be in an exposure state, acquiring the intensity of the ambient light.
In this embodiment, since the first preview image is not uploaded to the user side, the detecting the state of the first preview image is completed by the processor. When the camera device is irradiated by strong light, the preview image is directly detected and identified in the processor, and when the first preview image is detected to be in an exposure state, the image sensor is controlled to detect and acquire the intensity of the ambient light.
Specifically, the core portion of the image sensor is a photodiode, the photodiode can generate an output current after receiving the light, and the intensity of the output current corresponds to the intensity of the ambient light, so that the intensity value of the ambient light can be obtained.
In some embodiments, an Ambient Light Sensor (ALS) may also be utilized to obtain the intensity of the current Ambient Light. For example, an ambient light sensor may be configured in the imaging device where the image sensor is located, so that when the image sensor is started, the ambient light sensor is also started to acquire the intensity of the current ambient light, and during the process of acquiring an image by the image sensor, the ambient light sensor acquires the intensity value of the current ambient light in real time or periodically.
S43: and correspondingly adjusting the exposure parameters of the image pickup device according to the intensity of the ambient light.
Step S43 is similar to step S21, and will not be described herein.
S44: a second preview image is acquired.
The second preview image can be understood as a second frame or a preview image acquired by a subsequent frame processor, and the processor uploads the second preview image to the user terminal for the user to preview and view.
S45: and when the second preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode.
Specifically, step S45 may be implemented by the steps shown in fig. 5:
s451: and sending the second preview image to the server so that the server performs exposure detection on the second preview image.
Before the second preview image is acquired, since the intensity of the ambient light at the time of acquiring the first preview image is detected and acquired and the exposure parameter of the image pickup device is adjusted based on the current intensity of the ambient light, the second preview image acquired at this time should theoretically be in an adjusted normal exposure state. Therefore, step S451 is used to perform secondary detection on the state parameter of the second preview image acquired after adjustment, so as to facilitate subsequent further adjustment of the image capturing apparatus according to the detection result.
In this embodiment, the exposure detection means that the second preview image is transmitted to the server so that the server acquires an ISO (standard sensitivity specified by the international organization for standardization) value of the second preview image, that is, acquires a value of image sensitivity. The sensitivity is used for measuring the sensitivity of the photosensitive device to light, an ISO value of the second preview image generated by the image sensor can be detected, and the current image state of the camera device after exposure parameter adjustment is fed back according to the ISO value. The detection and acquisition of the image ISO value belongs to conventional means in the field, and is not described in detail.
S452: and receiving an exposure detection result sent by the server.
Wherein the received exposure detection result refers to an ISO value of the second preview image sent by the receiving server. In this embodiment, when the obtained ISO value is below 800, it indicates that the second preview image is in an underexposed state, that is, a state in which the ambient light intensity is weak and/or the exposure parameter of the image pickup apparatus is small; when the obtained ISO value is within 800-6400, the second preview image is in a normal exposure state, namely, the ambient light intensity is normal and/or the exposure parameter of the camera device is moderate; when the obtained ISO value is 6400 or more, it indicates that the second preview image is in an overexposed state, that is, a state where the ambient light intensity is strong and/or the exposure parameter of the image pickup apparatus is large.
S453: and when the exposure detection result shows that the second preview image is in an exposure state, switching the shooting mode of the image pickup device to an infrared shooting mode.
In this embodiment, if the ISO value of the acquired second preview image reaches the preset exposure threshold, it indicates that the acquired second preview image is still in an overexposed state after the exposure parameter adjustment of the previous image frame (the first preview image), and at this time, the shooting of the camera device may be directly switched to an infrared shooting mode, so that the acquired subsequent image may have a clearer display effect, and the user side may better preview and view the image. The working principle of the infrared shooting mode is well known to those skilled in the art, and will not be described in detail.
The preset exposure threshold may be ISO6400, or may be greater than this numerical standard, and is not specifically limited herein.
In some embodiments, when it is detected that the preview image is in an underexposed state and the image capturing device is in a normal capturing mode (i.e., a non-infrared capturing mode), the brightness of the preview image is low and the preview effect is not good enough, and the image capturing device cannot be significantly improved by adjusting the exposure parameters. The light supplementing lamp device can be added into the camera device or the camera with the light supplementing effect is used for attaching to the camera device, so that the brightness compensation of the image sensor is realized.
In some embodiments, when it is detected that the preview image is in a normal exposure state, the image capturing apparatus is not subjected to any mode switching process, and the exposure parameters may be correspondingly adjusted according to the data model.
Referring to fig. 6, fig. 6 is a schematic flowchart of a control method of an image capturing apparatus according to another embodiment of the present application, where the method mainly includes:
s61: and calculating first brightness values of all pixel points in the first preview image.
In this embodiment, the RGB values of all the pixel points in the first preview image are obtained first, that is, the color values of red, green and blue of each pixel point are obtained respectively, the specific obtaining method is well known to those skilled in the art, and is not described here again, and the luminance value corresponding to each pixel point is further calculated by using a formula:
y (brightness) ═ 0.299 × R) + (0.587 × G) + (0.144 × B);
since the RGB values of all the pixels are known, the first luminance values of all the pixels in the first preview image can be calculated according to the above formula.
It can be understood that each pixel has its corresponding brightness, and the brightness of the pixel is independent of the hue property, and can represent either red or green under the same brightness.
The luminance value of the pixel is between 0 and 255, specifically, the luminance value closer to 255 indicates that the luminance of the pixel is higher, the luminance value closer to 0 indicates that the luminance of the pixel is lower, and the rest indicates that the pixel belongs to a middle tone.
S62: and calculating second brightness values of all pixel points in the second preview image.
Similarly, the second brightness values of all the pixel points in the second preview image are calculated by using the formula. The first preview image and the second preview image are images obtained by the camera device at the same position, so that the pixel points of the two preview images respectively correspond to two sets of pixel coordinates in two different coordinate systems, and the pixel coordinates of the first preview image correspond to the pixel coordinates of the second preview image one to one.
S63: and generating a target display image based on the magnitude relation of the first brightness value and the second brightness value.
Specifically, step S63 may be implemented by the steps shown in fig. 7:
s631 a: and taking the pixel point corresponding to the brightness value with smaller difference value between the first brightness value and the second brightness value as a target pixel point, and storing.
Specifically, step S631a may have three cases:
and if the first brightness value and the second brightness value corresponding to the same pixel point in the first preview image and the second preview image are both larger than a preset brightness threshold, selecting the pixel point with the smaller brightness value from the pixel points corresponding to the first brightness value and the second brightness value as the data of the target pixel point for storage.
And if the first brightness value and the second brightness value corresponding to the same pixel point in the first preview image and the second preview image are both smaller than a preset brightness threshold, selecting the pixel point with the larger brightness value from the pixel points corresponding to the first brightness value and the second brightness value as the data of the target pixel point for storage.
If the first brightness value and the second brightness value corresponding to the same pixel point in the first preview image and the second preview image are respectively larger than or smaller than the preset brightness threshold, that is, any one of the first brightness value and the second brightness value is larger than the preset brightness threshold, and the other one of the first brightness value and the second brightness value is smaller than the preset brightness threshold, selecting the pixel point with smaller difference value with the preset brightness threshold from the pixel points corresponding to the first brightness value and the second brightness value as the data of the target pixel point for storage.
The range of the preset luminance threshold may be 110-150, specifically 128, or the threshold may be adjusted according to actual conditions.
S632 a: and sequentially storing a plurality of target pixel points corresponding to all pixel points in the first preview image and the second preview image.
Step S631a is repeatedly executed until the same number of target pixel points as all the pixel points are determined from the first preview image and the second preview image.
S633 a: and generating a target display image by the plurality of target pixel points according to the storage sequence.
The target display image is formed by screening and combining each pixel point in the first preview image and the second preview image. Assume that the first preview image has 100 x 100 total 10000 pixels (actually far more), denoted as a; the second preview image also has 10000 pixels in total of 100 × 100, denoted as B, because in the previous step, the processor has selected and stored data for each pixel at the same position in the two preview images in turn, at this time, the processor needs to regenerate a new image according to the selected and stored pixel data, for example, in 100 × 100 pixel distribution, the first pixel selects a, the second pixel selects B, the third pixel selects a, until 100 × 100 pixels are selected, the pixel arrangement is finally generated as a target display image of "a, B, a … …". By the method, data with more proper brightness in the two preview images can be selected to be displayed on all pixel position points, so that the generated target display image has a clearer display effect and is convenient for a user to view and recognize.
In this embodiment, the generated target display image is an image other than the first preview image and the second preview image, and although the target display image is also uploaded to the user side, the target display image is different from the preview image normally displayed at the user side, and the target display image can be viewed at other windows of the user side, so that when the camera device encounters strong light, a clear image is obtained by using a mode of recombining images by pixel points, so that the user can view the reason of the strong light according to the target display image, and the source of the strong light can be accurately identified when the camera device is maliciously irradiated.
Alternatively, step S63 can also be implemented by the steps shown in fig. 8:
s631 b: and acquiring a plurality of exposure pixel points of which the first brightness value is more than n times of a preset brightness threshold value in the pixel points of the first preview image.
The exposure pixel point refers to a pixel point whose luminance value exceeds the normal luminance level, n may be 1.5, taking a preset luminance threshold value as 128 as an example, the luminance value of the exposure pixel point may be a pixel point greater than 192, and specifically, the multiple standard may be increased or decreased within a certain range.
S632 b: and determining a first brightness region in the second preview image according to the positions of the exposure pixel points, and determining a second brightness region in the first preview image.
The first brightness region is a corresponding region surrounded by a plurality of exposed pixel points in the second preview image, that is, a high brightness region, and the second brightness region is a corresponding region except the first brightness region in the first preview image, that is, a low brightness region or a normal brightness region, where "low" is relative to high brightness.
Specifically, since the pixels in the first preview image and the second preview image are in a one-to-one correspondence relationship, a plurality of exposure pixels in the second preview image can be correspondingly obtained according to a plurality of exposure pixels determined in the first preview image, and further, smooth connection can be performed according to a plurality of exposure pixels in the second preview image, so as to approximately or accurately determine a region, namely, a first brightness region; and the second luminance region is a portion of the preview image other than the first luminance region. Optionally, the first luminance region may further include a plurality of regions.
S633 b: the first luminance region and the second luminance region are combined to generate a target display image.
In this embodiment, one or more first luminance regions in the second preview image are clipped, a second luminance region in the first preview image is simultaneously clipped, and the clipped first luminance region and the second luminance region are further recombined to generate the target display image. It can be understood that, by such a mode, the image area with relatively good exposure condition can be used for replacing the image area with overexposure, so that the generated target display image can have a clearer display effect, and the user can conveniently view and recognize the target display image.
In some embodiments, the first preview image and the second preview image may be identified and compared to obtain a first brightness region, and an identification algorithm may be used to identify a region in which an obvious difference occurs in the two images, that is, the first brightness region, and a portion outside the first brightness region is a second brightness region. The second preview image at this time should be the first frame image when the image is just exposed, that is, the image when the strong ambient light is just projected to the front of the lens of the image pickup device, and the first preview image is the image when the strong ambient light is not yet present in the lens of the image pickup device.
Referring to fig. 9, fig. 9 is a schematic structural diagram of another embodiment of the image capturing apparatus provided in the present application, where the image capturing apparatus 20 of the present embodiment includes a processor 21 and a memory 22, the processor 21 is coupled to the memory 22, where the memory 22 is used for storing a computer program executed by the processor 21, and the processor 21 is used for executing the computer program to implement the following method steps:
correspondingly adjusting exposure parameters of the camera device according to the intensity of the ambient light; acquiring a preview image; and when the preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode.
It should be noted that the camera device 20 of the present embodiment is an entity terminal based on the foregoing method embodiments, and the implementation principle and steps are similar, and are not described herein again. Therefore, when being executed by the processor 21, the computer program may also implement other method steps in any of the above embodiments, which are not described herein again.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 30 of the present embodiment is used for storing a computer program 31, the computer program 31, when being executed by a processor, is adapted to carry out the method steps of:
correspondingly adjusting exposure parameters of the camera device according to the intensity of the ambient light; acquiring a preview image; and when the preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode.
It should be noted that the method steps executed by the computer program 31 of the present embodiment are based on the above-described method embodiments, and the implementation principle and steps are similar. Therefore, when being executed by the processor, the computer program 31 may also implement other method steps in any of the above embodiments, which are not described herein again.
Embodiments of the present application may be implemented in software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made according to the content of the present specification and the accompanying drawings, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A method of controlling an image pickup apparatus, the method comprising:
correspondingly adjusting exposure parameters of the camera device according to the intensity of the ambient light;
acquiring a preview image;
and when the preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode.
2. The method of claim 1,
the correspondingly adjusting the exposure parameters of the camera device according to the intensity of the ambient light includes:
when the intensity of the ambient light is greater than a preset light intensity threshold value, carrying out any one of the following adjustments on the exposure parameters of the camera device:
reducing the size of an aperture of the camera device; or
Reducing the exposure time of the camera device; or
And reducing the brightness gain of the camera device.
3. The method of claim 1,
the method further comprises the following steps:
acquiring a first preview image;
when the first preview image is detected to be in an exposure state, acquiring the intensity of ambient light;
the acquiring of the preview image includes:
acquiring a second preview image;
when the preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode, including:
and when the second preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode.
4. The method of claim 2,
when the second preview image is detected to be in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode, including:
sending the second preview image to a server so that the server performs exposure detection on the second preview image;
receiving an exposure detection result sent by the server;
and when the exposure detection result shows that the second preview image is in an exposure state, switching the shooting mode of the camera device to an infrared shooting mode.
5. The method of claim 3,
the exposure detection is to cause the server to acquire an ISO value of the second preview image;
the receiving of the exposure detection result sent by the server includes:
receiving an ISO value of the second preview image sent by the server;
when the exposure detection result indicates that the second preview image is in an exposure state, switching a shooting mode of the image pickup device to an infrared shooting mode includes:
and when the ISO value of the second preview image reaches a preset exposure threshold value, switching the shooting mode of the camera device to an infrared shooting mode.
6. The method of claim 2,
the method further comprises the following steps:
calculating first brightness values of all pixel points in the first preview image;
calculating second brightness values of all pixel points in the second preview image;
and generating a target display image based on the magnitude relation of the first brightness value and the second brightness value.
7. The method of claim 5,
the generating a target display image based on the magnitude relationship between the first brightness value and the second brightness value includes:
taking the pixel point corresponding to the brightness value with smaller difference value between the first brightness value and the second brightness value as a target pixel point, and storing the pixel point;
sequentially storing a plurality of target pixel points corresponding to all pixel points in the first preview image and the second preview image;
and generating a target display image by the target pixel points according to a storage sequence.
8. The method of claim 6,
the generating a target display image based on the magnitude relationship between the first brightness value and the second brightness value includes:
obtaining a plurality of exposure pixel points of which the first brightness value is more than n times of a preset brightness threshold value from the pixel points of the first preview image;
determining a first brightness region in the second preview image according to the positions of the exposure pixel points, and determining a second brightness region in the first preview image; the first brightness area is a corresponding area surrounded by the plurality of exposure pixel points in the second preview image, and the second brightness area is a corresponding area except the first brightness area in the first preview image;
combining the first luminance region and the second luminance region to generate a target display image.
9. An image pickup apparatus comprising a processor and a memory, wherein the processor is electrically coupled to the memory, and the memory is used for storing a computer program, and the computer program is used for implementing the control method of the image pickup apparatus according to any one of claims 1 to 8 when the computer program is executed by the processor.
10. A computer-readable storage medium storing a computer program for implementing a control method of an image pickup apparatus according to any one of claims 1 to 8 when executed by a processor.
CN202010754239.3A 2020-07-30 2020-07-30 Control method of camera device, camera device and storage medium Withdrawn CN112055154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010754239.3A CN112055154A (en) 2020-07-30 2020-07-30 Control method of camera device, camera device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010754239.3A CN112055154A (en) 2020-07-30 2020-07-30 Control method of camera device, camera device and storage medium

Publications (1)

Publication Number Publication Date
CN112055154A true CN112055154A (en) 2020-12-08

Family

ID=73601356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010754239.3A Withdrawn CN112055154A (en) 2020-07-30 2020-07-30 Control method of camera device, camera device and storage medium

Country Status (1)

Country Link
CN (1) CN112055154A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822404A (en) * 2021-01-12 2021-05-18 Oppo广东移动通信有限公司 Image processing method and device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822404A (en) * 2021-01-12 2021-05-18 Oppo广东移动通信有限公司 Image processing method and device and storage medium
CN112822404B (en) * 2021-01-12 2022-08-09 Oppo广东移动通信有限公司 Image processing method and device and storage medium

Similar Documents

Publication Publication Date Title
US10979654B2 (en) Image signal processing method and system
CN108683862B (en) Imaging control method, imaging control device, electronic equipment and computer-readable storage medium
KR102075456B1 (en) Image processing method for improving image quality and image processing device therewith
CN103581559B (en) A kind of intelligent AE algorithm for flash photography of mobile phone
JP2006025416A (en) Exposure adjustment method of camera
CN108683863B (en) Imaging control method, imaging control device, electronic equipment and readable storage medium
JP4600684B2 (en) Imaging apparatus and imaging method
CN108337446B (en) High dynamic range image acquisition method, device and equipment based on double cameras
US11689822B2 (en) Dual sensor imaging system and privacy protection imaging method thereof
CN111064899A (en) Exposure parameter adjusting method and device
WO2015199969A2 (en) Exposure metering based on background pixels
JP2018056702A (en) Image processing device, image processing method and program
CN107835351B (en) Two camera modules and terminal
US11496694B2 (en) Dual sensor imaging system and imaging method thereof
CN112055154A (en) Control method of camera device, camera device and storage medium
JP2010062668A (en) Image processing apparatus, image processing method, program, and image capturing apparatus
KR101005769B1 (en) Auto exposure and auto white-balance method for detecting high dynamic range conditions
US11568526B2 (en) Dual sensor imaging system and imaging method thereof
JP2012044559A (en) Imaging apparatus and control method of the same
US20130266220A1 (en) Color signal processing circuit, color signal processing method, color reproduction evaluating method, imaging apparatus, electronic apparatus and testing device
US20210243344A1 (en) Dual sensor imaging system and depth map calculation method thereof
JP2007208642A (en) Image signal processing circuit and imaging system
CN114143443A (en) Dual-sensor camera system and camera method thereof
US20220321764A1 (en) Illumination control device, imaging device, and storage medium
JP2016040879A (en) Control system, imaging device, control method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20201208