Disclosure of Invention
In view of the above, the present invention has been made to provide a method for image generation based on an electronic device and a corresponding electronic device for generating an image that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a method for image generation based on an electronic device, the electronic device including at least a first image capturing device and a second image capturing device located in a same shooting plane;
the method comprises the following steps:
starting the first image acquisition device and the second image acquisition device;
based on a double-shooting distance measuring principle, focusing on the same target object by adopting the first image acquisition equipment and the second image acquisition equipment respectively to obtain a corresponding first image and a corresponding second image;
and synthesizing the first image and the second image into a target image of the target object.
Optionally, based on a principle of bi-camera ranging, focusing on the same target object by using the first image capturing device and the second image capturing device respectively, and obtaining the corresponding first image and second image includes:
calculating a first distance between the first image acquisition device and the target object and a second distance between the second image acquisition device and the target object according to a triangular relation formed among the first image acquisition device, the second image acquisition device and the target object;
and focusing the target object according to the first distance by adopting the first image acquisition equipment to obtain a first image and focusing the target object according to the second distance by adopting the second image acquisition equipment to obtain a second image aiming at the same target object.
Optionally, the electronic device further includes a closed-loop focusing motor, and the step of focusing the target object by the first image capturing device according to the first distance to obtain a first image and the step of focusing the target object by the second image capturing device according to the second distance to obtain a second image for the same target object includes:
focusing the target object according to the first distance by adopting the first image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a first image;
and focusing the target object according to the second distance by adopting the second image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a second image.
Optionally, the first image is a color-focused image; the second image is an image that focuses on contours, details, and brightness.
Optionally, the step of synthesizing the first image and the second image into the target image of the target object includes:
extracting pixel points related to the contour, the details and the brightness of the target object in the second image;
and adding the extracted pixel points into the first image.
Optionally, the first image is a color image; the second image is a black and white image.
Optionally, the first image capture device comprises a color RGBW sensor and the second image capture device comprises a black and white night vision sensor; wherein the color RGBW sensor includes a color filter, and the black and white night vision sensor does not include a color filter.
Optionally, the method further comprises:
and outputting the target image.
Optionally, before the step of starting the first image capturing device and the second image capturing device, the method further includes:
identifying a current shooting scene;
and if the current shooting scene is recognized as a night vision scene, executing the step of starting the first image acquisition device and the second image acquisition device.
Optionally, the step of identifying the current shooting scene includes:
acquiring a light intensity parameter of a current shooting scene;
if the light intensity parameter is smaller than or equal to a preset threshold value, identifying that the current shooting scene is a night vision scene;
and if the light intensity parameter is larger than a preset threshold value, identifying that the current shooting scene is not a night vision scene.
According to another aspect of the present invention, there is provided an electronic device for generating an image, the electronic device including at least a first image capturing device and a second image capturing device located on a same shooting plane;
the electronic device further includes:
the starting module is suitable for starting the first image acquisition device and the second image acquisition device;
the image acquisition module is suitable for focusing on the same target object by respectively adopting the first image acquisition device and the second image acquisition device based on a double-shooting distance measuring principle to obtain a corresponding first image and a corresponding second image;
and the synthesis module is suitable for synthesizing the first image and the second image into a target image of the target object.
Optionally, the image acquisition module is further adapted to:
calculating a first distance between the first image acquisition device and the target object and a second distance between the second image acquisition device and the target object according to a triangular relation formed among the first image acquisition device, the second image acquisition device and the target object;
and focusing the target object according to the first distance by adopting the first image acquisition equipment to obtain a first image and focusing the target object according to the second distance by adopting the second image acquisition equipment to obtain a second image aiming at the same target object.
Optionally, the electronic device further comprises a closed-loop focusing motor, the image acquisition module further adapted to:
focusing the target object according to the first distance by adopting the first image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a first image;
and focusing the target object according to the second distance by adopting the second image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a second image.
Optionally, the first image is a color-focused image; the second image is an image that focuses on contours, details, and brightness.
Optionally, the synthesis module is further adapted to:
extracting pixel points related to the contour, the details and the brightness of the target object in the second image;
and adding the extracted pixel points into the first image.
Optionally, the first image is a color image; the second image is a black and white image.
Optionally, the first image capture device comprises a color RGBW sensor and the second image capture device comprises a black and white night vision sensor; wherein the color RGBW sensor includes a color filter, and the black and white night vision sensor does not include a color filter.
Optionally, the electronic device further comprises:
and the output module is suitable for outputting the target image.
Optionally, the electronic device further comprises:
and the scene identification module is suitable for identifying the current shooting scene, and if the current shooting scene is identified to be a night vision scene, the starting module is called.
Optionally, the scene recognition module is further adapted to:
acquiring a light intensity parameter of a current shooting scene;
if the light intensity parameter is smaller than or equal to a preset threshold value, identifying that the current shooting scene is a night vision scene;
and if the light intensity parameter is larger than a preset threshold value, identifying that the current shooting scene is not a night vision scene.
According to the image generation method based on the electronic equipment and the electronic equipment, the focusing of the first image acquisition equipment and the second image acquisition equipment on the target object can be completed by adopting a double-shooting distance measuring principle, so that the extremely fast focusing is achieved, the focusing speed is greatly increased, and a better imaging effect is achieved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, a flowchart illustrating a first step of a method for generating an image based on an electronic device according to an embodiment of the present invention is shown, which may be applied to an electronic device integrated with an image capturing device such as a camera, including a smart phone, a tablet, a Personal Digital Assistant (PDA), a camera, and the like. Further, the electronic device may further include a display screen, wherein an image capturing device in the electronic device is used for realizing photographing and shooting functions, and the display screen is used for realizing a preview function of a shot picture, that is, a picture currently received by the camera is displayed in real time for a user to preview, so that an effect of the viewfinder is achieved.
The electronic device at least comprises a first image acquisition device and a second image acquisition device, wherein the first image acquisition device and the second image acquisition device are adjacent and positioned on the same shooting plane, and the position relationship of the first image acquisition device and the second image acquisition device needs to satisfy the following requirements: the distances from the two image acquisition devices to the shot target object are basically the same, and the shooting angles of the two cameras relative to the shot object are basically the same, namely the distance or the difference of the shooting angles is negligibly small, and based on the position relationship, the pictures shot by the two cameras for the same shot object are basically consistent.
The embodiment of the invention specifically comprises the following steps:
step 101, starting the first image acquisition device and the second image acquisition device;
in a specific implementation, a process of an operating system running of the electronic device may be monitored, and when it is monitored that a "camera" (or other similar name, i.e., an application program that implements a photographing function) application program in the operating system is called to a foreground to run, the first image capturing device and the second image capturing device of the electronic device may be started.
Step 102, based on a double-shooting distance measuring principle, focusing on the same target object by respectively adopting the first image acquisition device and the second image acquisition device to obtain a corresponding first image and a corresponding second image;
after the first image acquisition device and the second image acquisition device are started, whether a shutter instruction is detected or not can be further judged, when the shutter instruction is detected, the two image acquisition devices are triggered to carry out shooting work simultaneously, for the same target object, the first image acquisition device is adopted to shoot the target object synchronously, a first image of the target object is shot, and the second image acquisition device is adopted to shoot the target object, and a second image of the target object is shot.
In a specific implementation, the issuing manner of the shutter instruction includes, but is not limited to, the following: the shutter instruction is sent by pressing a physical key of the electronic equipment, and accordingly, the sending of the shutter instruction needs to be determined by detecting whether a circuit connected with the physical key is communicated or not; or, a shutter instruction is issued by pressing a virtual key on a touch screen of the electronic device, and accordingly, the issue of the shutter instruction needs to be determined by detecting whether a circuit of a screen area where the virtual key is located is conducted; or, the shutter command is issued by voice, accordingly, the voice data is received by a microphone device of the terminal, and the voice data is analyzed to determine the issue of the shutter command.
In a preferred embodiment of the present invention, the two image capturing devices may be used to quickly focus on the target device based on a triangulation principle (i.e., a binocular distance measuring principle), so as to obtain the first image and the second image. Based on this, step 102 may further comprise the following sub-steps:
a substep S11 of calculating a first distance between the first image capturing device and the target object and a second distance between the second image capturing device and the target object according to a trigonometric relationship formed between the first image capturing device, the second image capturing device and the target object;
and a substep S12, focusing the target object according to the first distance by using the first image capturing device to obtain a first image, and focusing the target object according to the second distance by using the second image capturing device to obtain a second image, for the same target object.
In a specific implementation, the first image acquisition device may natively support two focusing modes, namely phase focusing and contrast focusing. Furthermore, the embodiment of the invention can realize faster focusing according to the principle of triangular distance measurement.
Specifically, the distance of the target object can be accurately calculated by using a triangular relation formed between the two cameras and the focused target object and by calculating an included angle between the target object and the two lenses and assisting the distance between the two lenses according to a triangular distance measuring principle, that is, a first distance from the target object to the first image acquisition device and a second distance from the target object to the second image acquisition device are calculated.
The embodiment of the invention can also be provided with a closed-Loop focusing (Close-Loop Focus) motor which is used as a new technology in the lens of the electronic equipment, so that the focusing precision and speed of the lens of the electronic equipment can be improved to a certain extent, and better photographing experience is brought.
In a preferred embodiment of the present invention, the sub-step S12 further includes the following sub-steps:
substep S121, focusing the target object according to the first distance with the first image capturing device under the assistance of the closed-loop focusing motor, to obtain a first image;
and a substep S122, focusing the target object according to the second distance with the assistance of the closed-loop focusing motor by using the second image acquisition device, so as to obtain a second image.
In a specific implementation, the principle of in-focus imaging is as follows: the closed-loop focusing motor drives the lens to move forward and backward, so that an image clearly appears on the image sensor, the basic focusing is completed, an image is focused on the imaging element through the optical system, the photoelectric signal on each pixel is converted into a digital signal through the A/D converter, and the digital signal is processed into a digital image through a DSP (digital signal processing).
The embodiment of the invention realizes higher focusing speed and even can realize 0-second ultra-fast focusing by utilizing the principle of triangular distance measurement and assisting a closed-loop focusing motor on the premise of not sacrificing pixel points.
Applied to the embodiment of the present invention, the first image may be an image focused on color; while the second image may be an image with attention to contours, details and brightness.
Step 103, synthesizing the first image and the second image into a target image of the target object.
After the first image and the second image are obtained, the first image and the second image can be synthesized into a target image of a target object, and the advantages of the two images are combined to show the target image with better imaging.
In a preferred embodiment of the present invention, step 103 may further comprise the following sub-steps:
substep S21, extracting pixel points in the second image about the contour, the details and the brightness of the target object;
and a substep S22 of adding the extracted pixel point to the first image.
Specifically, since the first image is an image focused on color, detailed information such as contour and brightness may be lacking; while the second image is an image that focuses on contours, detail, and brightness. Therefore, pixel points related to the contour, the details and the brightness of the target object in the second image can be extracted, and the extracted pixel points are synthesized into the first image, so that the defects of the first image are overcome, and a better imaged image is achieved.
Of course, the way of synthesizing the first image and the second image is not limited to the above way, and those skilled in the art may synthesize the first image and the second image in other ways, for example, the same pixels of the first image and the second image are overlapped, or the brightness values of each pixel corresponding to the first image and the second image are respectively compared and subtracted, so as to eliminate the noise in the first image and ensure that the color, brightness, and contrast of the normal pixels of the first image are not affected.
In the embodiment of the invention, the focusing of the first image acquisition equipment and the second image acquisition equipment on the target object is completed by adopting a double-shooting distance measuring principle, so that the extremely-fast focusing is realized, the focusing speed is greatly increased, and a better imaging effect is realized.
Referring to fig. 2, a flowchart illustrating steps of a second embodiment of an image generation method based on an electronic device according to an embodiment of the present invention is shown, where the electronic device may include at least a first image capturing device and a second image capturing device located in the same shooting plane, and the first image capturing device and the second image capturing device are located adjacent to each other.
The first image acquisition device is used for acquiring a first image, and the second image acquisition device is used for acquiring a second image. Further, the first image may be an image focused on color; the second image may be an image that focuses on contours, details, and brightness.
Further, the first image may be a color image; the second image may be a black and white image. Of course, the first image is not limited to the color image, and may be a black-and-white image; the second image is not limited to the black-and-white image, and may be a color image as long as it can function as the first image, which may be an image focusing on color; the second image may be a contribution of an image focusing on contours, details, and brightness. The first image is a color image and the second image is a black-and-white image.
Specifically, in the embodiment of the present invention, the first image capturing device includes a color RGBW sensor, which is responsible for color and can be used for capturing a color image; the second image acquisition device comprises a black-and-white night vision sensor, is responsible for the depth of field of details such as contour, detail and brightness, and can be used for acquiring black-and-white images.
RGBW differs most from RGB in that the filter array immediately before the sensor is not the same. The RGBW technique is to add a W white pixel to the original RGB red (R), green (G), and blue (B) three primary colors, and thus, the RGBW technique is designed as a four-color pixel. W is a white area and is free of a filter, so that the input quantity of light is 3-4 times that of other areas, the light incoming quantity of pixel points under low illumination is obviously improved, and noise is reduced. Experiments prove that the first image acquisition equipment adopts an RGBW sensor, so that the brightness of a high-contrast environment can be improved by 40%, and the noise of a low-light environment can be reduced by 78%. In addition, an independent gray scale sensing area can be provided in the W area of the RGBW sensor, and accurate grabbing of gray scales can be realized during low illumination, namely more accurate low light white balance can be realized.
Black and white night vision sensor, MONO sensor is a full light-transmitting sensor, and all light all directly reaches the sensor and is caught, and it adopts stack formula structure, and the advantage possesses higher purity under the low light environment, and this lets equipment still can be leisurely dealt with in the environment that light is not enough.
In a particular implementation, the color RGBW sensor includes a color filter, while the black and white night vision sensor does not include a color filter.
Specifically, each image capturing device is internally integrated with a photosensitive element, dense and rough pixels are distributed on the photosensitive element, but each pixel can only sense the intensity of light rays but cannot sense colors, so that the purpose of identifying colors can be achieved by adding a color filter lens (namely a color filter lens) on the top of the pixel to enable the light rays of a specified color to irradiate on the pixel, but the color filter lens blocks most of the light rays, so that the sensitivity of the sensor, namely ISO, needs to be improved under the dark light condition, but noise which is difficult to avoid is brought. On the other hand, if the color filter of the image acquisition device is removed, although the color of light cannot be sensed, the image acquisition device becomes a black-and-white image acquisition device, each pixel point can obtain an electric signal, and simultaneously, as the light can be completely received by the sensor, the more the light entering amount is, the clearer the imaging is, the more the details are, and experiments show that the light entering amount of the black-and-white night vision sensor without the color filter is 4 times of that of the common color sensor with the color filter.
Therefore, in the embodiment of the present invention, at least two image capturing devices are adopted, and a color light separation technique is adopted, and one image capturing device (i.e. the first image capturing device) includes a color filter and is responsible for color perception; the other image acquisition device does not comprise a color filter (namely, the second image acquisition device) and is responsible for light acquisition, so that a good imaging effect is obtained in a low-light environment.
The embodiment of the invention specifically comprises the following steps:
step 201, identifying a current shooting scene;
in a specific implementation, a process of an operating system running of the electronic device may be monitored, and when it is monitored that a "camera" (or other similar name, i.e., an application program that implements a photographing function) application program in the operating system is called to a foreground to run, whether a current photographing scene is a night vision scene may be identified.
In a preferred embodiment of the present invention, whether the current shooting scene is a night vision scene may be identified as follows: acquiring a light intensity parameter of a current shooting scene; if the light intensity parameter is smaller than or equal to a preset threshold value, identifying that the current shooting scene is a night vision scene; and if the light intensity parameter is larger than a preset threshold value, identifying that the current shooting scene is not a night vision scene.
Specifically, the light intensity is the brightness of the object after the light is projected on the object, and is referred to as the light intensity. In a specific implementation, the light intensity parameter may be obtained through a photosensitive element in the electronic device, and the obtained light intensity parameter is compared with a preset threshold, if the light intensity parameter is less than or equal to the preset threshold, the current shooting scene may be identified as a night vision scene, otherwise, if the light intensity parameter is greater than the preset threshold, the current shooting scene may be identified as not a night vision scene, that is, the current shooting scene is a daytime scene.
Of course, the embodiment of the present invention is not limited to the above-mentioned manner for identifying the night vision scene, and those skilled in the art may identify whether the current shooting scene is the night vision scene in other manners.
Step 202, when the current shooting scene is recognized as a night vision scene, starting the first image acquisition device and the second image acquisition device;
when the current shooting scene is recognized as a night vision scene, the first image acquisition device and the second image acquisition device can be started at the same time.
Step 203, focusing on the same target object by respectively adopting the first image acquisition device and the second image acquisition device based on a double-shooting distance measuring principle to obtain a corresponding first image and a corresponding second image;
after the first image acquisition device and the second image acquisition device are started, whether a shutter instruction is detected or not can be further judged, when the shutter instruction is detected, the two image acquisition devices are triggered to carry out shooting work simultaneously, aiming at the same target object, the first image acquisition device is adopted to shoot the target object synchronously, a color image of the target object is shot, the second image acquisition device is adopted to shoot the target object, and a black and white image of the target object is shot.
In a preferred embodiment of the present invention, the step 203 may include the following sub-steps:
a substep S31 of calculating a first distance between the first image capturing device and the target object and a second distance between the second image capturing device and the target object according to a trigonometric relationship formed between the first image capturing device, the second image capturing device and the target object;
and a substep S32, focusing the target object according to the first distance by using the first image capturing device to obtain a first image, and focusing the target object according to the second distance by using the second image capturing device to obtain a second image, for the same target object.
Specifically, the distance of the target object can be accurately calculated by using a triangular relation formed between the two cameras and the focused target object and by calculating an included angle between the target object and the two lenses and assisting the distance between the two lenses according to a triangular distance measuring principle, that is, a first distance from the target object to the first image acquisition device and a second distance from the target object to the second image acquisition device are calculated.
In a preferred embodiment of the present invention, the electronic device may further include a closed-loop focusing motor, and the sub-step S32 further includes the following sub-steps:
substep S321, focusing the target object according to the first distance with the first image acquisition device under the assistance of the closed-loop focusing motor, so as to obtain a first image;
and a substep S322, focusing the target object according to the second distance with the second image capturing device under the assistance of the closed-loop focusing motor, so as to obtain a second image.
The embodiment of the invention can also be provided with a closed-Loop focusing (Close-Loop Focus) motor which is used as a new technology in the lens of the electronic equipment, so that the focusing precision and speed of the lens of the electronic equipment can be improved to a certain extent, and better photographing experience is brought.
With the assistance of the closed-loop focusing motor, the first image acquisition device focuses the target object according to the first distance to obtain a color image, and the second image acquisition device focuses the target object according to the second distance to obtain a black-and-white image.
In a specific implementation, after the color image and the black-and-white image are obtained, the color image can be previewed as a preview screen. Specifically, in the embodiment of the present invention, two image capturing devices are simultaneously capturing images to obtain a color image and a black-and-white image, respectively, so that in order to improve the image quality of a preview image of a camera of an electronic device and to more abundantly show details of a captured scene in the preview image, in the embodiment, the preview image displayed on a terminal display screen is the color image captured by the first image capturing device, and the black-and-white image captured by the second image capturing device is not used for display but only used for post-processing.
The preview picture, namely the picture imaged by the camera in real time, can be used for finishing operations such as focus selection and framing for photographing or shooting. In this embodiment, a picture taken by the first image capturing device generates an optical image through a lens thereof, and the optical image is projected onto the sensor, and then the optical image is converted into an electrical signal, the electrical signal is converted into a digital signal through analog-to-digital conversion, the digital signal is processed by the DSP, and then the digital signal is sent to the electronic device processor for processing, and finally the digital signal is output to a display screen of the electronic device, so that a real-time preview picture which can be seen by a user is formed.
Step 204, synthesizing the first image and the second image into a target image of the target object;
in a specific implementation, a synthesis function switch may be newly added in a setting interface of the electronic device, and the synthesis function switch may be set to be turned on by default or to be turned off by default in advance. After the camera application program is started, if the synthesis function of the camera program is detected to be started, the black-and-white image and the color image are synthesized.
In another embodiment, the composition process may also be triggered by a composition instruction. The composition instruction may be given by pressing a designated physical key or virtual key in the electronic device.
In a preferred embodiment of the present invention, step 204 may comprise the following sub-steps:
substep S41, extracting pixel points in the second image about the contour, the details and the brightness of the target object;
and a substep S42 of adding the extracted pixel point to the first image.
And step 205, outputting the target image.
Specifically, the outputting may specifically refer to outputting the target image to a storage medium of the electronic device, and in a subsequent operation process, a user may call the target image through a display screen of the electronic device to view the target image, or copy the target image from the storage medium to display or store the target image in another device.
In the embodiment of the invention, in a night vision scene, two image acquisition devices can be simultaneously adopted to shoot a target object to respectively obtain a color image and a black-and-white image, and then the black-and-white image and the color image are synthesized into the target image, further post-processing on the shot picture is not required by a software method, the operation is convenient, the system overhead is reduced, and the imaging effect of the image is improved.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of an embodiment of an electronic device for generating an image according to an embodiment of the present invention is shown, wherein the electronic device includes at least a first image capturing device and a second image capturing device located in a same shooting plane.
The electronic device may further include:
a starting module 301 adapted to start the first image capturing device and the second image capturing device;
the image acquisition module 302 is adapted to focus on the same target object by respectively using the first image acquisition device and the second image acquisition device based on a double-shooting distance measurement principle to obtain a corresponding first image and a corresponding second image;
a synthesizing module 303 adapted to synthesize the first image and the second image into a target image of the target object.
In a preferred embodiment of the present invention, the image acquisition module 302 is further adapted to:
calculating a first distance between the first image acquisition device and the target object and a second distance between the second image acquisition device and the target object according to a triangular relation formed among the first image acquisition device, the second image acquisition device and the target object;
and focusing the target object according to the first distance by adopting the first image acquisition equipment to obtain a first image and focusing the target object according to the second distance by adopting the second image acquisition equipment to obtain a second image aiming at the same target object.
In a preferred embodiment of the present invention, the electronic device further comprises a closed-loop focusing motor, and the image capturing module 302 is further adapted to:
focusing the target object according to the first distance by adopting the first image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a first image;
and focusing the target object according to the second distance by adopting the second image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a second image.
In a preferred embodiment of the present invention, the first image is an image focused on color; the second image is an image that focuses on contours, details, and brightness.
In a preferred embodiment of the present invention, the synthesis module 303 is further adapted to:
extracting pixel points related to the contour, the details and the brightness of the target object in the second image;
and adding the extracted pixel points into the first image.
In a preferred embodiment of the present invention, the first image is a color image; the second image is a black and white image.
In a preferred embodiment of the embodiments of the present invention, the first image capturing device comprises a color RGBW sensor, and the second image capturing device comprises a black and white night vision sensor; wherein the color RGBW sensor includes a color filter, and the black and white night vision sensor does not include a color filter.
In a preferred embodiment of the present invention, the electronic device further includes:
and the output module is suitable for outputting the target image.
In a preferred embodiment of the present invention, the electronic device further includes:
and the scene identification module is suitable for identifying the current shooting scene, and if the current shooting scene is identified to be a night vision scene, the starting module is called.
In a preferred embodiment of the present invention, the scene recognition module is further adapted to:
acquiring a light intensity parameter of a current shooting scene;
if the light intensity parameter is smaller than or equal to a preset threshold value, identifying that the current shooting scene is a night vision scene;
and if the light intensity parameter is larger than a preset threshold value, identifying that the current shooting scene is not a night vision scene.
For the embodiment of the electronic device, since it is basically similar to the embodiment of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiment of the method.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in an electronic device based image generation device according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses A1, a method for generating an image based on electronic equipment, wherein the electronic equipment at least comprises a first image acquisition device and a second image acquisition device which are positioned on the same shooting plane;
the method comprises the following steps:
starting the first image acquisition device and the second image acquisition device;
based on a double-shooting distance measuring principle, focusing on the same target object by adopting the first image acquisition equipment and the second image acquisition equipment respectively to obtain a corresponding first image and a corresponding second image;
and synthesizing the first image and the second image into a target image of the target object.
The method of a2, as described in a1, wherein the step of obtaining the corresponding first image and second image by respectively focusing on the same target object by using the first image capturing device and the second image capturing device based on the principle of bi-camera ranging includes:
calculating a first distance between the first image acquisition device and the target object and a second distance between the second image acquisition device and the target object according to a triangular relation formed among the first image acquisition device, the second image acquisition device and the target object;
and focusing the target object according to the first distance by adopting the first image acquisition equipment to obtain a first image and focusing the target object according to the second distance by adopting the second image acquisition equipment to obtain a second image aiming at the same target object.
A3, the method as recited in a2, the electronic device further comprising a closed-loop focusing motor, the steps of focusing the target object at the first distance with the first image capturing device to obtain a first image and focusing the target object at the second distance with the second image capturing device to obtain a second image for the same target object comprising:
focusing the target object according to the first distance by adopting the first image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a first image;
and focusing the target object according to the second distance by adopting the second image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a second image.
A4, the method as in A1 or A2 or A3, the first image being an image of color interest; the second image is an image that focuses on contours, details, and brightness.
A5, the method of A4, wherein the step of composing the first image and the second image into a target image of the target object comprises:
extracting pixel points related to the contour, the details and the brightness of the target object in the second image;
and adding the extracted pixel points into the first image.
A6, the method of a4 or a5, the first image being a color image; the second image is a black and white image.
A7, the method of A6, the first image capture device comprising a color RGBW sensor, the second image capture device comprising a black and white night vision sensor; wherein the color RGBW sensor includes a color filter, and the black and white night vision sensor does not include a color filter.
A8, the method of a1, further comprising:
and outputting the target image.
A9, the method of A1, further comprising, prior to the step of activating the first image capture device and the second image capture device:
identifying a current shooting scene;
and if the current shooting scene is recognized as a night vision scene, executing the step of starting the first image acquisition device and the second image acquisition device.
A10, the method of a9, the step of identifying the current shooting scene comprising:
acquiring a light intensity parameter of a current shooting scene;
if the light intensity parameter is smaller than or equal to a preset threshold value, identifying that the current shooting scene is a night vision scene;
and if the light intensity parameter is larger than a preset threshold value, identifying that the current shooting scene is not a night vision scene.
The invention also discloses B11 and electronic equipment for generating the image, wherein the electronic equipment at least comprises a first image acquisition device and a second image acquisition device which are positioned on the same shooting plane;
the electronic device further includes:
the starting module is suitable for starting the first image acquisition device and the second image acquisition device;
the image acquisition module is suitable for focusing on the same target object by respectively adopting the first image acquisition device and the second image acquisition device based on a double-shooting distance measuring principle to obtain a corresponding first image and a corresponding second image;
and the synthesis module is suitable for synthesizing the first image and the second image into a target image of the target object.
B12, the electronic device of B11, the image acquisition module further adapted to:
calculating a first distance between the first image acquisition device and the target object and a second distance between the second image acquisition device and the target object according to a triangular relation formed among the first image acquisition device, the second image acquisition device and the target object;
and focusing the target object according to the first distance by adopting the first image acquisition equipment to obtain a first image and focusing the target object according to the second distance by adopting the second image acquisition equipment to obtain a second image aiming at the same target object.
B13, the electronic device of B12, the electronic device further comprising a closed-loop focus motor, the image acquisition module further adapted to:
focusing the target object according to the first distance by adopting the first image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a first image;
and focusing the target object according to the second distance by adopting the second image acquisition equipment under the assistance of the closed-loop focusing motor to obtain a second image.
B14, the electronic device as described in B11 or B12 or B13, the first image being an image of color interest; the second image is an image that focuses on contours, details, and brightness.
B15, the electronic device of B14, the synthesis module further adapted to:
extracting pixel points related to the contour, the details and the brightness of the target object in the second image;
and adding the extracted pixel points into the first image.
B16, the electronic device as described in B14 or B15, the first image being a color image; the second image is a black and white image.
B17, the electronic device of B16, the first image capture device comprising a color RGBW sensor, the second image capture device comprising a black and white night vision sensor; wherein the color RGBW sensor includes a color filter, and the black and white night vision sensor does not include a color filter.
B18, the electronic device of B11, further comprising:
and the output module is suitable for outputting the target image.
B19, the electronic device of B11, further comprising:
and the scene identification module is suitable for identifying the current shooting scene, and if the current shooting scene is identified to be a night vision scene, the starting module is called.
B20, the electronic device of B19, the scene recognition module further adapted to:
acquiring a light intensity parameter of a current shooting scene;
if the light intensity parameter is smaller than or equal to a preset threshold value, identifying that the current shooting scene is a night vision scene;
and if the light intensity parameter is larger than a preset threshold value, identifying that the current shooting scene is not a night vision scene.