CN110677621A - Camera calling method and device, storage medium and electronic equipment - Google Patents

Camera calling method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN110677621A
CN110677621A CN201910878360.4A CN201910878360A CN110677621A CN 110677621 A CN110677621 A CN 110677621A CN 201910878360 A CN201910878360 A CN 201910878360A CN 110677621 A CN110677621 A CN 110677621A
Authority
CN
China
Prior art keywords
camera
determining
color
cameras
distance
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.)
Granted
Application number
CN201910878360.4A
Other languages
Chinese (zh)
Other versions
CN110677621B (en
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.)
Realme Chongqing Mobile Communications Co Ltd
Original Assignee
Realme Chongqing Mobile Communications 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 Realme Chongqing Mobile Communications Co Ltd filed Critical Realme Chongqing Mobile Communications Co Ltd
Priority to CN201910878360.4A priority Critical patent/CN110677621B/en
Publication of CN110677621A publication Critical patent/CN110677621A/en
Application granted granted Critical
Publication of CN110677621B publication Critical patent/CN110677621B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces

Abstract

The embodiment of the application discloses a camera calling method, a camera calling device, a storage medium and electronic equipment, wherein the camera calling method is applied to the electronic equipment, and the electronic equipment comprises a plurality of cameras. According to the embodiment of the application, when the preview mode is started, a common color camera and a color wide-angle camera in a plurality of cameras are started; determining a shooting subject in a scene to be shot in a preview mode; determining the distance between a shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera; and determining a target camera for acquiring the preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera. The embodiment of the application can be used for ranging the shooting main body by using the common color camera and the color wide-angle camera in the preview mode, and the camera needs to be called according to the measured distance, so that the camera is automatically called to collect images, and the shooting convenience is improved.

Description

Camera calling method and device, storage medium and electronic equipment
Technical Field
The application relates to the technical field of electronics, in particular to a camera calling method, a camera calling device, a storage medium and electronic equipment.
Background
At present, users generally take images by using electronic devices with cameras, and things around, scenes and the like can be recorded by the electronic devices anytime and anywhere. With more and more cameras in the electronic equipment, different cameras have different functions and are suitable for different scenes. However, in the related art, a user is required to manually select different cameras to adapt to different scenes to be shot.
Disclosure of Invention
The embodiment of the application provides a camera calling method and device, a storage medium and electronic equipment, which can automatically determine a called camera and increase the convenience of shooting.
In a first aspect, an embodiment of the present application provides a camera calling method, which is applied to an electronic device, where the electronic device includes a plurality of cameras, and the camera calling method includes:
when a preview mode is started, starting a common color camera and a color wide-angle camera in the plurality of cameras;
determining a shooting subject in a scene to be shot in the preview mode;
determining the distance between the shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera;
and determining a target camera for acquiring a preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera.
In a second aspect, an embodiment of the present application provides a camera calling device, which is applied to an electronic device, where the electronic device includes a plurality of cameras, and the camera calling device includes:
the starting module is used for starting a common color camera and a color wide-angle camera in the plurality of cameras when a preview mode is started;
the second determining module is used for determining a shooting subject in a scene to be shot in the preview mode;
the second determining module is used for determining the distance between the shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera;
and the acquisition module is used for determining a target camera for acquiring a preview image according to the distance and acquiring the preview image of the scene to be shot according to the determined target camera.
In a third aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the camera calling method provided in the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and multiple cameras, where the memory stores a computer program, and the processor executes the camera calling method provided in the embodiment of the present application by calling the computer program.
In a fifth aspect, an embodiment of the present application provides an electronic device, including:
the cameras are used for acquiring preview images;
a display screen for displaying a preview image;
the treater, respectively with a plurality of cameras reach display screen electric connection, the treater is used for:
when a preview mode is started, starting a common color camera and a color wide-angle camera in the plurality of cameras;
determining a shooting subject in a scene to be shot in the preview mode;
determining the distance between the shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera;
and determining a target camera for acquiring a preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera.
In the embodiment of the application, the common color camera and the color wide-angle camera are used for ranging the shooting main body in the preview mode, and the cameras need to be called according to the measured distance, so that the cameras are automatically called to collect images, and the shooting convenience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a camera calling method provided in an embodiment of the present application.
Fig. 2 is a schematic view of a binocular stereo vision system provided in an embodiment of the present application.
Fig. 3 is a schematic view of a head-up binocular stereoscopic imaging principle provided by an embodiment of the present application.
Fig. 4 is another schematic flow chart of a camera call method provided in the embodiment of the present application.
Fig. 5 is a first structural schematic diagram of a camera call device provided in an embodiment of the present application.
Fig. 6 is a second schematic structural diagram of a camera call device according to an embodiment of the present application.
Fig. 7 is a third structural schematic diagram of a camera call device provided in the embodiment of the present application.
Fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Fig. 9 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
The embodiment of the application firstly provides a camera calling method, and the camera calling method is applied to electronic equipment. The execution main body of the camera calling method can be the camera calling device provided by the embodiment of the application, or electronic equipment integrated with the camera calling device, the camera calling device can be realized in a hardware or software mode, and the electronic equipment can be equipment with processing capability and configured with a processor, such as a smart phone, a tablet computer, a palm computer, a notebook computer or a desktop computer.
For example, the electronic device is exemplified by a smartphone. Wherein the electronic device may include a plurality of cameras. The electronic device may include three cameras, four cameras, five cameras, or more cameras. Such as an electronic device that includes four cameras, respectively: the camera comprises a first camera, a second camera, a third camera and a fourth camera.
It should be noted that the electronic device may include a front camera and/or a rear camera, where the front camera may include a plurality of cameras, and the rear camera may also include a plurality of cameras. The multiple cameras defined by the embodiment of the application can be front-facing cameras or rear-facing cameras.
The first camera can be used as a main camera of the electronic equipment, is a lens with a focal length of 40-55 millimeters, and is mainly used for taking pictures. The picture observed from the first camera is very close to the picture seen by human eyes, and the image shot by the first camera is relatively 'real'. In some embodiments, the first camera may be embodied as a normal color camera.
The second camera, the third camera and the fourth camera can be used as auxiliary cameras. The number of the auxiliary cameras is not limited to this, and the number of the auxiliary cameras is two, four, or the like.
The focal length of the second camera is longer than that of the first camera. The second camera can shoot objects far away compared with the first camera, and can effectively blur the main body with the protruded background. In some embodiments, the second camera may be a color tele camera. The third camera is faster than the first camera in focusing speed. The third camera may be a wide-angle camera, which may increase the shooting angle and content of the first camera. The focal length of the fourth camera is shorter than that of the first camera, and can be a common fourth camera, for example, the focal length is 38-24 mm, and the visual angle is 60-84 degrees. The fourth camera can shoot a picture with a short distance and a large scene, and the shot picture is much larger than that seen by human eyes; the picture of the fourth camera emphasizes the foreground and highlights the far-near contrast, that is, near objects in the picture are larger, far objects are smaller, and a strong perspective effect is achieved. In some embodiments, the fourth camera may be a color macro camera.
Optionally, the electronic device may also include a fifth camera, and the fifth camera is a common black-and-white camera.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a camera call method according to an embodiment of the present disclosure. The camera calling method is applied to the electronic equipment provided by the embodiment of the application, the electronic equipment comprises a plurality of cameras, and the flow of the camera calling method provided by the embodiment of the application can be as follows:
101, when the preview mode is turned on, a normal color camera and a color wide-angle camera among the plurality of cameras are activated.
In an embodiment, when a user opens a camera application, the user can enter a preview mode in the camera application. When the preview mode is started, a common color camera and a color wide-angle camera in the multiple cameras are started to serve as a default camera combination in the preview mode, and the current picture is previewed through the default camera combination.
And 102, determining a shooting subject in a scene to be shot in a preview mode.
The shooting subject can be an object to be focused in a scene to be shot, that is, an object that a user wants to shoot in a focused manner. Determining a shooting subject in a scene to be shot in a preview mode may include:
(1) and when the focusing instruction is received in the preview mode, determining a shooting subject in the scene to be shot according to the focusing instruction.
Generally, the in-focus position is a subject. In an embodiment, a shooting subject in a scene to be shot can be determined by a mode actively selected by a user, and before the user operates an electronic device to start a shooting application (such as a system application "camera" of the electronic device) to capture an image, a focusing instruction is input on a preview interface of the shooting application by clicking or frame selection in a preview mode. The electronic equipment receives a focusing instruction input by a user, and determines an object pointed by the focusing instruction as a shooting subject. For example, when the scene to be photographed is a scene in which a cow grazes under the mountain feet, the user wants to mainly photograph the cow, and then the cow can be taken as the subject of photographing by clicking the position of the cow in the preview interface.
(2) And acquiring a current preview picture, and determining a shooting subject in a scene to be shot according to the geometric center of the preview picture.
When the focusing is performed manually, the shooting subject is located at the position of a touch screen; and if the user does not carry out manual focusing, the electronic equipment carries out automatic focusing on the current scene to be shot in a preview mode, and the focusing position is the geometric center of the current preview picture.
In an embodiment, if the focusing instruction is not received in the preview mode, a current preview picture is obtained, the geometric center of the preview picture is focused, and an object corresponding to the geometric center is determined as a shooting subject in a current scene to be shot.
The preview interface may be in various shapes, and preferably, the preview interface may be in a regular geometric figure, such as a rectangle, a triangle, a circle, and the like. When the preview interface is a regular geometric figure, the center of gravity of the regular geometric figure is the geometric center of the preview interface. For a rectangular preview interface, the geometric center of the preview interface is at the intersection point of two diagonal lines of the rectangle; for a triangular preview interface, the geometric center of the preview interface is at the intersection point of three central lines of the triangle; for a circular preview interface, the geometric center of the preview interface is at the center of the circle.
Alternatively, the photographic subject may be a person or an object, may be a stationary photographic subject, or may be a moving photographic subject. For a moving shooting subject, when the shooting subject is determined, two adjacent images to be processed can be obtained through a common color camera, the gray level difference value of the same object in the two adjacent images to be processed is calculated, and if the gray level difference value is larger than a preset threshold value, the object is determined as the shooting subject.
And 103, determining the distance between the shooting subject and the electronic equipment according to the common color camera and the color wide-angle camera.
In one embodiment, the distance between the subject and the electronic device is determined by a three-dimensional measurement method based on a binocular stereo vision system, also called binocular range finding, using a normal color camera and a color wide-angle camera. In the present application, the binocular stereoscopic vision system may be composed of two cameras, a normal color camera and a color wide-angle camera. Just like the left eye and the right eye of human eyes have imaging difference when watching the same object, the positions of the shooting subjects in the images shot by the two cameras by the same shooting subject are different, so that the distance between the shooting subject and the electronic equipment can be determined according to the position difference of image points in the images shot by the shooting subject in the common color camera and the color wide-angle camera respectively.
In one embodiment, determining the distance between the photographic subject and the electronic device according to the common color camera and the color wide-angle camera comprises:
determining a first optical center of a common color camera and a second optical center of a color wide-angle camera;
connecting the first image point and the first optical center to obtain a first projection line, and connecting the second image point and the second optical center to obtain a second projection line;
acquiring an intersection point of the first projection line and the second projection line, and determining the intersection point as the position of the shooting subject;
and acquiring the distance from the intersection point to the electronic equipment, and determining the distance as the distance between the shooting subject and the electronic equipment.
Referring to fig. 2, fig. 2 is a schematic view of a binocular stereo vision system according to an embodiment of the present application. The camera comprises a left camera and a right camera, a common color camera is used as a right camera, and a color wide-angle camera is used as a left camera. In the figure, subscripts l and r are respectively marked on corresponding parameters of the left camera and the right camera. Imaging planes C of photographic subject A (X, Y, Z) in world space on left and right cameraslAnd CrThe image points on are respectively al(ul,vl) And ar(ur,vr). Image point alAnd image point arIs an image of the same object a in world space, called the "conjugate point". From the two conjugate points, the optical centers O of the two conjugate points and the respective cameras are respectively madelAnd OrOf connection lines, i.e. projection lines alOlAnd arOrProjection line alOlAnd arOrThe intersection point of (a) is the photographic subject a (X, Y, Z) in the world space.
In one embodiment, determining the distance between the photographic subject and the electronic device according to the common color camera and the color wide-angle camera comprises:
shooting a scene to be shot according to a common camera to obtain a first reference image, and shooting the scene to be shot according to a color wide-angle camera to obtain a second reference image;
determining a first image point of a shooting subject on a first reference image, and determining a second image point of the shooting subject on a second reference image;
calculating to obtain the parallax of the shooting subject on the first reference image and the second reference image according to the first image point and the second image point;
and determining the distance between the shooting subject and the electronic equipment in the scene to be shot according to the parallax.
Referring to fig. 3, fig. 3 is a schematic view illustrating a principle of head-up binocular stereoscopic imaging according to an embodiment of the present disclosure. Wherein the two cameras photograph the same subject a (X, Y, Z) in a head-up manner. Left image plane ClIs an imaging surface of a color wide-angle camera at an imaging surface ClForming a first reference image of a scene to be shot; right image plane CrIs an imaging surface of a common color camera and is arranged on an imaging surface CrA second reference image of the scene to be photographed is formed. a isl(ul,vl) For capturing a first image point, a, of a subject A (X, Y, Z) on a first reference imager(ur,vr) To capture a second image point of subject a (X, Y, Z) on a second reference image. The base line distance b is the distance of the connecting line of the projection centers of the two cameras. Composition of colour wide-angle camera and ordinary colour cameraThe image plane is in front of the optical center f of the common color camera.
When calculating the parallax of the shooting subject on the first reference image and the second reference image, a virtual image plane coordinate system O is usedlThe u-axis and the v-axis of uv are kept consistent with the directions of the x-axis and the y-axis of the camera coordinate system, so that the calculation process is simplified. O islAnd OrThe system comprises a camera, a camera lens and a camera lens, wherein the camera lens is used for taking the camera lens as a camera lens, the camera lens is used for taking the camera lens.
When the first reference image and the second reference image are on the same plane, the Y coordinates of the photographic subject a (X, Y, Z) in the first reference image and the second reference image are the same, i.e., vl=vr. From the trigonometric relationship:
Figure BSA0000190543980000071
wherein (X, Y, Z) is the coordinate of the main body A in the coordinate system of the left camera, b is the base line distance, f is the focal length of the two cameras, and (u)l,vl) And (u)r,vr) Coordinates of the photographic subject a in the first reference image and the second reference image, respectively.
According to the first image point and the second image point, calculating to obtain the parallax of the shooting subject on the first reference image and the second reference image:
Figure BSA0000190543980000072
thus, the coordinates of the photographic subject a in the left camera coordinate system are calculated as:
Figure BSA0000190543980000073
because the distance between the shooting subject and the electronic equipment is reflected as the coordinate of the Z axis in the coordinate system of the left camera, the distance Z between the shooting subject and the electronic equipment in the scene to be shot can be determined according to the parallax.
In one embodiment, a mark point is determined on the photographic subject, and the coordinates of the mark point in each coordinate system are used as the coordinates of the photographic subject in each coordinate system to represent the photographic subject. The mark point may be a center of gravity of the photographic subject or a highest point of the photographic subject or a lowest point of the highest point of the photographic subject, or the like. Since the photographic subject generally has a certain volume, the photographic subject in the first reference image and the second reference image acquired by the common color camera and the color wide-angle camera also has a certain volume. By determining the mark points on the shooting subject and representing the shooting subject by the mark points, the coordinates of the shooting subject in the first reference image and the second reference image can be more accurately determined, so that the determined shooting subject and the electronic equipment are more accurate.
Here, the directions are set to the left and right for convenience of description, and a color wide-angle camera may be used as the left camera and a normal color camera may be used as the right camera. In addition, the positions of the common color camera and the color wide-angle camera can be left-right, up-down, or obliquely above and obliquely below, and the like, and the positions of the common color camera and the color wide-angle camera are not limited herein.
And 104, determining a target camera for acquiring the preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera.
The method comprises the steps that a plurality of cameras are arranged in the electronic equipment, and after the distance between a shooting main body in a scene to be shot and the electronic equipment is determined, a target camera needing to be called is determined according to a distance interval where the distance is located. The system comprises at least three distance intervals, and is respectively suitable for a macro shooting scene, a normal distance shooting scene and a long-distance shooting scene according to the distance from near to far.
Determining a target camera for acquiring a preview image according to the distance may include:
(1) and when the distance is smaller than or equal to the first preset distance, determining the color macro camera in the multiple cameras as a target camera.
The first preset distance may be an applicable distance threshold of the color macro camera. When the shooting main body is close to the electronic equipment and the effect of the color macro camera is superior to that of the common color camera, the color wide-angle camera and the common color camera are automatically closed, and the color macro camera is opened to adapt to the current macro shooting scene.
(2) And when the distance is greater than the first preset distance and less than the second preset distance, determining the common color camera and the color wide-angle camera in the plurality of cameras as the target camera.
The second preset distance may be an applicable distance threshold of the color wide-angle camera. When the distance is greater than the first preset distance and less than the second preset distance, the shooting scene does not belong to a macro shooting scene, a long-distance shooting scene or a normal-distance shooting scene.
When the preview mode is started, the cameras are started by default to be a common color camera and a color wide-angle camera in the multiple cameras, so that when the distance between the shooting main body and the electronic equipment is judged to be larger than a first preset distance and smaller than a second preset distance, the two cameras are still determined as target cameras.
Or if a plurality of common color cameras and/or a plurality of color wide-angle cameras are arranged in the electronic equipment, when a preview mode is started, one common color camera and one color wide-angle camera in the plurality of cameras are started, a shooting subject in a scene to be shot is determined in the preview mode, the distance between the shooting subject and the electronic equipment is determined according to the common color camera and the color wide-angle camera, and when the distance is greater than a first preset distance and smaller than a second preset distance, all the common color cameras and all the color wide-angle cameras in the plurality of cameras are determined as target cameras.
(3) And when the distance is greater than or equal to a second preset distance, determining the color long-focus camera in the multiple cameras as a target camera.
The second preset distance may be an applicable distance threshold of the color telephoto camera. When the shooting main body is far away from the electronic equipment and the common color camera is not enough to shoot a far clear picture, the color wide-angle camera and the common color camera are automatically closed, and the color long-focus camera is opened to adapt to the current long-distance shooting scene.
It should be noted that there may be one or multiple cameras of the same type in the determined target cameras, where the number of the cameras of the same type in the determined target cameras is not limited, and when multiple cameras are called, the multiple cameras respectively collect preview images of a scene to be photographed, and perform image synthesis processing on the collected multiple preview images. For example, when a plurality of cameras of the same type are called, the camera parameters of the plurality of cameras of the same type are changed to acquire preview images of the same scene to be shot, and the preview images acquired by the plurality of cameras of the same type and different camera parameters are synthesized to obtain a synthesized image.
In one embodiment, acquiring a preview image of a scene to be photographed according to a determined target camera includes:
when the target camera comprises a plurality of cameras of the same type, setting exposure parameters of different gradients for the plurality of cameras of the same type;
acquiring a plurality of preview images of a scene to be shot based on exposure parameters of different gradients;
and performing image synthesis processing on the plurality of preview images to obtain a synthesized image.
The multiple cameras of the same type refer to the multiple cameras belonging to the same color macro camera or the same color tele camera, and the like. The exposure parameters include exposure time. For example, when the determined target camera includes a plurality of tele cameras, setting exposure times with different gradients for the tele cameras, and acquiring a preview image of a scene to be shot by each tele camera according to the exposure time of the tele camera to obtain a plurality of preview images. When image synthesis processing is performed on a plurality of preview images, dark portion details of a preview image having a long exposure time and bright portion details of a preview image having a short exposure time are synthesized. The bright details refer to the brightest part in the preview image, and the dark details refer to the darkest part in the preview image. Therefore, the bright part details and the dark part details of the synthesized image are clearer.
As can be seen from the above, in the embodiment of the present application, the electronic device includes a plurality of cameras. The electronic equipment starts a common color camera and a color wide-angle camera in the plurality of cameras when a preview mode is started; determining a shooting subject in a scene to be shot in a preview mode; determining the distance between a shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera; and determining a target camera for acquiring the preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera. The embodiment of the application can be used for ranging the shooting main body by using the common color camera and the color wide-angle camera in the preview mode, and the camera needs to be called according to the measured distance, so that the camera is automatically called to collect images, and the shooting convenience is improved.
Optionally, before determining the distance between the shooting subject and the electronic device according to the common color camera and the color wide-angle camera, obtaining the ambient brightness of the scene to be shot; when the ambient brightness is larger than the brightness threshold, determining the distance between the shooting subject and the electronic equipment according to the common color camera and the color wide-angle camera; and when the ambient brightness is less than or equal to the brightness threshold, determining a common color camera and a common black-and-white camera in the plurality of cameras as the target camera.
Before determining the target camera, besides the distance between the shooting subject and the electronic equipment as a reference condition, the ambient brightness can be used as the reference condition, and the priority of the ambient brightness is better than that of the distance. That is, if the current ambient brightness is dark and the distance between the main shooting body and the electronic device is also close, the camera calling scheme when the ambient brightness is dark is preferentially considered, and a common color camera and a common black-and-white camera are used as target cameras. And only when the current environment brightness is larger than the brightness threshold value and the environment is not dark, considering the reference condition of the distance, and determining the distance between the shooting subject and the electronic equipment according to the common camera and the color wide-angle camera. When the distance is smaller than or equal to a first preset distance, determining a color macro camera in the multiple cameras as a target camera; when the distance is greater than a first preset distance and less than a second preset distance, determining a common color camera and a color wide-angle camera in the plurality of cameras as a target camera; and when the distance is greater than or equal to a second preset distance, determining the color long-focus camera in the multiple cameras as a target camera.
In one embodiment, the sensitivity during shooting automatically changes with the ambient brightness and is inversely proportional to the ambient brightness. When the ambient brightness is brighter, the digital photosensitive element in the electronic equipment senses stronger light, and the sensitivity is correspondingly lower; when the ambient brightness is darker, the light sensed by the digital photosensitive element in the electronic equipment is weaker, and the sensitivity is correspondingly higher. Thus, when the sensitivity varies with the ambient brightness, the sensitivity at the time of shooting can also be acquired. Determining a common color camera and a common black-and-white camera of the plurality of cameras as a target camera when the sensitivity is greater than or equal to the sensitivity threshold; and when the sensitivity is smaller than the sensitivity threshold, determining the distance between the shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera, and determining a target camera for acquiring a preview image according to the distance.
Referring to fig. 4, fig. 4 is another schematic flow chart of a camera invoking method provided in the embodiment of the present application, where the camera invoking method is applied to an electronic device provided in the embodiment of the present application, and if the electronic device includes a normal color camera, a color wide-angle camera, a color macro camera, a color telephoto camera, and a normal black-and-white camera, the flow of the camera invoking method may include:
201. when the preview mode is turned on, a normal color camera and a color wide-angle camera among the plurality of cameras are started.
In the electronic device, a plurality of cameras may be included, for example: common color cameras, color wide-angle cameras, color macro cameras, color tele cameras, common black and white cameras, and the like.
In an embodiment, the preview mode may be entered in the camera class application when the user opens the camera class application. When the preview mode is started, a common color camera and a color wide-angle camera in the multiple cameras are started to serve as a default camera combination in the preview mode, and the current picture is previewed through the default camera combination.
202. A photographic subject in a scene to be photographed is determined in a preview mode.
The shooting subject can be an object to be focused in a scene to be shot, that is, an object that a user wants to shoot in a focused manner. Determining a shooting subject in a scene to be shot in a preview mode may include:
(1) and when the focusing instruction is received in the preview mode, determining a shooting subject in the scene to be shot according to the focusing instruction.
Generally, the in-focus position is a subject. In an embodiment, a shooting subject in a scene to be shot can be determined by a mode actively selected by a user, and before the user operates an electronic device to start a shooting application (such as a system application "camera" of the electronic device) to capture an image, a focusing instruction is input on a preview interface of the shooting application by clicking or frame selection in a preview mode. The electronic equipment receives a focusing instruction input by a user, and determines an object pointed by the focusing instruction as a shooting subject. For example, when the scene to be photographed is a scene in which a cow grazes under the mountain feet, the user wants to mainly photograph the cow, and then the cow can be taken as the subject of photographing by clicking the position of the cow in the preview interface.
(2) And acquiring a current preview picture, and determining a shooting subject in a scene to be shot according to the geometric center of the preview picture.
When the focusing is performed manually, the shooting subject is located at the position of a touch screen; and if the user does not carry out manual focusing, the electronic equipment carries out automatic focusing on the current scene to be shot in a preview mode, and the focusing position is the geometric center of the current preview picture.
In an embodiment, if the focusing instruction is not received in the preview mode, a current preview picture is obtained, the geometric center of the preview picture is focused, and an object corresponding to the geometric center is determined as a shooting subject in a current scene to be shot.
The preview interface may be in various shapes, and preferably, the preview interface may be in a regular geometric figure, such as a rectangle, a triangle, a circle, and the like. When the preview interface is a regular geometric figure, the center of gravity of the regular geometric figure is the geometric center of the preview interface. For a rectangular preview interface, the geometric center of the preview interface is at the intersection point of two diagonal lines of the rectangle; for a triangular preview interface, the geometric center of the preview interface is at the intersection point of three central lines of the triangle; for a circular preview interface, the geometric center of the preview interface is at the center of the circle.
Alternatively, the photographic subject may be a person or an object, may be a stationary photographic subject, or may be a moving photographic subject. For a moving shooting subject, when the shooting subject is determined, two adjacent images to be processed can be obtained through a common color camera, the gray level difference value of the same object in the two adjacent images to be processed is calculated, and if the gray level difference value is larger than a preset threshold value, the object is determined as the shooting subject.
203. And acquiring the ambient brightness of the scene to be shot.
204. And judging whether the ambient brightness is greater than the brightness threshold, if not, turning to step 205, and if so, turning to step 206.
205. And determining a common color camera and a common black-and-white camera in the plurality of cameras as the target camera.
The ambient brightness and the distance between the shooting subject and the electronic equipment are used as two reference conditions for determining the target camera. And, the priority of the ambient brightness is higher than the distance between the photographing subject and the electronic device. That is, if the current ambient brightness is dark and the distance between the main shooting body and the electronic device is also close, the camera calling scheme when the ambient brightness is dark is preferentially considered, and a common color camera and a common black-and-white camera are used as target cameras. Before determining a target camera, obtaining the ambient brightness of a scene to be shot, and determining a common color camera and a common black-and-white camera in a plurality of cameras as the target camera when the ambient brightness is less than or equal to a brightness threshold; and only when the current environment brightness is larger than the brightness threshold value and the environment is not dark, the reference condition of the distance is considered, and the target camera is determined according to the distance.
206. Shooting a scene to be shot according to a common camera to obtain a first reference image, and shooting the scene to be shot according to a wide-angle camera to obtain a second reference image.
207. And determining a first image point of the shooting subject on the first reference image, and determining a second image point of the shooting subject on the second reference image.
Referring to fig. 3, fig. 3 is a schematic view illustrating a principle of head-up binocular stereoscopic imaging according to the present application. Wherein the two cameras photograph the same subject a (X, Y, Z) in a head-up manner. Left image plane ClIs an imaging surface of a color wide-angle camera at an imaging surface ClForming a first reference image of a scene to be shot; right image plane CrIs an imaging surface of a common color camera and is arranged on an imaging surface CrA second reference image of the scene to be photographed is formed. a isl(ul,vl) For capturing a first image point, a, of a subject A (X, Y, Z) on a first reference imager(ur,vr) To capture a second image point of subject a (X, Y, Z) on a second reference image. The base line distance b is the distance of the connecting line of the projection centers of the two cameras. The imaging surfaces of the color wide-angle camera and the ordinary color camera are in front of the optical center f of the ordinary color camera.
208. And calculating the parallax of the shooting subject on the first reference image and the second reference image according to the first image point and the second image point.
When the parallax of the shooting subject on the first reference image and the second reference image is calculated, the virtual image is generatedImage plane coordinate system OlThe u-axis and the v-axis of uv are kept consistent with the directions of the x-axis and the y-axis of the camera coordinate system, so that the calculation process is simplified. O islAnd OrThe system comprises a camera, a camera lens and a camera lens, wherein the camera lens is used for taking the camera lens as a camera lens, the camera lens is used for taking the camera lens.
When the first reference image and the second reference image are on the same plane, the Y coordinates of the photographic subject a (X, Y, Z) in the first reference image and the second reference image are the same, i.e., vl=vr. From the trigonometric relationship:
Figure BSA0000190543980000141
wherein (X, Y, Z) is the coordinate of the main body A in the coordinate system of the left camera, b is the base line distance, f is the focal length of the two cameras, and (u)l,vl) And (u)r,vr) Coordinates of the photographic subject a in the first reference image and the second reference image, respectively.
According to the first image point and the second image point, calculating to obtain the parallax of the shooting subject on the first reference image and the second reference image:
Figure BSA0000190543980000142
209. and determining the distance between the shooting subject and the electronic equipment in the scene to be shot according to the parallax. And determining whether to shift to steps 210, 211 or 213 according to the distance interval to which the distance belongs.
And determining the coordinates of the shooting subject A in the left camera coordinate system according to the parallax as follows:
Figure BSA0000190543980000143
because the distance between the shooting subject and the electronic equipment is reflected as the coordinate of the Z axis in the coordinate system of the left camera, the distance Z between the shooting subject and the electronic equipment in the scene to be shot can be determined according to the parallax.
From the distance interval of the distance Z, it is determined whether to proceed to steps 210, 211 or 213 next. If the distance Z is small and smaller than or equal to the first preset distance, go to step 210; if the distance Z is greater than the first preset distance and less than the second preset distance, go to step 211; if the distance Z is large and greater than or equal to the second predetermined distance, go to step 213.
210. And when the distance is smaller than or equal to the first preset distance, determining the color macro camera in the multiple cameras as a target camera.
The first preset distance may be an applicable distance threshold of the color macro camera. When the shooting main body is close to the electronic equipment and the effect of the color macro camera is superior to that of the common color camera, the color wide-angle camera and the common color camera are automatically closed, and the color macro camera is opened to adapt to the current macro shooting scene.
211. And when the distance is greater than the first preset distance and less than the second preset distance, determining the common color camera and the color wide-angle camera in the plurality of cameras as the target camera.
The second preset distance may be an applicable distance threshold of the color wide-angle camera. When the distance is greater than the first preset distance and less than the second preset distance, the shooting scene does not belong to a macro shooting scene, a long-distance shooting scene or a normal-distance shooting scene.
When the preview mode is started, the cameras are started by default to be a common color camera and a color wide-angle camera in the multiple cameras, so that when the distance between the shooting main body and the electronic equipment is judged to be larger than a first preset distance and smaller than a second preset distance, the two cameras are still determined as target cameras.
Or if a plurality of common color cameras and/or a plurality of color wide-angle cameras are arranged in the electronic equipment, when a preview mode is started, one common color camera and one color wide-angle camera in the plurality of cameras are started, a shooting subject in a scene to be shot is determined in the preview mode, the distance between the shooting subject and the electronic equipment is determined according to the common color camera and the color wide-angle camera, and when the distance is greater than a first preset distance and smaller than a second preset distance, all the common color cameras and all the color wide-angle cameras in the plurality of cameras are determined as target cameras.
212. Shooting a scene to be shot according to the common color camera and the color wide-angle camera, and blurring the shot image.
When the distance between the shooting main body and the electronic equipment is larger than a first preset distance and smaller than a second preset distance, common color cameras and color wide-angle cameras in the multiple cameras are determined as target cameras. Under the condition that the camera is combined into a target camera, the blurring function can be realized by utilizing two paths of data of a common color camera and a color wide-angle camera.
For example, in an embodiment, after a common color camera and a color wide-angle camera in the plurality of cameras are determined as target cameras, a scene to be shot is shot according to the common color camera and the color wide-angle camera, and a shot image is subjected to blurring processing. Wherein, treating according to ordinary color camera and colored wide-angle camera and shoot the scene, the step of carrying out blurring treatment to the image that obtains of shooing can include:
when a shooting request is received, shooting a scene to be shot according to a common color camera to obtain a first image to be processed, and shooting the scene to be shot according to a color wide-angle camera to obtain a second image to be processed;
determining depth-of-field information according to the first image to be processed and the second image to be processed;
determining a foreground region and a background region in the first image to be processed according to the depth information;
and carrying out fuzzy processing on the background area in the first image to be processed to obtain an imaging image corresponding to the shooting request.
Calculating the depth information in the first image to be processed and the second image to be processed, generating a depth table or a depth map according to the depth information, and combining the depth table or the depth map with the first image to be processed, thereby determining a foreground area and a background area in the first image to be processed. The plane of the shooting main body is used as an interface, the foreground area corresponds to one side, close to the electronic equipment, of two side spaces divided by the interface in the actual scene to be shot, and the background area corresponds to one side, far away from the electronic equipment, of two side spaces divided by the interface in the actual scene to be shot.
213. And when the distance is greater than or equal to a second preset distance, determining the color long-focus camera in the multiple cameras as a target camera.
The second preset distance may be an applicable distance threshold of the color telephoto camera. When the shooting main body is far away from the electronic equipment and the common color camera is not enough to shoot a far clear picture, the color wide-angle camera and the common color camera are automatically closed, and the color long-focus camera is opened to adapt to the current long-distance shooting scene.
214. And acquiring a preview image of a scene to be shot according to the determined target camera.
One or more cameras of the same type in the determined target cameras may be provided, and the number of the cameras of the same type in the determined target cameras is not limited herein. When one target camera is used, acquiring a preview image of a scene to be shot through only one camera; when the target cameras are a plurality of cameras, the plurality of cameras are used for respectively collecting preview images of a scene to be shot, and the collected preview images are subjected to image synthesis processing. For example, when a plurality of cameras of the same type are called, the camera parameters of the plurality of cameras of the same type are changed to acquire preview images of the same scene to be shot, and the preview images acquired by the plurality of cameras of the same type and different camera parameters are synthesized to obtain a synthesized image.
In one embodiment, acquiring a preview image of a scene to be photographed according to a determined target camera includes:
when the target camera comprises a plurality of cameras of the same type, setting exposure parameters of different gradients for the plurality of cameras of the same type;
acquiring a plurality of preview images of a scene to be shot based on exposure parameters of different gradients;
and performing image synthesis processing on the plurality of preview images to obtain a synthesized image.
The multiple cameras of the same type refer to the multiple cameras belonging to the same color macro camera or the same color tele camera, and the like. The exposure parameters include exposure time. For example, when the determined target camera includes a plurality of tele cameras, setting exposure times with different gradients for the tele cameras, and acquiring a preview image of a scene to be shot by each tele camera according to the exposure time of the tele camera to obtain a plurality of preview images. When image synthesis processing is performed on a plurality of preview images, dark portion details of a preview image having a long exposure time and bright portion details of a preview image having a short exposure time are synthesized. The bright details refer to the brightest part in the preview image, and the dark details refer to the darkest part in the preview image. Therefore, the bright part details and the dark part details of the synthesized image are clearer.
As can be seen from the above, in the embodiment of the present application, the electronic device includes a plurality of cameras. The electronic equipment starts a common color camera and a color wide-angle camera in the plurality of cameras when a preview mode is started; determining a shooting subject in a scene to be shot in a preview mode; determining the distance between a shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera; and determining a target camera for acquiring the preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera. The embodiment of the application can be used for ranging the shooting main body by using the common color camera and the color wide-angle camera in the preview mode, and the camera needs to be called according to the measured distance, so that the camera is automatically called to collect images, and the shooting convenience is improved.
The embodiment of the application also provides a camera calling device. Referring to fig. 5, fig. 5 is a first structural schematic diagram of a camera call device according to an embodiment of the present application. The camera calling device 300 is applied to an electronic device, the electronic device includes a plurality of cameras, and the camera calling device includes a starting module 301, a first determining module 302, a second determining module 303, and an acquiring module 304, as follows:
a starting module 301, configured to start a common color camera and a color wide-angle camera in the multiple cameras when the preview mode is started;
a first determining module 302, configured to determine a shooting subject in a scene to be shot in a preview mode;
a second determining module 303, configured to determine a distance between the main shooting object and the electronic device according to the common color camera and the color wide-angle camera;
and the acquisition module 304 is configured to determine a target camera for acquiring a preview image according to the distance, and acquire the preview image of the scene to be shot according to the determined target camera.
Referring to fig. 6, in an embodiment, the first determining module 302 includes a first determining unit 3021 and a second determining unit 3022:
a first determination unit 3021 configured to, when a focus instruction is received in the preview mode, determine a photographic subject in a scene to be photographed according to the focus instruction;
a second determining unit 3022, configured to acquire a current preview screen, and determine a subject in a scene to be photographed according to a geometric center of the preview screen; (ii) a Or
The third determining unit 3023 is configured to obtain two adjacent to-be-processed images through a common color camera, calculate a graying difference value of the same object in the two adjacent to-be-processed images, and determine the object as a shooting subject in a scene to be shot if the graying difference value is greater than a preset grayscale threshold.
In one embodiment, the second determining module 303 includes an acquiring unit 3031, a pixel determining unit 3032, a calculating unit 3033, and a determining unit 3034:
an obtaining unit 3031, configured to shoot a scene to be shot according to a common camera to obtain a first reference image, and shoot the scene to be shot according to a color wide-angle camera to obtain a second reference image;
an image point determining unit 3032, configured to determine a first image point of the photographic subject on the first reference image, and determine a second image point of the photographic subject on the second reference image;
a calculating unit 3033, configured to calculate, according to the first image point and the second image point, a parallax of the shooting subject on the first reference image and the second reference image;
a determining unit 3034, configured to determine, according to the parallax, a distance between the photographic subject and the electronic device in the scene to be photographed.
In an embodiment, the acquisition module 304 includes a third determination unit 3041, a fourth determination unit 3042, and a fifth determination unit 3043:
a fourth determining unit 3041 for determining a color macro camera of the plurality of cameras as a target camera when the distance is less than or equal to the first preset distance; or
A fifth determining unit 3042 configured to determine, as target cameras, a common color camera and a color wide-angle camera of the plurality of cameras when the distance is greater than the first preset distance and smaller than the second preset distance; or
A sixth determining unit 3043 for determining a color tele camera of the plurality of cameras as a target camera when the distance is greater than or equal to a second preset distance.
Referring to fig. 7, in an embodiment, the camera invoking device further includes an obtaining module 305:
the obtaining module 305 is configured to obtain ambient brightness of a scene to be photographed, and when the ambient brightness is greater than a brightness threshold, invoke the second determining module 303 to determine a distance between the photographing subject and the electronic device according to the normal color camera and the color wide-angle camera.
Referring to fig. 7, in an embodiment, the camera call device further includes a third determining module 306:
a third determining module 306, configured to determine, after the obtaining module 301 obtains the ambient brightness of the current scene to be photographed, when the ambient brightness is less than or equal to the brightness threshold, a common color camera and a common black-and-white camera in the multiple cameras as target cameras.
It should be noted that the camera calling device provided in the embodiment of the present application and the camera calling method in the foregoing embodiment belong to the same concept, and any method provided in the camera calling method embodiment may be run on the camera calling device, and a specific implementation process thereof is described in detail in the camera calling method embodiment, and is not described herein again.
The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program stored in the storage medium is executed on a computer, the computer is caused to execute the steps in the camera calling method provided by the embodiment of the present application. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
An electronic device is further provided in the embodiments of the present application, please refer to fig. 8, and fig. 8 is a schematic structural diagram of the electronic device provided in the embodiments of the present application. The electronic device includes a processor 401, a memory 402, a plurality of cameras 403, and a display 404, wherein the processor 401 is electrically connected to the memory 402, the cameras 403, and the display 404.
The processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by running or loading a computer program stored in the memory 402 and calling data stored in the memory 402.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The plurality of cameras 403 may include a normal color camera, or a normal color camera with a viewing angle of about 45 degrees, or a color telephoto camera with a viewing angle of less than 40 degrees, and so on.
The display 304 may be used to display information entered by or provided to the user as well as various graphical user interfaces that may be composed of graphics, text, icons, video, and any combination thereof. The display 304 includes a display screen for displaying preview images.
In this embodiment, the processor 401 in the electronic device loads instructions corresponding to one or more processes of the computer program into the memory 402 according to the following steps, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions, as follows:
when a preview mode is started, starting a common color camera and a color wide-angle camera in the plurality of cameras;
determining a shooting subject in a scene to be shot in a preview mode;
determining the distance between a shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera;
and determining a target camera for acquiring the preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera.
Referring to fig. 9, fig. 9 is another schematic structural diagram of the electronic device according to the embodiment of the present application, and the difference from the electronic device shown in fig. 8 is that the electronic device further includes components such as an input unit 405 and an output unit 406.
The input unit 405 may be used to receive input numbers, character information, or user characteristic information (such as a fingerprint), and generate a keyboard, a mouse, a joystick, an optical or trackball signal input, etc., related to user setting and function control, among others.
The output unit 406 may be used to display information input by the user or information provided to the user, such as a screen.
In this embodiment, the processor 401 in the electronic device loads instructions corresponding to one or more processes of the computer program into the memory 402 according to the following steps, and the processor 401 runs the computer program stored in the memory 402, so as to implement various functions, as follows:
when a preview mode is started, starting a common color camera and a color wide-angle camera in the plurality of cameras;
determining a shooting subject in a scene to be shot in a preview mode;
determining the distance between a shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera;
and determining a target camera for acquiring the preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera.
In an embodiment, when determining a photographic subject in a scene to be photographed in the preview mode, the processor 401 further performs:
when a focusing instruction is received in a preview mode, determining a shooting subject in a scene to be shot according to the focusing instruction; or
Acquiring a current preview picture, and determining a shooting subject in a scene to be shot according to the geometric center of the preview picture; or
The method comprises the steps of obtaining two adjacent images to be processed through a common color camera, calculating a gray level difference value of the same object in the two adjacent images to be processed, and determining the object as a shooting subject in a scene to be shot if the gray level difference value is larger than a preset gray level threshold value.
In one embodiment, when determining the distance between the subject and the electronic device according to the normal color camera and the color wide-angle camera, the processor 401 further performs:
shooting a scene to be shot according to a common camera to obtain a first reference image, and shooting the scene to be shot according to a color wide-angle camera to obtain a second reference image;
determining a first image point of a shooting subject on a first reference image, and determining a second image point of the shooting subject on a second reference image;
calculating to obtain the parallax of the shooting subject on the first reference image and the second reference image according to the first image point and the second image point;
and determining the distance between the shooting subject and the electronic equipment in the scene to be shot according to the parallax.
In an embodiment, before determining the distance between the subject and the electronic device according to the normal color camera and the color wide-angle camera, the processor 401 further performs:
acquiring the ambient brightness of a scene to be shot;
and when the ambient brightness is greater than the brightness threshold, determining the distance between the shooting subject and the electronic equipment according to the common color camera and the color wide-angle camera.
In an embodiment, when determining the target camera for acquiring the preview image according to the distance, the processor 401 further performs:
when the distance is smaller than or equal to a first preset distance, determining a color macro camera in the multiple cameras as a target camera; or
When the distance is greater than a first preset distance and less than a second preset distance, determining a common color camera and a color wide-angle camera in the plurality of cameras as a target camera; or
And when the distance is greater than or equal to a second preset distance, determining the color long-focus camera in the multiple cameras as a target camera.
In an embodiment, after determining a normal color camera and a color wide-angle camera of the plurality of cameras as the target camera, the processor 401 further performs:
and when the ambient brightness is less than or equal to the brightness threshold, determining a common color camera and a common black-and-white camera in the plurality of cameras as the target camera.
It should be noted that the electronic device provided in the embodiment of the present application and the camera calling method in the above embodiment belong to the same concept, and any method provided in the camera calling method embodiment may be run on the electronic device, and a specific implementation process thereof is described in detail in the feature extraction method embodiment, and is not described herein again.
It should be noted that, for the camera invoking method in the embodiment of the present application, it can be understood by a person skilled in the art that all or part of the process of implementing the camera invoking method in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, the computer program can be stored in a computer readable storage medium, such as a memory of the electronic device, and executed by at least one processor in the electronic device, and the process of executing the computer program can include the process of the embodiment of the camera invoking method. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.
For the camera calling device in the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The foregoing describes in detail a camera invoking method, apparatus, storage medium, and electronic device provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principle and implementation manner of the present application, and the description of the foregoing embodiments is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. A camera calling method is applied to electronic equipment, and is characterized in that the electronic equipment comprises a plurality of cameras, and the camera calling method comprises the following steps:
when a preview mode is started, starting a common color camera and a color wide-angle camera in the plurality of cameras;
determining a shooting subject in a scene to be shot in the preview mode;
determining the distance between the shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera;
and determining a target camera for acquiring a preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera.
2. The camera calling method according to claim 1, wherein the determining a shooting subject in a scene to be shot in the preview mode includes:
when a focusing instruction is received in the preview mode, determining a shooting subject in the scene to be shot according to the focusing instruction; or
Acquiring a current preview picture, and determining a shooting subject in the scene to be shot according to the geometric center of the preview picture; or
Acquiring two adjacent images to be processed through the common color camera, calculating the gray scale difference value of the same object in the two adjacent images to be processed, and determining the object as a shooting subject in a scene to be shot if the gray scale difference value is greater than a preset gray scale threshold value.
3. The camera invocation method according to claim 1, wherein said determining the distance between the photographic subject and the electronic device based on the normal color camera and the color wide-angle camera comprises:
shooting the scene to be shot according to the common camera to obtain a first reference image, and shooting the scene to be shot according to the color wide-angle camera to obtain a second reference image;
determining a first image point of the shooting subject on the first reference image, and determining a second image point of the shooting subject on the second reference image;
calculating to obtain the parallax of the shooting subject on the first reference image and the second reference image according to the first image point and the second image point;
and determining the distance between the shooting subject and the electronic equipment in the scene to be shot according to the parallax.
4. The camera invocation method according to any of claims 1-3, wherein before determining the distance between the photographic subject and the electronic device according to the normal color camera and the color wide-angle camera, the method further comprises:
acquiring the ambient brightness of the scene to be shot;
and when the ambient brightness is greater than the brightness threshold, determining the distance between the shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera.
5. The camera invocation method according to claim 4, wherein the determining, according to the distance, a target camera for acquiring a preview image comprises:
when the distance is smaller than or equal to a first preset distance, determining a color macro camera in the plurality of cameras as the target camera; or
When the distance is greater than the first preset distance and less than a second preset distance, determining a common color camera and a color wide-angle camera in the plurality of cameras as the target camera; or
And when the distance is greater than or equal to the second preset distance, determining a color long-focus camera in the plurality of cameras as the target camera.
6. The camera call method according to claim 4, wherein after determining a normal color camera and a color wide-angle camera of the plurality of cameras as the target camera, further comprising:
when a shooting request is received, shooting the scene to be shot according to the common color camera to obtain a first image to be processed, and shooting the scene to be shot according to the color wide-angle camera to obtain a second image to be processed;
determining depth-of-field information according to the first image to be processed and the second image to be processed;
determining a foreground region and a background region in the first image to be processed according to the depth information;
and carrying out fuzzy processing on the background area in the first image to be processed to obtain an imaging image corresponding to the shooting request.
7. The camera calling method according to claim 4, wherein after the obtaining the ambient brightness of the current scene to be shot, the method further comprises:
and when the ambient brightness is less than or equal to the brightness threshold, determining a common color camera and a common black-and-white camera in the plurality of cameras as the target camera.
8. The utility model provides a camera calling device, is applied to electronic equipment, its characterized in that, electronic equipment includes a plurality of cameras, camera calling device includes:
the starting module is used for starting a common color camera and a color wide-angle camera in the plurality of cameras when a preview mode is started;
the first determining module is used for determining a shooting subject in a scene to be shot in the preview mode;
the second determining module is used for determining the distance between the shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera;
and the acquisition module is used for determining a target camera for acquiring a preview image according to the distance and acquiring the preview image of the scene to be shot according to the determined target camera.
9. A storage medium having stored thereon a computer program which, when run on a computer, causes the computer to execute the camera call method according to any one of claims 1 to 7.
10. An electronic device, comprising a processor, a memory and a plurality of cameras, wherein the processor is electrically connected to the memory and the plurality of cameras, the memory stores a computer program, and the processor executes the camera calling method according to any one of claims 1 to 7 by calling the computer program.
11. An electronic device, comprising:
the cameras are used for acquiring preview images;
a display screen for displaying a preview image;
the treater, respectively with a plurality of cameras reach display screen electric connection, the treater is used for:
when a preview mode is started, starting a common color camera and a color wide-angle camera in the plurality of cameras;
determining a shooting subject in a scene to be shot in the preview mode;
determining the distance between the shooting main body and the electronic equipment according to the common color camera and the color wide-angle camera;
and determining a target camera for acquiring a preview image according to the distance, and acquiring the preview image of the scene to be shot according to the determined target camera.
CN201910878360.4A 2019-09-03 2019-09-03 Camera calling method and device, storage medium and electronic equipment Active CN110677621B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910878360.4A CN110677621B (en) 2019-09-03 2019-09-03 Camera calling method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910878360.4A CN110677621B (en) 2019-09-03 2019-09-03 Camera calling method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110677621A true CN110677621A (en) 2020-01-10
CN110677621B CN110677621B (en) 2021-04-13

Family

ID=69078020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910878360.4A Active CN110677621B (en) 2019-09-03 2019-09-03 Camera calling method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110677621B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111757005A (en) * 2020-07-06 2020-10-09 Oppo广东移动通信有限公司 Shooting control method and device, computer readable medium and electronic equipment
CN111901539A (en) * 2020-09-22 2020-11-06 Oppo广东移动通信有限公司 Image acquisition method, image acquisition device and terminal equipment
CN112887620A (en) * 2021-01-28 2021-06-01 维沃移动通信有限公司 Video shooting method and device and electronic equipment
CN113747028A (en) * 2021-06-15 2021-12-03 荣耀终端有限公司 Shooting method and electronic equipment
CN114125257A (en) * 2020-08-25 2022-03-01 北京珠穆朗玛移动通信有限公司 Camera photographing method, camera system and camera
CN115696067A (en) * 2021-08-12 2023-02-03 荣耀终端有限公司 Image processing method and device of terminal and terminal equipment

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101834996A (en) * 2009-03-11 2010-09-15 汉王科技股份有限公司 Luminous flux control method of high definition vehicle snapshot system
CN101997981A (en) * 2010-11-01 2011-03-30 惠州Tcl移动通信有限公司 Mobile phone camera-based latitude realization method and mobile phone
CN102629988A (en) * 2012-03-31 2012-08-08 博康智能网络科技股份有限公司 Automatic control method and device of camera head
CN103090807A (en) * 2013-01-11 2013-05-08 北京国网富达科技发展有限责任公司 Method and system for detecting safe operations of electric transmission line
CN105007431A (en) * 2015-07-03 2015-10-28 广东欧珀移动通信有限公司 Picture shooting method based on various shooting scenes and terminal
CN105959555A (en) * 2016-06-02 2016-09-21 广东欧珀移动通信有限公司 Shooting mode automatic adjustment method and device and mobile terminal
CN107454328A (en) * 2017-08-24 2017-12-08 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and computer equipment
CN107483827A (en) * 2017-09-11 2017-12-15 郑州仁峰软件开发有限公司 One kind photography automatic identification cutaway system
CN108024057A (en) * 2017-11-30 2018-05-11 广东欧珀移动通信有限公司 Background blurring processing method, device and equipment
CN108419008A (en) * 2018-01-30 2018-08-17 努比亚技术有限公司 A kind of image pickup method, terminal and computer readable storage medium
CN109729266A (en) * 2018-12-25 2019-05-07 努比亚技术有限公司 A kind of image capturing method, terminal and computer readable storage medium
CN109813278A (en) * 2019-02-26 2019-05-28 北京中科慧眼科技有限公司 Ranging model modification method, distance measuring method, device and automated driving system
US20190179014A1 (en) * 2017-12-13 2019-06-13 Sick Ag Triangulation light sensor
CN110166680A (en) * 2019-06-28 2019-08-23 Oppo广东移动通信有限公司 Equipment imaging method, device, storage medium and electronic equipment

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101834996A (en) * 2009-03-11 2010-09-15 汉王科技股份有限公司 Luminous flux control method of high definition vehicle snapshot system
CN101997981A (en) * 2010-11-01 2011-03-30 惠州Tcl移动通信有限公司 Mobile phone camera-based latitude realization method and mobile phone
CN102629988A (en) * 2012-03-31 2012-08-08 博康智能网络科技股份有限公司 Automatic control method and device of camera head
CN103090807A (en) * 2013-01-11 2013-05-08 北京国网富达科技发展有限责任公司 Method and system for detecting safe operations of electric transmission line
CN105007431A (en) * 2015-07-03 2015-10-28 广东欧珀移动通信有限公司 Picture shooting method based on various shooting scenes and terminal
CN105959555A (en) * 2016-06-02 2016-09-21 广东欧珀移动通信有限公司 Shooting mode automatic adjustment method and device and mobile terminal
CN107454328A (en) * 2017-08-24 2017-12-08 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and computer equipment
CN107483827A (en) * 2017-09-11 2017-12-15 郑州仁峰软件开发有限公司 One kind photography automatic identification cutaway system
CN108024057A (en) * 2017-11-30 2018-05-11 广东欧珀移动通信有限公司 Background blurring processing method, device and equipment
US20190179014A1 (en) * 2017-12-13 2019-06-13 Sick Ag Triangulation light sensor
CN108419008A (en) * 2018-01-30 2018-08-17 努比亚技术有限公司 A kind of image pickup method, terminal and computer readable storage medium
CN109729266A (en) * 2018-12-25 2019-05-07 努比亚技术有限公司 A kind of image capturing method, terminal and computer readable storage medium
CN109813278A (en) * 2019-02-26 2019-05-28 北京中科慧眼科技有限公司 Ranging model modification method, distance measuring method, device and automated driving system
CN110166680A (en) * 2019-06-28 2019-08-23 Oppo广东移动通信有限公司 Equipment imaging method, device, storage medium and electronic equipment

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111757005A (en) * 2020-07-06 2020-10-09 Oppo广东移动通信有限公司 Shooting control method and device, computer readable medium and electronic equipment
CN114125257A (en) * 2020-08-25 2022-03-01 北京珠穆朗玛移动通信有限公司 Camera photographing method, camera system and camera
CN111901539A (en) * 2020-09-22 2020-11-06 Oppo广东移动通信有限公司 Image acquisition method, image acquisition device and terminal equipment
CN112887620A (en) * 2021-01-28 2021-06-01 维沃移动通信有限公司 Video shooting method and device and electronic equipment
CN113747028A (en) * 2021-06-15 2021-12-03 荣耀终端有限公司 Shooting method and electronic equipment
WO2022262344A1 (en) * 2021-06-15 2022-12-22 荣耀终端有限公司 Photographing method and electronic device
CN113747028B (en) * 2021-06-15 2024-03-15 荣耀终端有限公司 Shooting method and electronic equipment
CN115696067A (en) * 2021-08-12 2023-02-03 荣耀终端有限公司 Image processing method and device of terminal and terminal equipment
CN115696067B (en) * 2021-08-12 2024-03-26 荣耀终端有限公司 Image processing method for terminal, terminal device and computer readable storage medium

Also Published As

Publication number Publication date
CN110677621B (en) 2021-04-13

Similar Documents

Publication Publication Date Title
CN110677621B (en) Camera calling method and device, storage medium and electronic equipment
JP7003238B2 (en) Image processing methods, devices, and devices
CN108076286B (en) Image blurring method and device, mobile terminal and storage medium
CN107977940B (en) Background blurring processing method, device and equipment
JP2020528622A (en) Image processing methods, equipment and devices
EP3480784B1 (en) Image processing method, and device
KR102229811B1 (en) Filming method and terminal for terminal
JPH09181966A (en) Image processing method and device
CN110166680B (en) Device imaging method and device, storage medium and electronic device
CN109688321B (en) Electronic equipment, image display method thereof and device with storage function
WO2019119986A1 (en) Image processing method and device, computer readable storage medium, and electronic apparatus
CN110324532A (en) A kind of image weakening method, device, storage medium and electronic equipment
US20190355101A1 (en) Image refocusing
US20230328400A1 (en) Auxiliary focusing method, apparatus, and system
US20220329729A1 (en) Photographing method, storage medium and electronic device
CN114363522A (en) Photographing method and related device
CN110312075B (en) Device imaging method and device, storage medium and electronic device
CN113747067A (en) Photographing method and device, electronic equipment and storage medium
CN110430375B (en) Imaging method, imaging device, storage medium and electronic equipment
JP6483661B2 (en) Imaging control apparatus, imaging control method, and program
WO2021145913A1 (en) Estimating depth based on iris size
CN115134532A (en) Image processing method, image processing device, storage medium and electronic equipment
JP2023033355A (en) Image processing device and control method therefor
CN110545375B (en) Image processing method, image processing device, storage medium and electronic equipment
CN115086558B (en) Focusing method, image pickup apparatus, terminal apparatus, and storage medium

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
GR01 Patent grant
GR01 Patent grant