CN115225810A - Image pickup mode switching method, image pickup device, and computer-readable storage medium - Google Patents

Image pickup mode switching method, image pickup device, and computer-readable storage medium Download PDF

Info

Publication number
CN115225810A
CN115225810A CN202210576156.9A CN202210576156A CN115225810A CN 115225810 A CN115225810 A CN 115225810A CN 202210576156 A CN202210576156 A CN 202210576156A CN 115225810 A CN115225810 A CN 115225810A
Authority
CN
China
Prior art keywords
mode
fog
primary color
preset
primary
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.)
Pending
Application number
CN202210576156.9A
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202210576156.9A priority Critical patent/CN115225810A/en
Publication of CN115225810A publication Critical patent/CN115225810A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Abstract

The application discloses a camera mode switching method, a camera device and a computer readable storage medium, wherein the camera mode switching method comprises the following steps: acquiring image data shot by a camera device in a fog penetrating mode; the lens of the camera device covers the optical filter when the camera device is in the fog penetration mode; detecting image data to obtain the base color distribution condition of pixel points in the image; selecting a fog-penetrating mode to be maintained or switching to a sunlight mode based on the primary color distribution condition; wherein, the lens of the image pickup device does not cover the optical filter when in the daylight mode. According to the scheme, the shooting mode can be accurately switched.

Description

Image pickup mode switching method, image pickup device, and computer-readable storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method for switching an image capturing mode, an image capturing device, and a computer-readable storage medium.
Background
With the continuous development of electronic information technology, various camera devices are widely applied in daily life of people. Wherein, camera device with fog penetrating function mainly is applied to under the lower extreme weather of visibility (for example rainy day, big fog, haze), promotes the control quality picture, makes the image more penetrating clear.
However, the conventional imaging device rarely has an intelligent and automatic switching of the imaging mode. Although some image pickup devices have a mode switching function, the accuracy of mode switching still needs to be improved. For example, the fog-penetrating mode is switched by mistake before the large fog is scattered. In view of this, how to accurately switch the image capturing mode is an urgent problem to be solved.
Disclosure of Invention
The technical problem mainly solved by the application is to provide a camera mode switching method, a camera device and a computer readable storage medium, which can accurately switch camera modes.
In order to solve the above technical problem, a first aspect of the present application provides an image capturing mode switching method, including: acquiring image data shot by a camera device in a fog penetrating mode; the optical filter is covered at the lens of the camera device when the camera device is in the fog penetrating mode; detecting image data to obtain the distribution condition of the primary colors of pixel points in the image; based on the primary color distribution condition, selecting to maintain a fog-penetrating mode or switch to a sunlight mode; the lens of the imaging device does not cover the optical filter in the daylight mode.
In order to solve the above technical problem, a second aspect of the present application provides an image capturing device, which includes a memory, an image sensor and a processor, wherein the memory and the image sensor are both coupled to the processor, and the processor is configured to execute program instructions stored in the memory, so as to implement the image capturing mode switching method of the first aspect.
In order to solve the above technical problem, a third aspect of the present application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being for implementing the image capturing mode switching method in the first aspect.
In the scheme, the image data shot by the camera device in the fog-penetrating mode is obtained, the primary color distribution condition of the pixel points in the image data is detected, and the fog-penetrating mode is selectively maintained or the sunlight mode is switched to according to the primary color distribution condition. Therefore, the primary color distribution condition of the pixel points in the image data is detected, and the transmission condition of each primary color light in the current environment can be accurately analyzed, so that the accuracy of judging whether the current environment maintains the fog-penetrating mode or not can be improved, the error can be reduced as far as possible, and the shooting mode can be accurately switched.
Drawings
Fig. 1 is a schematic flowchart of an embodiment of a method for switching a camera mode according to the present application;
fig. 2 is a response curve of the image pickup device for three optical primary colors of red, green, and blue;
FIG. 3 is a schematic diagram of a filter transmittance setting based on a response curve;
fig. 4 is a schematic flowchart of another embodiment of the method for switching the image capturing mode of the present application;
FIG. 5 is a schematic block diagram of an embodiment of an imaging device according to the present application;
FIG. 6 is a block diagram of one embodiment of a computer-readable storage medium of the present application;
fig. 7 is a schematic diagram of a framework of an embodiment of the image capturing mode switching apparatus.
Detailed Description
The following describes in detail the embodiments of the present application with reference to the drawings attached hereto.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an embodiment of a method for switching a camera mode according to the present application. Specifically, the image capturing mode switching method in the present embodiment may include the steps of:
step S11: and acquiring image data shot by the camera device in a fog penetrating mode.
In the present embodiment, the imaging Device is a Device for realizing an imaging function, and includes, but is not limited to, a CCD (Charge Coupled Device) camera, a CMOS (Complementary Metal-Oxide-Semiconductor) camera, and the like.
In this embodiment, the fog-penetrating mode indicates a mode in which the image pickup device covers the optical filter at the lens to operate, and can improve monitoring quality pictures in extreme weather with low visibility (such as rainy days, heavy fog, and haze); the daylight mode indicates a mode in which the image pickup device operates without covering the filter at the lens, and generally performs shooting in normal weather.
In one implementation scenario, the image data includes data information such as pictures, videos, and the like taken in the fog-transparent mode of the image pickup device.
In an implementation scene, the optical filter adopts an optical fog-penetrating principle to realize a fog-penetrating mode of the image pickup device, the optical filter is generally arranged in a band-pass mode according to a wavelength range, light can be cut off in one part of the wavelength range, and light can penetrate in the other part of the wavelength range, so that clear imaging of light with specific wavelength on the image pickup device can be ensured in a severe environment.
In one specific implementation scenario, the filter may be an optical filter that cuts light in the range of 400nm to 700nm and transmits light in the range of 700nm to 1000 nm; the optical filter can also be an optical filter which cuts off light within the range of 400nm-750nm and transmits light within the range of 750nm-1000 nm; the optical filter may also be an optical filter that cuts light in the range of 400nm to 800nm and transmits light in the range of 800nm to 1000nm, and the specific wavelength range is not specifically limited herein.
In an implementation scenario, after the light passes through the optical filter, relative response values of the light on the imaging device with respect to the first primary color, the second primary color and the third primary color satisfy a preset relationship in a first wavelength band, and do not satisfy the preset relationship in a second wavelength band. Wherein the relative response value represents a ratio of the radiance received by a certain color and the radiance incident thereto at each wavelength of the image pickup device.
In a specific implementation scenario, the first primary color, the second primary color, and the third primary color may preferably be three optical primary colors, red, green, and blue. In some special scenarios, the first primary color, the second primary color, and the third primary color may also be other colors such as yellow, purple, black, and the like, and are not limited herein.
In a specific implementation scenario, the first wavelength band may be a wavelength range of 400nm to 700nm, the second wavelength band may be a wavelength range of 700nm to 1000nm, and the predetermined relationship may be that the relative response value of the first primary color is greater than the relative response value of either of the second primary color and the third primary color.
In another specific implementation scenario, the first wavelength band may also be a wavelength range from 400nm to 750nm, the second wavelength band may be a wavelength range from 750nm to 1000nm, and the preset relationship may be a specific ratio of relative response values of the first primary color and the second primary color, and a specific ratio of relative response values of the first primary color and the second primary color, which are greater than 150%, 200%, and the like.
In yet another specific implementation scenario, the first wavelength band may be a wavelength range from 400nm to 800nm, the second wavelength band may be a wavelength range from 800nm to 1000nm, and the predetermined relationship may be that the relative response value of the first primary color is greater than 80%, and the relative response value of any one of the second primary color and the third primary color is less than 40%.
Therefore, after the light passes through the optical filter, the relative response values of the three primary colors on the camera device meet the requirement of the preset relationship, so that the subsequent analysis of image data is facilitated, and the accurate switching of the camera mode is finally realized.
In another implementation scenario, in the first band, the minimum value of the difference between the relative response value of the first primary color and the relative response value of the second primary color, and the minimum value of the difference between the relative response value of the first primary color and the relative response value of the third primary color are both greater than a first preset difference value; in the second wavelength band, the maximum value of the difference between the relative response value of the first primary color and the relative response value of the second primary color and the maximum value of the difference between the relative response value of the first primary color and the relative response value of the second primary color are not larger than a second preset difference value. The first preset difference may be a specific value of 0.3, 0.4, etc., and the second preset difference may be a specific value of 0.05, 0.1, etc., which is smaller than the first preset difference.
In a specific implementation scenario, the description of the first primary color, the second primary color, the third primary color, and the first and second wavelength bands may refer to the foregoing embodiments. At this time, the first preset difference is 0.3, the second preset difference is 0.05, the minimum value of the green relative response value is 0.8, the maximum value of the red relative response value is 0.3, and the maximum value of the blue relative response value is 0.35 within the wavelength range of 400nm-800 nm; the relative response values of green, red and blue are kept consistent and are all 0.4 within the wavelength range of 800nm-1000 nm. Therefore, in the wavelength range of 400nm-800nm, the minimum value of the difference between the green relative response value and the red relative response value is 0.5, the minimum value of the difference between the green relative response value and the blue relative response value is 0.45, and the difference is greater than a first preset difference value of 0.3; in the wavelength range of 800nm-1000nm, the difference between the green relative response value and the red relative response value and the difference between the green relative response value and the blue relative response value are both 0 and are both smaller than a second preset difference value of 0.05.
In another specific implementation scenario, similarly, the first preset difference is set to be 0.5, the second preset difference is set to be 0.1, and in the wavelength range of 400nm to 700nm, the minimum value of the red relative response value is 0.9, the maximum value of the green relative response value is 0.3, and the maximum value of the blue relative response value is 0.25; the relative response values of green, red and blue are all in the numerical range of 0.3-0.4 in the wavelength range of 700nm-1000 nm. Therefore, in the wavelength range of 400nm-700nm, the minimum value of the difference between the red relative response value and the green relative response value is 0.6, the minimum value of the difference between the red relative response value and the blue relative response value is 0.65, and the difference is greater than the first preset difference value by 0.5; because the green, red and blue relative response values are all in the numerical range of 0.3-0.4 in the wavelength range of 700nm-1000nm, the difference between the red relative response value and the green relative response value and the difference between the red relative response value and the blue relative response value are all smaller than the second preset difference value of 0.1.
Therefore, after the light passes through the optical filter, the relative response value of one primary color is highlighted in the first waveband, and the relative response values of the three primary colors in the second waveband are almost kept consistent, so that the light shows a remarkable difference in the two wavebands after passing through the optical filter, and the subsequent image analysis is facilitated.
In another implementation scenario, transmittance settings of the optical filters may be performed based on response curves of the imaging device to the three primary colors in a daylight mode (the optical filter is not covered at the lens), so that relative response values of the light rays on the imaging device with respect to the first primary color, the second primary color and the third primary color after the light rays pass through the optical filter satisfy a preset relationship in a first wavelength band, and do not satisfy the preset relationship in a second wavelength band.
Further, for convenience of understanding, the wavelength bands of the light can be simply divided according to the wavelength range, and the wavelength range of the first wavelength band is 400nm-800nm and is recorded as a visible light wavelength band; the wavelength range of the second band is 800nm-1000nm, and is recorded as a near-infrared band. Referring to fig. 2, fig. 2 is a response curve of the image pickup device for three primary optical colors of red, green, and blue. As shown in fig. 2, the relative response values of the three primary colors of red, green, and blue are almost the same in the near-infrared band, but the relative response values of the three primary colors differ significantly in the visible light band. In order to set the light transmittance of the light-transmitting sheet conveniently, the wavelength range in which the relative response value of the primary colors is high can be screened out by screening the camera device with reference to the response curve. Regarding green, it can be seen that the relative response value of green is the highest in the wavelength range of 505nm to 575nm in the visible light band, and therefore the light transmittance of the light-transmitting sheet can be set to be relatively high in the wavelength range of 505nm to 575nm in the visible light band. Similarly, it can be seen that the relative response value of red in the wavelength range of 575nm to 700nm in the visible light band is high, and the relative response value of blue in the wavelength range of 400nm to 480nm in the visible light band is high.
In one particular implementation scenario, the first primary color may be selected to be green, in which case the second primary color is red and the third primary color is blue. Referring to fig. 2 and 3, fig. 3 is a schematic diagram illustrating a transmittance setting of the optical filter based on a response curve, as shown in fig. 3, the optical filter may be set to have a transmittance of greater than 80% in a wavelength range of 505nm to 575nm in the visible light band, and to have a transmittance of greater than 80% in a wavelength range of 800nm to 1000nm in the near infrared band. In addition, the wavelength ranges of 400nm-505nm and 575nm-800nm of the visible light wave band are required to be set to be less than 40%, and the final optical filter is a band-pass optical filter. To explain further, since the optical filter has a high light transmittance in only the wavelength range of 505nm to 575nm in the visible light band, and the relative response value of green is the highest in this wavelength range, the green component in the image is necessarily high when the image pickup device finally forms an image. In a similar way, the light transmittance of the optical filter in the near-infrared band is high, and the light transmittance of the optical filter in the near-infrared band is almost consistent with that of the filter in green, red and blue, so that the component proportions of the filter in the near-infrared band and the filter in red, red and blue are almost consistent when the camera device finally images. The imaging in the visible light wave band and the near infrared wave band has obvious difference, which is beneficial to the accurate switching of the shooting mode.
In another specific implementation scenario, the first primary color may be selected to be red, in which case the second primary color is green and the third primary color is blue. The light filter can be set to have light transmittance of more than 80% in the wavelength range of 575nm-700nm of the visible light band and light transmittance of more than 80% in the wavelength range of 800nm-1000nm of the near infrared band. In addition, the light transmittance in the wavelength ranges of 400nm-575nm and 700nm-800nm of the visible light wave band is required to be less than 40%.
In yet another specific implementation scenario, the first primary color may be selected to be blue, in which case the second primary color is green and the third primary color is red. The light transmittance of the optical filter is more than 80% in the wavelength range of 400nm-480nm in the visible light band, and the light transmittance is more than 80% in the wavelength range of 800nm-1000nm in the near infrared band. In addition, less than 40% of the wavelength in the range of 480nm to 800nm in the visible light band is required.
It should be noted that, setting the transmittance conditions of the filters with respect to the three primary colors, including but not limited to the above, based on the response curves of the imaging device to the three primary colors. Therefore, the wavelength range with higher response value of the primary color of the image pickup device is directly screened out according to the response curve of the image pickup device to the three primary colors of red, green and blue, so that the setting of the optical filter is simpler and easier to realize.
Step S12: and detecting the image data to obtain the distribution condition of the primary colors of the pixel points in the image.
In an implementation scene, each pixel point contained in the image is detected, and the primary color distribution condition of each pixel point is obtained. The base color distribution condition of each pixel point comprises the following steps: a first ratio between the pixel components of the first and second primary colors and a second ratio between the pixel components of the first and third primary colors.
In a specific implementation scenario, three optical primary colors, namely red, green and blue, are also set as primary colors. Further, green is selected as a first primary color, red is selected as a second primary color, and blue is selected as a third primary color, and the primary color distribution condition of the pixel point includes a ratio of a green component to a red component and a ratio of a green component to a blue component in the pixel point.
In another implementation scenario, the distribution of the primary colors of each pixel includes a proportion of the first primary color component to the entire pixel.
In a specific implementation scenario, three primary optical colors, red, green and blue, are also provided as primary colors. Further, green is selected as a first primary color, and the primary color distribution condition of the pixel point includes the proportion of a green component in the pixel point to the whole pixel point.
Step S13: and based on the distribution condition of the primary colors, selecting to maintain the fog-penetrating mode or switch to the sunlight mode.
In an implementation scene, the quantity ratio of pixel points meeting preset conditions in image data is counted, and a fog-transparent mode is maintained or a sunlight mode is switched to according to the quantity ratio. When the base color distribution condition includes a first ratio between the pixel components of the first base color and the second base color, and a second ratio between the pixel components of the first base color and the third base color, the preset condition may be set to include that the first ratio is greater than a first threshold and the second ratio is greater than a second threshold.
In a specific implementation scenario, the first threshold and the second threshold may be specific values such as 1.5 and 2, and no specific limitation is imposed herein, as described above, it is counted that the number of pixels satisfying that the ratio of the green component to the red component is greater than 1.5, and the ratio of the green component to the blue component is greater than 2 in the image is 500, the total number of pixels in the image is 1000, and the number ratio is 50% at this time.
It should be noted that the first threshold and the second threshold may be set to be equal or different. Preferably, the efficiency of the statistics is improved by setting the first threshold and the second threshold equal.
In another implementation scenario, the number of pixels meeting preset conditions in the image data is counted, and the fog-transparent mode is maintained or the sunlight mode is switched to according to the number of the pixels. When the distribution condition of the primary colors includes a proportion of the first primary color component to the entire pixel point, a preset condition may be set, including that the proportion is greater than a proportion threshold.
In a specific implementation scenario, the proportion threshold may be set to a specific numerical value such as 50%, and no specific limitation is made herein, and as described above, the number of pixels satisfying that the proportion of the green component in the pixels exceeds 50% in the image data is counted to be 600.
According to the scheme, the pixel points meeting the requirements in the image data are screened out through the preset conditions, mode switching is achieved according to the ratio of the number of the pixel points to the number of the pixel points in the image data, and the probability of occurrence of error switching is greatly reduced through analysis of a large number of the pixel points.
Further, in one implementation scenario, the fog-transparent mode is maintained or switched to the daylight mode is selected based on the number ratio. Responding to the number proportion not less than the preset proportion, and selecting to switch to the sunlight mode; and/or selecting the fog penetration maintaining mode in response to the number ratio being smaller than the preset ratio. Also, the preset ratio may be set to a specific value such as 60%, 70%, etc., and is not particularly limited herein.
Easily understood, meeting a preset condition indicates that the proportion of the first primary color in the pixel exceeds a certain threshold requirement, and the pixel can be understood as a pixel generated in the first wavelength band (visible light wavelength band). Therefore, the ratio of the number of the pixel points meeting the preset condition in the image data reflects the proportion of the pixel points in the first wave band (visible light wave band) in the image data, the higher the proportion is, the higher the visibility of the shooting environment is, and when the proportion exceeds the preset proportion, the sunlight mode can be switched to. Therefore, the switching judgment is carried out according to the proportion, the possibility of wrong mode switching caused by analysis errors or statistical errors of partial pixel points is reduced as much as possible, and the accuracy of mode switching is ensured.
In a specific implementation scenario, the preset proportion is set to 60%, as described above, the number of the pixels meeting the preset condition is counted to be 500, the total number of the pixels in the image is counted to be 1000, at this time, the number proportion is 50%,50% is less than 60%, and therefore the fog-penetration mode is selected to be maintained without any operation.
In another specific implementation scenario, the preset ratio is set to 60%, as described above, the number of the pixels meeting the preset condition is counted to be 700, the total number of the pixels in the image is 1000, and the number ratio is 70% and 70% is not less than 60%, so that the solar mode is selected to be switched to, and the optical filter covering the lens is removed.
In another implementation scenario, the fog-transparent mode is maintained or the sunlight mode is switched to according to the number of the pixels meeting the preset condition. Responding to the fact that the number of the pixel points meeting the preset condition is not smaller than a preset number threshold value, and selecting to switch to the sunlight mode; and/or selecting a fog penetration maintaining mode in response to the number of the pixel points meeting the preset condition being smaller than a preset number threshold.
In a specific implementation scenario, the threshold of the preset number is 800, and as described above, the number of the pixels meeting the preset condition is counted to be 500, 500 is smaller than 800, so that the fog penetration mode is selected to be maintained without any operation.
In another specific implementation scenario, the threshold of the preset number is 800, and as mentioned above, 900 pixels meeting the preset condition are counted, and 900 is not less than 800, so that the solar mode is selected to be switched to, and the optical filter covering the lens is removed.
In the scheme, the image data shot by the camera device in the fog penetration mode is obtained, the primary color distribution condition of the pixel points in the image data is detected, and the fog penetration mode is selected to be maintained or the sunlight mode is switched to the sunlight mode according to the primary color distribution condition. Therefore, the primary color distribution condition of the pixel points in the image data is detected, and the transmission condition of each primary color light in the current environment can be accurately analyzed, so that the accuracy of judging whether the current environment maintains the fog-penetrating mode or not can be improved, the error can be reduced as far as possible, and the shooting mode can be accurately switched.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a method for switching a camera mode according to another embodiment of the present application. Specifically, the image capturing mode switching method in the present embodiment may include the steps of:
step S401: and acquiring a response curve of the camera device, and modifying the light transmittance of the optical filter based on the response curve.
Acquiring a response curve of the image pickup device, and modifying the transmittance of the optical filter based on the response curve is equivalent to "setting the transmittance of the optical filter based on the response curve of the image pickup device to the three primary colors in the daylight mode (the optical filter is not covered at the lens part)" in the foregoing embodiment.
Step S402: image data taken by the image pickup device in the fog penetration mode is acquired.
The image data obtained by the image pickup device in the fog penetrating mode is completely consistent with step S11 in the foregoing embodiment, and specific implementation steps may refer to the foregoing embodiment, which are not described herein again.
Step S403: and detecting the image data to obtain the distribution condition of the primary colors of the pixel points in the image.
The image data is detected, and the obtained distribution condition of the primary colors of the pixels in the image is completely consistent with the step S12 in the foregoing embodiment, and the specific implementation steps may refer to the foregoing embodiment, which is not described herein again.
Step S404: and judging whether the primary color distribution condition meets a preset distribution condition. If yes, go to step S405; otherwise, step S407 is executed.
Judging whether the primary color distribution condition meets the preset distribution condition is equivalent to counting the number proportion of the pixel points in the image data, the primary color distribution condition of which meets the preset condition, in the image data and judging the size relation between the number proportion and the preset proportion, or counting the number of the pixel points in the image data, the number of which meets the preset condition, and judging the size relation between the number of the pixel points and the preset number threshold in the embodiment, and specific implementation steps can refer to the embodiment and are not repeated herein.
Step S405: the image pickup device is switched to the daylight mode.
In response to the primary color distribution condition meeting the preset distribution condition, the imaging device is switched to the sunlight mode, namely, the optical filter covering the lens is removed.
Step S406: and responding to the fact that the fog concentration meets the preset switching condition, and switching the camera device to the fog penetration mode.
In an implementation scene, the camera device in the sunlight mode acquires the fog concentration in real time, and when the fog concentration meets the preset switching concentration, the fog mode is switched to the fog penetrating mode, namely, the optical filter is covered at the lens.
Step S407: the image pickup device maintains a fog-through mode.
And responding to the condition that the primary color distribution does not meet the preset distribution condition, and maintaining the fog penetration mode of the image pickup device without any operation.
Step S408: the execution returns to step S402 and subsequent steps.
After the execution of steps S406 and S407 is completed, the execution returns to step S402 and subsequent steps, and the analysis and determination of the image data are continued, so that the entire image capturing mode switching method can be executed in a closed loop.
According to the scheme, the light transmittance is changed to enable the light transmittance to be obviously different between the first waveband and the second waveband, so that image data shot by the camera device in the fog-transparent mode is obtained, the primary color distribution condition of pixel points in the image data is detected, the fog-transparent mode is selected to be maintained or switched to the sunlight mode according to the primary color distribution condition and the light transmittance obvious difference between the first waveband and the second waveband, and the closed-loop execution is continued. Therefore, the primary color distribution condition of the pixel points in the image data is detected, and the transmission condition of each primary color light in the current environment can be accurately analyzed, so that the accuracy of judging whether the current environment maintains the fog-penetrating mode or not can be improved, the error can be reduced as far as possible, and the shooting mode can be accurately switched.
Referring to fig. 5, fig. 5 is a schematic diagram of a frame of an image pickup device 50 according to an embodiment of the present disclosure. Specifically, the image pickup device 50 includes a memory 51, an image sensor 52, and a processor 53, and the memory 51 and the image sensor 52 are each coupled to the processor 53. The processor 53 is configured to execute the program instructions stored in the memory 51 to implement the steps in the image capturing mode switching method according to any of the above embodiments.
Specifically, the processor 53 may control itself, as well as the memory 51 and the image sensor 52, to execute the steps in the image capturing mode switching method of any of the above embodiments. The processor 53 may also be referred to as a CPU (Central Processing Unit). The processor 53 may be an integrated circuit chip having signal processing capabilities. The Processor 53 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 53 may be commonly implemented by a plurality of circuit-forming chips.
In another implementation scenario, the image capture device 50 further includes a lens, a filter, and a transmission mechanism for covering the lens with the filter or removing the filter from the lens under the control of the processor 53. When the optical filter covers the lens, it indicates that the image pickup device 50 is in the fog-transparent mode; when the filter does not cover the lens, it indicates that the image pickup device 50 is in the daylight mode.
In the scheme, the image data shot by the camera device in the fog penetration mode is obtained, the primary color distribution condition of the pixel points in the image data is detected, and the fog penetration mode is selected to be maintained or the sunlight mode is switched to the sunlight mode according to the primary color distribution condition. Therefore, the primary color distribution condition of the pixel points in the image data is detected, and the transmission condition of each primary color light in the current environment can be accurately analyzed, so that the accuracy of judging whether the current environment maintains the fog-penetrating mode or not can be improved, the error can be reduced as far as possible, and the shooting mode can be accurately switched.
Referring to fig. 6, fig. 6 is a block diagram illustrating an embodiment of a computer readable storage medium 60 according to the present application. In this embodiment, the computer-readable storage medium 60 stores processor-executable program instructions 601, where the program instructions 601 are used to execute the steps in the above-described embodiment of the image capturing mode switching method.
The computer-readable storage medium 60 may be a medium that can store program instructions, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or may be a server that stores the program instructions, and the server can send the stored program instructions to other devices for operation or can self-operate the stored program instructions.
In the scheme, the image data shot by the camera device in the fog penetration mode is obtained, the primary color distribution condition of the pixel points in the image data is detected, and the fog penetration mode is selected to be maintained or the sunlight mode is switched to the sunlight mode according to the primary color distribution condition. Therefore, the primary color distribution condition of the pixel points in the image data is detected, and the transmission condition of each primary color light in the current environment can be accurately analyzed, so that the accuracy of judging whether the current environment maintains the fog-penetrating mode or not can be improved, the error can be reduced as far as possible, and the shooting mode can be accurately switched.
Referring to fig. 7, fig. 7 is a schematic diagram of an embodiment of a camera mode switching device 70. Specifically, the image capturing mode switching device 70 includes an image data acquiring module 71, an image data detecting module 72, and an image capturing mode switching module 73, where the image data acquiring module 71 is configured to acquire image data captured by the image capturing device in the fog penetration mode; the lens of the camera device covers the optical filter when the camera device is in the fog penetration mode; the image data detection module 72 is configured to detect image data to obtain a distribution of primary colors of pixels in an image; the image pickup mode switching module 73 is used for selecting and maintaining a fog-transparent mode or switching to a sunlight mode based on the primary color distribution condition; wherein, the lens of the image pickup device does not cover the optical filter when in the daylight mode.
In the scheme, the image data shot by the camera device in the fog-penetrating mode is obtained, the primary color distribution condition of the pixel points in the image data is detected, and the fog-penetrating mode is selectively maintained or the sunlight mode is switched to according to the primary color distribution condition. Therefore, the primary color distribution condition of the pixel points in the image data is detected, and the transmission condition of each primary color light in the current environment can be accurately analyzed, so that the accuracy of judging whether the current environment maintains the fog-penetrating mode or not can be improved, the error can be reduced as far as possible, and the shooting mode can be accurately switched.
In some disclosed embodiments, the image capturing mode switching module 73 includes a pixel number counting unit, configured to count pixel points in the image data whose primary color distribution satisfies a preset condition, where the number of the pixel points in the image data is proportional to the number of the pixel points; the image capturing mode switching module 73 selects to maintain the fog-transparent mode or switch to the sunlight mode based on the number ratio.
Therefore, pixel points meeting requirements in the image data are screened out through preset conditions, mode switching is achieved according to the ratio of the number of the pixel points to the number of the pixel points in the image data, and the possibility of error switching is greatly reduced through analysis of a large number of the pixel points.
In some disclosed embodiments, the relative response values of the light transmitted through the filter on the image pickup device with respect to the first primary color, the second primary color and the third primary color satisfy: the first band is in accordance with a preset relationship, and the second band is not in accordance with the preset relationship; wherein, the first wave band belongs to the visible light wave band, and the second wave band belongs to near-infrared wave band, and the light filter is at the light filter of first wave band, second wave band-pass, predetermines the relation and includes: the relative response value of the first primary color is larger than that of any one of the second primary color and the third primary color, and the primary color distribution condition comprises: a first ratio between the pixel components of the first and second primary colors and a second ratio between the pixel components of the first and third primary colors, the preset conditions including: the first ratio is greater than a first threshold and the second ratio is greater than a second threshold.
Therefore, after the light passes through the optical filter, the relative response values of the imaging device with respect to the three primary colors meet the requirement of a preset relationship, so that the subsequent analysis of image data is facilitated, and the accurate switching of the imaging mode is finally realized.
In some disclosed embodiments, in the first wavelength band, a minimum value of a difference between a relative response value of the first primary color and a relative response value of the second primary color, and a minimum value of a difference between the relative response value of the first primary color and a relative response value of the third primary color are both greater than a first preset difference value, and in the second wavelength band, a maximum value of a difference between the relative response value of the first primary color and the relative response value of the second primary color, and a maximum value of a difference between the relative response value of the first primary color and the relative response value of the third primary color are both greater than a second preset difference value, wherein the first preset difference value is greater than the second preset difference value.
Therefore, after the light passes through the optical filter, the relative response value of one primary color is highlighted in the first waveband, and the relative response values of the three primary colors in the second waveband are almost kept consistent, so that the light shows a significant difference in the two wavebands after passing through the optical filter, and the subsequent image analysis is facilitated.
In some disclosed embodiments, the image capturing mode switching module 73 includes a daylight mode switching unit and/or a fog-penetrating mode switching unit. The sunlight mode switching unit is used for responding to the fact that the number ratio is not smaller than a preset ratio and selectively switching to the sunlight mode; and/or the fog penetration mode switching unit is used for responding to the fact that the number ratio is smaller than the preset ratio, and selecting and maintaining the fog penetration mode.
Therefore, switching judgment is carried out according to the proportion, the possibility of wrong mode switching caused by analysis errors or statistical errors of partial pixel points is reduced, and the accuracy of mode switching is ensured.
In some disclosed embodiments, in response to the image capture mode switching module 73 selecting the maintenance fog-through mode, the image data acquisition module 71 and the image data detection module 72 are restarted, and the steps of the relevant image capture mode switching are re-executed again.
Therefore, after the camera shooting mode switching module selects and maintains the fog penetration mode, the camera shooting mode switching device is started and executed again, and the closed-loop operation of the camera shooting mode switching device is ensured.
In some disclosed embodiments, the image capturing mode switching device 70 includes a fog density acquiring unit configured to acquire a fog density in response to the image capturing mode switching module 73 being switched to the daylight mode, the image capturing mode switching module 73 switching the image capturing device to the fog penetration mode in response to the fog density satisfying a preset switching density, restarting the image data acquiring module 71 and the image data detecting module 72, and re-executing the step of switching the relevant image capturing mode again.
Therefore, after the photographing mode switching module selects and maintains the sunlight mode, the fog penetrating mode is further switched back based on the fog concentration acquisition unit, and then the photographing mode switching device is started and executed again, so that the closed-loop operation of the photographing mode switching device is ensured.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is only one type of logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to 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.
If the technical scheme of the application relates to personal information, a product applying the technical scheme of the application clearly informs personal information processing rules before processing the personal information, and obtains personal independent consent. If the technical scheme of the application relates to sensitive personal information, a product applying the technical scheme of the application obtains individual consent before processing the sensitive personal information, and simultaneously meets the requirement of 'express consent'. For example, at a personal information collection device such as a camera, a clear and significant identifier is set to inform that the personal information collection range is entered, the personal information is collected, and if the person voluntarily enters the collection range, the person is regarded as agreeing to collect the personal information; or on the device for processing the personal information, under the condition of informing the personal information processing rule by using obvious identification/information, obtaining personal authorization by modes of popping window information or asking a person to upload personal information of the person by himself, and the like; the personal information processing rule may include information such as a personal information processor, a personal information processing purpose, a processing method, and a type of personal information to be processed.

Claims (10)

1. An image pickup mode switching method, comprising:
acquiring image data shot by a camera device in a fog penetrating mode; the lens of the image pickup device covers the optical filter in the fog penetration mode;
detecting the image data to obtain the base color distribution condition of pixel points in the image;
based on the primary color distribution condition, selecting to maintain the fog-penetrating mode or switch to the sunlight mode; wherein the optical filter is not covered by the camera lens when the camera device is in the daylight mode.
2. The method of claim 1, wherein selecting to maintain the fog-transparent mode or switch to the daylight mode based on the primary color distribution comprises:
counting pixel points of which the distribution condition of the primary colors in the image data meets a preset condition, wherein the number of the pixel points accounts for the ratio in the image data;
and selecting to maintain the fog penetrating mode or switch to the sunlight mode based on the number ratio.
3. The method of claim 2, wherein the relative response values of the light transmitted through the filter on the image pickup device with respect to the first primary color, the second primary color and the third primary color satisfy: the first wave band is in accordance with a preset relation, and the second wave band is not in accordance with the preset relation;
the first waveband belongs to a visible light waveband, the second waveband belongs to a near-infrared waveband, the optical filter is a band-pass optical filter of the first waveband and the second waveband, and the preset relationship comprises: the relative response value of the first primary color is larger than the relative response value of any one of the second primary color and the third primary color, and the primary color distribution condition comprises: a first ratio between the pixel components of the first and second primary colors and a second ratio between the pixel components of the first and third primary colors, the preset conditions including: the first ratio is greater than a first threshold and the second ratio is greater than a second threshold.
4. The method of claim 3, wherein in the first band, a minimum value of a difference between the relative response value of the first primary and the relative response value of the second primary, and a minimum value of a difference between the relative response value of the first primary and the relative response value of the third primary are both greater than a first preset difference, and in the second band, a maximum value of a difference between the relative response value of the first primary and the relative response value of the second primary, and a maximum value of a difference between the relative response value of the first primary and the relative response value of the third primary are both greater than a second preset difference, wherein the first preset difference is greater than the second preset difference.
5. The method of claim 2, wherein selecting to maintain the fog-transparent mode or switch to the daylight mode based on the number ratio comprises:
responding to the number proportion not less than a preset proportion, and selecting to switch to the daylight mode;
and/or, responding to the number ratio smaller than a preset ratio, and selecting to maintain the fog penetration mode.
6. The method of claim 1, further comprising:
and in response to the selection of maintaining the fog penetration mode, re-executing the step of acquiring the image data shot by the image pickup device in the fog penetration mode and the subsequent steps.
7. The method of claim 1, further comprising:
responding to the selection of switching to the sunlight mode, and acquiring a target fog concentration;
and switching the camera device to the fog penetration mode based on the fact that the fog concentration meets the preset switching concentration, and re-executing the step of acquiring the image data shot by the camera device in the fog penetration mode and the subsequent steps.
8. An image pickup device comprising a memory, an image sensor and a processor, wherein the memory and the image sensor are both coupled to the processor, and the processor is configured to execute program instructions stored in the memory to implement the image pickup mode switching method according to any one of claims 1 to 7.
9. The image pickup device according to claim 8, further comprising a lens, an optical filter, and a transmission mechanism for covering the lens with the optical filter or removing the optical filter from the lens under the control of the processor.
10. A computer-readable storage medium, characterized by program instructions executable by a processor for implementing the image capture mode switching method according to any one of claims 1 to 7.
CN202210576156.9A 2022-05-24 2022-05-24 Image pickup mode switching method, image pickup device, and computer-readable storage medium Pending CN115225810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210576156.9A CN115225810A (en) 2022-05-24 2022-05-24 Image pickup mode switching method, image pickup device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210576156.9A CN115225810A (en) 2022-05-24 2022-05-24 Image pickup mode switching method, image pickup device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN115225810A true CN115225810A (en) 2022-10-21

Family

ID=83607504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210576156.9A Pending CN115225810A (en) 2022-05-24 2022-05-24 Image pickup mode switching method, image pickup device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN115225810A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050069207A1 (en) * 2002-05-20 2005-03-31 Zakrzewski Radoslaw Romuald Method for detection and recognition of fog presence within an aircraft compartment using video images
JP2012199793A (en) * 2011-03-22 2012-10-18 Fujifilm Corp Monitoring camera lens apparatus
CN102780841A (en) * 2012-07-24 2012-11-14 苏州工业园区七星电子有限公司 Near-infrared spectrum based fog penetrating system
KR20130116139A (en) * 2012-04-12 2013-10-23 장예규 Camera with function of clairvoyant
CN106447639A (en) * 2016-10-18 2017-02-22 乐视控股(北京)有限公司 Mobile terminal photograph processing method and device
CN206807588U (en) * 2017-04-26 2017-12-26 上海控创信息技术股份有限公司 High-definition camera based on optical lens and the dual Penetrating Fog of Penetrating Fog chip
CN110582721A (en) * 2017-05-01 2019-12-17 金泰克斯公司 Imaging device with switchable day and night modes
CN114025085A (en) * 2021-10-29 2022-02-08 浙江大华技术股份有限公司 Method, device and equipment for switching working modes of camera equipment and storage medium
CN114170327A (en) * 2020-08-20 2022-03-11 比亚迪股份有限公司 Identification method and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050069207A1 (en) * 2002-05-20 2005-03-31 Zakrzewski Radoslaw Romuald Method for detection and recognition of fog presence within an aircraft compartment using video images
JP2012199793A (en) * 2011-03-22 2012-10-18 Fujifilm Corp Monitoring camera lens apparatus
KR20130116139A (en) * 2012-04-12 2013-10-23 장예규 Camera with function of clairvoyant
CN102780841A (en) * 2012-07-24 2012-11-14 苏州工业园区七星电子有限公司 Near-infrared spectrum based fog penetrating system
CN106447639A (en) * 2016-10-18 2017-02-22 乐视控股(北京)有限公司 Mobile terminal photograph processing method and device
CN206807588U (en) * 2017-04-26 2017-12-26 上海控创信息技术股份有限公司 High-definition camera based on optical lens and the dual Penetrating Fog of Penetrating Fog chip
CN110582721A (en) * 2017-05-01 2019-12-17 金泰克斯公司 Imaging device with switchable day and night modes
CN114170327A (en) * 2020-08-20 2022-03-11 比亚迪股份有限公司 Identification method and electronic equipment
CN114025085A (en) * 2021-10-29 2022-02-08 浙江大华技术股份有限公司 Method, device and equipment for switching working modes of camera equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
苗开超;罗希昌;张淑静;王飞;周建平;: "基于色域分析的大雾图像特征提取与等级识别方法", 科学技术与工程, no. 35, 18 December 2019 (2019-12-18) *

Similar Documents

Publication Publication Date Title
US11790504B2 (en) Monitoring method and apparatus
CN104519328B (en) Image processing equipment, image capture device and image processing method
CN100377166C (en) Method and device for iris recognition
US8711256B2 (en) Image processing apparatus, image processing method, and program to create a composite image from color image data and monochrome image data
CN108875619B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN107835372A (en) Imaging method, device, mobile terminal and storage medium based on dual camera
CN107948538B (en) Imaging method, imaging device, mobile terminal and storage medium
CN108805198B (en) Image processing method, image processing device, computer-readable storage medium and electronic equipment
EP2387231A2 (en) Imaging apparatus
WO2021000592A1 (en) Image capturing device and method
US8760561B2 (en) Image capture for spectral profiling of objects in a scene
CN107750345A (en) multi-spectral imager
CN112995616A (en) Image pickup apparatus and image pickup system
CN110049240B (en) Camera control method and device, electronic equipment and computer readable storage medium
CN110533709B (en) Depth image acquisition method, device and system and image acquisition equipment
CN108600740A (en) Optical element detection method, device, electronic equipment and storage medium
CN114399450A (en) Image fusion method, target feature identification method and device and electronic equipment
CN107682611B (en) Focusing method and device, computer readable storage medium and electronic equipment
CN112991245A (en) Double-shot blurring processing method and device, electronic equipment and readable storage medium
KR101608316B1 (en) An Acquisition apparatus and method of Iris image in outdoors and/or indoors
CN110392211A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN112235506B (en) Camera focusing processing method, device, storage medium and electronic device
CN115225810A (en) Image pickup mode switching method, image pickup device, and computer-readable storage medium
CN111783563A (en) Double-spectrum-based face snapshot and monitoring method, system and equipment
CN115187559A (en) Illumination detection method and device for image, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination