WO2022022715A1 - Photographing method and device - Google Patents

Photographing method and device Download PDF

Info

Publication number
WO2022022715A1
WO2022022715A1 PCT/CN2021/109836 CN2021109836W WO2022022715A1 WO 2022022715 A1 WO2022022715 A1 WO 2022022715A1 CN 2021109836 W CN2021109836 W CN 2021109836W WO 2022022715 A1 WO2022022715 A1 WO 2022022715A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
target
camera
telephoto
mobile phone
Prior art date
Application number
PCT/CN2021/109836
Other languages
French (fr)
Chinese (zh)
Inventor
吴亮
敖欢欢
郭勇
王妙锋
王军
Original Assignee
华为技术有限公司
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
Priority claimed from CN202011296539.8A external-priority patent/CN114071010A/en
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022022715A1 publication Critical patent/WO2022022715A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/272Means for inserting a foreground image in a background image, i.e. inlay, outlay

Definitions

  • the embodiments of the present application relate to the field of electronic technologies, and in particular, to a photographing method and device.
  • electronic devices such as mobile phones or watches can use a wide-angle camera with a smaller equivalent focal length to capture a target image with a larger field of view (FOV).
  • FOV field of view
  • the clarity of local details on this target image is low.
  • an electronic device uses a wide-angle camera to shoot a larger scene or a distant scenery, the user may not be able to clearly see the details on the target image.
  • Embodiments of the present application provide a shooting method and device, which can refer to an image collected by a first camera with a larger field of view, use a second camera with a smaller field of view to shoot images, and stitch them to obtain a target image with a larger field of view , and the clarity of the target image is high, the details are clear, and the shooting effect is better.
  • an embodiment of the present application provides a shooting method, which is applied to an electronic device.
  • the electronic device includes a first camera and a second camera, and the equivalent focal length of the second camera is greater than the equivalent focal length of the first camera.
  • the method includes: the electronic device starts a photographing function. Then, the electronic device displays the image collected by the first camera and the guide frame on the preview interface. After detecting the user's photographing operation, the electronic device displays the first image on the photographing interface, and a guide frame superimposed on the first image; wherein the first image is obtained according to the image collected by the first camera, and the guide frame includes a plurality of Grid, a single grid corresponds to the size of the field of view of the second camera.
  • the electronic device displays splicing information on the shooting interface, the splicing information is used to indicate the shooting progress, and the splicing information corresponds to the multi-frame target shooting images matched with the multiple grids in the guide frame, and the target shooting images are acquired by the second camera.
  • the electronic device generates a stitched image according to the multi-frame target captured images. After the shooting, the electronic device generates the target image according to the stitched image.
  • the electronic device can refer to the first image captured by the first camera with a smaller equivalent focal length and a larger field of view, and use the second camera with a larger equivalent focal length and a smaller field of view to capture an image of the target , and splicing to obtain a target image with a larger field of view, and the target image has high definition, clear details and better shooting effect.
  • the first image is displayed as a background image, and a guide frame can be superimposed on the first image to guide the second camera to move to shoot a target image that matches the grid in the guide frame.
  • the electronic device may also display stitching information on the shooting interface to indicate the current shooting progress in real time for the user.
  • the first image is the first frame image collected by the first camera after detecting the user's photographing operation; or, the first image is the first frame image collected by the first camera after detecting the user's photographing operation
  • the first image displayed as the background image on the photographing interface may be a fixed frame of image or an image refreshed in real time.
  • the overlap ratio of the same content of the first image is greater than or equal to the first preset value; or, the target captured image and the matched grid , the similarity of the histogram of the feature parameters of the first image is greater than or equal to the second preset value; or, in the target captured image and the matched grid, the similarity of the first image in the same transformation domain is greater than or equal to the third preset value; or, in the target captured image and the matched grid, the feature matching degree of the first image is greater than or equal to the fourth preset value.
  • the electronic device can determine whether the target captured image matches the grid in various ways.
  • the method further includes: the electronic device determines, according to the image blocks corresponding to the grid on the reference image, configuration parameters of the image captured by the second camera to capture the target.
  • the electronic device acquires the captured image of the target matched with the grid according to the configuration parameters.
  • the electronic device can determine the configuration parameters when the second camera collects the target captured images corresponding to different grids according to the reference image corresponding to the global scope, so that the overall effect of the stitched image obtained according to the target captured image can be as consistent as possible with the reference image,
  • the overall change of the stitched image is smoother and the transition is natural.
  • the configuration parameters include at least one or more of the following: automatic exposure AE configuration parameters, automatic white balance AWB configuration parameters, or dynamic range correction DRC configuration parameters.
  • the electronic device can make the overall exposure effect, AWB effect or dynamic range of the stitched image obtained from the target captured image as consistent as possible with the reference image, so that the overall change of the stitched image is smoother and the transition is natural.
  • the multi-frame captured images of the target include a first captured image of the target and a second captured image of the target
  • the electronic device generates a stitched image according to the multi-frame captured images of the target, including: the electronic device captures an image of the first target After performing first image processing with the second target captured image, a stitched image is generated, and the first image processing includes image registration.
  • the electronic device performs image registration on the captured image of the first target and the captured image of the second target, including: the electronic device, according to a preset image registration algorithm, separately registers the captured image of the first target and the captured image of the second target.
  • the second target captured image extracts features; the electronic device registers the first target captured image and the second target captured image according to the obtained feature matching pairs.
  • the captured image of the first target and the captured image of the second target can be registered according to the feature matching pair.
  • the method further includes: the electronic device corrects the registered image according to the reference image.
  • the electronic device can correct the result of the registration according to the feature matching pair according to the reference image.
  • the electronic device performs image registration on the captured image of the first target and the captured image of the second target, including: the electronic device extracts features from the captured image of the first target and the reference image respectively, and according to the obtained features The matched pair registers the first target captured image and the reference image. The electronic device extracts features from the captured image of the second target and the reference image, respectively, and registers the captured image of the second target and the reference image according to the obtained feature matching pair.
  • the electronic device can register the first target captured image and the reference image according to the feature matching pair, and register the second target captured image and the reference image, so as to achieve the registration of the first target captured image and the second target captured image the goal of.
  • the method further includes: the electronic device extracts features from the captured image of the first target and the captured image of the second target, respectively, and matches the paired registration of the captured image of the first target and the second target according to the obtained features Shooting an image; the electronic device calculates a homography matrix according to the feature matching pair of the overlapping area of the first target shooting image, the second target shooting image and the reference image; the electronic device deforms the second target shooting image according to the homography matrix .
  • the electronic device can register the first target captured image and the reference image, the second target captured image and the reference image, and the first target captured image and the second target captured image, respectively.
  • the feature matching pair of the overlapping area of the captured image, the second target captured image and the reference image calculates a homography matrix to deform the second target captured image so that the fusion effect of the second target captured image is better.
  • the electronic device performs image registration on the captured image of the first target and the captured image of the second target, including: fitting the captured image of the first target to a coordinate position having the same image content on the reference image ; The second target photographed image is attached to the coordinate position with the same image content on the reference image; If there is a hole between the first target photographed image and the second target photographed image, then according to the image content of the corresponding position of the hole on the reference image Fill in the holes.
  • the electronic device may register the captured image of the first target and the captured image of the second target according to the coordinate system of the reference image.
  • the first image processing further includes ghost removal processing
  • the electronic device performs first image processing on the first target captured image and the second target captured image to generate a stitched image, including: retaining the first image A ghost-free image of a moving object on the target captured image; delete the image of the moving object on the second target captured image; perform image registration on the first target captured image and the second target captured image to generate a stitched image; Fill the holes in the image.
  • the electronic device can retain the ghost-free image of the moving object on the captured image of the first target, and fill holes in the spliced image generated by the captured image of the first target and the captured image of the second target, so as to achieve a ghost-free image. Purpose.
  • the first image processing further includes ghost removal processing
  • the electronic device performs first image processing on the first target captured image and the second target captured image to generate a stitched image, including: The target captured image and the second target captured image are registered; the ghost-free image of the moving object is retained on the registered image, and the ghost-free image comes from the first target captured image, the second target captured image or the first image ; Delete the images of moving objects in other areas on the registered image; fill the holes caused by the deletion according to the reference image to generate a stitched image.
  • the electronic device can first register the first target captured image and the second target captured image, retain the ghost-free image of the moving object on the registered image, and delete the registered image of other moving objects. image, with hole filling based on the reference image.
  • the first image processing further includes ghost removal processing
  • the electronic device performs first image processing on the first target captured image and the second target captured image to generate a stitched image, including: deleting the first target image.
  • the electronic device can obtain the ghost-free first image, and attach the first target captured image and the second target captured image after deleting the image of the moving object to the ghost-free first image, and Hole filling is performed based on the reference image to generate a stitched image.
  • the first image processing further includes uniform light and color processing and image fusion processing.
  • the electronic device generates the target image according to the spliced image, including: after the electronic device performs second image processing on the spliced image, generating the target image, and the second image processing includes at least one or more of the following: De-ghosting, dynamic range enhancement, high frequency component fusion, dodging, or hole filling.
  • the electronic device generates the target image after the stitched image is processed such as ghost removal, dynamic range enhancement, high-frequency component fusion, uniform light and color processing, or hole filling.
  • the electronic device performs high-frequency component fusion on the spliced image, including: the electronic device extracts the high-frequency component image of the reference image, and fuses the high-frequency component image with the spliced image to enhance the quality of the spliced image. High frequency detail to enhance the clarity and detail of the stitched and target images.
  • the electronic device performs uniform light and color processing on the spliced image, including: the electronic device performs high dynamic range synthesis on the images collected by the multiple frames of the first camera; The range information performs uniform light and color processing on the stitched image.
  • the electronic device can perform uniform light and color uniform processing on the stitched image according to the synthesized high dynamic range information, thereby enhancing the dynamic range of the stitched image.
  • the electronic device fills holes in the spliced images, including: splicing the regions corresponding to the holes of the images on the images collected by the multiple frames of the first camera, and performing super-resolution image synthesis; The image information of the stitched image is filled with holes.
  • the electronic device performs hole filling on the stitched image, including: performing image super-resolution processing on the area on the reference image corresponding to the hole in the stitched image; Fill in the holes.
  • the reference image is the first frame image collected by the first camera after detecting the user's photographing operation; or, the first image is the first frame image collected by the first camera after detecting the user's photographing operation
  • the reference image in the photographing process is a fixed image of the same frame.
  • the electronic device determines that the shooting ends, including: after the grids in the guide frame are matched, determining that the shooting ends.
  • the electronic device automatically ends shooting.
  • the electronic device generates the target image according to the spliced image, including: the spliced image is the target image; or, if the edges of the spliced image are not aligned, the spliced image is cropped to obtain the target whose edges are aligned or, if the edges of the spliced image are not aligned, fill the edge area of the spliced image according to the first image to obtain a target image with aligned edges.
  • the target image is the same as the stitched image, or an image that has been edge cropped or edge filled for the stitched image.
  • the electronic device determines that the shooting is ended, including: before the grids in the guide frame are not matched, if a user's operation to stop taking pictures is detected, determining that the shooting is ended; If the moving direction moves out of the guide frame, the shooting is determined to end; or, if the deviation range between the moving direction of the electronic device and the indicated direction of the guide frame is greater than or equal to the fifth preset value, the shooting is determined to be completed.
  • the electronic device generates the target image according to the stitched image, including: generating the target image according to the stitched image corresponding to the matched whole row/column grid; or, according to the matched grid corresponding to the grid.
  • the target image is generated by stitching the image and the image area corresponding to the unmatched grid on the first image.
  • the electronic device can generate the target image according to the stitched images corresponding to the entire row/column grid, or combine with the image area corresponding to the unmatched grid on the first image. Image padding to generate the target image.
  • the method further includes: the electronic device obtains a target zoom magnification, the guide frame corresponds to the target zoom magnification, and the target zoom magnification is greater than the zoom magnification of the first camera and smaller than the zoom magnification of the second camera .
  • the electronic device generates a target image according to the stitched image, including: the electronic device cuts the stitched image to generate a target image, and the target image corresponds to the target zoom magnification.
  • the electronic device can stitch the target image captured by the second camera with a smaller field of view to obtain a stitched image with a larger and clearer field of view, and then crop the stitched image to obtain the target zoom A clear target image corresponding to the magnification.
  • the electronic device does not need to perform image magnification through digital zoom, so the high resolution of the second camera and the high resolution of the second image can be retained, and the zoom effect of optical zoom can be achieved.
  • an embodiment of the present application provides another shooting method, which is applied to an electronic device.
  • the electronic device includes a first camera and a second camera, and the equivalent focal length of the second camera is greater than the equivalent focal length of the first camera.
  • the method includes: the electronic device starts a photographing function.
  • the electronic device displays a third image and an image frame on the preview interface, the third image is an image captured by the first camera, the screen range of the third image in the image frame corresponds to the screen range of the second image, and the second image is the second image. image captured by the camera.
  • the electronic device displays the first image and the image frame on the photographing interface, and the first image is obtained according to the image collected by the first camera.
  • the electronic device displays stitching information on the shooting interface.
  • the stitching information is used to indicate the shooting progress.
  • the stitching information corresponds to the multi-frame target shooting images obtained during the shooting process, and the adjacent target shooting images match each other.
  • the electronic device generates a stitched image according to the multi-frame target captured images. After the shooting, the electronic device generates the target image according to the stitched image.
  • the electronic device can refer to the first image captured by the first camera with a smaller equivalent focal length and a larger field of view, and use the second camera with a larger equivalent focal length and a smaller field of view to capture an image of the target , and splicing to obtain a target image with a larger field of view, and the target image has high definition, clear details and better shooting effect.
  • the electronic device displays an image frame on the preview interface and the shooting interface, so as to facilitate the user to move the second camera according to the real-time shooting range of the second camera.
  • the electronic device may also display stitching information on the shooting interface to indicate the current shooting progress for the user in real time.
  • the matching third target captured image and fourth target captured image satisfy: the abscissa range of the third target captured image and the fourth target captured image
  • the deviation between the abscissa ranges is less than or equal to the first preset threshold; or, the deviation between the ordinate range of the third target captured image and the ordinate range of the fourth target captured image is less than or equal to the second preset threshold.
  • the matched images of the third target and the images of the fourth target are basically distributed left and right or basically distributed up and down.
  • the matching third target captured image and fourth target captured image also satisfy: the overlapping area between the third target captured image and the fourth target captured image is greater than or equal to the sixth predetermined target image. or, the gap between the captured image of the third target and the captured image of the fourth target is less than or equal to the seventh preset value.
  • the overlapping area is smaller, or the gap is smaller.
  • an embodiment of the present application provides a photographing apparatus, and the apparatus is included in an electronic device.
  • the device has the function of implementing the behavior of the electronic device in any of the above aspects and possible designs, so that the electronic device executes the photographing method performed by the electronic device in any of the possible designs in the above-mentioned aspects.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes at least one module or unit corresponding to the above-mentioned functions.
  • the apparatus may include an activation unit, a detection unit, a display unit, a generation unit, and the like.
  • an embodiment of the present application provides an electronic device, including: a first camera and a second camera for capturing images; a screen for displaying an interface; one or more processors; a memory; and one or more One or more computer programs, one or more computer programs are stored in memory, the one or more computer programs include instructions that, when executed by an electronic device, cause the electronic device to perform any of the above aspects. Possible designs for the electronic device to perform Shooting method.
  • an embodiment of the present application provides an electronic device, including: one or more processors; and a memory, where codes are stored in the memory.
  • the electronic device is caused to execute the photographing method executed by the electronic device in any possible design of the above aspect.
  • an embodiment of the present application provides a computer-readable storage medium, including computer instructions, which, when the computer instructions are executed on an electronic device, enable the electronic device to execute the photographing method in any of the possible designs in the foregoing aspect.
  • an embodiment of the present application provides a computer program product, which, when the computer program product runs on a computer, enables the computer to execute the photographing method performed by the electronic device in any of the possible designs in the above aspect.
  • an embodiment of the present application provides a chip system, and the chip system is applied to an electronic device.
  • the chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the interface circuit is used for receiving signals from the memory of the electronic device and sending signals to the processor, and the signals are included in the memory Stored computer instructions; when the processor executes the computer instructions, the electronic device is made to execute the photographing method in any possible design of the above aspect.
  • FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a photographing method provided by an embodiment of the present application.
  • 3A is a schematic diagram of a group of interfaces provided by an embodiment of the present application.
  • 3B is a schematic diagram of an interface provided by an embodiment of the present application.
  • Fig. 4 is another interface schematic diagram provided by the embodiment of the present application.
  • FIG. 5 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 7A is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 7B is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 8 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • 9A is another set of interface schematic diagrams provided by an embodiment of the present application.
  • 9B is a schematic diagram of a group of shooting sequences provided by an embodiment of the present application.
  • FIG. 10A is a set of schematic interface diagrams and a schematic diagram of camera positions provided by an embodiment of the present application.
  • FIG. 10B is a schematic diagram of an interface provided by an embodiment of the present application.
  • FIG. 11 is another set of interface schematic diagrams provided by this embodiment of the present application.
  • FIG. 12B is a schematic diagram of a group of images provided by an embodiment of the present application.
  • FIG. 12C is a schematic diagram of another group of images provided by this embodiment of the present application.
  • FIG. 12D is a schematic diagram of another set of images provided by an embodiment of the present application.
  • FIG. 13A is a schematic diagram of an image fusion process provided by an embodiment of the present application.
  • FIG. 13B is a schematic diagram of another image fusion process provided by an embodiment of the present application.
  • FIG. 13C is a schematic diagram of a group of interfaces provided by an embodiment of the present application.
  • FIG. 14 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • 15A is another set of interface schematic diagrams provided by an embodiment of the present application.
  • 15B is another set of interface schematic diagrams provided by an embodiment of the present application.
  • 15C is a schematic diagram of an interface provided by an embodiment of the present application.
  • 15D is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 16 is another interface schematic diagram provided by an embodiment of the present application.
  • FIG. 17 is a schematic diagram of a group of images provided by an embodiment of the present application.
  • 18 is a schematic diagram of the identification of a group of target images provided by an embodiment of the present application.
  • FIG. 19 is a schematic flowchart of another photographing method provided by an embodiment of the present application.
  • FIG. 20 is a schematic diagram of a group of interfaces provided by an embodiment of the present application.
  • FIG. 21 is another set of interface schematic diagrams provided by this embodiment of the present application.
  • FIG. 22 is another set of interface schematic diagrams provided by this embodiment of the present application.
  • 23A is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 23B is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIG. 24 is a schematic flowchart of a zoom solution provided by an embodiment of the present application.
  • FIG. 25 is a schematic diagram of a group of interfaces provided by an embodiment of the present application.
  • 26A is a set of schematic diagrams and interface diagrams of a guide frame provided by an embodiment of the present application.
  • 26B is a schematic diagram of an interface provided by an embodiment of the present application.
  • FIG. 27 is a schematic diagram of a group of interfaces provided by an embodiment of the present application.
  • FIG. 28 is another set of interface schematic diagrams and target image schematic diagrams provided by an embodiment of the present application.
  • FIG. 29 is another interface schematic diagram provided by this embodiment of the application.
  • FIG. 30 is a schematic structural diagram of another electronic device provided by an embodiment of the present application.
  • the first image the background image displayed on the shooting interface.
  • the first image is a wide-angle image.
  • the first image may be fixed and not refreshed, for example, the first frame of wide-angle image or the following initial wide-angle image captured by the wide-angle camera after the user's photographing operation is detected in the following embodiments.
  • the first image may also be refreshed in real time, for example, a wide-angle image collected in real time by the wide-angle camera during the photographing process.
  • Second image the image captured by the second camera in real time.
  • the second image is a telephoto image.
  • Target Capture Image A second image that matches the grid in the guide frame.
  • the image captured by the target may be a telephoto image of the target that matches the grid in the guide frame.
  • the third image the real-time changing image displayed on the preview interface, acquired through real-time acquisition by the first camera.
  • the first camera is a wide-angle camera
  • the third image may be a wide-angle image displayed on the preview interface in the following embodiments.
  • Stitching information used to indicate the shooting progress of the photographing process, indicating the matching progress of the grids in the guide frame during the photographing process.
  • the stitching information corresponds to the multi-frame target telephoto images matched with the grids in the guide frame during the photographing process.
  • the splicing information may be the spliced image thumbnails, splicing frames, matched grids or borders of matched grids displayed on the shooting interface in the following embodiments.
  • Image frame used to indicate the real-time shooting range of the second camera.
  • the image frame is the telephoto frame in the following embodiments.
  • the first image processing the processing of the two target telephoto images to be spliced, for example, including image registration, uniform light and color, ghost removal or image fusion, etc.
  • Second image processing The processing performed on the stitched image before generating the target image, such as ghost removal processing, dynamic range enhancement, high-frequency component fusion, uniform light and color processing, or hole filling, etc.
  • the first target telephoto image and the second target telephoto image are respectively two frames of target telephoto images obtained during the photographing process.
  • the third target telephoto image and the fourth target telephoto image are respectively two frames of target telephoto images obtained during the photographing process.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • plural means two or more.
  • the embodiment of the present application provides a shooting method, which can be applied to electronic equipment, and can refer to an image collected by a first camera with a larger field of view, and use a second camera (telephoto camera) with a smaller field of view to shoot images and stitch them together A target image with a larger field of view is obtained, so that the target image has higher clarity and resolution, clear local details, prominent subject, and better shooting effect.
  • a shooting method which can be applied to electronic equipment, and can refer to an image collected by a first camera with a larger field of view, and use a second camera (telephoto camera) with a smaller field of view to shoot images and stitch them together
  • a target image with a larger field of view is obtained, so that the target image has higher clarity and resolution, clear local details, prominent subject, and better shooting effect.
  • the equivalent focal length of the second camera is relatively large, and the field of view angle is relatively small, for example, it may be a telephoto camera or an ultra-telephoto camera.
  • the first camera involved in the embodiments of the present application may be a camera with a smaller equivalent focal length and a larger field of view, such as a wide-angle camera, an ultra-wide-angle camera, or a panoramic camera.
  • the equivalent focal length of the second camera may be 240mm, and the field angle may be 10°.
  • the equivalent focal length of the second camera may be 125mm, and the field of view angle may be 20°.
  • the equivalent focal length of the second camera may be 80mm, and the field of view angle may be 30°.
  • the equivalent focal length of the first camera may be 26mm, and the field angle may be 80°.
  • the equivalent focal length of the first camera may be 16mm, and the field of view angle may be 120°.
  • the first camera is a wide-angle camera
  • the second camera is a telephoto camera
  • the first camera is an ultra-wide-angle camera
  • the second camera is a telephoto camera
  • the first camera is a wide-angle camera
  • the second camera is a Super telephoto camera.
  • the field of view of the image captured by the second camera and the target image obtained by splicing is smaller than or equal to the field of view of the first camera.
  • the equivalent focal length of the second camera may be greater than or equal to a preset value, so that the zoom magnification of the second camera is larger, the field of view is smaller, and the image resolution is higher; in other embodiments, The ratio of the equivalent focal length of the second camera to the first camera may be greater than or equal to the preset value of 1, so that the ratio of the zoom magnification of the second camera to the first camera is larger, and the difference between the field of view of the first camera and the second camera The proportion is larger.
  • the preset value 1 may be 2 or 3 or the like. In this way, the target image obtained by the electronic device has higher definition and resolution, clearer local details, more prominent subject, and better shooting effect.
  • the equivalent focal length refers to the length of the diagonal of the image area of the photoelectric sensor chip of the camera.
  • the actual focal length of the camera corresponds to the focal length of the 35mm camera lens.
  • the zoom ratio describes the meaning of the relative equivalent focal length. For example, if the zoom ratio of a wide-angle camera is defined as 1, then the zoom ratio of other cameras (such as telephoto cameras) is equal to the equivalent focal length of the telephoto camera and the wide-angle camera as the benchmark. ratio of equivalent focal lengths.
  • the size of the field of view determines the field of view of the camera. The larger the field of view, the larger the field of view. The larger the equivalent focal length, the smaller the field of view.
  • the target image obtained by splicing the images captured by the second camera may be in the form of a wide format (including a horizontal format or a vertical format), a square format, an ultra-wide format, or a panorama.
  • the aspect ratio of the target image can be 2:1, 9:16, 1:1, or 2.39:1, etc.
  • target images of different frames can give users different visual feelings, so for different themes or themes, appropriate frames can be used to shoot.
  • landscape subjects can be shot in horizontal format to show the wide and atmospheric characteristics of the scene.
  • high-rise buildings, towers, mountains and other themes can be shot in vertical format to express a towering and upright picture effect.
  • the shooting methods provided in the embodiments of the present application can be used for rear image shooting, and can also be used for front image shooting.
  • the electronic device may be a mobile phone, a tablet, a wearable device (eg, a smart watch), an in-vehicle device, an augmented reality (AR)/virtual reality (VR) device, a laptop, a super mobile personal computer
  • a wearable device eg, a smart watch
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the display screen 194 may be used to display a preview interface and a photographing interface and the like in the photographing mode.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • the camera 193 may include cameras with different focal lengths, for example, a first camera with a short focal length and a second camera with a long focal length.
  • the equivalent focal length of the first camera is small (for example, 13mm, 16mm, 26mm, 30mm or 40mm, etc.), and the field of view angle is large (for example, the field of view angle can be 80°, 120°, or 150°, etc.), which can be used for Take larger pictures such as landscapes.
  • a current wide-angle camera, an ultra-wide-angle camera, a panoramic camera, and other cameras with a larger field of view may be referred to as the first camera.
  • the equivalent focal length of the second camera is larger (for example, 80mm, 125mm, 150mm or 240mm, etc.), and the field of view angle is small (for example, the field of view angle can be 10°, 20° or 30°, etc.), which can be used to shoot distant objects, the area that can be photographed is small.
  • the field of view angle can be 10°, 20° or 30°, etc.
  • both the current telephoto camera and the ultra-telephoto camera can be called the second camera.
  • the second camera is fixed, and the user can move the second camera by moving the electronic device 100 .
  • the second camera can be moved independently, and the user can directly move the second camera through a certain key, control or operation without moving the mobile phone; or, the mobile phone can automatically control the movement of the second camera.
  • the content of the picture captured by the second camera also changes accordingly.
  • the camera 193 may further include a depth camera for measuring the object distance of the object to be photographed, and other cameras.
  • the depth camera may include a 3-dimensions (3D) depth camera, a time of flight (TOF) depth camera, or a binocular depth camera, and the like.
  • a digital signal processor is used to process digital signals, in addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 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, universal flash storage (UFS), and the like.
  • the processor 110 can realize the reference to the image collected by the first camera by running the instructions stored in the internal memory 121, use the second camera to capture the image and stitch to obtain the target image with a larger field of view, so as to The target image has high definition, clear details and better shooting effect.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a touch screen.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the first camera and the second camera in the camera 193 can be used to capture images;
  • the display screen 194 can be used to display a preview interface and a shooting interface when taking pictures;
  • the instructions of the memory 121 can realize the reference to the image collected by the first camera with a larger field of view, use the second camera with a smaller field of view to capture the image and stitch to obtain the target image with a larger field of view, so that the target image has a larger field of view.
  • the sharpness is high, the details are clear, and the shooting effect is better.
  • the photographing method provided by the embodiment of the present application will be described below by taking the electronic device as a mobile phone having the structure shown in FIG. 1 as an example. As shown in Figure 2, the method may include:
  • the mobile phone starts the camera function.
  • the camera function of the mobile phone can be activated.
  • the phone can launch the camera app, or launch other apps with a shooting function (such as AR apps such as Douyin or Hetu cyberverse), thereby launching the app's camera function.
  • AR apps such as Douyin or Hetu cyberverse
  • the mobile phone after the mobile phone detects that the user clicks the camera icon 301 shown in (a) in FIG. 3A , the mobile phone starts the photographing function of the camera application, and displays the preview interface shown in (b) in FIG. 3A .
  • the mobile phone displays a desktop or a non-camera application interface, starts the photographing function after detecting the user's voice command to open the camera application, and displays a preview interface as shown in (b) of FIG. 3A .
  • the mobile phone can also activate the camera function in response to other user touch operations, voice commands or quick gestures and other operations, and the embodiment of the present application does not limit the operation of triggering the mobile phone to activate the camera function.
  • the mobile phone can use the shooting method provided by the embodiment of the present application to use a second camera with a smaller field of view to collect multiple frames of images, and stitch the multiple frames of the images into a field of view target image with larger corners.
  • the clarity and resolution of the target image are high, the local details are clear, the main body is prominent, and the shooting effect is better.
  • the shooting method provided by the embodiment of the present application can use the second camera with a smaller field of view to collect multiple frames of images, and then record the multiple frames of the The images are stitched into a target image with a larger field of view.
  • the mobile phone can use the shooting method provided by the embodiment of the present application to refer to the image collected by the first camera with a larger field of view, use the second camera with a smaller field of view to shoot images, and stitch them to obtain the field of view.
  • the larger the target image the higher the clarity and resolution of the target image, the clear local details, the prominent subject, and the better shooting effect.
  • the target photographing mode may be specifically referred to as a wide-frame mode, a wide-view mode, or a high-definition image mode, and the embodiment of the present application does not limit the specific name of the target photographing mode.
  • the target photographing mode is taken as the wide-view mode as an example for description.
  • the wide view mode is entered as shown in (c) in FIG. 3A .
  • the interface shown in (d) in FIG. 3A is displayed; after the mobile phone detects the operation that the user clicks the control 304 , as shown in (c) in Figure 3A to enter the wide-view mode.
  • the mobile phone when the mobile phone displays a desktop or a non-camera application interface, it detects the user's voice command to enter the wide-view mode and starts the camera function, and enters the wide-view mode as shown in (c) of FIG. 3A .
  • the mobile phone can also activate the camera function and enter the wide-view mode in response to other user touch operations, voice commands, or shortcut gestures.
  • the mobile phone can prompt the user of the function of the shooting mode in the wide-view mode by displaying information or voice broadcasting.
  • the mobile phone displays text prompt information on the preview interface: in the wide-view mode, you can refer to the image captured by the first camera with a larger field of view, use the second camera with a smaller field of view to capture the image and Stitching obtains a target image with a larger field of view.
  • the mobile phone in the wide view mode, can prompt the user about the specific cameras used by the first camera and the second camera.
  • the mobile phone displays text information on the preview interface to prompt the user
  • the first camera is a wide-angle camera
  • the second camera is a telephoto camera.
  • the first camera and the second camera in the wide-view mode are cameras set by the user, for example, the first camera is an ultra-wide-angle camera set by the user, and the second camera is a telephoto camera set by the user.
  • This embodiment of the present application does not limit the specific manner in which the user sets the first camera and the second camera.
  • the first camera and the second camera in the wide-view mode are default cameras, for example, the first camera is a wide-angle camera by default, and the second camera is a telephoto camera by default.
  • the user can also modify the camera types of the first camera and the second camera.
  • the first camera is a wide-angle camera and the second camera is a telephoto camera as an example for description.
  • the mobile phone displays a wide-angle image on the preview interface.
  • the phone After the phone starts the camera function, it enters the preview state.
  • the mobile phone can collect wide-angle images in real time through the wide-angle camera according to the preset frame rate 1, and display the obtained wide-angle images on the preview interface, so as to present the global image within a larger field of view to the user ( or panoramic image).
  • the wide-angle camera is the first camera.
  • the mobile phone can also display a guide frame for guiding the telephoto camera to move and shoot on the preview interface, so that the telephoto camera can shoot multiple frames of images according to the guide frame during the photographing process.
  • the guide frame is superimposed and displayed on the wide-angle image in the form of a transparent floating frame.
  • the field of view of the guide frame is smaller than or equal to the field of view of the wide-angle camera. That is to say, the field of view of the target image generated by the mobile phone according to the instructions of the guide frame is smaller than or equal to the field of view of the wide-angle camera.
  • the maximum number of grids that the guide frame can include is R*R, and R is related to K1 and/or K2.
  • K1 is the ratio of the equivalent focal length of the telephoto camera to the equivalent focal length of the wide-angle camera, rounded up or down.
  • K2 is the ratio of the field of view of the wide-angle camera to the field of view of the telephoto camera, rounded up or down.
  • R is K1; in other embodiments, R is K2; in other embodiments, R is the greater of K1 and K2.
  • the guide frame displayed by the mobile phone on the guide interface includes M (rows)*N (columns) grids.
  • M ⁇ R, N ⁇ R, and at least one of M and N is greater than 1.
  • This M*N can be called the specification of the lead frame. That is to say, the specification of the guide frame includes the number of grids in the guide frame and the arrangement of the grids.
  • the wide-angle image corresponds to the lead frame with the highest number of grids.
  • the size and field of view of the wide-angle image can be slightly larger or equal to the size and field of view of the guide frame with the largest number of grids
  • the field of view of the telephoto camera corresponds to the corresponding field of view of a single grid.
  • the field of view of the telephoto camera may be slightly larger than or equal to the field of view corresponding to a single grid.
  • the equivalent focal length of the wide-angle camera is 125mm
  • the equivalent focal length of the telephoto camera is 25mm
  • the number of grids in each row of the guide frame is less than or equal to 5, and the number of grids in each column is also less than or equal to 5.
  • the guide frame may include at most 5*5 (ie, 5 rows and 5 columns) grids; the guide frame may also include less than 5*5 grids, such as 3*3, 3*4 or 4* 5 grids.
  • the field of view of the wide-angle camera corresponds to the 5*5 grids
  • a single grid corresponds to the field of view of the telephoto camera.
  • the ratio between the equivalent focal length of the telephoto camera and the equivalent focal length of the wide-angle camera is less than or equal to a preset value of 2.
  • the preset value 2 may be 8 or 10 or the like.
  • the guide frame includes at most 5*5 grids as an example for description.
  • the guide frame is displayed by default in the middle of the image displayed in the preview interface.
  • the specification of the guide frame is the default specification, or the specification that the phone last adopted in the wide view mode.
  • the position or specification of the guide frame displayed by the mobile phone on the preview interface may be set by the user.
  • the mobile phone determines a matching guide frame according to the area selected by the user.
  • the area corresponding to the guide frame determined by the mobile phone can cover the user's selection area, or the ratio of covering the user's selection area is greater than or equal to a preset ratio (such as 90%), or slightly larger than the user's selection area.
  • a preset ratio such as 90%
  • the mobile phone determines that the target image the user wants to shoot is the size corresponding to the area. Then, the mobile phone determines the position or size of the guide frame according to the area.
  • the guide frame includes 3*3 grids, and as shown in (c) of FIG. 5 , the guide frame 501 is displayed on the preview interface.
  • the mobile phone displays the setting interface after detecting that the user clicks the setting control 601 on the preview interface as shown in (a) of FIG. 6 .
  • the setting interface includes the setting control of the target image guide frame.
  • the largest guide frame is displayed.
  • the largest lead frame includes the largest number of grids (eg 5*5 grids above).
  • the mobile phone detects that the user performs a frame selection on the largest guide frame and clicks to confirm the control, the range of the position corresponding to the user's frame selection operation is determined as the position and size of the guide frame.
  • the mobile phone displays the determined guide frame 602 including 2*3 grids on the preview interface.
  • the mobile phone displays the largest guide frame including the maximum number of grids on the preview interface, and prompts the user: please set the guide frame of the target image.
  • the user drags on the largest guide frame to select multiple grids, and the mobile phone determines that the position and range corresponding to the user's frame selection operation are the position and size of the guide frame.
  • the mobile phone displays a determined guide frame 701 including 3*3 grids on the preview interface, and the preview interface also includes a wide-angle image.
  • the user can indicate the main body on the preview interface, and the mobile phone determines the position and size of the guide frame according to the main body indicated by the user, so that the guide frame can cover the main body indicated by the user.
  • the mobile phone may prompt the user on the preview interface to select the subject to be photographed.
  • the mobile phone detects the operation of the user clicking on the building, it determines that the entire connected building is the subject to be photographed, and thus determines that the guide frame is on the preview interface as shown in (c) in FIG. 7B .
  • the guide frame 703 that can cover the entire connected building includes a total of 3*3 grids.
  • the mobile phone displays multiple specification controls on the preview interface, such as 5*5, 4*5, 4*4, 3*4 or 3*3, etc. Determines the number of grids included in the guide box based on the user-selected specification control. For example, after the mobile phone detects the operation of clicking the 3*3 specification control, as shown in (b) of FIG. 8, a guide frame 801 including 3*3 grids is displayed on the preview interface, and the preview interface also includes Wide angle image.
  • the mobile phone may also operate according to the user's instruction to determine the shooting sequence of the grids in the guide frame.
  • the user can move the telephoto camera according to the photographing sequence, so that the telephoto camera is sequentially matched with the grid specified in the sequence.
  • the user when the user sets the position or specification of the guide frame through the methods described in the above embodiments (eg, the methods shown in FIGS. 5-8 ), the user may also set the shooting order of the grids in the guide frame.
  • the mobile phone after determining the specification of the guide frame, can display multiple sequence modes corresponding to the guide frame of the specification, and the mobile phone can determine one sequence mode according to the user's selection operation.
  • the size of the guide frame is 3*3, see (a) in FIG. 9A
  • the preview interface includes multiple sequential mode controls, such as controls 901 to 903 .
  • the mobile phone determines that the shooting sequence is to first shoot the image corresponding to the middle row of grids from left to right, then shoot the image of the upper row of grids from left to right, and then from left to right. Go to the right to take an image of the lower row of grids.
  • the mobile phone detects the user's operation of clicking the sequence mode control 902, it determines that the photographing sequence is to first photograph the image of the grid in the middle row from left to right, then photograph the image of the grid in the upper row from right to left, and then from the left. Go to the right to take an image of the lower row of grids.
  • the mobile phone detects that the user clicks on the sequence mode control 903
  • the mobile phone determines that the shooting sequence is to shoot according to the "zigzag" track from top to bottom.
  • the guide frame of each specification corresponds to a shooting order by default, and the mobile phone uses the default shooting order to shoot after determining the specification of the guide frame.
  • the mobile phone can also modify the shooting sequence according to the user's instruction operation.
  • the mobile phone may prompt the user to shoot according to the shooting sequence.
  • the mobile phone can display shooting sequence prompt information on the preview interface.
  • the mobile phone can display a label and a guide line with an arrow on the guide frame, and the label is used to indicate different rows of grids.
  • the arrows of the guide line indicate the direction to indicate the shooting order of each row of grids.
  • the mobile phone can display a guide line with an arrow on the guide frame to indicate the shooting sequence corresponding to different grids.
  • the shooting sequence may also include other sequential modes, for example, may also include sequential modes as shown in (a)-(d) in FIG. limited.
  • the mobile phone may briefly display the guide frame on the photographing interface, and then display the guide frame on the photographing interface after the user's photographing operation is subsequently detected.
  • the mobile phone does not display the guide frame on the preview interface, but displays the guide frame on the shooting interface after detecting the user's photographing operation.
  • the mobile phone in the preview state, can also collect telephoto images through the telephoto camera according to the preset acquisition frame rate 2 .
  • the telephoto camera is the second camera.
  • the mobile phone may also prompt the user with the real-time shooting range of the telephoto camera through the telephoto frame, so as to present the partial picture captured by the telephoto camera in real time to the user.
  • the telephoto frame is superimposed and displayed on the wide-angle image in the form of a transparent floating frame.
  • the position and size of the telephoto frame on the wide-angle image corresponds to the shooting range of the telephoto camera.
  • the field of view of the wide-angle image in the telephoto frame may be equal to or slightly smaller than the shooting range and field of view of the telephoto camera.
  • the picture range of the wide-angle image in the telephoto frame corresponds to that of the telephoto camera.
  • the frame range of the wide-angle image in the telephoto frame may be equal to or slightly smaller than the frame range of the telephoto image captured by the telephoto camera.
  • the collection frame rate 2 and the collection frame rate 1 may be the same or different, and are not limited.
  • the preview interface includes a wide-angle image 1001 , a telephoto frame 1002 and a guide frame 1003 .
  • the relative position and size of the telephoto frame on the wide-angle image on the preview interface remain basically unchanged.
  • the object distance and the size of the field of view are related. Exemplarily, see (b) in FIG. 10A , the distance between the lens centers of the wide-angle camera and the telephoto camera is fixed, and when the object distance is constant, the size of the field of view is also fixed.
  • the telephoto camera and the wide-angle camera move at the same time, but the relative relationship between the telephoto camera’s field of view and the wide-angle camera’s field of view remains unchanged, so the relative position and size of the telephoto frame on the wide-angle image are also Basically unchanged.
  • the field angle of the telephoto camera is also quite different from the field angle of the wide-angle camera.
  • the field of view is small, and the size of the telephoto frame is small, making it inconvenient for users to view details within the shooting range of the telephoto camera. Therefore, the mobile phone can enlarge the telephoto frame and the wide-angle image in the telephoto frame and display them on the preview interface, so as to facilitate the user to know the shooting range and details of the telephoto camera.
  • the preview interface includes a wide-angle image 1004 , a zoomed-in telephoto frame 1005 , and a guide frame 1006 .
  • the mobile phone displays the target area image corresponding to the guide frame on the wide-angle image on the preview interface, but does not display the complete wide-angle image.
  • the ratio of the size of the target area image to the size of the guide frame is r, and r ⁇ 1.
  • the target area image can be obtained by cropping and zooming in on the full wide-angle image.
  • the field of view of the telephoto camera is also quite different from that of the wide-angle camera.
  • the size of the telephoto frame is small, which is not convenient for users to view the details within the shooting range of the telephoto camera.
  • the mobile phone can enlarge the target area image and the guide frame proportionally and display them on the preview interface, so that the user can easily know the shooting range and details of the telephoto camera.
  • the wide-angle image can be cropped according to the guide frame of the default specification to obtain the target area image, and the target area image and The guide frame is proportionally enlarged and displayed on the preview interface.
  • the specification of the guide frame corresponds to the area/subject selected by the user
  • the mobile phone collects the wide-angle image
  • the wide-angle image can be cropped according to the guide frame to obtain the target area image, and the target area image and the guide frame are proportional to each other. After zooming in, it will be displayed on the preview interface.
  • the complete wide-angle image on the preview interface shown in (b) of FIG. 8 can be replaced with the target area image 1007 in the wide-angle image on the preview interface shown in FIG. 10B .
  • the target area image and the guide frame are enlarged in equal proportions, and the size of the target area image is the same as the guide frame.
  • the size of the ratio r is greater than 1.
  • the mobile phone After detecting the user's photographing operation, the mobile phone displays a wide-angle image and a guide frame superimposed on the wide-angle image on the photographing interface.
  • a shooting operation can be triggered to make the mobile phone enter the shooting process. For example, after the mobile phone detects the user's operation of clicking the photographing control on the preview interface, it determines that the user's photographing operation is detected, thereby entering the photographing process. For another example, after the mobile phone detects the operation of the user's voice instructing to start taking a photo, it determines that the user's photo-taking operation is detected, thereby entering the photo-taking process. It can be understood that the manner for triggering the mobile phone to enter the photographing process may also include gestures and other manners, which are not limited in the embodiments of the present application.
  • a wide-angle image is displayed on the photographing interface, and the wide-angle image is acquired by using a wide-angle camera (ie, the first camera).
  • the wide-angle image on the photographing interface is used as a background image to provide the user with a panoramic image, and the user determines the moving path of the telephoto camera according to the range of the wide-angle image, thereby generating multiple telephoto images stitched image.
  • the wide-angle image is the first frame of image collected by the wide-angle camera after detecting the user's photographing operation.
  • the mobile phone always displays the first frame of image, not the image collected by the wide-angle camera. Perform refresh display.
  • the mobile phone may collect Q (Q is an integer greater than 1) frames of wide-angle images after detecting the user's photo-taking operation, so as to fuse the Q frames of wide-angle images into an initial wide-angle image with better quality image as background image.
  • Q is an integer greater than 1
  • the mobile phone always displays the initial wide-angle image, and does not refresh and display the image captured by the wide-angle camera. That is to say, after the mobile phone detects the user's photographing operation, the wide-angle image displayed on the photographing interface and used as a preview remains unchanged.
  • the first wide-angle image serving as the background image on the photographing interface changes, and is an image acquired by the mobile phone through real-time acquisition of the wide-angle camera according to the preset acquisition frame rate 3 .
  • the acquisition frame rate 3 and the acquisition frame rate 1 may be the same or different.
  • the mobile phone can also display the above-mentioned guide frame on the photographing interface, and the guide frame is superimposed on the background image in the form of a transparent floating frame.
  • the mobile phone can continuously display the entire guide frame on the shooting interface; in other embodiments, the mobile phone can only display the unmatched grids in the guide frame on the shooting interface, instead of continuously displaying the entire guide frame .
  • the mobile phone can collect telephoto images through the telephoto camera according to the preset acquisition frame rate 4 .
  • the acquisition frame rate 4 and the acquisition frame rate 2 may be the same or different.
  • the user can move the telephoto camera by moving the mobile phone, or the user can directly move the telephoto camera, or the mobile phone can automatically control the telephoto camera to move at preset angular intervals.
  • the mobile phone can also display a telephoto frame on the shooting interface. As the telephoto camera moves, the shooting range of the telephoto camera changes, the content of the telephoto image collected by the telephoto camera also changes accordingly, and the position of the telephoto frame also changes accordingly.
  • the telephoto frame can prompt the user in real time the dynamic change process of the shooting range of the telephoto camera during the movement of the telephoto camera.
  • the wide-angle image on the shooting interface can be used as a background image to provide the user with a panoramic image, so as to guide the user to move the telephoto camera to match the telephoto frame with the grids in the guide frame one by one.
  • the mobile phone can control the telephoto camera to automatically move according to the grid order according to the grid arrangement in the guide frame, so that the telephoto camera is connected to the guide frame.
  • the grids are matched one by one without the need to display a telephoto frame on the shooting interface.
  • the wide-angle image used as the background image on the shooting interface changes, because the user does not specifically move the mobile phone, the wide-angle image captured by the mobile phone in real time is basically unchanged or changes little, and the guide frame and grid are on the screen.
  • the position of the telephoto camera is basically unchanged, so the mobile phone controls the telephoto camera to automatically move in the grid order, and the telephoto camera can still be matched with the grid in the guide frame one by one without displaying the telephoto frame.
  • the mobile phone generates a stitched image according to the acquired target telephoto image, and displays a thumbnail of the stitched image on the shooting interface.
  • the mobile phone can collect multiple frames of target telephoto images that match the grid in the guide frame through the telephoto camera.
  • the mobile phone can stitch the target telephoto image to generate the target image.
  • the telephoto image matches the grid
  • the telephoto image may be called the target telephoto image.
  • the content of the telephoto image matches the content of the wide-angle image in the grid means that the content of the telephoto image is exactly or substantially the same as the content of the wide-angle image in the grid.
  • the overlap ratio of the telephoto image and the same content of the wide-angle image in the grid is greater than or equal to a preset value of 3 (eg, 80% or 90%, etc.).
  • the similarity between the histogram of the telephoto image and the wide-angle image in the grid is greater than or equal to the preset value of 4.
  • the histogram here may be a histogram of characteristic parameter values such as brightness.
  • the telephoto image and the wide-angle image in the grid are in the same transform domain (such as fast Fourier transform (FFT), wavelet transform (WT) or discrete cosine transform (discrete cosine transform), The similarity of DCT), etc.) is greater than or equal to the preset value of 5.
  • the measure of similarity can be the sum of the differences of the scale coefficients corresponding to different values.
  • the feature matching degree between the telephoto image and the wide-angle image in the grid is greater than or equal to a preset value of 6, for example, the feature includes a corner point, a convolutional neural network feature, or a SIFI feature.
  • the ways for the mobile phone to obtain the target telephoto image may include: mode 1. After the mobile phone determines that a certain frame of telephoto image matches the grid, the mobile phone captures and obtains the target telephoto image that matches the grid; After matching with the grid, it is determined that this frame of telephoto image is the target telephoto image.
  • the mobile phone can prompt the user of the photographing sequence of the grid in the guide frame, so that the user can move the telephoto camera according to the photographing sequence during the photographing process.
  • the mobile phone can prompt the user for the shooting order during the shooting process, so that the user can move the mobile phone or directly move the telephoto camera according to the shooting order, so that the The telephoto image captured by the telephoto camera is matched to the grid in the guide frame in the order in which it was taken.
  • the mobile phone may prompt the user for the complete shooting sequence.
  • the mobile phone may only prompt a part of the currently required shooting sequence according to the shooting situation, instead of prompting the user for the complete shooting sequence.
  • the user can move the mobile phone or directly move the telephoto camera according to their needs, habits or wishes, so that the telephoto image collected by the telephoto camera and the guide frame grid to match.
  • the telephoto image should be matched with the adjacent grids in the row/column as far as possible.
  • the grid will not be matched again.
  • the wide-angle image on the shooting interface can provide the user with a panoramic image within a large field of view, so the wide-angle image can provide a reference for the user to move the mobile phone or telephoto camera.
  • the corresponding position of the content of the focus image on the wide-angle image is used to accurately control the movement path (such as the moving direction and amplitude) of the mobile phone or telephoto camera, so that the telephoto image can be quickly and accurately matched with the next grid.
  • the telephoto frame can be displayed in real time on the shooting interface, so as to guide the user to move the shooting range of the telephoto camera and the telephoto frame to the position where the first grid to be matched is located.
  • the first grid to be matched is the first grid on the left side of the middle row as shown in (a) of FIG. 11
  • the preview interface includes a wide-angle image and a guide frame.
  • the shooting interface includes a wide-angle image, a guide frame and a telephoto frame 1101 .
  • the photographing interface shown in (b) of FIG. 11 does not display the prompt information of the photographing sequence.
  • the photographing interface shown in (c) of FIG. 11 displays prompt information of the complete photographing sequence, and the photographing interface shown in (d) of FIG. 11 displays prompt information of part of the photographing sequence.
  • the mobile phone may also prompt the user on the shooting interface: please move the mobile phone in the direction of the arrow and match the grid.
  • the photographing process will be described below by taking the photographing sequence shown in (c) of FIG. 11 and the prompt information of a part of the photographing sequence displayed on the photographing interface as an example.
  • the mobile phone may determine, according to the reference wide-angle image, configuration parameters when the telephoto camera collects the target telephoto images corresponding to different grids.
  • the mobile phone performs automatic exposure (AE) configuration, automatic white balance (AWB) adjustment and dynamic range correction (DRC) on the target telephoto image according to the configuration parameters, so as to obtain the target length. focus image.
  • AE automatic exposure
  • AVB automatic white balance
  • DRC dynamic range correction
  • the mobile phone determines the configuration parameters of the telephoto camera when collecting the target telephoto images corresponding to different grids according to the reference wide-angle image corresponding to the global scope, which can make the overall exposure effect, AWB effect and dynamic range of the stitched image obtained according to the target telephoto image. Try to be consistent with the reference wide-angle image, so that the overall change of the stitched image is smooth and the transition is natural.
  • the reference wide-angle image is used to determine the configuration parameters of the telephoto image of the acquisition target during the photographing process, and the reference wide-angle image is the same frame image during the photographing process.
  • the reference wide-angle image may be the above-mentioned initial wide-angle image, or the first frame image collected by the wide-angle camera after detecting the user's photographing operation.
  • the image may be an initial wide-angle image obtained by fusing the above-mentioned multiple frames of images.
  • the reference wide-angle image is correspondingly divided into a plurality of image patches (patches) according to the grid of the guide frame, and each image patch corresponds to a grid of the guide frame.
  • grid 1 corresponds to image block 1
  • grid 2 corresponds to image block 2
  • grid 3 corresponds to image block 3.
  • the mobile phone sets configuration parameters such as AE, AWB or DRC of the target telephoto image of the grid corresponding to the image block according to the parameters such as brightness, color and dynamic range of each image block of the reference wide-angle image.
  • the mobile phone collects the target telephoto image according to the configuration parameters, and realizes the configuration of AE, AWB and DRC according to the wide-angle image to guide the target telephoto image in the corresponding grid.
  • the first grid to be matched is taken as grid 1, and grid 1 corresponds to target telephoto image 1 as an example for description.
  • the mobile phone can first collect the telephoto image, and after determining that the telephoto image matches grid 1, set the configuration parameters of the telephoto camera according to the image block 1 corresponding to grid 1 on the reference wide-angle image, so that the telephoto camera can The configuration parameters are collected to obtain the target telephoto image 1 corresponding to the grid 1 .
  • the mobile phone can set the configuration parameters of the telephoto camera according to the image block 1 corresponding to grid 1 on the reference wide-angle image, so that the telephoto camera can collect telephoto images according to the configuration parameters, until a certain frame of telephoto images and grid 1 After matching, the mobile phone determines that the telephoto image of the frame is the target telephoto image 1 .
  • the mobile phone can perform light metering on the image block 1 on the reference wide-angle image, so as to obtain brightness parameters such as the brightness value, brightness average value, and maximum value of the image block 1, which can reflect the ambient brightness.
  • the exposure meter in the mobile phone is preset with a corresponding relationship between ambient brightness and exposure parameters.
  • the mobile phone can determine the AE configuration parameters of the telephoto image to be collected corresponding to grid 1 according to the ambient brightness situation reflected by the brightness parameter of the image block 1 on the wide-angle image, combined with the exposure table of the telephoto image, for example, determine the exposure time and the exposure time of the telephoto image.
  • Exposure parameters such as ISO.
  • the mobile phone uses this exposure parameter to automatically expose the target telephoto image 1 corresponding to grid 1, so as to improve the exposure effect of the target telephoto image 1.
  • the exposure parameters of the target telephoto image can be determined according to the exposure information of the image blocks in the reference wide-angle image, and the exposure effect of the stitched images obtained from different target telephoto images can be made global as much as possible. Consistent with the reference wide-angle image, so that the overall exposure of the stitched image is also better.
  • the mobile phone can also adjust the target telephoto corresponding to the image block 1 according to the brightness of the adjacent image blocks of the image block 1
  • the exposure parameters of image 1 make the brightness transition between the brightness of the target telephoto image 1 and the adjacent target telephoto images more natural, and avoid the mobile phone independently automatically exposing the target telephoto image corresponding to each grid, resulting in different
  • the exposure effect of the target telephoto image varies greatly, the brightness process of the spliced image is not smooth and natural, and the splicing traces are obvious, which can improve the overall quality of the spliced image.
  • the mobile phone can increase the exposure parameter of target telephoto image 1 determined according to image block 1 by one brightness level, so that the target telephoto The brightness transition between image 1 and target telephoto image 2 corresponding to image block 2 is relatively natural.
  • the mobile phone can determine the AWB configuration parameters of the target telephoto image 1 corresponding to the grid 1 according to the color distribution of the image block 1 on the reference wide-angle image, for example, determine the WB value of the target telephoto image 1 corresponding to the grid 1, that is, RGB The ratio of the three primary colors.
  • the mobile phone correspondingly adjusts the RGB ratio of the target telephoto image 1 corresponding to the grid 1 according to the ratio, so as to improve the color configuration effect of the target telephoto image.
  • the white balance information of the image blocks of the reference wide-angle image can be taken from the global perspective, so that the white balance of the target telephoto image can be achieved from a global perspective.
  • the balance effect is as consistent as possible with the reference wide-angle image, so that the color transition between different target telephoto images included in the spliced image is also more natural, avoiding the mobile phone to perform automatic white balance adjustment for the target telephoto image corresponding to each grid.
  • the white balance effect of different target telephoto images is quite different, the color transition of the stitched image is not smooth and natural enough, and the stitching traces are obvious, which can improve the overall quality of the stitched image.
  • the mobile phone can determine the DRC configuration parameters of the target telephoto image 1 corresponding to the grid 1 according to the dynamic range of the image block 1 on the reference wide-angle image, so as to adjust the dynamic range of the target telephoto image 1 corresponding to the grid 1 accordingly, so that the target
  • the brightness distribution of the telephoto image 1 is relatively consistent with the brightness distribution of the corresponding image block.
  • the dynamic range may include the brightness distribution of different pixels on the image, the brightness difference between different pixels, and the like.
  • the mobile phone can count the dynamic range of image block 1 through the luminance histogram.
  • the image block 1 includes a plurality of pixels whose brightness is lower than 100 and pixels whose brightness is higher than 200.
  • the mobile phone can control the brightness of the pixels of the target telephoto image, so that the target telephoto image includes multiple pixels with a brightness lower than 100 and pixels with a brightness higher than 200, thereby increasing the dynamic range of the target telephoto image.
  • the dynamic range of the reference wide-angle image since the dynamic range of the reference wide-angle image is relatively large, adjusting the dynamic range of the target telephoto image 1 corresponding to the grid 1 according to the dynamic range of the image block 1 on the reference wide-angle image can increase the dynamic range of the target telephoto image 1.
  • the dynamic range makes the target telephoto image 1 have a larger brightness range, richer levels of light and dark, and can provide more image details in bright and dark parts.
  • the mobile phone configures the DRC parameters of the target telephoto image according to the dynamic range information of the image block of the reference wide-angle image, which can make the brightness distribution transition between different target telephoto images on the spliced image more natural from a global perspective, and avoid the mobile phone to separate each network.
  • the DRC of the corresponding target telephoto image results in a large difference in the dynamic range of different target telephoto images, poor dynamic range of the stitched image, and obvious stitching traces, which can improve the overall quality of the stitched image.
  • the telephoto camera can move and continue to collect the telephoto image to acquire the target telephoto image 2 that matches the next grid 2 to be matched.
  • the next grid 2 to be matched is adjacent to at least one grid (eg grid 1 ) that has already been matched.
  • the mobile phone can also configure the telephoto camera to collect the target telephoto image corresponding to other grids according to the image block of the reference wide-angle image (for example, the target telephoto image 2 corresponding to grid 2, the grid The configuration parameters of the corresponding target telephoto image 3, etc.) are not repeated here.
  • the mobile phone can also prompt the grid to the user, so that the user can know the location of the currently matched grid and the current shooting progress.
  • the mobile phone can display the matched grid and other grids in a differentiated manner to prompt the user where the currently matched grid is located, so that the user can know the current shooting progress, the subsequent shooting direction and the telephoto camera. direction of movement.
  • the currently matched grid can be highlighted, bolded, displayed in a color different from other grids, displayed in a specific color, or transformed into a line type different from other grids for display, etc.
  • the user moves the mobile phone or the telephoto camera so that the target telephoto image 1 matches the content of the wide-angle image in the leftmost grid 1 in the middle row of the guide frame.
  • the boundary of grid 1 is changed from a dotted line to a thick solid line, so that it is displayed differently from other grids, so that the user can know that grid 1 is currently matched, and the current shooting progress is the same as that of other grids.
  • Grid 1 corresponds.
  • the mobile phone can also display grid 2 differently from other grids, so that the user can know that grid 2 is currently matched.
  • the current shooting progress corresponds to grid 2.
  • the mobile phone may spliced with the previously obtained spliced image every time a new target telephoto image is obtained, thereby generating a new spliced image. That is, when all grids in the guide frame are not matched, a stitched image is generated according to the multi-frame target telephoto images corresponding to the matched grids.
  • the mobile phone generates a stitched image according to the target telephoto image after obtaining the target telephoto image that matches all the grids in the guide frame, or after shooting ends. This embodiment of the present application does not limit the stitching timing of the stitched images.
  • the process of splicing different target telephoto images to generate a spliced image by a mobile phone may include image registration, image uniformity and color uniformity, and image fusion.
  • image registration refers to the process of matching and stacking different images.
  • the mobile phone can perform feature extraction on the two frames of images to be registered to obtain feature points, find the matching feature point pairs by performing similarity measurement, and then obtain the image space coordinate transformation parameters through the matching feature point pairs, and finally use the coordinate transformation parameters.
  • Image registration The mobile phone can calculate the homography matrix of the target telephoto image 2 relative to the target telephoto image 1, so as to register the target telephoto image 2 with the target telephoto image 1 according to the homography matrix.
  • the image registration algorithm may include SURF feature matching algorithm, SKB feature matching algorithm, ORB feature matching algorithm, grid registration algorithm, optical flow registration algorithm or convolutional neural network (artificial intelligence (AI) network) A registration algorithm, etc., the embodiment of the present application does not limit the specific type of the image registration algorithm.
  • the image homogenization refers to the brightness equalization of the registered images after image registration, so that the brightness transition between adjacent target telephoto images is natural.
  • Brightness equalization of image stitching is a mature technology, which is not limited here.
  • Image homogenization means that after image registration, the statistics of brightness histogram and color histogram are performed for the overlapping part of the registered images, and the cumulative distribution of image brightness and image color is obtained by curve fitting (such as spline curve). function.
  • the brightness and color distribution of one image can be used as the criterion, and the brightness and color of other images can be corrected according to its cumulative distribution function of brightness and color to achieve the purpose of uniform light and color; it can also be based on the brightness of multiple images.
  • color parameters as the common optimization goal, iterative optimization, to achieve the purpose of uniform light and color of all images.
  • Image fusion refers to the process of extracting the relevant information from each image to the maximum extent and synthesizing it into a high-quality image through image processing and computer technology.
  • the image fusion algorithm may include an alpha fusion algorithm, a Poisson fusion algorithm, or a convolutional neural network fusion (AI fusion) algorithm, and the like.
  • AI fusion convolutional neural network fusion
  • the embodiment of the present application does not limit the specific type of the image fusion algorithm.
  • the target telephoto image 2 and the target telephoto image 1 can be registered, lighted and evened, and fused to form a stitched image with a larger field of view. .
  • the target telephoto image 2 and the target telephoto image 1 can be directly registered and fused according to an image registration algorithm, thereby generating a stitched image.
  • a certain overlap ratio for example, 20%
  • the mobile phone can extract features from the target telephoto image 1 and the target telephoto image 2 respectively according to a preset image registration algorithm, and perform image registration according to the feature matching pair between the two.
  • the target telephoto image 2 and the target telephoto image 1 are directly registered and fused to generate a stitched image.
  • the mobile phone can also correct the registered image or the stitched image according to the reference wide-angle image, so as to avoid registration errors caused by less feature point pairs between the telephoto images of the target to be registered.
  • some image contents may be distorted. The coordinates of the distorted image content, so as to correct the distortion and improve the quality of the stitched image.
  • the target telephoto image 2 and the target telephoto image 1 are registered and fused according to the reference wide-angle image.
  • the overlap ratio between the target telephoto image 2 to be registered and the target telephoto image 1 may be small (for example, it may be 10% or 5%, etc.);
  • the mobile phone can also accurately register and fuse the target telephoto image 2 and the target telephoto image 1 according to the reference wide-angle image. In this way, the requirements for the target telephoto image to be matched are relatively loose.
  • the mobile phone can quickly and easily obtain the target telephoto image, reducing the user's shooting time, and avoiding the need to be matched.
  • Registration errors caused by fewer feature point pairs between quasi-target telephoto images Moreover, if the overlap ratio between the target telephoto images is small or non-overlapping, the user can complete the photographing process by taking a few target telephoto images, thereby reducing the number of shooting frames and the shooting time, and improving the shooting efficiency and user shooting experience. .
  • the target telephoto image 2, the target telephoto image 1 and the reference wide-angle image can be registered and fused together.
  • the target telephoto image 2, the target telephoto image 1 and the reference wide-angle image can extract features respectively and match them in pairs, and more feature matching pairs can be obtained in the overlapping area of the three.
  • the mobile phone can obtain more and more accurate feature matching pairs, thereby calculating a more accurate homography matrix, and deforming the target telephoto image 2 according to the homography matrix, so as to achieve better registration, stitching and fusion effects. .
  • the target telephoto image 2 and the target telephoto image 1 can be registered and fused with the reference wide-angle image respectively, and no registration is required between the target telephoto image 2 and the target telephoto image 1 and fusion.
  • the target telephoto image 2 and the reference wide-angle image can be extracted and matched respectively, so as to calculate the homography matrix, and the target telephoto image 2 can be deformed according to the homography matrix, so that the target telephoto image 2 is longer than the target image.
  • Focus image 1 blends better.
  • the overlap ratio between the target telephoto image 2 to be registered and the target telephoto image 1 may be small (for example, it may be 10% or 5%, etc.).
  • the mobile phone can quickly and easily obtain the target telephoto image, reducing the user's shooting time.
  • the overlap ratio between the target telephoto images is small or non-overlapping, the user can complete the photographing process by taking a few target telephoto images, thereby reducing the number of shooting frames and the shooting time, and improving the shooting efficiency and user shooting experience. .
  • the target telephoto image 1 may be registered according to the coordinate system of the reference wide-angle image, that is, the target telephoto image 1 may be fitted to the coordinate position of the same content on the reference wide-angle image.
  • the target telephoto image 2 can also be registered according to the coordinate system of the reference wide-angle image, that is, the target telephoto image 2 can be fitted to the coordinate position of the same content on the reference wide-angle image. If there is no void between the target telephoto image 1 and the target telephoto image 2 that are attached to the reference wide-angle image, the whole formed by the attachment of the target telephoto image 1 and the target telephoto image 2 is the stitched image.
  • the acquisition angle of the telephoto camera may be deflected due to the user's hand shaking or the rotation of the mobile phone, so that the image shift between the target telephoto image 2 and the target telephoto image 1 is large, and it is easy to make the target telephoto image.
  • the mobile phone can detect the hole through various methods.
  • the target telephoto image 1 and the target telephoto image 2 can both be attached to the position of the same content on the reference wide-angle image to determine whether there is a gap between the attached target telephoto image 1 and the target telephoto image 2 , thereby detecting the presence of voids.
  • the phone can determine that a hole has been detected.
  • the mobile phone can also measure and calculate the spatial positional relationship between the target telephoto image 1 and the target telephoto image 2 when shooting through an inertial measurement unit (IMU) (such as a gyroscope) of the mobile phone, and sequentially to detect the presence of voids.
  • IMU inertial measurement unit
  • the mobile phone determines that there is a hole between the target telephoto image 2 and the target telephoto image 1, the mobile phone can fill the content of the same position on the reference wide-angle image into the hole between the target telephoto image 1 and the target telephoto image 2. . In this way, the whole formed by the target telephoto image 1 , the target telephoto image 2 and the filled portion is a stitched image.
  • the mobile phone can fill in the holes between the telephoto images of the target to be spliced according to the reference wide-angle image, and the target telephoto images cannot be registered and spliced due to the holes, and the target telephoto image does not need to be cropped according to the holes.
  • the image field angle and image resolution are lost during stitching, and the stitched image can have a larger field angle and image resolution.
  • cropping is performed at the minimum image height, which will lose image resolution and image view. field angle.
  • the reference wide-angle image can refer to the image 1210 shown in FIG. 12B (a)
  • the target telephoto image 1 can refer to the image 1211 shown in FIG. 12B (a)
  • the target telephoto image 2 can refer to FIG. Image 1212 shown in (b) in 12B.
  • the mobile phone can fill the hole 1213 according to the content of the corresponding position of the reference wide-angle image.
  • the overall image 1214 formed by the target telephoto image 1 , the target telephoto image 2 and the filling portion is a stitched image.
  • the mobile phone may guide the user to take a new frame of the target telephoto image 2 to fill the gap. Empty. For example, in a possible implementation manner, in the presence of holes, the grid 2 corresponding to the target telephoto image 2 will not be displayed differently from other grids, so as to guide the user to shoot a frame matching grid 2 again. Target telephoto image 2. In another possible implementation manner, the mobile phone prompts the user by displaying information or voice playback, etc., to collect a frame of the target telephoto image again to correspond to the current grid.
  • the mobile phone can perform image super-resolution processing on the cavity area to reduce the resolution difference between the cavity filled area and the surrounding area, so as to achieve a better user experience.
  • the mobile phone can also use the AI local search method or the AI image restoration method to predict and fill in the hollow area.
  • the embodiments of the present application do not limit the specific methods for filling and image super-resolution.
  • the mobile phone may also perform ghost removal processing on the photographed moving objects during the splicing process.
  • the target telephoto image may appear on the adjacent N frames (N is an integer greater than 2) of the target telephoto image.
  • N is an integer greater than 2
  • the image of the object, resulting in ghosts (or ghosts, ghosts, etc.) of moving objects appear on the stitched image.
  • the mobile phone can also perform ghost removal processing during the photographing process.
  • the following takes the splicing scene of the target telephoto image 2 and the target telephoto image 1 as an example, and describes the method for removing the ghost image of the moving object through two cases.
  • Moving objects move at a slower speed, and moving objects do not appear ghosted on wide-angle images.
  • Moving objects appear on both the adjacent target telephoto image 2 and target telephoto image 1.
  • the images of moving objects on different target telephoto images are distinguished from each other and are not connected, which easily leads to multiple moving objects appearing on the spliced image. Images are ghosts.
  • the detection of ghost image area is a relatively mature technology at present. For example, it can be estimated and detected by optical flow method or combined with gyroscope data of mobile phone, which will not be described in detail here.
  • the mobile phone can first detect the position of the moving object (the optical flow method, the object detection and tracking method, the method of semantic segmentation, and the method of brightness difference and expansion corrosion can be used). Then, on the spliced image of the target telephoto image 2 and the target telephoto image 1, the mobile phone can retain the complete image of the moving object on the target telephoto image 1, the target telephoto image 2 or the wide-angle image (also called ghost-free image). ), delete the images of moving objects in other areas, and fill the deleted area with the content corresponding to the deleted area on the reference wide-angle image, so as to avoid ghosting of moving objects on the spliced image.
  • the optical flow method, the object detection and tracking method, the method of semantic segmentation, and the method of brightness difference and expansion corrosion can be used. Then, on the spliced image of the target telephoto image 2 and the target telephoto image 1, the mobile phone can retain the complete image of the moving object on the target telephoto image 1, the target telephoto image 2 or
  • the wide-angle image used for hole filling may be a recently collected frame of wide-angle image, a certain frame of wide-angle image previously collected by the mobile phone during the photographing process, or a reference wide-angle image, etc., which are not limited in the embodiments of the present application.
  • the mobile phone can retain the complete image of the moving object on the wide-angle image.
  • the mobile phone in order to make the position of the moving object on the final target image closer to what the user sees last, the mobile phone can retain the complete image of the moving object on the last frame of the target telephoto image.
  • the positions of the moving objects mentioned here may be different on the three images of the target telephoto image 2, the target telephoto image 1 and the wide-angle image.
  • the mobile phone can determine to retain the complete image of the moving object on a certain image according to the corresponding measurement.
  • the mobile phone when the mobile phone retains the complete image of the moving object on the target telephoto image 1 on the spliced image of the target telephoto image 2 and the target telephoto image 1, the mobile phone can delete the image of the moving object on the target telephoto image 2 , and fill the deleted area with the content of the corresponding position on the wide-angle image.
  • the mobile phone can retain the complete image of the moving object on the target telephoto image 1 and delete the image of the moving object on the target telephoto image 2 before the target telephoto image 1 and the target telephoto image 2 are registered. Then, the mobile phone can register and fuse the target telephoto image 1 and the deleted target telephoto image 2, and use the content of the corresponding position on the reference wide-angle image to fill the deleted blank area to generate a stitched image. .
  • the mobile phone can first register and fuse the target telephoto image 1 and the target telephoto image 2 to generate a stitched image. Then, the mobile phone can delete the images of the moving objects on the stitched image (including the images of the moving objects on the target telephoto image 1 and the target telephoto image 2). The mobile phone fits the complete image of the moving object on the target telephoto image 1 to the corresponding position on the stitched image. The mobile phone uses the content of the corresponding position on the reference wide-angle image to fill the hole in the stitched image, and the hole position is the area where the image of the deleted moving object on the target telephoto image 2 is located.
  • the mobile phone When the mobile phone retains the complete image of the moving object on the target telephoto image 2 on the spliced image of the target telephoto image 2 and the target telephoto image 1, the mobile phone can delete the image of the moving object on the target telephoto image 1, and Fill the deleted area with the content of the corresponding position on the wide-angle image.
  • the mobile phone When the mobile phone retains the complete image of the moving object on the wide-angle image on the spliced image of the target telephoto image 2 and the target telephoto image 1, the mobile phone can delete the moving object on the target telephoto image 1 and the target telephoto image 2. image, and fill the deleted area with the content of the corresponding position on the wide-angle image.
  • reference to the wide-angle image may refer to (a) in FIG. 12C .
  • the target telephoto image 1 can be seen in (b) of FIG. 12C , including an image 1221 of a moving object.
  • the target telephoto image 2 can be seen in (c) of FIG. 12C, including an image 1222 of a moving object.
  • the mobile phone deletes the image of the moving object on the target telephoto image 1 and the target telephoto image 2, and fills the deleted area with the content of the corresponding position on the reference wide-angle image, so as to obtain the image shown in (d) in Figure 12C stitched image.
  • Case a No ghosts of moving objects appear on the reference wide-angle image.
  • the mobile phone can use the same method as the above-mentioned slow-moving object to perform ghost removal processing, and use the content of the corresponding position on the reference wide-angle image to fill the ghost area deleted on the stitched image.
  • Case b The ghost of a moving object appears on the reference wide-angle image, and the ghost of a moving object appears on the multi-frame wide-angle images collected in real time by the mobile phone.
  • the mobile phone can perform motion vector estimation or optical flow estimation in combination with the multi-frame wide-angle images collected during the photographing process, so as to determine the motion trajectory of the moving object, and remove the connected area of the moving object on the wide-angle image to obtain a complete Images of moving objects without ghosting. That is to say, the mobile phone can obtain a wide-angle image without ghost images of moving objects directly or after processing.
  • the moving object When the moving speed of the moving object is fast, the moving object appears on both the adjacent target telephoto image 2 and the target telephoto image 1, and the images of the moving object on different target telephoto images are connected with each other, which easily leads to the splicing of images. ghosting of moving objects appears.
  • the mobile phone can attach the target telephoto image 1 and the target telephoto image 2 to the ghost-free wide-angle image, thereby marking the target telephoto image 1 and the target telephoto image 2
  • the connected area of the moving object image on the fitted overall image that is, the ghost area.
  • the wide-angle image without ghost image may be a wide-angle image without ghost image in a certain frame, or a wide-angle image obtained after performing ghost removal processing.
  • the mobile phone can fit the target telephoto image 1 and the target telephoto image 2 to the ghost-free wide-angle image during the registration process, and mark the connected area.
  • the mobile phone can perform motion vector estimation and other processing in combination with multiple frames of wide-angle images collected during the photographing process, thereby determining the connected area of the moving object image on the target telephoto image 2 and the target telephoto image 1 .
  • the mobile phone can delete the image area of the moving object on the spliced image of the target telephoto image 2 and the target telephoto image 1, and fill the deleted area according to the content of the corresponding position on the ghost-free wide-angle image to avoid the spliced image. ghosting of moving objects appears.
  • reference to the wide-angle image may refer to (a) in FIG. 12D .
  • the target telephoto image 1 can be seen in (b) of FIG. 12D , including the ghost image 1231 of the moving object.
  • the target telephoto image 2 can be seen in (c) of FIG. 12D , including the ghost image 1232 of the moving object.
  • the mobile phone deletes the ghost image of the moving object on the target telephoto image 1 and the target telephoto image 2, and fills the deleted area with the content of the corresponding position on the reference wide-angle image, so as to obtain (d) in Figure 12D stitched image.
  • the mobile phone can eliminate the ghosting of moving objects on the stitched image of the target telephoto image during the photographing process, and present a clear, ghost-free stitched image to the user on the shooting interface, thereby improving the image display effect during the photographing process.
  • ghost images may also appear on consecutive multi-frame target telephoto images, for example, the ghost area on consecutive multi-frame target telephoto images is a cat whose body is dragged for a long time.
  • the mobile phone can use the same stitching method to stitch the subsequent target telephoto image k (k is an integer greater than 2) with the previously generated stitched image, thereby generating a new stitched image.
  • the mobile phone can stitch the target telephoto image 3 with the previously generated stitched image to generate a new stitched image.
  • the splicing of the target telephoto image 3 with the previous spliced image can also be understood as the splicing of the target telephoto image 3 and the target telephoto image 2 adjacent to the target telephoto image 3 in the previous spliced image.
  • the stitching process of the subsequent target telephoto images will not be described in detail here.
  • the non-first frame target telephoto image may be spliced with one or more adjacent target telephoto images.
  • registration and splicing can be performed only with the target telephoto image corresponding to the grid in the first row and second column, or it can be registered with all the target telephoto images corresponding to the grid in the first row and second column. Registration and stitching with its adjacent target telephoto images.
  • the mobile phone after obtaining the target telephoto image 1 that matches the grid 1 (ie, the first grid to be matched), the mobile phone can use the thumbnail of the target telephoto image 1 as the background After the wide-angle images of the images are matched and fused, a thumbnail of the target telephoto image 1 is displayed on the shooting interface, so that the user can see the real picture of the target telephoto image 1 that matches the grid 1 .
  • the thumbnail of the target telephoto image 1 is attached to an area on the wide-angle image that has the same image content as the target telephoto image 1 .
  • the position and size of the thumbnail of the target telephoto image 1 may have some deviations from the matched grid 1, or may be exactly the same as the position and size of the matched grid 1.
  • the thumbnail image of the target telephoto image 1 is overlaid on the area of the same image content of the wide-angle image.
  • the thumbnail of the target telephoto image 1 is an image obtained by down-sampling the target telephoto image 1 collected by the telephoto camera.
  • the wide-angle image displayed by the mobile phone on the preview interface and the shooting interface is usually an image obtained by down-sampling the image collected by the wide-angle camera. Since the thumbnail of the target telephoto image and the wide-angle image displayed on the interface come from different cameras and data sources, the display effect of the interface may be different before and after the thumbnail of the target telephoto image is attached.
  • the mobile phone may display a thumbnail of the spliced image on the photographing interface, so as to facilitate the user to know the current real-time photographing progress. For example, after matching and fusing the stitched image thumbnail with the wide-angle image as the background image, the mobile phone can fit the stitched image thumbnail on the area where the wide-angle image and the stitched image thumbnail have the same image content.
  • the stitched image thumbnail can be obtained in different ways.
  • the mobile phone registers and splices the down-sampled adjacent target telephoto images to obtain spliced image thumbnails, and attaches the spliced image thumbnails to the wide-angle image and the spliced image thumbnails that have the same image above the content area.
  • the processing process of obtaining the stitched image thumbnail by the mobile phone is relatively simple, and the processing time is short, and the stitched image thumbnail can be obtained in real time and displayed on the shooting interface in time to avoid stuttering.
  • the process of obtaining the stitched image thumbnail by the mobile phone is processed in parallel with the process of obtaining the stitched image by the mobile phone.
  • the stitched images can be obtained by stitching in real time during the photographing process; they can also be obtained by uniform stitching after obtaining the target telephoto images matching all grids or after shooting.
  • the mobile phone can obtain and display the stitched image thumbnails in real time according to the target telephoto image obtained each time during the photographing process.
  • the mobile phone downsamples the stitched image to obtain a stitched image thumbnail, and fits the stitched image thumbnail on the wide-angle image on an area having the same image content as the stitched image thumbnail.
  • the position and size of the thumbnails of the spliced images may have some deviations from the positions and sizes of the multiple grids that have been matched, or may be exactly the same as the positions and sizes of the multiple grids that have been matched.
  • the mobile phone fits the stitched image thumbnail on the wide-angle image of the shooting interface, allowing users to feel the real, real-time stitching process and stitching progress.
  • the following describes the display situations of the spliced image thumbnails on the shooting interface, respectively, in the two cases that the background image is fixed and not fixed.
  • the user can move the telephoto camera by moving the mobile phone, or the user can directly move the telephoto camera, or the mobile phone can automatically control the telephoto camera to move.
  • the background image on the shooting interface is fixed as the reference wide-angle image
  • the relative position of the guide frame and the background image remains unchanged
  • the content of the background image corresponding to each grid also remains unchanged
  • the telephoto frame is relative to the background.
  • the position of the image can be changed in real time.
  • the mobile phone first matches the grid in the middle row of the guide frame, then matches the grid in the row above the guide frame, and then matches the row below the guide frame. grid.
  • the photographing interface displaying the thumbnails of the spliced images can be referred to (c) in FIG. 12A .
  • the telephoto camera continues to move.
  • the mobile phone displays a real-time telephoto frame corresponding to the shooting range of the telephoto camera on the shooting interface.
  • the photographing interface displaying the thumbnails of the stitched images can be seen in (d) of FIG. 12A .
  • the photographing interface displaying the thumbnails of the spliced images can be referred to (e) in FIG. 12A .
  • the shooting interface showing the thumbnails of the stitched images can be seen in (f) in Figure 12A, and the mobile phone generates a stitching corresponding to the 3*3 grid Image thumbnail.
  • the schematic diagram of the photographing interface may refer to (a)-(e) in FIG. 14 .
  • the background image is not fixed and is a wide-angle image collected in real time by a mobile phone
  • the telephoto frame is determined by the lens center of the wide-angle camera and the telephoto camera, the object distance and the size of the field of view, when the object distance is basically unchanged, in view of the wide-angle camera.
  • the relative position of the lens center of the telephoto camera remains unchanged, and the relative position of the telephoto frame and the background image is basically unchanged. For example, when taking a photo, the telephoto frame is always positioned near the middle of the background image.
  • the wide-angle camera also moves, and the content of the wide-angle image as the background image also changes, but the content of the background image corresponding to each grid remains unchanged. It can also be understood that during the photographing process, the corresponding relationship between the grid and the content of the wide-angle image in the grid remains unchanged, and the grid and the content of the wide-angle image serving as the background image are bound.
  • Mobile phones can bind grids to wide-angle image content in a number of ways.
  • the mobile phone can record the content of the wide-angle image corresponding to each grid after the photo-taking operation is detected; in the subsequent photo-taking process, the mobile phone can use the image matching method to match the grid with the content of the wide-angle image acquired in real time, In this way, the binding of the grid and the content of the wide-angle image is realized.
  • the mobile phone can record the coordinate position of each grid and the corresponding wide-angle image content after the photo-taking operation is detected; in the subsequent photo-taking process, the mobile phone can determine the translation amount and /Rotation amount, so as to calculate the new coordinate position of each grid and the corresponding wide-angle image content according to the translation amount and /rotation amount, so as to realize the binding of the grid and the wide-angle image content.
  • the wide-angle camera and telephoto camera move to the right at the same time, the field of view and image content of the wide-angle image move to the right, and the position of the guide frame on the screen moves to the right with the content of the wide-angle image. Shifting to the left, the position of the telephoto frame relative to the wide-angle image remains largely unchanged.
  • the background image is a wide-angle image collected in real time by a mobile phone
  • a schematic diagram of the shooting interface can be seen in (a) in FIG. 13C , and a target is displayed on the shooting interface.
  • Thumbnail of telephoto image 1 after the grids in the middle row are matched, the schematic diagram of the shooting interface can be seen in (b) in Figure 13C, and the stitched image thumbnails are displayed on the shooting interface; After grid matching, the schematic diagram of the photographing interface can be seen in (c) in FIG. 13C , and the stitched image thumbnails are displayed on the photographing interface.
  • the wide-angle image is shifted to the right
  • the guide frame is shifted to the left
  • the telephoto frame is substantially located in the middle of the wide-angle image.
  • FIG. 12A is described by taking an example that the thumbnail of the target telephoto image is basically aligned with the edge of the matched grid.
  • the edges of the stitched image may be jagged, and Not substantially aligned with the edges of the matched grid.
  • the telephoto camera and the wide-angle camera may not move synchronously.
  • the background image is not fixed and is a wide-angle image collected in real time by the mobile phone, for example, when the background image changes in real time due to the shaking of the mobile phone, the relative position of the guide frame and the background image will change in real time with the content of the background image.
  • the content of the background image corresponding to each grid remains basically unchanged, and the relative position of the telephoto frame and the background image can change in real time as the telephoto camera moves.
  • the size, position, and content of the image covered by the stitched image thumbnail and the wide-angle image are basically the same.
  • the size of the stitched image thumbnail is small, which is inconvenient for users to view the image details.
  • the mobile phone in response to a user's click or long press and other preset operations, can zoom in and display a thumbnail of the stitched image on the shooting interface, so that the user can clearly see the target telephoto stitched image captured by the telephoto camera at any time. The specific details of the object.
  • the mobile phone in order to avoid the size of the stitched image thumbnails being small (especially when the equivalent focal lengths of the telephoto camera and the wide-angle camera are quite different, for example, the ratio of the equivalent focal lengths is greater than a certain preset value), resulting in It is inconvenient for users to view the details of the images, and the mobile phone can automatically zoom in and display the thumbnails of the stitched images on the shooting interface. Similarly, the mobile phone can also enlarge and display the thumbnail of the target telephoto image 1 on the shooting interface.
  • the magnified display multiple may be a default value, or may be related to the ratio of the equivalent focal length of the wide-angle camera to the telephoto camera, or may be a value set by the user, which is not limited.
  • the thumbnail of the target telephoto image 1 after enlarged display or the thumbnail of the spliced image cannot block the grid to be matched.
  • the thumbnail of the zoomed-in target telephoto image 1 and the thumbnail of the stitched image on the shooting interface when shooting in a grid order from left to right, the thumbnail of the zoomed-in target telephoto image 1 and the thumbnail of the stitched image on the shooting interface.
  • the right side is aligned with the right side of the recently matched grid, that is, aligned with the left side of the grid to be matched, so as to avoid the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image from blocking the grid to be matched on the right side.
  • the lower side of the thumbnail of the zoomed-in target telephoto image 1 or the thumbnail of the stitched image is aligned with the lower side of the grid that has been matched recently, that is, the grid to be matched align the upper side of the target telephoto image 1 and the thumbnail of the spliced image to block the grid to be matched on the lower side.
  • the grid in the middle row of the guide frame usually corresponds to the image content that the user most wants to capture, so the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image try not to block the unmatched grid in the middle row.
  • the mobile phone displays the target area image corresponding to the guide frame on the wide-angle image on the shooting interface, instead of displaying the complete wide-angle image.
  • the ratio of the size of the target area image to the size of the guide frame is r, and r ⁇ 1.
  • the target area image can be obtained by cropping and zooming in on the full wide-angle image. In this way, the size of the guide frame and the grid displayed on the shooting interface is larger, which is convenient for the mobile phone to perform mobile shooting and matching according to the larger size grid.
  • the equivalent focal length of the telephoto camera is quite different from the equivalent focal length of the wide-angle camera
  • the guide frame, grid, and target telephoto image 1 Thumbnails/stitched image thumbnails are small in size and inconvenient for users to view.
  • the mobile phone can enlarge the target area image, the guide frame, the thumbnail of the target telephoto image 1/stitched image thumbnail, etc., and display it on the shooting interface, so that the user can view the thumbnail of the larger target telephoto image 1/ The specific content of the stitched image thumbnail.
  • the complete wide-angle image on the shooting interface shown in (d) of FIG. 12A may be replaced with the target area image 1500 in the wide-angle image on the shooting interface shown in FIG. 15C .
  • the target area image, the guide frame and the stitched image thumbnails are enlarged in equal proportions, and the target area is enlarged in equal proportions.
  • the ratio r of the size of the image to the size of the guide frame is greater than 1.
  • the mobile phone displays the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image on the photographing interface.
  • the mobile phone may not display the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image, but only display a splicing frame on the wide-angle image, and the splicing frame is the target telephoto image 1 , or the border of a stitched image thumbnail.
  • the mobile phone can remind the user of the current shooting progress through the splicing box, and does not need to acquire and display the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image, which can reduce the processing load of the mobile phone.
  • the mobile phone may not display the thumbnail of the target telephoto image 1 and the thumbnail of the stitched image, but only highlight (for example, highlight or bold) the matched grid or the stitched image. Matches the border of the grid. In this way, the mobile phone can remind the user of the current shooting progress by highlighting the stitched grid, and does not need to acquire and display the thumbnail of the target telephoto image 1 and the stitched image thumbnail, which can reduce the processing load of the mobile phone.
  • the mobile phone can also give a corresponding prompt to the user according to the current real-time photographing situation. For example, when the phone is moving too fast for the telephoto image to match the grid, the phone can prompt the user to move the phone slowly. For another example, when the moving direction of the mobile phone is opposite to the direction indicated by the shooting sequence, or when the mobile phone moves in the direction of the matched grid, the mobile phone may prompt the user to move the mobile phone in the indicated direction. Or, the mobile phone directly terminates the shooting process, and generates the final target image according to the acquired target telephoto image. For another example, when the telephoto frame is far away from the top of the grid to be matched. The mobile phone can prompt the user to move the mobile phone downwards; when the telephoto frame deviates far below the grid to be matched, the mobile phone can prompt the user to move the mobile phone upwards.
  • the wide-angle image collected by the mobile phone in real time can be used to display as a background image when the background image is not fixed; on the other hand, it can also be used to move moving objects.
  • the reference wide-angle image with better quality can be used as a reference to perform AE, AWB and DRC configuration on the target telephoto image, used as a reference to register and fuse multiple target telephoto images, and use It is used as a reference to perform processing such as hole filling.
  • a target image is generated according to the stitched image.
  • the target image can be generated according to the stitched images obtained from the multiple frames of target telephoto images.
  • the mobile phone can also perform processing such as ghost removal, dynamic range enhancement, or hole filling on the stitched image before generating the target image according to the stitched image, so as to improve the quality of the stitched image.
  • processing such as ghost removal, dynamic range enhancement, or hole filling on the stitched image before generating the target image according to the stitched image, so as to improve the quality of the stitched image.
  • the spliced image of the target image is generated and the quality of the target image is improved.
  • the mobile phone can perform ghost removal processing on the stitched image after the shooting ends and before generating the target image according to the stitched image, so that according to the stitching after ghost removal image to generate the target image.
  • the mobile phone can process the ghosts on the stitched images obtained after shooting together.
  • the mobile phone in order to make the position of the moving object on the final target image closer to what the user sees last, the mobile phone can retain the complete image of the moving object on the last frame of the target telephoto image.
  • the mobile phone when the mobile phone generates a stitched image after the shooting, the mobile phone can process ghost images on the stitched image together.
  • the mobile phone can delete the image of the moving object on the spliced image, and keep the target telephoto image of a certain frame or the wide-angle image of a certain frame of the image. A complete image of a moving object, and fill the hole with the content of the corresponding location on the wide-angle image.
  • the mobile phone can perform motion vector estimation based on multiple frames of wide-angle images, so as to remove the connected areas of moving objects on the wide-angle images to obtain a complete image of moving objects without ghosts.
  • the mobile phone deletes the image area of the moving object on the spliced image, and fills the deleted area with the content of the corresponding position on the wide-angle image without ghosting.
  • This embodiment of the present application does not limit whether the ghost removal process is performed during the shooting process or after the shooting ends.
  • the stitched image of the multi-frame target telephoto images may have a smaller dynamic range, fewer bright layers, a smaller brightness range, insufficient contrast between bright and dark, and insufficient details of dark and bright parts.
  • the mobile phone can enhance the dynamic range of the entire stitched image after the shooting ends and before generating the target image according to the stitched image, for example, a method of enhancing the dynamic range of the photographed photo (HDRnet) can be used to make the stitched image bright
  • HDRnet a method of enhancing the dynamic range of the photographed photo
  • the mobile phone can process the stitched images through the convolutional neural network (AI network) to directly obtain the effect of high dynamic range, thereby obtaining the target image with high dynamic range.
  • AI network convolutional neural network
  • the mobile phone can also adjust the brightness distribution of the spliced image according to the brightness distribution of the reference wide-angle image, so as to increase the brightness range of the spliced image, thereby enhancing the dynamic range of the spliced image.
  • the luminance values in the corresponding regions of the reference wide-angle image and the stitched image range from 30 to 250, and the luminance value of the stitched image ranges from 180 to 230.
  • the mobile phone can adjust the brightness value of some pixels whose brightness value is close to 180 on the spliced image (such as randomly selected pixels or pixels in the edge part, etc.) to 30-180;
  • the brightness value of the pixel is adjusted to between 230-250; thereby increasing the brightness range of the spliced image and enhancing the dynamic range of the spliced image.
  • the mobile phone can also extract the high-frequency component image of the reference wide-angle image, and fuse the high-frequency component image and the stitched image to increase the high-frequency detail of the stitched image (also called high-frequency component fusion).
  • the high-frequency component image includes pixels in the upper edge portion of the reference wide-angle image or pixels in the transition portion of the edges of different objects, and the like.
  • the mobile phone can use wavelet transform or deep learning to extract the high-frequency component image of the reference wide-angle image, so as to extract high-frequency details with large frequency and texture changes and superimpose them on the stitched image to enhance the high-frequency details of the stitched image and enhance the stitching. Image and target image clarity and detail.
  • the mobile phone can also synthesize multiple frames of wide-angle images with high dynamic range, and apply the synthesized high dynamic range effect to the stitched image through the algorithm of uniform light and color.
  • the dynamic range information performs uniform light and color processing on the stitched image, thereby enhancing the dynamic range of the stitched image.
  • the mobile phone can also superimpose the details of the stitched image onto the wide-angle image with high dynamic range effect, and finally obtain the target image with high dynamic range and rich texture details.
  • the mobile phone can use different exposures of multiple frames of wide-angle images to synthesize a wide-angle image with high dynamic range, and then perform uniform light and color processing on the stitched image based on the high dynamic range of the wide-angle image, or The processing of style transfer, so that the stitched image also has the effect of high dynamic range.
  • a cell phone may utilize different exposures of multiple frames of wide-angle images to synthesize a wide-angle image with high dynamic range.
  • the phone can then extract details and textures from the stitched image, overlay it onto a wide-angle image with high dynamic range, and fuse details, color, and brightness, and finally obtain a target image with high dynamic range and high-definition detail.
  • the algorithm for enhancing the dynamic range is not limited to the traditional algorithm or the algorithm of the convolutional neural network.
  • the algorithm for synthesizing a wide-angle image with high dynamic range from multiple frames of wide-angle images is not limited to traditional algorithms or convolutional neural network algorithms.
  • the mobile phone can also perform hole filling on the stitched image, and then generate the target image according to the stitched image after the holes are filled. Since there may be misalignment between the target telephoto images, the edges of the stitched images may not be smooth enough, and there may be empty edges between image parts from different target telephoto images. Therefore, the mobile phone can also fill in the empty edges according to the reference wide-angle image. For neat, beautiful rectangular or square stitched images.
  • the mobile phone fills the empty edge according to the corresponding content of the reference wide-angle image, and does not need to crop the target telephoto image according to the empty edge, which leads to the loss of the image field angle and image resolution during splicing, which can make the spliced image more efficient.
  • Large field of view and image resolution so that the target image generated from the spliced image has a large field of view and image resolution.
  • the mobile phone can use the corresponding areas of multiple frames of wide-angle images for high-resolution synthesis, or use the image super-resolution algorithm to process the corresponding areas of a single frame of reference wide-angle images.
  • the filling of holes and empty edges can have a higher resolution and improve the user experience.
  • the stitched image with empty edges obtained by the mobile phone according to multiple frames of target telephoto images can refer to the image framed by the solid line shown in (a) in FIG. 15D .
  • the obtained stitched image can refer to the image framed by the solid line shown in (b) of FIG. 15D .
  • the reference wide-angle image with better quality is used as a reference to perform AE, AWB adjustment, and DRC configuration on the target telephoto image, which is used as a reference to register and fuse multi-frame target telephoto.
  • the image is used as a reference for hole filling, and is used as a reference to enhance the dynamic range of the entire stitched image after shooting.
  • each frame of target telephoto image is processed according to the same reference wide-angle image, which can make the effect of each target telephoto image and the reference wide-angle image as consistent as possible, so that the final stitched image and The overall effect of the target image is more consistent with the image effect of the reference wide-angle image, so that the final stitched image and the target image as a whole are more natural, with smooth transition and better quality.
  • the mobile phone may prompt the user that the target image is being generated during the processing, so as to prevent the user from mistakenly thinking that the mobile phone is stuck or other abnormal conditions have occurred.
  • the mobile phone can prompt the user through text prompts, voice prompts, or a rotating circle logo.
  • the mobile phone can prompt the user that the target image is currently being generated through text information: processing, please wait; and a rotating circle mark.
  • the mobile phone may determine the end of shooting, and there may also be various methods for the mobile phone to generate the target image according to the spliced image.
  • the mobile phone determines that the photographing is ended after detecting the user's operation of stopping photographing.
  • the mobile phone detects that the user clicks the operation of the stop photographing control 1200 as shown in (e) in FIG. 12A , it determines that the photographing is ended.
  • the operation to stop taking pictures may also be other gesture operations or user voice instruction operations, and the embodiment of the present application does not limit the operations that trigger the mobile phone to end the taking pictures process.
  • the shooting ends automatically.
  • the target image is generated by intercepting the part corresponding to the guide frame from the reference wide-angle image.
  • the mobile phone determines that the shooting is completed before the grid in the guide frame is completed, and the shooting process is performed according to the rows of the grid, the mobile phone discards the entire row of grids that are not completed on the spliced image.
  • a target image is generated according to the stitched images corresponding to the entire row of grids that have been captured, so that the target image is an image corresponding to the entire row of grids.
  • the stitched images corresponding to the grids in the middle row and the upper row of the guide frame are generated as shown in FIG. 17 .
  • the mobile phone determines that the shooting is over before the grid in the guide frame has been shot, and the photo is taken according to the columns of the grid, the mobile phone removes the part of the stitched image that has not been photographed in the entire column, according to the A target image is generated from the stitched images corresponding to the entire column of grids that have been captured, so that the target image is an image corresponding to the entire column of grids.
  • the mobile phone determines that the shooting is completed before the grid in the guide frame is completed, and the shooting process is performed according to the rows of the grid, the mobile phone supplements the stitched image according to the reference wide-angle image. The image corresponding to the latest row of grids, thereby generating the target image.
  • the mobile phone determines that the shooting is over before the grid in the guide frame has been shot, and the shooting process is carried out according to the columns of the grid, the mobile phone will supplement the latest grid column on the stitched image according to the reference wide-angle image. corresponding image to generate the target image.
  • the mobile phone determines that the shooting is completed before the grid in the guide frame is completed, the photographing process is abnormal, and the mobile phone does not generate the target image.
  • the mobile phone can also prompt the user that the shooting is stopped or the shooting is abnormal.
  • the phone automatically ends capturing and generates a target image based on the stitched image.
  • the size of the target image may be the same as the size of the guide frame. If the size of the stitched image is inconsistent with the size of the guide frame due to the dislocation between the target telephoto images during stitching, the mobile phone can crop or fill the stitched image according to the size of the guide frame (fill according to the reference wide-angle image). ), so that the size of the stitched image is consistent with the size of the guide frame.
  • the target image generated by the mobile phone can be referred to (b) in Fig. 17 .
  • the mobile phone can fill the spliced images according to the reference wide-angle image, so as to obtain rules such as rectangles or squares.
  • the shape of the target image, the position and size of the target image and the position and size of the guide frame may differ.
  • the resolution of the wide-angle image collected by the wide-angle camera and the resolution of the telephoto image collected by the telephoto camera are both larger. Since the field of view of the wide-angle camera is much larger than that of the telephoto camera, the number of pixels corresponding to the telephoto image per unit field of view is much larger than the number of pixels corresponding to the wide-angle image per unit field of view.
  • the resolution of the wide-angle image collected by the wide-angle camera is 4000*3000, that is, 12 million pixels
  • the resolution of the telephoto image collected by the telephoto camera is 3264*2448, that is, 8 million pixels.
  • the target image generated by the mobile phone based on the spliced image of the multi-frame target telephoto image has higher definition and clearer details than the wide-angle image. Shoot better.
  • the mobile phone can obtain a high-definition target image with a large field of view by stitching multiple frames of target telephoto images.
  • the telephoto image in the foregoing embodiment is a single-frame image collected by the telephoto camera.
  • the telephoto images involved in the foregoing embodiments may also be multiple frames (for example, 2 frames or 3 frames, etc.) of telephoto images collected by a telephoto camera and generated after registration and fusion of better quality. a frame of image.
  • the target image obtained by splicing the target telephoto image and obtained by splicing the target telephoto image stored in the mobile phone can be specially identified from other images, so as to facilitate the user to intuitively know this type of image.
  • the target image obtained by the mobile phone has a character identification 1801 of "cp" displayed.
  • a specific symbol 1802 is displayed on the target image obtained by the mobile phone.
  • the photographing method described in the above embodiments may be referred to as a solution for displaying a guide frame.
  • Some other embodiments of the present application provide another shooting method. Different from the above-mentioned embodiments, the mobile phone does not display a guide frame on the preview interface and the shooting interface.
  • the shooting method may include:
  • the mobile phone starts the camera function.
  • the mobile phone can take a photograph through the solution provided by the embodiments of the present application without displaying the guide frame.
  • the mobile phone after the mobile phone activates the photographing function and enters the target photographing mode, the mobile phone can take photographs by using the solution provided by the embodiments of the present application without displaying the guide frame.
  • the target photographing mode is the aforementioned wide-view mode.
  • step 1900 reference may be made to the description in the above-mentioned step 200, which will not be repeated here.
  • the mobile phone displays a wide-angle image and a telephoto frame on the preview interface.
  • the mobile phone displays a wide-angle image on the preview interface.
  • the mobile phone displays a telephoto frame on the preview interface to facilitate the user to know the real-time shooting range of the telephoto camera; and the mobile phone does not display the guide on the preview interface. frame.
  • the mobile phone is on the preview interface.
  • the preview interface includes a wide-angle image and a telephoto frame.
  • step 1901 For other related descriptions in step 1901, reference may be made to the description in the above-mentioned step 201, and details are not repeated here.
  • the mobile phone After detecting the user's photographing operation, the mobile phone displays a wide-angle image and a telephoto frame superimposed on the wide-angle image on the photographing interface.
  • step 1902 after the mobile phone detects the user's photographing operation, it does not display the guide frame on the shooting interface, and the mobile phone displays the wide-angle image and the telephoto frame on the shooting interface.
  • step 1902 For other related descriptions in step 1902, reference may be made to the descriptions in the foregoing step 202, and details are not repeated here.
  • the mobile phone generates a stitched image according to the acquired target telephoto image, and displays a thumbnail of the stitched image on the shooting interface.
  • the user when the user wants to shoot the target image, he can refer to the wide-angle image on the preview interface to move the mobile phone or telephoto camera to compose the picture, so that the shooting range of the telephoto camera and the telephoto frame are located in the position where the user wants to The starting position of the captured area. Then, the user can trigger a photographing operation. After the mobile phone detects the user's photographing operation, it can determine the configuration parameters of the telephoto camera according to the image blocks of the reference wide-angle image corresponding to the shooting range of the telephoto camera.
  • the configuration parameters may include configuration parameters such as AE, AWB, or DRC.
  • the mobile phone collects the telephoto image through the telephoto camera according to the configuration parameters such as AE, AWB or DRC, and obtains the first frame of the target telephoto image, that is, the target telephoto image 1.
  • configuration parameters such as AE, AWB, and DRC
  • the target telephoto image needs to match the grid.
  • the target telephoto image does not match the guide frame. box to match the grid.
  • the frame of telephoto image may be the target telephoto image 2 .
  • the matching of the target telephoto image 2 with the target telephoto image 1 includes: the deviation between the abscissa range of the target telephoto image 2 and the abscissa range of the target telephoto image 1 is less than or equal to the preset threshold 1, or the target length
  • the deviation between the ordinate range of the focus image 2 and the ordinate range of the target telephoto image 1 is less than or equal to the preset threshold 2 . That is to say, the target telephoto image 2 and the target telephoto image 1 are basically distributed side-by-side in left and right, or basically distributed in up and down.
  • the matching of the target telephoto image 2 and the target telephoto image 1 also includes: the overlapping area between the target telephoto image 2 and the target telephoto image 1 is greater than or equal to a preset value of 8, or the target telephoto image 2 and the target telephoto image 1.
  • the gap between 1 is less than or equal to the preset value of 9, etc.
  • the mobile phone determines that the matching content between the collected telephoto image and the reference wide-angle image and the matching content of the target telephoto image 1 on the reference wide-angle image are greater than or equal to the preset value of 8
  • the mobile phone determines that the matching content between the target telephoto image 1 and the reference wide-angle image is greater than or equal to the preset value of 8.
  • the target telephoto image 2 is matched with the focal image 1.
  • the user cannot move the mobile phone or the telephoto camera according to the instructions of the guide frame.
  • the user can move the mobile phone or directly move the telephoto camera according to the position of the obtained image content of the target telephoto image 1 relative to the global wide-angle image, as well as his own needs, habits or wishes.
  • the mobile phone can adjust the configuration parameters of the telephoto camera in real time according to the image blocks of the reference wide-angle image corresponding to the shooting range of the telephoto camera, so as to collect the target telephoto image according to the configuration parameters.
  • Image-guided target telephoto images for configurations such as AE, AWB, and DRC.
  • the mobile phone may perform splicing with the previously obtained spliced image every time a new target telephoto image is obtained, thereby generating a new spliced image.
  • the mobile phone can stitch the target telephoto image 1 and the target telephoto image 2 to obtain a stitched image.
  • the mobile phone obtains a new target telephoto image, and the new target telephoto image can be stitched with the previously obtained stitched image to obtain a new stitched image.
  • the mobile phone generates a stitched image according to the target telephoto image after the shooting is completed. This embodiment of the present application does not limit the stitching timing of the stitched images.
  • the image splicing process reference may be made to the description in the solution for displaying the guide frame above, which will not be repeated here.
  • the mobile phone can display the thumbnail of the target telephoto image 1 on the shooting interface.
  • a photographing interface displaying a thumbnail image of the target telephoto image 1 reference may be made to (b) in FIG. 20 .
  • the mobile phone can display the stitched image thumbnails on the photographing interface to prompt the user of the current real-time photographing progress.
  • the mobile phone displays a splicing frame on the photographing interface.
  • the mobile phone can automatically enlarge and display the thumbnail of the target telephoto image 1 and the spliced image thumbnail on the shooting interface.
  • the photographing interface for zooming in and displaying the thumbnail of the target telephoto image 1 may refer to (a) in FIG. 21
  • the photographing interface for zooming and displaying the thumbnail of the spliced image may refer to (b)-(c) in FIG. 21 .
  • the mobile phone displays the target area image corresponding to the guide frame on the wide-angle image on the shooting interface, instead of displaying the complete wide-angle image.
  • the ratio of the size of the target area image to the size of the guide frame is r, and r ⁇ 1.
  • the target area image can be obtained by cropping and zooming in on the full wide-angle image.
  • a target image is generated according to the stitched image.
  • the mobile phone can also perform processing such as ghost removal, dynamic range enhancement or hole filling on the stitched image before generating the target image according to the stitched image, so as to improve the quality of the stitched image. , so as to generate a target image according to the processed spliced image and improve the quality of the target image, which will not be repeated here.
  • processing such as ghost removal, dynamic range enhancement or hole filling on the stitched image before generating the target image according to the stitched image, so as to improve the quality of the stitched image.
  • the mobile phone ends the photographing after detecting the user's operation of stopping the photographing.
  • the mobile phone can preset a maximum number of shooting frames, and the mobile phone automatically ends the shooting after acquiring the target telephoto image with the preset number of frames.
  • the target image is generated according to the stitched image of the target telephoto image.
  • the mobile phone can minimize the edges of the stitched image to obtain a stitched image with a regular shape such as a rectangle or a square, so as to generate a target image according to the stitched image.
  • a regular shape such as a rectangle or a square
  • the schematic diagram of the stitched image thumbnails obtained by the mobile phone according to the target telephoto camera can refer to (a) in Figure 22
  • the schematic diagram of the new stitched image thumbnails obtained by the mobile phone after cropping can refer to Figure 22 (b). ).
  • the mobile phone can fill the vacant part according to the content of the corresponding position on the reference wide-angle image, so as to obtain a stitched image of a regular shape such as a rectangle or a square, so as to obtain a stitched image with a regular shape such as a rectangle or a square. Stitch the images to generate the target image.
  • the schematic diagram of the stitched image thumbnails obtained by the mobile phone according to the target telephoto camera can refer to (a) in FIG. (b) in 23A.
  • the mobile phone regardless of whether the edges of the stitched image are aligned, the mobile phone generates a target image according to the stitched image, and the size of the target image is consistent with the size of the stitched image.
  • the size of the target image obtained by the mobile phone may not be the size desired by the user. Therefore, in a possible technical solution, the user can also edit the generated target image in the gallery to obtain the target image of the desired size.
  • the user can also edit the stitched image to obtain a stitched image of an ideal size, thereby generating a target image of an ideal size.
  • the mobile phone may prompt the user on the shooting interface after the shooting is completed, please set the range of the target image on the stitched image.
  • the mobile phone detects the user's operation of setting the dotted frame 2300 and clicks the OK control, the stitched image is cropped according to the dotted frame 2300, thereby generating the target image within the range indicated by the user as shown in (b) in FIG. 23B .
  • the target image generated by the mobile phone based on the spliced image of the multi-frame target telephoto images is smaller than that of the wide-angle image.
  • the sharpness is higher, the details are clearer, and the shooting effect is better.
  • the mobile phone can obtain a high-definition target image with a large field of view by stitching multiple frames of target telephoto images.
  • the user can move the mobile phone or telephoto camera to collect telephoto images according to their own needs, so as to obtain the target telephoto image of the user's desired position, and then according to the user's desired position.
  • the mobile phone can obtain the target image of the corresponding size or shape according to the stitched image of any specification, which can facilitate the user to shoot and obtain the target image of various sizes in wide format, square format or panoramic format.
  • Some other embodiments of the present application also provide a shooting method, which can obtain a stitched image with a larger and clearer field of view by stitching a telephoto image with a smaller field of view, and then crop the stitched image to obtain different A clear target image corresponding to the target zoom magnification.
  • the mobile phone does not need to use digital zoom to enlarge the image, so the high resolution of the telephoto camera and the high definition of the telephoto image can be retained, and the zoom effect of optical zoom can be realized.
  • This scheme combines stitching and cropping of telephoto images, and can also be called a hybrid zoom scheme.
  • the hybrid zoom scheme may include:
  • the mobile phone starts the camera function.
  • the hybrid zoom method provided by the embodiments of the present application can be used for processing.
  • the mobile phone after the mobile phone starts the photographing function and enters the target photographing mode, it can be processed by the hybrid zoom method provided by the embodiments of the present application.
  • the target photographing mode is taken as an example of the hybrid zoom mode for description.
  • step 2400 For other related descriptions of step 2400, reference may be made to the description in the foregoing step 200, and details are not repeated here.
  • the mobile phone displays a wide-angle image on the preview interface.
  • the mobile phone may not display the guide frame on the preview interface first, and then display the guide corresponding to the target zoom magnification on the preview interface after obtaining the target zoom magnification subsequently. frame.
  • the phone does not display a telephoto frame on the preview interface. In other embodiments, the mobile phone continuously displays the telephoto frame on the preview interface. In some other embodiments, the mobile phone does not display the telephoto frame on the preview interface first, and displays the telephoto frame on the preview interface after obtaining the target zoom magnification subsequently.
  • the mobile phone obtains the target zoom ratio.
  • the target zoom ratio is greater than the zoom ratio of the wide-angle camera (ie, the first camera), and is smaller than the zoom ratio of the telephoto camera (ie, the second camera).
  • the target zoom ratio is the zoom ratio of the target image obtained based on the stitched image of the target telephoto image, the zoom ratio of the final image the user wants to capture, not the zoom ratio of the wide-angle image as the background image. Before and after the user sets the target zoom magnification, the zoom magnification of the wide-angle image as the background image does not change.
  • the target zoom magnification is the zoom magnification set by the user.
  • the mobile phone may prompt the user to set the target zoom magnification by displaying information or playing a voice.
  • the mobile phone prompts the user on the preview interface: In this mode, you can set the zoom ratio to capture a high-definition image corresponding to the zoom ratio.
  • the preview interface of the mobile phone includes multiple optional zoom magnification controls, such as 1.5X controls, 2X controls, 2.5X controls, 3X controls, 3.5X controls, 4X controls and 4.5X controls, etc., the mobile phone determines the corresponding target zoom magnification according to the zoom magnification control selected by the user.
  • a setting interface can be displayed, and the user can set the target zoom magnification based on the setting page.
  • the mobile phone after detecting the zooming/zooming operation of the user on the preview interface, the mobile phone obtains the corresponding target zoom ratio after the zooming/zooming operation.
  • the mobile phone after detecting the user's drag operation on the zoom magnification adjustment lever, the mobile phone obtains the corresponding target zoom magnification after the drag operation.
  • the mobile phone after the mobile phone detects the user's voice instruction to set the zoom ratio, the mobile phone obtains the target zoom ratio set by the user's voice.
  • the mobile phone can use the hybrid zoom method provided by the embodiment of the present application for processing. If the target zoom ratio is less than or equal to the zoom ratio of the wide-angle camera, the mobile phone may not use the hybrid zoom scheme, but directly generate the target image corresponding to the target zoom ratio according to the image captured by the wide-angle camera or the ultra-wide-angle camera. If the target zoom ratio is greater than or equal to the zoom ratio of the long-angle camera, the mobile phone may not use the hybrid zoom scheme, but directly generate the target image corresponding to the target zoom ratio according to the image captured by the telephoto camera or the ultra-telephoto camera.
  • the target zoom ratio may also be the default zoom ratio (for example, the default zoom ratio of the wide-angle camera) or the last used zoom ratio.
  • the mobile phone can also modify the target zoom ratio according to the user's operation.
  • the mobile phone superimposes and displays a guide frame corresponding to the target zoom magnification on the wide-angle image of the preview interface.
  • the guide frame in the hybrid zoom scheme corresponds to the target zoom magnification, and is a guide frame of the minimum specification including the image area size corresponding to the field angle of the target zoom magnification.
  • the image area corresponding to the field of view of the target zoom magnification is located in the middle of the wide-angle image by default.
  • the zoom ratio of the wide-angle camera is 1X
  • the zoom ratio of the telephoto camera is 5X
  • the guide frame can include up to 5*5 grids.
  • the target zoom magnification is 2.5X
  • the field of view of the target zoom magnification corresponds to the image area 2601; for the guide frame corresponding to the target zoom magnification 2.5X, please refer to the dashed guide frame 2602 shown in (a) in FIG. 26A .
  • Block 2602 includes 3*3 grids, and the size of the grid corresponds to the field angle of the telephoto camera; the size of the image area corresponding to the field angle of the target zoom magnification is 2.5 times the grid size.
  • the target zoom magnification is 2.5X
  • FIG. 26A including a guide frame 2604 corresponding to the target zoom magnification.
  • the image area corresponding to the target zoom magnification 3X is the same size as the guide frame.
  • the guide frame corresponding to the target zoom magnification 3X please refer to the dotted guide frame 2603 shown in (b) in FIG. 26A .
  • the guide frame 2603 includes 3*3 grids, and the image size corresponding to the field angle of the target zoom magnification is 3 times the grid size.
  • the mobile phone in the preview state, can prompt the user by displaying information, voice broadcast, etc., during the photographing process, please press the guide frame to shoot, so as to crop the generated stitched image and obtain a zoom ratio that meets the target zoom ratio. target image.
  • the mobile phone can prompt the user by displaying information on the preview interface: Please press the dotted guide frame to capture a stitched image during the photographing process, and the stitched image is used for cropping to obtain the zoom you instructed.
  • the mobile phone can also continuously display the target frame corresponding to the target zoom ratio on the wide-angle image of the preview interface.
  • the position and size of the target frame are consistent with the position and size of the image area corresponding to the field angle of the target zoom magnification.
  • the mobile phone can display the target frame corresponding to the target zoom magnification on the preview interface, so as to prompt the user with the position and size of the image area size corresponding to the field of view of the current target zoom magnification, so that the user can know the zoom according to the current target zoom ratio.
  • the guide frame is the smallest size guide frame including the target frame.
  • the size of the guide frame is greater than or equal to the size of the target frame, that is, greater than or equal to the image size corresponding to the field angle of the target zoom magnification.
  • the target frame is located in the middle of the wide-angle image by default.
  • the zoom ratio of the wide-angle camera is 1X
  • the zoom ratio of the telephoto camera is 5X
  • the guide frame can include up to 5*5 grids.
  • the target zoom magnification is 2.5X
  • the target frame corresponding to the target zoom magnification of 2.5X may refer to the solid-line rectangular frame 2601 shown in (b) of FIG. 26A .
  • the target zoom magnification is 3X
  • the size of the target frame corresponding to the target zoom magnification 3X is consistent with the size of the frame of the guide frame.
  • FIG. 26B for a schematic diagram of the preview interface, including a guide frame 2604 corresponding to the target zoom ratio and a target frame 2605 corresponding to the target zoom ratio.
  • the target frame on the preview interface is located in the middle of the wide-angle image by default.
  • the user can also move the position of the target frame, and the position of the guide frame also changes correspondingly with the change of the position of the target frame.
  • the preview interface shown in (a) in FIG. 27 if the mobile phone detects that the user drags the target frame to the right, as shown in (b) in FIG. 27 , the target frame and the guide frame are move to the right.
  • the user can move the position of the guide frame, and the position of the target frame changes accordingly.
  • the mobile phone after acquiring the target zoom ratio, the mobile phone briefly displays the target frame on the preview interface to prompt the user the size of the image corresponding to the field of view of the current target zoom ratio, so as to facilitate the user to determine the current target Check whether the zoom ratio is appropriate, and then stop displaying the target frame.
  • the mobile phone can record the position and size of the target frame. After the mobile phone determines that the shooting is over, the stitched image can be cropped according to the recorded position and size of the target frame to obtain the target image.
  • the mobile phone After detecting the user's photographing operation, the mobile phone displays a wide-angle image on the photographing interface, and a guide frame superimposed on the wide-angle image, where the guide frame corresponds to the target zoom magnification.
  • the phone can display a wide-angle image and a guide frame superimposed on the wide-angle image.
  • the mobile phone can also display a telephoto frame on the shooting interface.
  • the mobile phone can also display a target frame on the shooting interface.
  • the mobile phone can temporarily or continuously prompt the user by displaying information, voice broadcast, etc., during the photographing process, please press the guide frame to photograph, so as to crop the stitched image obtained by photographing, Get the target image that matches the target zoom ratio.
  • the mobile phone displays the captured complete wide-angle image on the preview interface and the shooting interface.
  • the mobile phone can replace the complete wide-angle image displayed on the preview interface and the shooting interface with the target area image corresponding to the guide frame on the wide-angle image.
  • the mobile phone generates a stitched image according to the acquired target telephoto image, and displays a thumbnail of the stitched image on the shooting interface.
  • step 2404 For the relevant description of step 2404, reference may be made to the description in step 203, which will not be repeated here.
  • a thumbnail image of the target telephoto image 1 as well as a wide-angle image, a guide frame, and a telephoto frame are displayed on the shooting interface.
  • the stitched image thumbnails, as well as a wide-angle image, a guide frame, and a telephoto frame are displayed on the shooting interface.
  • the stitched image is cropped to generate a target image.
  • the mobile phone can also perform processing such as ghost removal, dynamic range enhancement or hole filling on the stitched image before generating the target image according to the stitched image, so as to improve the quality of the stitched image. , so as to generate a target image according to the processed spliced image and improve the quality of the target image, which will not be repeated here.
  • processing such as ghost removal, dynamic range enhancement or hole filling on the stitched image before generating the target image according to the stitched image, so as to improve the quality of the stitched image.
  • the mobile phone determines that the shooting ends. For example, in the first case, after the grids in the guide frame are all photographed, the mobile phone automatically ends the photographing, and the stitched image is cropped to the size of the target frame to generate the target image. Wherein, when the size of the guide frame is the same as the size of the target frame, the mobile phone does not need to crop the stitched image, but can directly generate the target image according to the stitched image. Exemplarily, in the case shown in (c) of FIG. 28 , the target image generated by the mobile phone may refer to (d) of FIG. 28 .
  • the mobile phone determines that the photographing is ended after detecting the user's operation of stopping photographing.
  • the mobile phone crops and enlarges the reference wide-angle image or the wide-angle image, thereby generating an image of the target zoom magnification through digital zooming. If the target frame is not displayed on the shooting interface, after the mobile phone determines that the shooting is over, the position and size of the target frame can be determined according to the target zoom magnification, so that the target image can be obtained by cropping the reference wide-angle image or wide-angle image according to the target frame.
  • the mobile phone can determine the position and size of the image area corresponding to the field of view of the target zoom magnification after the shooting is completed, so as to determine the position and size of the stitched image according to the position and size of the image area. Crop to get the target image.
  • the mobile phone can determine the position and size of the target frame according to the target zoom ratio after the shooting is completed, so as to obtain the target image by cropping the stitched image according to the position and size of the target frame.
  • the mobile phone can determine the position and size of the target frame according to the target zoom ratio, and record the position and size of the target frame, so that after the shooting, according to the The position and size of the target frame are used to crop the stitched image to obtain the target image.
  • the position and size of the image area corresponding to the field of view of the target zoom magnification are the position and size of the target frame.
  • the solution corresponding to the above-mentioned first case is obtained by stitching and cropping a telephoto image with a higher resolution and a clearer small field of view.
  • the resolution and clarity of the target image are also higher, the image quality is better, and the zoom effect of optical zoom can be realized.
  • the solutions corresponding to the above-mentioned first case in the embodiment of the present application can make the definition of the entire target image higher, and achieve the zoom effect of optical zoom.
  • the telephoto image collected in real time is not displayed in the telephoto frame, but is only used to indicate the real-time shooting range corresponding to the telephoto camera.
  • a down-sampling image of the telephoto image collected by the telephoto camera in real time is displayed in the telephoto frame, so as to present the telephoto image collected by the telephoto camera in real time to the user.
  • the position of the telephoto image is opposite to the position of the same content on the wide-angle image.
  • a telephoto image captured in real time by the telephoto camera is displayed in the telephoto frame.
  • the telephoto frame is located at a preset position on the interface, for example, at the lower left corner or the lower right corner of the interface.
  • the telephoto frame 2900 is located at the lower left corner of the interface.
  • the shooting method provided in the above embodiment can still be used to obtain the The target image is not repeated in this embodiment of the present application.
  • the above description takes the electronic device as a mobile phone as an example.
  • the electronic device is other devices such as a tablet computer or a smart watch, the target image can still be obtained by using the shooting method provided in the above embodiment, which is not repeated in this embodiment of the present application.
  • the electronic device includes corresponding hardware and/or software modules for executing each function.
  • the present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
  • the electronic device can be divided into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that, the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • Embodiments of the present application further provide an electronic device, including one or more processors and one or more memories.
  • the one or more memories are coupled to the one or more processors for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform
  • the above-mentioned related method steps implement the shooting method in the above-mentioned embodiment.
  • An embodiment of the present application also provides an electronic device, as shown in FIG. 30 , including: a display screen (or screen) 3001, one or more processors 3002, multiple cameras 3003, a memory 3004, and one or more computers
  • the above-mentioned devices may be connected through one or more communication buses 3006.
  • the one or more computer programs 3005 are stored in the aforementioned memory 3004 and configured to be executed by the one or more processors 3002, the one or more computer programs 3005 comprising instructions that may be used to perform the aforementioned implementations the steps in the example.
  • the processor 3002 may be the processor 110 shown in FIG. 1
  • the memory 3004 may be the internal memory 121 shown in FIG. 1
  • the camera 3003 may be the camera 193 shown in FIG.
  • the display screen 3001 may specifically be the display screen 194 shown in FIG. 1 .
  • Embodiments of the present application further provide a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to realize the above-mentioned embodiments shooting method in .
  • Embodiments of the present application also provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the photographing method executed by the electronic device in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the photographing method executed by the electronic device in the foregoing method embodiments.
  • the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided method. The beneficial effects in the corresponding method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be realized in the form of hardware, and can also be realized in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Abstract

Provided are a photographing method and a device, which relate to the technical field of electronics. With reference to an image collected by a first camera with a relatively large angle of view, a second camera with a relatively small angle of view can be used to photograph images, and splice the images to obtain a target image with a relatively large angle of view, wherein the target image has a higher definition, clear details and a better photographing effect. The solution comprises: an electronic device starting a photographing function; displaying, on a preview interface, an image collected by a first camera and a guide box; after a photographing operation of a user is detected, displaying a first image and a guide box on a photographing interface, wherein the first image is obtained according to the image collected by the first camera, the guide box comprises a plurality of grids, and a single grid corresponds to the size of an angle of view of a second camera; displaying splicing information on the photographing interface, wherein the splicing information is used for indicating photographing progress; generating a spliced image according to acquired multiple frames of target photographed images; and after photographing is finished, generating a target image according to the spliced image. The embodiments of the present application are used for photographing images.

Description

一种拍摄方法及设备A shooting method and equipment
本申请要求于2020年7月30日提交国家知识产权局、申请号为202010754701.X、申请名称为“一种拍摄方法及设备”的中国专利申请,以及于2020年11月18日提交国家知识产权局、申请号为202011296539.8、申请名称为“一种拍摄方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires a Chinese patent application with an application number of 202010754701.X and an application title of "A Shooting Method and Equipment" to be submitted to the State Intellectual Property Office on July 30, 2020, as well as a national knowledge application on November 18, 2020 The Chinese Patent Office, the application number is 202011296539.8, and the application title is "a shooting method and apparatus" for the priority of the Chinese patent application, the entire contents of which are incorporated in this application by reference.
技术领域technical field
本申请实施例涉及电子技术领域,尤其涉及一种拍摄方法及设备。The embodiments of the present application relate to the field of electronic technologies, and in particular, to a photographing method and device.
背景技术Background technique
目前,手机或手表等电子设备可以使用等效焦距较小的广角摄像头,拍摄获得视场角(field of view,FOV)较大的目标图像。然而,该目标图像上局部细节的清晰度较低。尤其地,当电子设备使用广角摄像头拍摄较大的场面或较远的风景时,用户可能无法清楚地看到目标图像上的细节内容。At present, electronic devices such as mobile phones or watches can use a wide-angle camera with a smaller equivalent focal length to capture a target image with a larger field of view (FOV). However, the clarity of local details on this target image is low. In particular, when an electronic device uses a wide-angle camera to shoot a larger scene or a distant scenery, the user may not be able to clearly see the details on the target image.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种拍摄方法及设备,能够参考视场角较大的第一摄像头采集的图像,使用视场角较小的第二摄像头拍摄图像并拼接获得视场角较大的目标图像,且目标图像的清晰度较高,细节清楚,拍摄效果较好。Embodiments of the present application provide a shooting method and device, which can refer to an image collected by a first camera with a larger field of view, use a second camera with a smaller field of view to shoot images, and stitch them to obtain a target image with a larger field of view , and the clarity of the target image is high, the details are clear, and the shooting effect is better.
为达到上述目的,本申请实施例采用如下技术方案:In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
一方面,本申请实施例提供了一种拍摄方法,应用于电子设备,电子设备包括第一摄像头和第二摄像头,第二摄像头的等效焦距大于第一摄像头的等效焦距。该方法包括:电子设备启动拍照功能。而后,电子设备在预览界面上显示第一摄像头采集到的图像和引导框。电子设备检测到用户的拍照操作后,在拍摄界面上显示第一图像,以及叠加在第一图像之上的引导框;其中,第一图像根据第一摄像头采集的图像获得,引导框包括多个网格,单个网格与第二摄像头视场角的大小相对应。电子设备在拍摄界面上显示拼接信息,拼接信息用于指示拍摄进度,拼接信息与引导框中的多个网格所匹配的多帧目标拍摄图像相对应,目标拍摄图像通过第二摄像头采集获得。电子设备根据多帧目标拍摄图像生成拼接图像。在拍摄结束后,电子设备根据拼接图像生成目标图像。On the one hand, an embodiment of the present application provides a shooting method, which is applied to an electronic device. The electronic device includes a first camera and a second camera, and the equivalent focal length of the second camera is greater than the equivalent focal length of the first camera. The method includes: the electronic device starts a photographing function. Then, the electronic device displays the image collected by the first camera and the guide frame on the preview interface. After detecting the user's photographing operation, the electronic device displays the first image on the photographing interface, and a guide frame superimposed on the first image; wherein the first image is obtained according to the image collected by the first camera, and the guide frame includes a plurality of Grid, a single grid corresponds to the size of the field of view of the second camera. The electronic device displays splicing information on the shooting interface, the splicing information is used to indicate the shooting progress, and the splicing information corresponds to the multi-frame target shooting images matched with the multiple grids in the guide frame, and the target shooting images are acquired by the second camera. The electronic device generates a stitched image according to the multi-frame target captured images. After the shooting, the electronic device generates the target image according to the stitched image.
在该方案中,电子设备能够参考等效焦距较小、视场角较大的第一摄像头采集的第一图像,使用等效焦距较大、视场角较小的第二摄像头拍摄目标拍摄图像,并拼接获得视场角较大的目标图像,且目标图像的清晰度较高,细节清楚,拍摄效果较好。并且,在拍摄界面上,第一图像作为背景图像进行显示,第一图像上还可以叠加显示引导框,以指导第二摄像头移动来拍摄与引导框中的网格相匹配的目标拍摄图像。电子设备还可以在拍摄界面上显示拼接信息,以为用户实时指示当前的拍摄进度。In this solution, the electronic device can refer to the first image captured by the first camera with a smaller equivalent focal length and a larger field of view, and use the second camera with a larger equivalent focal length and a smaller field of view to capture an image of the target , and splicing to obtain a target image with a larger field of view, and the target image has high definition, clear details and better shooting effect. In addition, on the shooting interface, the first image is displayed as a background image, and a guide frame can be superimposed on the first image to guide the second camera to move to shoot a target image that matches the grid in the guide frame. The electronic device may also display stitching information on the shooting interface to indicate the current shooting progress in real time for the user.
在一种可能的实现方式中,第一图像为检测到用户的拍照操作后,第一摄像头采集到的第一帧图像;或者,第一图像为检测到用户的拍照操作后,第一摄像头采集到 的Q帧图像融合后的图像,Q为大于1的整数;或者,第一图像为检测到用户的拍照操作后,第一摄像头在拍照过程中采集获得的图像。In a possible implementation manner, the first image is the first frame image collected by the first camera after detecting the user's photographing operation; or, the first image is the first frame image collected by the first camera after detecting the user's photographing operation The obtained image of Q frames after image fusion, where Q is an integer greater than 1; or, the first image is an image acquired by the first camera during the photographing process after detecting the user's photographing operation.
也就是说,在拍照过程中,在拍摄界面上作为背景图像显示的第一图像,可以是固定的一帧图像,也可以是实时刷新的图像。That is to say, during the photographing process, the first image displayed as the background image on the photographing interface may be a fixed frame of image or an image refreshed in real time.
在另一种可能的实现方式中,目标拍摄图像与所匹配的网格中,第一图像的相同内容的重叠比例大于或者等于第一预设值;或者,目标拍摄图像与所匹配的网格中,第一图像的特征参数的直方图的相似度大于或者等于第二预设值;或者,目标拍摄图像与所匹配的网格中,第一图像在同种变换域的相似度大于或者等于第三预设值;或者,目标拍摄图像与所匹配的网格中,第一图像的特征匹配度大于或者等于第四预设值。In another possible implementation manner, in the target captured image and the matched grid, the overlap ratio of the same content of the first image is greater than or equal to the first preset value; or, the target captured image and the matched grid , the similarity of the histogram of the feature parameters of the first image is greater than or equal to the second preset value; or, in the target captured image and the matched grid, the similarity of the first image in the same transformation domain is greater than or equal to the third preset value; or, in the target captured image and the matched grid, the feature matching degree of the first image is greater than or equal to the fourth preset value.
也就是说,电子设备可以通过多种方式来确定目标拍摄图像与网格是否匹配。That is, the electronic device can determine whether the target captured image matches the grid in various ways.
在另一种可能的实现方式中,该方法还包括:电子设备根据参考图像上与网格对应的图像块,确定第二摄像头采集目标拍摄图像的配置参数。电子设备根据配置参数获取与网格相匹配的目标拍摄图像。In another possible implementation manner, the method further includes: the electronic device determines, according to the image blocks corresponding to the grid on the reference image, configuration parameters of the image captured by the second camera to capture the target. The electronic device acquires the captured image of the target matched with the grid according to the configuration parameters.
这样,电子设备可以根据全局范围对应的参考图像,确定第二摄像头采集不同网格对应的目标拍摄图像时的配置参数,可以使得根据目标拍摄图像获得的拼接图像整体的效果尽量与参考图像一致,使得拼接图像整体变化较为平滑且过渡自然。In this way, the electronic device can determine the configuration parameters when the second camera collects the target captured images corresponding to different grids according to the reference image corresponding to the global scope, so that the overall effect of the stitched image obtained according to the target captured image can be as consistent as possible with the reference image, The overall change of the stitched image is smoother and the transition is natural.
在另一种可能的实现方式中,配置参数至少包括以下一种或多种:自动曝光AE配置参数、自动白平衡AWB配置参数或动态范围校正DRC配置参数。In another possible implementation manner, the configuration parameters include at least one or more of the following: automatic exposure AE configuration parameters, automatic white balance AWB configuration parameters, or dynamic range correction DRC configuration parameters.
这样,电子设备可以使得根据目标拍摄图像获得的拼接图像整体的曝光效果、AWB效果或动态范围尽量与参考图像一致,使得拼接图像整体变化较为平滑且过渡自然。In this way, the electronic device can make the overall exposure effect, AWB effect or dynamic range of the stitched image obtained from the target captured image as consistent as possible with the reference image, so that the overall change of the stitched image is smoother and the transition is natural.
在另一种可能的实现方式中,多帧目标拍摄图像包括第一目标拍摄图像和第二目标拍摄图像,电子设备根据多帧目标拍摄图像生成拼接图像,包括:电子设备对第一目标拍摄图像和第二目标拍摄图像进行第一图像处理后,生成拼接图像,第一图像处理包括图像配准。In another possible implementation manner, the multi-frame captured images of the target include a first captured image of the target and a second captured image of the target, and the electronic device generates a stitched image according to the multi-frame captured images of the target, including: the electronic device captures an image of the first target After performing first image processing with the second target captured image, a stitched image is generated, and the first image processing includes image registration.
也就是说,电子设备对第一目标拍摄图像和第二目标拍摄图像进行配准后,生成拼接图像。That is, after the electronic device registers the captured image of the first target and the captured image of the second target, a stitched image is generated.
在另一种可能的实现方式中,电子设备对第一目标拍摄图像和第二目标拍摄图像进行图像配准,包括:电子设备根据预设的图像配准算法,分别对第一目标拍摄图像与第二目标拍摄图像提取特征;电子设备根据获得的特征匹配对,配准第一目标拍摄图像和第二目标拍摄图像。In another possible implementation manner, the electronic device performs image registration on the captured image of the first target and the captured image of the second target, including: the electronic device, according to a preset image registration algorithm, separately registers the captured image of the first target and the captured image of the second target. The second target captured image extracts features; the electronic device registers the first target captured image and the second target captured image according to the obtained feature matching pairs.
也就是说,电子设备可以提取特征后,根据特征匹配对配准第一目标拍摄图像和第二目标拍摄图像。That is to say, after the electronic device extracts the features, the captured image of the first target and the captured image of the second target can be registered according to the feature matching pair.
在另一种可能的实现方式中,该方法还包括:电子设备根据参考图像对配准后的图像进行修正。In another possible implementation manner, the method further includes: the electronic device corrects the registered image according to the reference image.
即,电子设备可以根据参考图像,对根据特征匹配对配准后的结果进行修正。That is, the electronic device can correct the result of the registration according to the feature matching pair according to the reference image.
在另一种可能的实现方式中,电子设备对第一目标拍摄图像和第二目标拍摄图像进行图像配准,包括:电子设备分别对第一目标拍摄图像和参考图像提取特征,根据 获得的特征匹配对配准第一目标拍摄图像和参考图像。电子设备分别对第二目标拍摄图像和参考图像提取特征,根据获得的特征匹配对配准第二目标拍摄图像和参考图像。In another possible implementation manner, the electronic device performs image registration on the captured image of the first target and the captured image of the second target, including: the electronic device extracts features from the captured image of the first target and the reference image respectively, and according to the obtained features The matched pair registers the first target captured image and the reference image. The electronic device extracts features from the captured image of the second target and the reference image, respectively, and registers the captured image of the second target and the reference image according to the obtained feature matching pair.
也就是说,电子设备可以根据特征匹配对,配准第一目标拍摄图像和参考图像,并配准第二目标拍摄图像和参考图像,从而达到配准第一目标拍摄图像和第二目标拍摄图像的目的。That is to say, the electronic device can register the first target captured image and the reference image according to the feature matching pair, and register the second target captured image and the reference image, so as to achieve the registration of the first target captured image and the second target captured image the goal of.
在另一种可能的实现方式中,该方法还包括:电子设备分别对第一目标拍摄图像和第二目标拍摄图像提取特征,根据获得的特征匹配对配准第一目标拍摄图像和第二目标拍摄图像;电子设备根据第一目标拍摄图像、第二目标拍摄图像和参考图像的重叠区域的特征匹配对,计算单应性矩阵;电子设备根据单应性矩阵,对第二目标拍摄图像进行变形。In another possible implementation manner, the method further includes: the electronic device extracts features from the captured image of the first target and the captured image of the second target, respectively, and matches the paired registration of the captured image of the first target and the second target according to the obtained features Shooting an image; the electronic device calculates a homography matrix according to the feature matching pair of the overlapping area of the first target shooting image, the second target shooting image and the reference image; the electronic device deforms the second target shooting image according to the homography matrix .
也就是说,电子设备可以分别配准第一目标拍摄图像和参考图像,配准第二目标拍摄图像和参考图像,以及配准第一目标拍摄图像和第二目标拍摄图像,并根据第一目标拍摄图像、第二目标拍摄图像和参考图像的重叠区域的特征匹配对计算单应性矩阵,以对第二目标拍摄图像进行变形,使得第二目标拍摄图像的融合效果更好。That is to say, the electronic device can register the first target captured image and the reference image, the second target captured image and the reference image, and the first target captured image and the second target captured image, respectively. The feature matching pair of the overlapping area of the captured image, the second target captured image and the reference image calculates a homography matrix to deform the second target captured image so that the fusion effect of the second target captured image is better.
在另一种可能的实现方式中,电子设备对第一目标拍摄图像和第二目标拍摄图像进行图像配准,包括:将第一目标拍摄图像贴合在参考图像上具有相同图像内容的坐标位置;将第二目标拍摄图像贴合在参考图像上具有相同图像内容的坐标位置;若第一目标拍摄图像与第二目标拍摄图像之间存在空洞,则根据参考图像上与空洞对应位置的图像内容进行空洞填充。In another possible implementation manner, the electronic device performs image registration on the captured image of the first target and the captured image of the second target, including: fitting the captured image of the first target to a coordinate position having the same image content on the reference image ; The second target photographed image is attached to the coordinate position with the same image content on the reference image; If there is a hole between the first target photographed image and the second target photographed image, then according to the image content of the corresponding position of the hole on the reference image Fill in the holes.
在该方案中,电子设备可以根据参考图像的坐标系,配准第一目标拍摄图像和第二目标拍摄图像。In this solution, the electronic device may register the captured image of the first target and the captured image of the second target according to the coordinate system of the reference image.
在另一种可能的实现方式中,第一图像处理还包括去鬼影处理,电子设备对第一目标拍摄图像和第二目标拍摄图像进行第一图像处理后生成拼接图像,包括:保留第一目标拍摄图像上运动物体的无鬼影图像;删除第二目标拍摄图像上运动物体的图像;对第一目标拍摄图像和第二目标拍摄图像进行图像配准后生成拼接图像;根据参考图像对拼接图像上的空洞进行填充。In another possible implementation manner, the first image processing further includes ghost removal processing, and the electronic device performs first image processing on the first target captured image and the second target captured image to generate a stitched image, including: retaining the first image A ghost-free image of a moving object on the target captured image; delete the image of the moving object on the second target captured image; perform image registration on the first target captured image and the second target captured image to generate a stitched image; Fill the holes in the image.
在该方案中,电子设备可以保留第一目标拍摄图像上运动物体的无鬼影图像,并对第一目标拍摄图像和第二目标拍摄图像生成的拼接图像进行空洞填充,以达到去鬼影的目的。In this solution, the electronic device can retain the ghost-free image of the moving object on the captured image of the first target, and fill holes in the spliced image generated by the captured image of the first target and the captured image of the second target, so as to achieve a ghost-free image. Purpose.
在另一种可能的实现方式中,第一图像处理还包括去鬼影处理,电子设备对第一目标拍摄图像和第二目标拍摄图像进行第一图像处理后生成拼接图像,包括:对第一目标拍摄图像和第二目标拍摄图像进行图像配准;在配准后的图像上保留运动物体的无鬼影图像,无鬼影图像来自第一目标拍摄图像、第二目标拍摄图像或第一图像;删除配准后的图像上其他区域内的运动物体的图像;根据参考图像对删除导致的空洞进行填充以生成拼接图像。In another possible implementation manner, the first image processing further includes ghost removal processing, and the electronic device performs first image processing on the first target captured image and the second target captured image to generate a stitched image, including: The target captured image and the second target captured image are registered; the ghost-free image of the moving object is retained on the registered image, and the ghost-free image comes from the first target captured image, the second target captured image or the first image ; Delete the images of moving objects in other areas on the registered image; fill the holes caused by the deletion according to the reference image to generate a stitched image.
在该方案中,电子设备可以先配准第一目标拍摄图像和第二目标拍摄图像,保留配准后的图像上运动物体的无鬼影图像,删除配准后的图像上其他的运动物体的图像,根据参考图像进行空洞填充。In this solution, the electronic device can first register the first target captured image and the second target captured image, retain the ghost-free image of the moving object on the registered image, and delete the registered image of other moving objects. image, with hole filling based on the reference image.
在另一种可能的实现方式中,第一图像处理还包括去鬼影处理,电子设备对第一 目标拍摄图像和第二目标拍摄图像进行第一图像处理后生成拼接图像,包括:删除第一目标拍摄图像和第二目标拍摄图像上运动物体的图像;根据第一摄像头采集到的多帧图像判断运动物体的运动轨迹,以删除第一图像上运动物体的图像,得到无鬼影的第一图像;将删除运动物体的图像后的第一目标拍摄图像和第二目标拍摄图像,贴合到无鬼影的第一图像上;根据参考图像对删除导致的空洞进行填充以生成拼接图像。In another possible implementation manner, the first image processing further includes ghost removal processing, and the electronic device performs first image processing on the first target captured image and the second target captured image to generate a stitched image, including: deleting the first target image. The image of the moving object on the target photographed image and the second target photographed image; according to the multi-frame images collected by the first camera, the motion trajectory of the moving object is judged, so as to delete the image of the moving object on the first image, and obtain a first ghost-free image. image; fit the first target captured image and the second target captured image after deleting the image of the moving object onto the ghost-free first image; fill the holes caused by the deletion according to the reference image to generate a stitched image.
在该方案中,电子设备可以获得无鬼影的第一图像,将删除运动物体的图像后的第一目标拍摄图像和第二目标拍摄图像,贴合到无鬼影的第一图像上,并根据参考图像进行空洞填充以生成拼接图像。In this solution, the electronic device can obtain the ghost-free first image, and attach the first target captured image and the second target captured image after deleting the image of the moving object to the ghost-free first image, and Hole filling is performed based on the reference image to generate a stitched image.
在另一种可能的实现方式中,第一图像处理还包括匀光匀色处理和图像融合处理。In another possible implementation manner, the first image processing further includes uniform light and color processing and image fusion processing.
也就是说,电子设备对第一目标拍摄图像和第二目标拍摄图像进行配准、匀光匀色处理和图像融合处理后,生成拼接图像。That is to say, after the electronic device performs registration, uniform light and color processing, and image fusion processing on the captured image of the first target and the captured image of the second target, a stitched image is generated.
在另一种可能的实现方式中,电子设备根据拼接图像生成目标图像,包括:电子设备对拼接图像进行第二图像处理后,生成目标图像,第二图像处理至少包括以下一种或多种:去鬼影处理、动态范围增强、高频分量融合、匀光匀色处理或空洞填充。In another possible implementation manner, the electronic device generates the target image according to the spliced image, including: after the electronic device performs second image processing on the spliced image, generating the target image, and the second image processing includes at least one or more of the following: De-ghosting, dynamic range enhancement, high frequency component fusion, dodging, or hole filling.
也就是说,电子设备对拼接图像进行去鬼影处理、动态范围增强、高频分量融合、匀光匀色处理或空洞填充等处理后,生成目标图像。That is to say, the electronic device generates the target image after the stitched image is processed such as ghost removal, dynamic range enhancement, high-frequency component fusion, uniform light and color processing, or hole filling.
在另一种可能的实现方式中,电子设备对拼接图像进行高频分量融合,包括:电子设备提取参考图像的高频分量图像,将高频分量图像与拼接图像进行融合,以增强拼接图像的高频细节,增强拼接图像和目标图像的清晰度和细节。In another possible implementation manner, the electronic device performs high-frequency component fusion on the spliced image, including: the electronic device extracts the high-frequency component image of the reference image, and fuses the high-frequency component image with the spliced image to enhance the quality of the spliced image. High frequency detail to enhance the clarity and detail of the stitched and target images.
在另一种可能的实现方式中,电子设备对拼接图像进行匀光匀色处理,包括:电子设备对多帧第一摄像头采集到的图像进行高动态范围的合成;电子设备根据获得的高动态范围信息对拼接图像进行匀光匀色处理。In another possible implementation manner, the electronic device performs uniform light and color processing on the spliced image, including: the electronic device performs high dynamic range synthesis on the images collected by the multiple frames of the first camera; The range information performs uniform light and color processing on the stitched image.
这样,电子设备可以根据合成的高动态范围信息对拼接图像进行匀光匀色处理,从而增强拼接图像的动态范围。In this way, the electronic device can perform uniform light and color uniform processing on the stitched image according to the synthesized high dynamic range information, thereby enhancing the dynamic range of the stitched image.
在另一种可能的实现方式中,电子设备对拼接图像进行空洞填充,包括:对多帧第一摄像头采集到的图像上,拼接图像的空洞对应的区域,进行超分辨率图像合成;根据获得的图像信息,对拼接图像进行空洞填充。In another possible implementation manner, the electronic device fills holes in the spliced images, including: splicing the regions corresponding to the holes of the images on the images collected by the multiple frames of the first camera, and performing super-resolution image synthesis; The image information of the stitched image is filled with holes.
这样,可以使得空洞和空边的填充能拥有较高的分辨率,提升图像质量和用户体验。In this way, the filling of holes and empty edges can have a higher resolution, thereby improving image quality and user experience.
在另一种可能的实现方式中,电子设备对拼接图像进行空洞填充,包括:对参考图像上与拼接图像的空洞对应的区域,进行图像超分辨率处理;根据获得的图像信息,对拼接图像进行空洞填充。In another possible implementation manner, the electronic device performs hole filling on the stitched image, including: performing image super-resolution processing on the area on the reference image corresponding to the hole in the stitched image; Fill in the holes.
这样,可以使得空洞和空边的填充能拥有较高的分辨率,提升图像质量和用户体验。In this way, the filling of holes and empty edges can have a higher resolution, thereby improving image quality and user experience.
在另一种可能的实现方式中,参考图像为检测到用户的拍照操作后,第一摄像头采集到的第一帧图像;或者,第一图像为检测到用户的拍照操作后,第一摄像头采集到的Q帧图像融合后的图像,Q为大于1的整数。In another possible implementation manner, the reference image is the first frame image collected by the first camera after detecting the user's photographing operation; or, the first image is the first frame image collected by the first camera after detecting the user's photographing operation The fused image of the resulting Q frames of images, where Q is an integer greater than 1.
也就是说,拍照过程中的参考图像为同一帧固定的图像。That is to say, the reference image in the photographing process is a fixed image of the same frame.
在另一种可能的实现方式中,电子设备确定拍摄结束,包括:在引导框中的网格 完成匹配后,确定拍摄结束。In another possible implementation manner, the electronic device determines that the shooting ends, including: after the grids in the guide frame are matched, determining that the shooting ends.
即,电子设备在确定引导框中的网格完成匹配后,自动结束拍摄。That is, after determining that the grids in the guide frame are matched, the electronic device automatically ends shooting.
在另一种可能的实现方式中,电子设备根据拼接图像生成目标图像,包括:拼接图像即为目标图像;或者,若拼接图像的边缘未对齐,则对拼接图像进行裁剪,获得边缘对齐的目标图像;或者,若拼接图像的边缘未对齐,则根据第一图像对拼接图像的边缘区域进行填充,获得边缘对齐的目标图像。In another possible implementation manner, the electronic device generates the target image according to the spliced image, including: the spliced image is the target image; or, if the edges of the spliced image are not aligned, the spliced image is cropped to obtain the target whose edges are aligned or, if the edges of the spliced image are not aligned, fill the edge area of the spliced image according to the first image to obtain a target image with aligned edges.
也就是说,目标图像与拼接图像相同,或者为拼接图像进行边缘裁剪或边缘填充后的图像。That is, the target image is the same as the stitched image, or an image that has been edge cropped or edge filled for the stitched image.
在另一种可能的实现方式中,电子设备确定拍摄结束,包括:在引导框中的网格未完成匹配前,若检测到用户的停止拍照操作,则确定拍摄结束;或者,若电子设备的移动方向移动出引导框,则确定拍摄结束;或者,若电子设备的移动方向,与引导框的指示方向的偏离范围大于或者等于第五预设值,则确定拍摄结束。In another possible implementation manner, the electronic device determines that the shooting is ended, including: before the grids in the guide frame are not matched, if a user's operation to stop taking pictures is detected, determining that the shooting is ended; If the moving direction moves out of the guide frame, the shooting is determined to end; or, if the deviation range between the moving direction of the electronic device and the indicated direction of the guide frame is greater than or equal to the fifth preset value, the shooting is determined to be completed.
也就是说,电子设备确定结束拍摄的方式可以有多种。That is to say, there may be various ways for the electronic device to determine to end the shooting.
在另一种可能的实现方式中,电子设备根据拼接图像生成目标图像,包括:根据已匹配的整行/列网格对应的拼接图像,生成目标图像;或者,根据已匹配的网格对应的拼接图像,以及第一图像上未匹配网格对应的图像区域,生成目标图像。In another possible implementation manner, the electronic device generates the target image according to the stitched image, including: generating the target image according to the stitched image corresponding to the matched whole row/column grid; or, according to the matched grid corresponding to the grid. The target image is generated by stitching the image and the image area corresponding to the unmatched grid on the first image.
也就是说,在引导框中的网格未完成匹配前,电子设备可以根据整行/列网格对应的拼接图像生成目标图像,或者再结合第一图像上未匹配网格对应的图像区域进行图像填充从而生成目标图像。That is to say, before the matching of the grids in the guide frame is completed, the electronic device can generate the target image according to the stitched images corresponding to the entire row/column grid, or combine with the image area corresponding to the unmatched grid on the first image. Image padding to generate the target image.
在另一种可能的实现方式中,该方法还包括:电子设备获取目标变焦倍率,引导框与目标变焦倍率相对应,目标变焦倍率大于第一摄像头的变焦倍率,且小于第二摄像头的变焦倍率。电子设备根据拼接图像生成目标图像,包括:电子设备对拼接图像进行裁剪生成目标图像,目标图像与目标变焦倍率相对应。In another possible implementation manner, the method further includes: the electronic device obtains a target zoom magnification, the guide frame corresponds to the target zoom magnification, and the target zoom magnification is greater than the zoom magnification of the first camera and smaller than the zoom magnification of the second camera . The electronic device generates a target image according to the stitched image, including: the electronic device cuts the stitched image to generate a target image, and the target image corresponds to the target zoom magnification.
在该方案中,电子设备可以通过视场角较小的第二摄像头采集到的目标拍摄图像进行拼接,获得视场角较大、较为清晰的拼接图像,而后再对拼接图像进行裁剪得到目标变焦倍率对应的清晰的目标图像。并且,电子设备不需要通过数字变焦进行图像放大,因而可以保留第二摄像头的高分辨率和第二图像的高清晰度,实现光学变焦的变焦效果。In this solution, the electronic device can stitch the target image captured by the second camera with a smaller field of view to obtain a stitched image with a larger and clearer field of view, and then crop the stitched image to obtain the target zoom A clear target image corresponding to the magnification. In addition, the electronic device does not need to perform image magnification through digital zoom, so the high resolution of the second camera and the high resolution of the second image can be retained, and the zoom effect of optical zoom can be achieved.
另一方面,本申请实施例提供了另一种拍摄方法,应用于电子设备,该电子设备包括第一摄像头和第二摄像头,第二摄像头的等效焦距大于第一摄像头的等效焦距。该方法包括:电子设备启动拍照功能。电子设备在预览界面上显示第三图像和图像框,第三图像为第一摄像头采集的图像,图像框内第三图像的画面范围与第二图像的画面范围相对应,第二图像为第二摄像头采集的图像。电子设备检测到用户的拍照操作后,在拍摄界面上显示第一图像和图像框,第一图像根据第一摄像头采集的图像获得。电子设备在拍摄界面上显示拼接信息,拼接信息用于指示拍摄进度,拼接信息与拍照过程中获取的多帧目标拍摄图像相对应,相邻目标拍摄图像之间相互匹配。电子设备根据多帧目标拍摄图像生成拼接图像。在拍摄结束后,电子设备根据拼接图像生成目标图像。On the other hand, an embodiment of the present application provides another shooting method, which is applied to an electronic device. The electronic device includes a first camera and a second camera, and the equivalent focal length of the second camera is greater than the equivalent focal length of the first camera. The method includes: the electronic device starts a photographing function. The electronic device displays a third image and an image frame on the preview interface, the third image is an image captured by the first camera, the screen range of the third image in the image frame corresponds to the screen range of the second image, and the second image is the second image. image captured by the camera. After detecting the user's photographing operation, the electronic device displays the first image and the image frame on the photographing interface, and the first image is obtained according to the image collected by the first camera. The electronic device displays stitching information on the shooting interface. The stitching information is used to indicate the shooting progress. The stitching information corresponds to the multi-frame target shooting images obtained during the shooting process, and the adjacent target shooting images match each other. The electronic device generates a stitched image according to the multi-frame target captured images. After the shooting, the electronic device generates the target image according to the stitched image.
在该方案中,电子设备能够参考等效焦距较小、视场角较大的第一摄像头采集的 第一图像,使用等效焦距较大、视场角较小的第二摄像头拍摄目标拍摄图像,并拼接获得视场角较大的目标图像,且目标图像的清晰度较高,细节清楚,拍摄效果较好。并且,电子设备在预览界面和拍摄界面上显示图像框,以方便用户根据第二摄像头的实时拍摄范围,移动第二摄像头。而且,电子设备还可以在拍摄界面上显示拼接信息,以为用户实时指示当前的拍摄进度。In this solution, the electronic device can refer to the first image captured by the first camera with a smaller equivalent focal length and a larger field of view, and use the second camera with a larger equivalent focal length and a smaller field of view to capture an image of the target , and splicing to obtain a target image with a larger field of view, and the target image has high definition, clear details and better shooting effect. In addition, the electronic device displays an image frame on the preview interface and the shooting interface, so as to facilitate the user to move the second camera according to the real-time shooting range of the second camera. Moreover, the electronic device may also display stitching information on the shooting interface to indicate the current shooting progress for the user in real time.
在一种可能的实现方式中,针对多帧目标拍摄图像中,相匹配的第三目标拍摄图像和第四目标拍摄图像,满足:第三目标拍摄图像的横坐标范围与第四目标拍摄图像的横坐标范围之间的偏差小于或者等于第一预设阈值;或者,第三目标拍摄图像的纵坐标范围与第四目标拍摄图像的纵坐标范围之间的偏差小于或者等于第二预设阈值。In a possible implementation manner, in the multi-frame target captured images, the matching third target captured image and fourth target captured image satisfy: the abscissa range of the third target captured image and the fourth target captured image The deviation between the abscissa ranges is less than or equal to the first preset threshold; or, the deviation between the ordinate range of the third target captured image and the ordinate range of the fourth target captured image is less than or equal to the second preset threshold.
也就是说,相匹配的第三目标拍摄图像和第四目标拍摄图像,基本呈左右分布或基本呈上下分布。That is to say, the matched images of the third target and the images of the fourth target are basically distributed left and right or basically distributed up and down.
在另一种可能的实现方式中,相匹配的第三目标拍摄图像和第四目标拍摄图像,还满足:第三目标拍摄图像与第四目标拍摄图像之间的重叠区域大于或者等于第六预设值;或者,第三目标拍摄图像与第四目标拍摄图像之间的空隙小于或者等于第七预设值。In another possible implementation manner, the matching third target captured image and fourth target captured image also satisfy: the overlapping area between the third target captured image and the fourth target captured image is greater than or equal to the sixth predetermined target image. or, the gap between the captured image of the third target and the captured image of the fourth target is less than or equal to the seventh preset value.
也就是说,在相匹配的第三目标拍摄图像和第四目标拍摄图像之间,重叠区域较小,或空隙较小。That is, between the matched third target captured image and the fourth target captured image, the overlapping area is smaller, or the gap is smaller.
另一方面,本申请实施例提供了一种拍摄装置,该装置包含在电子设备中。该装置具有实现上述方面及可能的设计中任一方法中电子设备行为的功能,使得电子设备执行上述方面任一项可能的设计中电子设备执行的拍摄方法。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括至少一个与上述功能相对应的模块或单元。例如,该装置可以包括启动单元、检测单元、显示单元和生成单元等。On the other hand, an embodiment of the present application provides a photographing apparatus, and the apparatus is included in an electronic device. The device has the function of implementing the behavior of the electronic device in any of the above aspects and possible designs, so that the electronic device executes the photographing method performed by the electronic device in any of the possible designs in the above-mentioned aspects. This function can be implemented by hardware or by executing corresponding software by hardware. The hardware or software includes at least one module or unit corresponding to the above-mentioned functions. For example, the apparatus may include an activation unit, a detection unit, a display unit, a generation unit, and the like.
又一方面,本申请实施例提供了一种电子设备,包括:第一摄像头和第二摄像头,用于采集图像;屏幕,用于显示界面;一个或多个处理器;存储器;以及一个或多个计算机程序,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被电子设备执行时,使得电子设备执行上述方面任一项可能的设计中电子设备执行的拍摄方法。In another aspect, an embodiment of the present application provides an electronic device, including: a first camera and a second camera for capturing images; a screen for displaying an interface; one or more processors; a memory; and one or more One or more computer programs, one or more computer programs are stored in memory, the one or more computer programs include instructions that, when executed by an electronic device, cause the electronic device to perform any of the above aspects. Possible designs for the electronic device to perform Shooting method.
又一方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;以及存储器,存储器中存储有代码。当代码被电子设备执行时,使得电子设备执行上述方面任一项可能的设计中电子设备执行的拍摄方法。In another aspect, an embodiment of the present application provides an electronic device, including: one or more processors; and a memory, where codes are stored in the memory. When the code is executed by the electronic device, the electronic device is caused to execute the photographing method executed by the electronic device in any possible design of the above aspect.
又一方面,本申请实施例提供了一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述方面任一项可能的设计中的拍摄方法。In another aspect, an embodiment of the present application provides a computer-readable storage medium, including computer instructions, which, when the computer instructions are executed on an electronic device, enable the electronic device to execute the photographing method in any of the possible designs in the foregoing aspect.
又一方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述方面任一项可能的设计中电子设备执行的拍摄方法。In another aspect, an embodiment of the present application provides a computer program product, which, when the computer program product runs on a computer, enables the computer to execute the photographing method performed by the electronic device in any of the possible designs in the above aspect.
又一方面,本申请实施例提供了一种芯片系统,该芯片系统应用于电子设备。该芯片系统包括一个或多个接口电路和一个或多个处理器;接口电路和处理器通过线路互联;接口电路用于从电子设备的存储器接收信号,并向处理器发送信号,信号包括 存储器中存储的计算机指令;当处理器执行计算机指令时,使得电子设备执行上述方面任一项可能的设计中的拍摄方法。In another aspect, an embodiment of the present application provides a chip system, and the chip system is applied to an electronic device. The chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the interface circuit is used for receiving signals from the memory of the electronic device and sending signals to the processor, and the signals are included in the memory Stored computer instructions; when the processor executes the computer instructions, the electronic device is made to execute the photographing method in any possible design of the above aspect.
上述其他方面对应的有益效果,可以参见关于方法方面的有益效果的描述,此处不予赘述。For the beneficial effects corresponding to the above-mentioned other aspects, reference may be made to the description of the beneficial effects of the method, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图2为本申请实施例提供的一种拍摄方法的流程示意图;2 is a schematic flowchart of a photographing method provided by an embodiment of the present application;
图3A为本申请实施例提供的一组界面示意图;3A is a schematic diagram of a group of interfaces provided by an embodiment of the present application;
图3B为本申请实施例提供的一种界面示意图;3B is a schematic diagram of an interface provided by an embodiment of the present application;
图4为本申请实施例提供的另一种界面示意图;Fig. 4 is another interface schematic diagram provided by the embodiment of the present application;
图5为本申请实施例提供的另一组界面示意图;FIG. 5 is another set of interface schematic diagrams provided by an embodiment of the present application;
图6为本申请实施例提供的又一组界面示意图;6 is another set of interface schematic diagrams provided by the embodiment of the present application;
图7A为本申请实施例提供的另一组界面示意图;7A is another set of interface schematic diagrams provided by an embodiment of the present application;
图7B为本申请实施例提供的又一组界面示意图;FIG. 7B is another set of interface schematic diagrams provided by an embodiment of the present application;
图8为本申请实施例提供的另一组界面示意图;FIG. 8 is another set of interface schematic diagrams provided by an embodiment of the present application;
图9A为本申请实施例提供的又一组界面示意图;9A is another set of interface schematic diagrams provided by an embodiment of the present application;
图9B为本申请实施例提供的一组拍摄顺序的示意图;9B is a schematic diagram of a group of shooting sequences provided by an embodiment of the present application;
图10A为本申请实施例提供的一组界面示意图和摄像头位置示意图;FIG. 10A is a set of schematic interface diagrams and a schematic diagram of camera positions provided by an embodiment of the present application;
图10B为本申请实施例提供的一种界面示意图;FIG. 10B is a schematic diagram of an interface provided by an embodiment of the present application;
图11为本申请实施例提供的另一组界面示意图;FIG. 11 is another set of interface schematic diagrams provided by this embodiment of the present application;
图12A为本申请实施例提供的又一组界面示意图;12A is another set of interface schematic diagrams provided by an embodiment of the present application;
图12B为本申请实施例提供的一组图像示意图;FIG. 12B is a schematic diagram of a group of images provided by an embodiment of the present application;
图12C为本申请实施例提供的另一组图像示意图;FIG. 12C is a schematic diagram of another group of images provided by this embodiment of the present application;
图12D为本申请实施例提供的又一组图像示意图;FIG. 12D is a schematic diagram of another set of images provided by an embodiment of the present application;
图13A为本申请实施例提供的一种图像融合过程的示意图;13A is a schematic diagram of an image fusion process provided by an embodiment of the present application;
图13B为本申请实施例提供的另一种图像融合过程的示意图;13B is a schematic diagram of another image fusion process provided by an embodiment of the present application;
图13C为本申请实施例提供的一组界面示意图;FIG. 13C is a schematic diagram of a group of interfaces provided by an embodiment of the present application;
图14为本申请实施例提供的另一组界面示意图;FIG. 14 is another set of interface schematic diagrams provided by an embodiment of the present application;
图15A为本申请实施例提供的又一组界面示意图;15A is another set of interface schematic diagrams provided by an embodiment of the present application;
图15B为本申请实施例提供的另一组界面示意图;15B is another set of interface schematic diagrams provided by an embodiment of the present application;
图15C为本申请实施例提供的一种界面示意图;15C is a schematic diagram of an interface provided by an embodiment of the present application;
图15D为本申请实施例提供的又一组界面示意图;15D is another set of interface schematic diagrams provided by an embodiment of the present application;
图16为本申请实施例提供的另一种界面示意图;FIG. 16 is another interface schematic diagram provided by an embodiment of the present application;
图17为本申请实施例提供的一组图像示意图;FIG. 17 is a schematic diagram of a group of images provided by an embodiment of the present application;
图18为本申请实施例提供的一组目标图像的标识的示意图;18 is a schematic diagram of the identification of a group of target images provided by an embodiment of the present application;
图19为本申请实施例提供的另一种拍摄方法的流程示意图;19 is a schematic flowchart of another photographing method provided by an embodiment of the present application;
图20为本申请实施例提供的一组界面示意图;FIG. 20 is a schematic diagram of a group of interfaces provided by an embodiment of the present application;
图21为本申请实施例提供的另一组界面示意图;FIG. 21 is another set of interface schematic diagrams provided by this embodiment of the present application;
图22为本申请实施例提供的又一组界面示意图;FIG. 22 is another set of interface schematic diagrams provided by this embodiment of the present application;
图23A为本申请实施例提供的另一组界面示意图;23A is another set of interface schematic diagrams provided by an embodiment of the present application;
图23B为本申请实施例提供的又一组界面示意图;FIG. 23B is another set of interface schematic diagrams provided by an embodiment of the present application;
图24为本申请实施例提供的一种变焦方案的流程示意图;FIG. 24 is a schematic flowchart of a zoom solution provided by an embodiment of the present application;
图25为本申请实施例提供的一组界面示意图;FIG. 25 is a schematic diagram of a group of interfaces provided by an embodiment of the present application;
图26A为本申请实施例提供的一组引导框示意图和界面示意图;26A is a set of schematic diagrams and interface diagrams of a guide frame provided by an embodiment of the present application;
图26B为本申请实施例提供的一种界面示意图;26B is a schematic diagram of an interface provided by an embodiment of the present application;
图27为本申请实施例提供的一组界面示意图;FIG. 27 is a schematic diagram of a group of interfaces provided by an embodiment of the present application;
图28为本申请实施例提供的另一组界面示意图和目标图像示意图;FIG. 28 is another set of interface schematic diagrams and target image schematic diagrams provided by an embodiment of the present application;
图29为本申请实施例提供的另一种界面示意图;FIG. 29 is another interface schematic diagram provided by this embodiment of the application;
图30为本申请实施例提供的另一种电子设备的结构示意图。FIG. 30 is a schematic structural diagram of another electronic device provided by an embodiment of the present application.
具体实施方式detailed description
为了便于理解,示例的给出了部分与本申请实施例相关概念的说明以供参考。如下所示:For ease of understanding, the examples provide some descriptions of concepts related to the embodiments of the present application for reference. As follows:
第一图像:拍摄界面上显示的背景图像,当第一摄像头为广角摄像头时,第一图像为广角图像。第一图像可以是固定不刷新的,比如为以下实施例中检测到用户的拍照操作后,广角摄像采集到的第一帧广角图像或以下初始广角图像。第一图像也可以是实时刷新的,比如为广角摄像头在拍照过程中实时采集到的广角图像。The first image: the background image displayed on the shooting interface. When the first camera is a wide-angle camera, the first image is a wide-angle image. The first image may be fixed and not refreshed, for example, the first frame of wide-angle image or the following initial wide-angle image captured by the wide-angle camera after the user's photographing operation is detected in the following embodiments. The first image may also be refreshed in real time, for example, a wide-angle image collected in real time by the wide-angle camera during the photographing process.
第二图像:第二摄像头实时采集到的图像。例如,当第二摄像头为长焦摄像头时,第二图像为长焦图像。Second image: the image captured by the second camera in real time. For example, when the second camera is a telephoto camera, the second image is a telephoto image.
目标拍摄图像:与引导框中的网格相匹配的第二图像。比如,当第二摄像头为长焦摄像头时,目标拍摄图像可以为与引导框中的网格相匹配的目标长焦图像。Target Capture Image: A second image that matches the grid in the guide frame. For example, when the second camera is a telephoto camera, the image captured by the target may be a telephoto image of the target that matches the grid in the guide frame.
第三图像:预览界面上显示的实时变化的图像,通过第一摄像头实时采集获得。例如,当第一摄像头为广角摄像头时,第三图像可以为以下实施例中预览界面上显示的广角图像。The third image: the real-time changing image displayed on the preview interface, acquired through real-time acquisition by the first camera. For example, when the first camera is a wide-angle camera, the third image may be a wide-angle image displayed on the preview interface in the following embodiments.
拼接信息:用于指示拍照过程的拍摄进度,指示引导框中网格在拍照过程中的匹配进度。拼接信息与拍照过程中所述引导框中的网格匹配的多帧目标长焦图像相对应。比如,拼接信息可以为以下实施例中,拍摄界面上显示的拼接图像缩略图,拼接框,已匹配的网格或已匹配的网格的边框等。Stitching information: used to indicate the shooting progress of the photographing process, indicating the matching progress of the grids in the guide frame during the photographing process. The stitching information corresponds to the multi-frame target telephoto images matched with the grids in the guide frame during the photographing process. For example, the splicing information may be the spliced image thumbnails, splicing frames, matched grids or borders of matched grids displayed on the shooting interface in the following embodiments.
图像框:用于指示第二摄像头的实时拍摄范围。例如,当第二摄像头为长焦摄像头时,图像框为以下实施例中的长焦框。Image frame: used to indicate the real-time shooting range of the second camera. For example, when the second camera is a telephoto camera, the image frame is the telephoto frame in the following embodiments.
第一图像处理:对待拼接的两帧目标长焦图像进行的处理,比如包括图像配准、匀光匀色、去鬼影或图像融合等。The first image processing: the processing of the two target telephoto images to be spliced, for example, including image registration, uniform light and color, ghost removal or image fusion, etc.
第二图像处理:在生成目标图像前对拼接图像进行的处理,比如去鬼影处理、动态范围增强、高频分量融合、匀光匀色处理或空洞填充等。Second image processing: The processing performed on the stitched image before generating the target image, such as ghost removal processing, dynamic range enhancement, high-frequency component fusion, uniform light and color processing, or hole filling, etc.
其中,第一目标长焦图像和第二目标长焦图像分别为拍照过程中获取的两帧目标长焦图像。第三目标长焦图像和第四目标长焦图像分别为拍照过程中获取的两帧目标长焦图像。Wherein, the first target telephoto image and the second target telephoto image are respectively two frames of target telephoto images obtained during the photographing process. The third target telephoto image and the fourth target telephoto image are respectively two frames of target telephoto images obtained during the photographing process.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表 示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise stated, “/” means or means, for example, A/B can mean A or B; “and/or” in this document is only a description of the associated object The association relationship of , indicates that there can be three kinds of relationships, for example, A and/or B, can indicate that A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" refers to two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may expressly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
目前,手机等电子设备使用广角摄像头拍摄获得的视场角较大的图像上,局部细节清晰度较低,用户可能无法清楚地看到图像上的细节内容。尤其地,当被拍摄物体距离电子设备较远时,广角摄像头远距离拍摄获得的图像的清晰度更低,被拍摄物体的细节内容难以清晰呈现。At present, on images with a wide field of view captured by electronic devices such as mobile phones with a wide-angle camera, the clarity of local details is low, and users may not be able to clearly see the details on the images. In particular, when the object to be photographed is far away from the electronic device, the sharpness of the image obtained by the wide-angle camera at a long distance is lower, and it is difficult to clearly present the details of the object to be photographed.
本申请实施例提供了一种拍摄方法,可以应用于电子设备,能够参考视场角较大的第一摄像头采集的图像,使用视场角较小的第二摄像头(telephoto camera)拍摄图像并拼接获得视场角较大的目标图像,从而使得目标图像的清晰度和分辨率较高,局部细节清楚,主体突出,拍摄效果较好。The embodiment of the present application provides a shooting method, which can be applied to electronic equipment, and can refer to an image collected by a first camera with a larger field of view, and use a second camera (telephoto camera) with a smaller field of view to shoot images and stitch them together A target image with a larger field of view is obtained, so that the target image has higher clarity and resolution, clear local details, prominent subject, and better shooting effect.
其中,第二摄像头的等效焦距较大,视场角较小,例如可以为长焦摄像头或超长焦摄像头等。区别于第二摄像头,本申请实施例涉及的第一摄像头可以是等效焦距较小且视场角较大的摄像头,例如可以为广角摄像头、超广角摄像头或全景摄像头等。例如,第二摄像头的等效焦距可以是240mm,视场角可以是10°。再例如,第二摄像头的等效焦距可以是125mm,视场角可以是20°。再例如,第二摄像头的等效焦距可以是80mm,视场角可以是30°。例如,第一摄像头的等效焦距可以是26mm,视场角可以是80°。再例如,第一摄像头的等效焦距可以是16mm,视场角可以是120°。Wherein, the equivalent focal length of the second camera is relatively large, and the field of view angle is relatively small, for example, it may be a telephoto camera or an ultra-telephoto camera. Different from the second camera, the first camera involved in the embodiments of the present application may be a camera with a smaller equivalent focal length and a larger field of view, such as a wide-angle camera, an ultra-wide-angle camera, or a panoramic camera. For example, the equivalent focal length of the second camera may be 240mm, and the field angle may be 10°. For another example, the equivalent focal length of the second camera may be 125mm, and the field of view angle may be 20°. For another example, the equivalent focal length of the second camera may be 80mm, and the field of view angle may be 30°. For example, the equivalent focal length of the first camera may be 26mm, and the field angle may be 80°. For another example, the equivalent focal length of the first camera may be 16mm, and the field of view angle may be 120°.
示例性的,第一摄像头为广角摄像头,第二摄像头为长焦摄像头;或者,第一摄像头为超广角摄像头,第二摄像头为长焦摄像头;或者,第一摄像头为广角摄像头,第二摄像头为超长焦摄像头。Exemplarily, the first camera is a wide-angle camera, and the second camera is a telephoto camera; or, the first camera is an ultra-wide-angle camera, and the second camera is a telephoto camera; or, the first camera is a wide-angle camera, and the second camera is a Super telephoto camera.
在本申请实施例提供的拍摄方法中,第二摄像头拍摄图像及拼接获得的目标图像的视场角,小于或者等于第一摄像头的视场角。在一些实施例中,第二摄像头的等效焦距可以大于或者等于预设数值,这样第二摄像头的变焦倍率较大且视场角较小,图像分辨率较高;在另一些实施例中,第二摄像头与第一摄像头的等效焦距的比例可以大于或者等于预设值1,这样第二摄像头与第一摄像头的变焦倍率的比例较大,第一摄像头与第二摄像头的视场角的比例较大。示例性的,该预设值1可以为2或3等。这样,电子设备获得的目标图像的清晰度和分辨率更高,局部细节更为清楚,主体更为突出,拍摄效果也更好。In the shooting method provided by the embodiment of the present application, the field of view of the image captured by the second camera and the target image obtained by splicing is smaller than or equal to the field of view of the first camera. In some embodiments, the equivalent focal length of the second camera may be greater than or equal to a preset value, so that the zoom magnification of the second camera is larger, the field of view is smaller, and the image resolution is higher; in other embodiments, The ratio of the equivalent focal length of the second camera to the first camera may be greater than or equal to the preset value of 1, so that the ratio of the zoom magnification of the second camera to the first camera is larger, and the difference between the field of view of the first camera and the second camera The proportion is larger. Exemplarily, the preset value 1 may be 2 or 3 or the like. In this way, the target image obtained by the electronic device has higher definition and resolution, clearer local details, more prominent subject, and better shooting effect.
其中,等效焦距是指摄像头光电传感器芯片影像区域对角线的长度,等效成35mm照相机画幅对角线长度(42.27mm)时,摄像头的实际焦距所对应的35mm照相机镜头的焦距。变焦倍率描述的是相对的等效焦距的含义,比如定义广角摄像头的变焦倍率等于1,则其他摄像头(如长焦摄像头)的变焦倍率,等于长焦摄像头的等效焦距与作为基准的广角摄像头的等效焦距的比值。视场角的大小决定了摄像头的视野范围,视场角越大,视野就越大。等效焦距越大,则视场角越小。Among them, the equivalent focal length refers to the length of the diagonal of the image area of the photoelectric sensor chip of the camera. When it is equivalent to the diagonal length of the 35mm camera frame (42.27mm), the actual focal length of the camera corresponds to the focal length of the 35mm camera lens. The zoom ratio describes the meaning of the relative equivalent focal length. For example, if the zoom ratio of a wide-angle camera is defined as 1, then the zoom ratio of other cameras (such as telephoto cameras) is equal to the equivalent focal length of the telephoto camera and the wide-angle camera as the benchmark. ratio of equivalent focal lengths. The size of the field of view determines the field of view of the camera. The larger the field of view, the larger the field of view. The larger the equivalent focal length, the smaller the field of view.
在本申请的实施例中,第二摄像头拍摄的图像拼接获得的目标图像,可以是宽画幅(包括横画幅或竖画幅)、方画幅、超宽画幅或全景图等形式。比如,目标图像的宽高比可以是2:1、9:16、1:1或2.39:1等。其中,不同画幅的目标图像可以给用户以不同的视觉感受,因此针对不同的题材或主题时,可以采用恰当的画幅来进行拍摄。比如,风光主题可以采用横画幅来进行拍摄,以表现出场景宽阔、大气的特性。再比如,高楼大厦、高塔、高山等主题可以采用竖画幅来进行拍摄,以表现高耸、挺拔的画面效果。In the embodiment of the present application, the target image obtained by splicing the images captured by the second camera may be in the form of a wide format (including a horizontal format or a vertical format), a square format, an ultra-wide format, or a panorama. For example, the aspect ratio of the target image can be 2:1, 9:16, 1:1, or 2.39:1, etc. Among them, target images of different frames can give users different visual feelings, so for different themes or themes, appropriate frames can be used to shoot. For example, landscape subjects can be shot in horizontal format to show the wide and atmospheric characteristics of the scene. For another example, high-rise buildings, towers, mountains and other themes can be shot in vertical format to express a towering and upright picture effect.
本申请实施例提供的拍摄方法可以用于后置图像拍摄,也可以用于前置图像拍摄。The shooting methods provided in the embodiments of the present application can be used for rear image shooting, and can also be used for front image shooting.
例如,该电子设备可以是手机、平板电脑、可穿戴设备(例如智能手表)、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或个人数字助理(personal digital assistant,PDA)等移动终端,也可以是专业的相机等设备,本申请实施例对电子设备的具体类型不作任何限制。For example, the electronic device may be a mobile phone, a tablet, a wearable device (eg, a smart watch), an in-vehicle device, an augmented reality (AR)/virtual reality (VR) device, a laptop, a super mobile personal computer Mobile terminals such as (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), can also be professional cameras and other equipment, the embodiment of the present application does not make any restrictions on the specific type of electronic equipment.
示例性的,图1示出了电子设备100的一种结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, FIG. 1 shows a schematic structural diagram of an electronic device 100 . The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。在本申请的实施例中,显示屏194可以用于显示拍摄模式下的预览界面和拍摄界面等。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one. In the embodiment of the present application, the display screen 194 may be used to display a preview interface and a photographing interface and the like in the photographing mode.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
摄像头193可以包括不同焦段的摄像头,例如短焦段的第一摄像头和长焦段的第二摄像头等。其中,第一摄像头的等效焦距较小(例如13mm、16mm、26mm、30mm或40mm等),视场角较大(例如视场角可以是80°、120°或150°等),可用于拍摄风景等较大的画面。比如,目前的广角摄像头、超广角摄像头和全景摄像头等视场角较大的摄像头均可以称为第一摄像头。第二摄像头的等效焦距较大(例如80mm、125mm、150mm或240mm等),视场角较小(例如视场角可以是10°、20°或30°等),可用于拍摄远处的物体,可拍摄到的区域较小。比如,目前的长焦摄像头和超长焦摄像头均可以称为第二摄像头。The camera 193 may include cameras with different focal lengths, for example, a first camera with a short focal length and a second camera with a long focal length. Among them, the equivalent focal length of the first camera is small (for example, 13mm, 16mm, 26mm, 30mm or 40mm, etc.), and the field of view angle is large (for example, the field of view angle can be 80°, 120°, or 150°, etc.), which can be used for Take larger pictures such as landscapes. For example, a current wide-angle camera, an ultra-wide-angle camera, a panoramic camera, and other cameras with a larger field of view may be referred to as the first camera. The equivalent focal length of the second camera is larger (for example, 80mm, 125mm, 150mm or 240mm, etc.), and the field of view angle is small (for example, the field of view angle can be 10°, 20° or 30°, etc.), which can be used to shoot distant objects, the area that can be photographed is small. For example, both the current telephoto camera and the ultra-telephoto camera can be called the second camera.
在一些实施例中,第二摄像头是固定的,用户可以通过移动电子设备100来移动第二摄像头。在另一些实施例中,第二摄像头可独立移动,用户可以在不移动手机的情况下,通过某个按键、控件或操作来直接移动第二摄像头;或者,手机可以自动控制第二摄像头移动。当第二摄像头移动时,第二摄像头拍摄的画面内容也相应发生变化。In some embodiments, the second camera is fixed, and the user can move the second camera by moving the electronic device 100 . In other embodiments, the second camera can be moved independently, and the user can directly move the second camera through a certain key, control or operation without moving the mobile phone; or, the mobile phone can automatically control the movement of the second camera. When the second camera moves, the content of the picture captured by the second camera also changes accordingly.
此外,摄像头193还可以包括用于测量待拍摄对象的物距的深度摄像,以及其他摄像头。例如,深度摄像头可以包括三维(3dimensions,3D)深感摄像头、飞行时间(time of flight,TOF)深度摄像头或双目深度摄像头等。In addition, the camera 193 may further include a depth camera for measuring the object distance of the object to be photographed, and other cameras. For example, the depth camera may include a 3-dimensions (3D) depth camera, a time of flight (TOF) depth camera, or a binocular depth camera, and the like.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其 他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 . The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 121 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, universal flash storage (UFS), and the like.
在本申请的实施例中,处理器110通过运行存储在内部存储器121的指令,可以实现参考第一摄像头采集的图像,使用第二摄像头拍摄图像并拼接获得视场角较大的目标图像,以使得目标图像的清晰度较高,细节清楚,拍摄效果较好。In the embodiment of the present application, the processor 110 can realize the reference to the image collected by the first camera by running the instructions stored in the internal memory 121, use the second camera to capture the image and stitch to obtain the target image with a larger field of view, so as to The target image has high definition, clear details and better shooting effect.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称触控屏。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a touch screen. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
在本申请的实施例中,摄像头193中的第一摄像头和第二摄像头可以用于采集图像;显示屏194可以用于显示拍照时的预览界面和拍摄界面等;处理器110通过运行存储在内部存储器121的指令,可以实现参考视场角较大的第一摄像头采集的图像,使用视场角较小的第二摄像头拍摄图像并拼接获得视场角较大的目标图像,以使得目标图像的清晰度较高,细节清楚,拍摄效果较好。In the embodiment of the present application, the first camera and the second camera in the camera 193 can be used to capture images; the display screen 194 can be used to display a preview interface and a shooting interface when taking pictures; The instructions of the memory 121 can realize the reference to the image collected by the first camera with a larger field of view, use the second camera with a smaller field of view to capture the image and stitch to obtain the target image with a larger field of view, so that the target image has a larger field of view. The sharpness is high, the details are clear, and the shooting effect is better.
以下将以电子设备为具有图1所示结构的手机为例,对本申请实施例提供的拍摄方法进行阐述。如图2所示,该方法可以包括:The photographing method provided by the embodiment of the present application will be described below by taking the electronic device as a mobile phone having the structure shown in FIG. 1 as an example. As shown in Figure 2, the method may include:
200、手机启动拍照功能。200. The mobile phone starts the camera function.
在本申请的实施例中,用户想要使用手机拍摄图像时,可以启动手机的拍照功能。例如,手机可以启动相机应用,或者启动具有拍摄功能的其他应用(比如抖音或河图cyberverse等AR应用),从而启动应用的拍照功能。In the embodiment of the present application, when the user wants to use the mobile phone to take an image, the camera function of the mobile phone can be activated. For example, the phone can launch the camera app, or launch other apps with a shooting function (such as AR apps such as Douyin or Hetu cyberverse), thereby launching the app's camera function.
示例性的,手机检测到用户点击图3A中的(a)所示的相机图标301的操作后,启动相机应用的拍照功能,并显示如图3A中的(b)所示的预览界面。再示例性的, 手机显示桌面或非相机应用的界面,检测到用户打开相机应用的语音指令后启动拍照功能,并显示如图3A中的(b)所示的预览界面。Exemplarily, after the mobile phone detects that the user clicks the camera icon 301 shown in (a) in FIG. 3A , the mobile phone starts the photographing function of the camera application, and displays the preview interface shown in (b) in FIG. 3A . In another example, the mobile phone displays a desktop or a non-camera application interface, starts the photographing function after detecting the user's voice command to open the camera application, and displays a preview interface as shown in (b) of FIG. 3A .
需要说明的是,手机还可以响应于用户的其他触摸操作、语音指令或快捷手势等操作启动拍照功能,本申请实施例对触发手机启动拍照功能的操作不作限定。It should be noted that the mobile phone can also activate the camera function in response to other user touch operations, voice commands or quick gestures and other operations, and the embodiment of the present application does not limit the operation of triggering the mobile phone to activate the camera function.
在一些实施例中,手机在启动拍照功能后,即可通过本申请实施例提供的拍摄方法,采用视场角较小的第二摄像头采集多帧图像,并将多帧该图像拼接成视场角较大的目标图像。目标图像的清晰度和分辨率较高,局部细节清楚,主体突出,拍摄效果较好。In some embodiments, after starting the camera function, the mobile phone can use the shooting method provided by the embodiment of the present application to use a second camera with a smaller field of view to collect multiple frames of images, and stitch the multiple frames of the images into a field of view target image with larger corners. The clarity and resolution of the target image are high, the local details are clear, the main body is prominent, and the shooting effect is better.
在另一些实施例中,手机在启动拍照功能并进入目标拍照模式后,才能通过本申请实施例提供的拍摄方法,采用视场角较小的第二摄像头采集多帧图像,并将多帧该图像拼接成视场角较大的目标图像。In other embodiments, after the mobile phone has activated the camera function and entered the target camera mode, the shooting method provided by the embodiment of the present application can use the second camera with a smaller field of view to collect multiple frames of images, and then record the multiple frames of the The images are stitched into a target image with a larger field of view.
在一些技术方案中,手机可以通过本申请实施例提供的拍摄方法,参考视场角较大的第一摄像头采集的图像,使用视场角较小的第二摄像头拍摄图像并拼接获得视场角较大的目标图像,从而使得目标图像的清晰度和分辨率较高,局部细节清楚,主体突出,拍摄效果较好。In some technical solutions, the mobile phone can use the shooting method provided by the embodiment of the present application to refer to the image collected by the first camera with a larger field of view, use the second camera with a smaller field of view to shoot images, and stitch them to obtain the field of view. The larger the target image, the higher the clarity and resolution of the target image, the clear local details, the prominent subject, and the better shooting effect.
举例来说,该目标拍照模式具体可以称为宽画幅模式、宽景模式或高清图模式等,本申请实施例对目标拍照模式的具体名称不予限定。For example, the target photographing mode may be specifically referred to as a wide-frame mode, a wide-view mode, or a high-definition image mode, and the embodiment of the present application does not limit the specific name of the target photographing mode.
本申请以下实施例中以目标拍照模式为宽景模式为例进行说明。In the following embodiments of the present application, the target photographing mode is taken as the wide-view mode as an example for description.
示例性的,手机启动拍照功能后,若检测到用户点击图3A中的(b)所示的控件302的操作,则如图3A中的(c)所示进入宽景模式。再示例性的,手机检测到用户点击图3A中的(b)所示的控件303的操作后,显示如图3A中的(d)所示的界面;手机检测到用户点击控件304的操作后,如图3A中的(c)所示进入宽景模式。Exemplarily, after the mobile phone starts the photographing function, if it is detected that the user clicks the control 302 shown in (b) in FIG. 3A , the wide view mode is entered as shown in (c) in FIG. 3A . In another example, after the mobile phone detects that the user clicks the control 303 shown in (b) in FIG. 3A , the interface shown in (d) in FIG. 3A is displayed; after the mobile phone detects the operation that the user clicks the control 304 , as shown in (c) in Figure 3A to enter the wide-view mode.
再例如,手机在显示桌面或非相机应用界面的情况下,检测到用户进入宽景模式的语音指令后启动拍照功能,并如图3A中的(c)所示进入宽景模式。For another example, when the mobile phone displays a desktop or a non-camera application interface, it detects the user's voice command to enter the wide-view mode and starts the camera function, and enters the wide-view mode as shown in (c) of FIG. 3A .
需要说明的是,手机还可以响应于用户的其他触摸操作、语音指令或快捷手势等操作启动拍照功能并进入宽景模式,本申请实施例对触发手机进入宽景模式的具体操作不予限定。It should be noted that the mobile phone can also activate the camera function and enter the wide-view mode in response to other user touch operations, voice commands, or shortcut gestures.
在一些实施例中,手机可以在宽景模式下将该拍摄模式的功能通过显示信息或语音播报等方式提示给用户。示例性的,参见图3B,手机在预览界面上显示文字提示信息:宽景模式下可参考视场角较大的第一摄像头采集的图像,使用视场角较小的第二摄像头拍摄图像并拼接获得视场角较大的目标图像。In some embodiments, the mobile phone can prompt the user of the function of the shooting mode in the wide-view mode by displaying information or voice broadcasting. Exemplarily, referring to FIG. 3B, the mobile phone displays text prompt information on the preview interface: in the wide-view mode, you can refer to the image captured by the first camera with a larger field of view, use the second camera with a smaller field of view to capture the image and Stitching obtains a target image with a larger field of view.
在一些实施例中,在宽景模式下,手机可以将第一摄像头和第二摄像头所采用的具体摄像头提示给用户。示例性的,参见图4,手机在预览界面上通过显示文字信息来提示用户,第一摄像头为广角摄像头,第二摄像头为长焦摄像头。In some embodiments, in the wide view mode, the mobile phone can prompt the user about the specific cameras used by the first camera and the second camera. Exemplarily, referring to FIG. 4 , the mobile phone displays text information on the preview interface to prompt the user, the first camera is a wide-angle camera, and the second camera is a telephoto camera.
在一些技术方案中,宽景模式下的第一摄像头和第二摄像头为用户设置的摄像头,例如第一摄像头为用户设置的超广角摄像头,第二摄像头为用户设置的长焦摄像头。本申请实施例对用户设置第一摄像头和第二摄像头的具体方式不予限定。In some technical solutions, the first camera and the second camera in the wide-view mode are cameras set by the user, for example, the first camera is an ultra-wide-angle camera set by the user, and the second camera is a telephoto camera set by the user. This embodiment of the present application does not limit the specific manner in which the user sets the first camera and the second camera.
在另一些技术方案中,宽景模式下的第一摄像头和第二摄像头为默认的摄像头,例如第一摄像头默认为广角摄像头,第二摄像头默认为长焦摄像头。用户还可以修改 第一摄像头和第二摄像头的摄像头类型。In other technical solutions, the first camera and the second camera in the wide-view mode are default cameras, for example, the first camera is a wide-angle camera by default, and the second camera is a telephoto camera by default. The user can also modify the camera types of the first camera and the second camera.
本申请以下实施例中将以第一摄像头为广角摄像头,第二摄像头为长焦摄像头为例进行说明。In the following embodiments of the present application, the first camera is a wide-angle camera and the second camera is a telephoto camera as an example for description.
201、手机在预览界面上显示广角图像。201. The mobile phone displays a wide-angle image on the preview interface.
手机启动拍照功能后进入预览状态。在预览状态下,手机可以根据预设的采集帧率1,通过广角摄像头来实时采集广角图像,并将获得的广角图像显示在预览界面上,以为用户呈现较大视场角内的全局画面(或称全景图像)。该广角摄像头为第一摄像头。After the phone starts the camera function, it enters the preview state. In the preview state, the mobile phone can collect wide-angle images in real time through the wide-angle camera according to the preset frame rate 1, and display the obtained wide-angle images on the preview interface, so as to present the global image within a larger field of view to the user ( or panoramic image). The wide-angle camera is the first camera.
在一些实施例中,手机还可以在预览界面上显示用于引导长焦摄像头移动拍摄的引导框,以便长焦摄像头在拍照过程中根据引导框拍摄多帧图像。其中,引导框以透明悬浮框的方式叠加显示在广角图像之上。引导框的视场角小于或者等于广角摄像头的视场角。也就是说,手机根据引导框的指示生成的目标图像的视场角,小于或者等于广角摄像头的视场角。In some embodiments, the mobile phone can also display a guide frame for guiding the telephoto camera to move and shoot on the preview interface, so that the telephoto camera can shoot multiple frames of images according to the guide frame during the photographing process. Among them, the guide frame is superimposed and displayed on the wide-angle image in the form of a transparent floating frame. The field of view of the guide frame is smaller than or equal to the field of view of the wide-angle camera. That is to say, the field of view of the target image generated by the mobile phone according to the instructions of the guide frame is smaller than or equal to the field of view of the wide-angle camera.
其中,引导框最多可包括的网格数量为R*R,R与K1和/或K2相关。其中,K1为长焦摄像头的等效焦距和广角摄像头的等效焦距的比例,向上取整或向下取整后的数值。K2为广角摄像头的视场角和长焦摄像头的视场角的比例,向上取整或向下取整后的数值。在一些实施例中,R为K1;在另一些实施例中,R为K2;在另一些实施例中,R为K1和K2中的较大值。The maximum number of grids that the guide frame can include is R*R, and R is related to K1 and/or K2. Among them, K1 is the ratio of the equivalent focal length of the telephoto camera to the equivalent focal length of the wide-angle camera, rounded up or down. K2 is the ratio of the field of view of the wide-angle camera to the field of view of the telephoto camera, rounded up or down. In some embodiments, R is K1; in other embodiments, R is K2; in other embodiments, R is the greater of K1 and K2.
在本申请实施例中,手机在引导界面上显示的引导框包括M(行)*N(列)个网格。其中,M≤R,N≤R,且M和N中的至少一个大于1。该M*N可以称为引导框的规格。也就是说,引导框的规格包括引导框中网格的数量以及网格的排列方式等。广角图像与具有最多网格数量的引导框相对应。例如,广角图像的尺寸和视场角,可以略大于或等于具有最多网格数量的引导框的尺寸和视场角,长焦摄像头的视场角与单个网格对应的视场角相对应。例如,长焦摄像头的视场角可以略大于或者等于单个网格对应的视场角。In this embodiment of the present application, the guide frame displayed by the mobile phone on the guide interface includes M (rows)*N (columns) grids. Wherein, M≤R, N≤R, and at least one of M and N is greater than 1. This M*N can be called the specification of the lead frame. That is to say, the specification of the guide frame includes the number of grids in the guide frame and the arrangement of the grids. The wide-angle image corresponds to the lead frame with the highest number of grids. For example, the size and field of view of the wide-angle image can be slightly larger or equal to the size and field of view of the guide frame with the largest number of grids, and the field of view of the telephoto camera corresponds to the corresponding field of view of a single grid. For example, the field of view of the telephoto camera may be slightly larger than or equal to the field of view corresponding to a single grid.
举例来说,广角摄像头的等效焦距为125mm,长焦摄像头的等效焦距为25mm,两者等效焦距的比例K1为5,R=K1=5。这样,引导框每行网格的个数小于或者等于5,每列网格的个数也小于或者等于5。也就是说,引导框最多可以包括5*5(即5行5列)个网格;引导框也可以包括少于5*5个网格,例如可以包括3*3、3*4或4*5个网格。其中,广角摄像头的视场角与该5*5个网格对应,单个网格与长焦摄像头的视场角对应。For example, the equivalent focal length of the wide-angle camera is 125mm, the equivalent focal length of the telephoto camera is 25mm, the ratio K1 of the equivalent focal lengths of the two is 5, and R=K1=5. In this way, the number of grids in each row of the guide frame is less than or equal to 5, and the number of grids in each column is also less than or equal to 5. That is to say, the guide frame may include at most 5*5 (ie, 5 rows and 5 columns) grids; the guide frame may also include less than 5*5 grids, such as 3*3, 3*4 or 4* 5 grids. Among them, the field of view of the wide-angle camera corresponds to the 5*5 grids, and a single grid corresponds to the field of view of the telephoto camera.
在一些实施例中,长焦摄像头的等效焦距与广角摄像头的等效焦距之间的比例小于或者等于预设值2。这样,引导框的尺寸与广角图像的尺寸相差较小,引导框和网格的尺寸较大,方便用户移动长焦摄像头以使得长焦图像与网格相匹配。示例性的,该预设值2可以为8或10等。In some embodiments, the ratio between the equivalent focal length of the telephoto camera and the equivalent focal length of the wide-angle camera is less than or equal to a preset value of 2. In this way, the difference between the size of the guide frame and the size of the wide-angle image is small, and the sizes of the guide frame and the grid are larger, which is convenient for the user to move the telephoto camera so that the telephoto image matches the grid. Exemplarily, the preset value 2 may be 8 or 10 or the like.
以下实施例中以引导框最多包括5*5个网格为例进行说明。In the following embodiments, the guide frame includes at most 5*5 grids as an example for description.
在一些实施例中,引导框默认显示在预览界面显示的图像的中间位置。引导框的规格为默认的规格,或者为手机上一次在宽景模式下采用的规格。In some embodiments, the guide frame is displayed by default in the middle of the image displayed in the preview interface. The specification of the guide frame is the default specification, or the specification that the phone last adopted in the wide view mode.
在另一些实施例中,手机在预览界面上显示的引导框的位置或规格可以是用户设 置的。In other embodiments, the position or specification of the guide frame displayed by the mobile phone on the preview interface may be set by the user.
例如,在一些技术方案中,在预览界面上,用户在广角图像上选择一个区域(例如划一个方框或者划一个圈)后,手机根据用户选择的区域确定相匹配的引导框。比如,手机确定的引导框对应的区域能够覆盖用户的选择区域,或者能够覆盖用户的选择区域的比例大于或者等于预设比例(比如90%),或者略大于用户的选择区域等。示例性的,参见图5中的(a),手机在预览界面上提示用户:请选择目标图像的范围,以显示对应的引导框。如图5中的(b)所示,手机检测到用户选定一个区域的操作后,确定用户想要拍摄的目标图像为该区域对应的大小。而后,手机根据该区域确定引导框的位置或规格。例如,引导框包括3*3个网格,并如图5中的(c)所示,在预览界面上显示该引导框501。For example, in some technical solutions, on the preview interface, after the user selects an area on the wide-angle image (for example, draws a box or a circle), the mobile phone determines a matching guide frame according to the area selected by the user. For example, the area corresponding to the guide frame determined by the mobile phone can cover the user's selection area, or the ratio of covering the user's selection area is greater than or equal to a preset ratio (such as 90%), or slightly larger than the user's selection area. Exemplarily, see (a) in FIG. 5 , the mobile phone prompts the user on the preview interface: please select the range of the target image to display the corresponding guide frame. As shown in (b) of FIG. 5 , after detecting the user's operation of selecting an area, the mobile phone determines that the target image the user wants to shoot is the size corresponding to the area. Then, the mobile phone determines the position or size of the guide frame according to the area. For example, the guide frame includes 3*3 grids, and as shown in (c) of FIG. 5 , the guide frame 501 is displayed on the preview interface.
在另一些技术方案中,手机检测到用户点击如图6中的(a)所示的预览界面上的设置控件601的操作后,显示设置界面。如图6中的(b)所示,设置界面包括目标图像引导框的设置控件,手机检测到用户点击该控件的操作后,如图6中的(c)所示,显示最大引导框,该最大引导框包括最多数量的网格(例如上述5*5个网格)。手机检测到用户在最大引导框上进行框选并点击确定控件的操作后,确定用户框选操作对应的位置的范围即为引导框的位置和大小。如图6中的(d)所示,手机在预览界面上显示确定的包括2*3个网格的引导框602。In other technical solutions, the mobile phone displays the setting interface after detecting that the user clicks the setting control 601 on the preview interface as shown in (a) of FIG. 6 . As shown in (b) in Figure 6, the setting interface includes the setting control of the target image guide frame. After the mobile phone detects the operation of the user clicking on the control, as shown in (c) in Figure 6, the largest guide frame is displayed. The largest lead frame includes the largest number of grids (eg 5*5 grids above). After the mobile phone detects that the user performs a frame selection on the largest guide frame and clicks to confirm the control, the range of the position corresponding to the user's frame selection operation is determined as the position and size of the guide frame. As shown in (d) of FIG. 6 , the mobile phone displays the determined guide frame 602 including 2*3 grids on the preview interface.
在另一些技术方案中,参见图7A中的(a),手机在预览界面上显示包括最多数量网格的最大引导框,并提示用户:请设置目标图像的引导框。如图7A中的(b)所示,用户在最大引导框上进行拖动以框选多个网格,手机确定用户框选操作对应的位置和范围即为引导框的位置和大小。如图7A中的(c)所示,手机在预览界面上显示确定的包括3*3个网格的引导框701,预览界面上还包括广角图像。In other technical solutions, see (a) in FIG. 7A , the mobile phone displays the largest guide frame including the maximum number of grids on the preview interface, and prompts the user: please set the guide frame of the target image. As shown in (b) of FIG. 7A , the user drags on the largest guide frame to select multiple grids, and the mobile phone determines that the position and range corresponding to the user's frame selection operation are the position and size of the guide frame. As shown in (c) of FIG. 7A , the mobile phone displays a determined guide frame 701 including 3*3 grids on the preview interface, and the preview interface also includes a wide-angle image.
在另一些技术方案中,用户可以指示预览界面上的主体,手机根据用户指示的主体确定引导框的位置和规格,以使得引导框能够覆盖用户指示的主体。示例性的,参见图7B中的(a),手机可以在预览界面上提示用户,请选择待拍摄的主体。如图7B中的(b)所示,手机检测用户点击建筑的操作后,确定相连的整个建筑为待拍摄的主体,从而确定引导框为如图7B中的(c)所示的预览界面上能够覆盖相连的整个建筑的引导框703,共包括3*3个网格。In other technical solutions, the user can indicate the main body on the preview interface, and the mobile phone determines the position and size of the guide frame according to the main body indicated by the user, so that the guide frame can cover the main body indicated by the user. Exemplarily, referring to (a) in FIG. 7B , the mobile phone may prompt the user on the preview interface to select the subject to be photographed. As shown in (b) in FIG. 7B , after the mobile phone detects the operation of the user clicking on the building, it determines that the entire connected building is the subject to be photographed, and thus determines that the guide frame is on the preview interface as shown in (c) in FIG. 7B . The guide frame 703 that can cover the entire connected building includes a total of 3*3 grids.
在另一些技术方案中,参见图8中的(a),手机在预览界面上显示多个规格控件,例如5*5,4*5,4*4,3*4或3*3等,手机根据用户选择的规格控件确定引导框包括的网格数量。例如,手机检测到用点击3*3的规格控件的操作后,如图8中的(b)所示,在预览界面上显示包括3*3个网格的引导框801,预览界面上还包括广角图像。In other technical solutions, see (a) in FIG. 8 , the mobile phone displays multiple specification controls on the preview interface, such as 5*5, 4*5, 4*4, 3*4 or 3*3, etc. Determines the number of grids included in the guide box based on the user-selected specification control. For example, after the mobile phone detects the operation of clicking the 3*3 specification control, as shown in (b) of FIG. 8, a guide frame 801 including 3*3 grids is displayed on the preview interface, and the preview interface also includes Wide angle image.
在本申请的一些实施例中,手机还可以根据用户的指示操作,确定引导框中网格的拍摄顺序。在拍照过程,用户可以按照该拍摄顺序移动长焦摄像头,以使得长焦摄像头与该顺序规定的网格依次匹配。In some embodiments of the present application, the mobile phone may also operate according to the user's instruction to determine the shooting sequence of the grids in the guide frame. During the photographing process, the user can move the telephoto camera according to the photographing sequence, so that the telephoto camera is sequentially matched with the grid specified in the sequence.
在一种可能的实现方式中,用户在通过以上实施例描述的方式(例如图5-8所示的方式)设置引导框的位置或规格时,还可以设置引导框中网格的拍摄顺序。In a possible implementation manner, when the user sets the position or specification of the guide frame through the methods described in the above embodiments (eg, the methods shown in FIGS. 5-8 ), the user may also set the shooting order of the grids in the guide frame.
在另一种可能的实现方式中,手机确定引导框的规格后,可以显示该规格的引导框对应的多种顺序模式,手机可以根据用户的选择操作确定一种顺序模式。示例性的, 引导框的规格为3*3,参见图9A中的(a),预览界面上包括多个顺序模式控件,例如控件901~903等。比如,手机检测到用户点击顺序模式控件901的操作后,确定拍摄顺序为先从左到右拍摄中间一行网格对应的图像,再从左到右拍摄上方一行网格的图像,而后再从左到右拍摄下方一行网格的图像。再比如,手机检测到用户点击顺序模式控件902的操作后,确定拍摄顺序为先从左到右拍摄中间一行网格的图像,再从右到左拍摄上方一行网格的图像,而后再从左到右拍摄下方一行网格的图像。再比如,手机检测到用户点击顺序模式控件903的操作后,确定拍摄顺序为从上到下按“之”字形轨迹进行拍摄。In another possible implementation manner, after determining the specification of the guide frame, the mobile phone can display multiple sequence modes corresponding to the guide frame of the specification, and the mobile phone can determine one sequence mode according to the user's selection operation. Exemplarily, the size of the guide frame is 3*3, see (a) in FIG. 9A , and the preview interface includes multiple sequential mode controls, such as controls 901 to 903 . For example, after the mobile phone detects the user's operation of clicking the sequence mode control 901, the mobile phone determines that the shooting sequence is to first shoot the image corresponding to the middle row of grids from left to right, then shoot the image of the upper row of grids from left to right, and then from left to right. Go to the right to take an image of the lower row of grids. For another example, after the mobile phone detects the user's operation of clicking the sequence mode control 902, it determines that the photographing sequence is to first photograph the image of the grid in the middle row from left to right, then photograph the image of the grid in the upper row from right to left, and then from the left. Go to the right to take an image of the lower row of grids. For another example, after the mobile phone detects that the user clicks on the sequence mode control 903, the mobile phone determines that the shooting sequence is to shoot according to the "zigzag" track from top to bottom.
在另一些实施例中,每种规格的引导框默认对应一种拍摄顺序,手机确定引导框的规格后采用默认的拍摄顺序进行拍摄。手机还可以根据用户的指示操作修改该拍摄顺序。In other embodiments, the guide frame of each specification corresponds to a shooting order by default, and the mobile phone uses the default shooting order to shoot after determining the specification of the guide frame. The mobile phone can also modify the shooting sequence according to the user's instruction operation.
在本申请的一些实施例中,手机确定引导框对应的拍摄顺序后,可以提示用户按照该拍摄顺序进行拍摄。例如,手机可以在预览界面上显示拍摄顺序提示信息。示例性的,当用户选择顺序模式控件901对应的拍摄顺序后,参见图9A中的(b),手机可以在引导框上显示标号和带箭头的引导线,该标号用于表示不同行网格的先后拍摄顺序,引导线的箭头指示方向用于表示每行网格的拍摄顺序。再示例性的,当用户选择顺序模式控件902对应的拍摄顺序后,参见图9A中的(c),手机可以在引导框上显示带箭头的引导线,以指示不同网格对应的拍摄顺序。In some embodiments of the present application, after determining the shooting sequence corresponding to the guide frame, the mobile phone may prompt the user to shoot according to the shooting sequence. For example, the mobile phone can display shooting sequence prompt information on the preview interface. Exemplarily, after the user selects the shooting sequence corresponding to the sequence mode control 901, see (b) in FIG. 9A , the mobile phone can display a label and a guide line with an arrow on the guide frame, and the label is used to indicate different rows of grids. , the arrows of the guide line indicate the direction to indicate the shooting order of each row of grids. For another example, after the user selects the shooting sequence corresponding to the sequence mode control 902, referring to FIG. 9A (c), the mobile phone can display a guide line with an arrow on the guide frame to indicate the shooting sequence corresponding to different grids.
可以理解的是,该拍摄顺序还可以包括其他顺序模式,比如还可以包括如图9B中的(a)-(d)所示的顺序模式等,本申请实施例对顺序模式的具体形式不予限定。It can be understood that the shooting sequence may also include other sequential modes, for example, may also include sequential modes as shown in (a)-(d) in FIG. limited.
在其他一些实施例中,手机在获取引导框后,可以在拍摄界面上短暂显示引导框,在后续检测到用户的拍照操作后,再在拍摄界面上显示引导框。In some other embodiments, after acquiring the guide frame, the mobile phone may briefly display the guide frame on the photographing interface, and then display the guide frame on the photographing interface after the user's photographing operation is subsequently detected.
在其他一些实施例中,手机并不在预览界面上显示引导框,而在检测到用户的拍照操作后,再在拍摄界面上显示引导框。In some other embodiments, the mobile phone does not display the guide frame on the preview interface, but displays the guide frame on the shooting interface after detecting the user's photographing operation.
此外,在另一些实施例中,在预览状态下,手机还可以根据预设的采集帧率2,通过长焦摄像头来采集长焦图像。该长焦摄像头为第二摄像头。In addition, in other embodiments, in the preview state, the mobile phone can also collect telephoto images through the telephoto camera according to the preset acquisition frame rate 2 . The telephoto camera is the second camera.
在又一些实施例中,手机还可以通过长焦框将长焦摄像头实时的拍摄范围提示给用户,以为用户呈现长焦摄像头实时采集到的局部画面。其中,长焦框以透明悬浮框的方式叠加显示在广角图像之上。长焦框在广角图像上的位置和大小与长焦摄像头的拍摄范围相对应。长焦框内的广角图像的视场角可以等于或略小于长焦摄像头的拍摄范围和视场角。长焦框内广角图像的画面范围与长焦摄像头的画面范围相对应。例如,长焦框内广角图像的画面范围可以等于或略小于长焦摄像头采集的长焦图像的画面范围。其中,采集帧率2与采集帧率1可以相同或不同,不予限定。示例性的,参见图10A中的(a),预览界面上包括广角图像1001、长焦框1002和引导框1003。In still other embodiments, the mobile phone may also prompt the user with the real-time shooting range of the telephoto camera through the telephoto frame, so as to present the partial picture captured by the telephoto camera in real time to the user. Among them, the telephoto frame is superimposed and displayed on the wide-angle image in the form of a transparent floating frame. The position and size of the telephoto frame on the wide-angle image corresponds to the shooting range of the telephoto camera. The field of view of the wide-angle image in the telephoto frame may be equal to or slightly smaller than the shooting range and field of view of the telephoto camera. The picture range of the wide-angle image in the telephoto frame corresponds to that of the telephoto camera. For example, the frame range of the wide-angle image in the telephoto frame may be equal to or slightly smaller than the frame range of the telephoto image captured by the telephoto camera. The collection frame rate 2 and the collection frame rate 1 may be the same or different, and are not limited. Exemplarily, referring to (a) in FIG. 10A , the preview interface includes a wide-angle image 1001 , a telephoto frame 1002 and a guide frame 1003 .
其中,当用户移动手机或用户手抖等原因导致手机抖动时,预览界面上长焦框在广角图像上的相对位置和大小基本保持不变,具体与广角摄像头和长焦摄像头的镜头中心、拍摄的物距以及视场角的大小相关。示例性的,参见图10A中的(b),广角摄像头和长焦摄像头的镜头中心之间的距离是固定的,在物距一定的情况下,视场角的大小也是固定的,此时若移动手机则长焦摄像头和广角摄像头同时移动,但长焦摄 像头的视场角与广角摄像头的视场角的相对关系是保持不变的,因而长焦框在广角图像上的相对位置和大小也基本保持不变。Among them, when the user moves the mobile phone or the user's hand shakes and other reasons cause the mobile phone to shake, the relative position and size of the telephoto frame on the wide-angle image on the preview interface remain basically unchanged. The object distance and the size of the field of view are related. Exemplarily, see (b) in FIG. 10A , the distance between the lens centers of the wide-angle camera and the telephoto camera is fixed, and when the object distance is constant, the size of the field of view is also fixed. For mobile phones, the telephoto camera and the wide-angle camera move at the same time, but the relative relationship between the telephoto camera’s field of view and the wide-angle camera’s field of view remains unchanged, so the relative position and size of the telephoto frame on the wide-angle image are also Basically unchanged.
在其他一些实施例中,当长焦摄像头的等效焦距与广角摄像头的等效焦距相差较大时,长焦摄像头的视场角与广角摄像头的视场角也相差较大,长焦摄像头的视场角较小,长焦框的尺寸较小,不便于用户查看长焦摄像头拍摄范围内的细节。因而,手机可以将长焦框和长焦框内的广角图像放大后显示在预览界面上,以方便用户获知长焦摄像头拍摄范围及细节。示例性的,参见图10A中的(c),预览界面上包括广角图像1004、放大显示的长焦框1005,以及引导框1006。In some other embodiments, when the equivalent focal length of the telephoto camera is quite different from the equivalent focal length of the wide-angle camera, the field angle of the telephoto camera is also quite different from the field angle of the wide-angle camera. The field of view is small, and the size of the telephoto frame is small, making it inconvenient for users to view details within the shooting range of the telephoto camera. Therefore, the mobile phone can enlarge the telephoto frame and the wide-angle image in the telephoto frame and display them on the preview interface, so as to facilitate the user to know the shooting range and details of the telephoto camera. Exemplarily, see (c) in FIG. 10A , the preview interface includes a wide-angle image 1004 , a zoomed-in telephoto frame 1005 , and a guide frame 1006 .
在另一些实施例中,手机在预览界面上显示广角图像上与引导框对应的目标区域图像,而不显示完整的广角图像。该目标区域图像的尺寸与引导框的尺寸的比例为r,且r≥1。该目标区域图像可以通过对完整的广角图像进行裁剪和放大获得。In other embodiments, the mobile phone displays the target area image corresponding to the guide frame on the wide-angle image on the preview interface, but does not display the complete wide-angle image. The ratio of the size of the target area image to the size of the guide frame is r, and r≥1. The target area image can be obtained by cropping and zooming in on the full wide-angle image.
尤其地,当长焦摄像头的等效焦距与广角摄像头的等效焦距相差较大时,长焦摄像头的视场角与广角摄像头的视场角也相差较大,长焦摄像头的视场角较小,长焦框的尺寸较小,不便于用户查看长焦摄像头拍摄范围内的细节。该种情况下,手机可以将目标区域图像和引导框等比例放大后显示在预览界面上,以方便用户获知长焦摄像头拍摄范围及细节。In particular, when the equivalent focal length of the telephoto camera is quite different from the equivalent focal length of the wide-angle camera, the field of view of the telephoto camera is also quite different from that of the wide-angle camera. Small, the size of the telephoto frame is small, which is not convenient for users to view the details within the shooting range of the telephoto camera. In this case, the mobile phone can enlarge the target area image and the guide frame proportionally and display them on the preview interface, so that the user can easily know the shooting range and details of the telephoto camera.
例如,在预览状态下,若引导框的规格为默认的规格,则手机在采集到广角图像后,可以根据默认规格的引导框对广角图像进行裁剪从而获得目标区域图像,并将目标区域图像和引导框等比例放大后显示在预览界面上。若引导框的规格与用户选择的区域/主体相对应,则手机在采集到广角图像后,可以根据该引导框对广角图像进行裁剪从而获得目标区域图像,并将目标区域图像和引导框等比例放大后显示在预览界面上。For example, in the preview state, if the specification of the guide frame is the default specification, after the mobile phone collects the wide-angle image, the wide-angle image can be cropped according to the guide frame of the default specification to obtain the target area image, and the target area image and The guide frame is proportionally enlarged and displayed on the preview interface. If the specification of the guide frame corresponds to the area/subject selected by the user, after the mobile phone collects the wide-angle image, the wide-angle image can be cropped according to the guide frame to obtain the target area image, and the target area image and the guide frame are proportional to each other. After zooming in, it will be displayed on the preview interface.
示例性的,图8中的(b)所示的预览界面上完整的广角图像可以替换为图10B所示的预览界面上广角图像中的目标区域图像1007。其中,与图8中的(b)所示的预览界面相比,在图10B所示的预览界面上,目标区域图像和引导框进行了等比例放大,且该目标区域图像的尺寸与引导框的尺寸的比例r大于1。Exemplarily, the complete wide-angle image on the preview interface shown in (b) of FIG. 8 can be replaced with the target area image 1007 in the wide-angle image on the preview interface shown in FIG. 10B . Among them, compared with the preview interface shown in (b) in FIG. 8 , on the preview interface shown in FIG. 10B , the target area image and the guide frame are enlarged in equal proportions, and the size of the target area image is the same as the guide frame. The size of the ratio r is greater than 1.
202、手机检测到用户的拍照操作后,在拍摄界面上显示广角图像,以及叠加在广角图像之上的引导框。202. After detecting the user's photographing operation, the mobile phone displays a wide-angle image and a guide frame superimposed on the wide-angle image on the photographing interface.
当用户想要开始拍摄目标图像时,可以触发拍照操作使得手机进入拍照过程。例如,手机检测到用户点击预览界面上拍摄控件的操作后,确定检测到用户的拍照操作,从而进入拍照过程。再例如,手机检测到用户语音指示开始拍照的操作后,确定检测到用户的拍照操作,从而进入拍照过程。可以理解的是,用于触发手机进入拍照过程的方式还可以有手势等多种其他方式,本申请实施例不予限定。When the user wants to start shooting the target image, a shooting operation can be triggered to make the mobile phone enter the shooting process. For example, after the mobile phone detects the user's operation of clicking the photographing control on the preview interface, it determines that the user's photographing operation is detected, thereby entering the photographing process. For another example, after the mobile phone detects the operation of the user's voice instructing to start taking a photo, it determines that the user's photo-taking operation is detected, thereby entering the photo-taking process. It can be understood that the manner for triggering the mobile phone to enter the photographing process may also include gestures and other manners, which are not limited in the embodiments of the present application.
在拍照过程中,拍摄界面上显示有广角图像,该广角图像使用广角摄像头(即第一摄像头)采集获得。在一些实施例中,在拍照过程中,拍摄界面上的广角图像作为背景图像,用于向用户提供全景图像,用户根据广角图像的范围确定长焦摄像头的移动路径,从而生成多个长焦图像的拼接图像。在一种可能的实现方式中,该广角图像为检测到用户的拍照操作后广角摄像头采集到的第一帧图像,在拍照过程中,手机始终显示该第一帧图像,不对广角摄像头采集的图像进行刷新送显。在另一种可能的实 现方式中,手机可以在检测到用户的拍照操作后采集Q(Q为大于1的整数)帧广角图像,从而将该Q帧广角图像融合成一张质量较好的初始广角图像作为背景图像。在拍照过程中,手机始终显示该初始广角图像,不对广角摄像头采集的图像进行刷新送显。也就是说,手机检测到用户的拍照操作后,在拍摄界面上显示的用于作为预览的广角图像保持不变。During the photographing process, a wide-angle image is displayed on the photographing interface, and the wide-angle image is acquired by using a wide-angle camera (ie, the first camera). In some embodiments, during the photographing process, the wide-angle image on the photographing interface is used as a background image to provide the user with a panoramic image, and the user determines the moving path of the telephoto camera according to the range of the wide-angle image, thereby generating multiple telephoto images stitched image. In a possible implementation manner, the wide-angle image is the first frame of image collected by the wide-angle camera after detecting the user's photographing operation. During the photographing process, the mobile phone always displays the first frame of image, not the image collected by the wide-angle camera. Perform refresh display. In another possible implementation, the mobile phone may collect Q (Q is an integer greater than 1) frames of wide-angle images after detecting the user's photo-taking operation, so as to fuse the Q frames of wide-angle images into an initial wide-angle image with better quality image as background image. During the photographing process, the mobile phone always displays the initial wide-angle image, and does not refresh and display the image captured by the wide-angle camera. That is to say, after the mobile phone detects the user's photographing operation, the wide-angle image displayed on the photographing interface and used as a preview remains unchanged.
在另一些实施例中,在拍照过程中,拍摄界面上作为背景图像的第一广角图像是变化的,是手机根据预设采集帧率3通过广角摄像头实时采集获得的图像。其中,该采集帧率3与采集帧率1可以相同或不同。In other embodiments, during the photographing process, the first wide-angle image serving as the background image on the photographing interface changes, and is an image acquired by the mobile phone through real-time acquisition of the wide-angle camera according to the preset acquisition frame rate 3 . The acquisition frame rate 3 and the acquisition frame rate 1 may be the same or different.
在拍照过程中,手机还可以在拍摄界面上显示上述引导框,该引导框以透明悬浮框的方式叠加在背景图像之上。在一些实施例中,手机可以在拍摄界面上持续显示整个引导框;在另一些实施例中,手机可以在拍摄界面上仅显示引导框中未匹配的网格,而不再持续显示整个引导框。During the photographing process, the mobile phone can also display the above-mentioned guide frame on the photographing interface, and the guide frame is superimposed on the background image in the form of a transparent floating frame. In some embodiments, the mobile phone can continuously display the entire guide frame on the shooting interface; in other embodiments, the mobile phone can only display the unmatched grids in the guide frame on the shooting interface, instead of continuously displaying the entire guide frame .
在拍照过程中,手机可以根据预设的采集帧率4,通过长焦摄像头采集长焦图像。该采集帧率4与采集帧率2可以相同或不同。During the photographing process, the mobile phone can collect telephoto images through the telephoto camera according to the preset acquisition frame rate 4 . The acquisition frame rate 4 and the acquisition frame rate 2 may be the same or different.
在拍照过程中,用户可以通过移动手机来移动长焦摄像头,或者用户可以直接移动长焦摄像头,或者手机可以自动控制长焦摄像头以预设的角度间隔进行移动。在一些实施例中,手机还可以在拍摄界面上显示长焦框。随着长焦摄像头的移动,长焦摄像头的拍摄范围发生变化,长焦摄像头采集的长焦图像的内容也相应变化,长焦框的位置也相应变化。长焦框可以在长焦摄像头的移动的过程中,将长焦摄像头拍摄范围的动态变化过程实时地提示给用户。在长焦摄像头的移动过程中,拍摄界面上的广角图像可以作为背景图像以向用户提供全景图像,从而引导用户移动长焦摄像头以使得将长焦框与引导框中的网格逐个匹配。During the photographing process, the user can move the telephoto camera by moving the mobile phone, or the user can directly move the telephoto camera, or the mobile phone can automatically control the telephoto camera to move at preset angular intervals. In some embodiments, the mobile phone can also display a telephoto frame on the shooting interface. As the telephoto camera moves, the shooting range of the telephoto camera changes, the content of the telephoto image collected by the telephoto camera also changes accordingly, and the position of the telephoto frame also changes accordingly. The telephoto frame can prompt the user in real time the dynamic change process of the shooting range of the telephoto camera during the movement of the telephoto camera. During the movement of the telephoto camera, the wide-angle image on the shooting interface can be used as a background image to provide the user with a panoramic image, so as to guide the user to move the telephoto camera to match the telephoto frame with the grids in the guide frame one by one.
在另一些实施例中,若手机可以自动控制长焦摄像头移动,则手机可以根据引导框中网格的排列顺序,控制长焦摄像头按照网格顺序自动移动,以使得长焦摄像头与引导框中的网格逐个匹配,而不需要在拍摄界面上显示长焦框。并且,即使拍摄界面上作为背景图像的广角图像是变化的情况下,由于用户未专门移动手机,因而手机实时采集到的广角图像的画面基本不变或变化很小,引导框及网格在画面中的位置也基本不变,因此手机控制长焦摄像头按照网格顺序自动移动,仍可以使得长焦摄像头与引导框中的网格逐个匹配,而不需要显示长焦框。In other embodiments, if the mobile phone can automatically control the telephoto camera to move, the mobile phone can control the telephoto camera to automatically move according to the grid order according to the grid arrangement in the guide frame, so that the telephoto camera is connected to the guide frame. The grids are matched one by one without the need to display a telephoto frame on the shooting interface. Moreover, even if the wide-angle image used as the background image on the shooting interface changes, because the user does not specifically move the mobile phone, the wide-angle image captured by the mobile phone in real time is basically unchanged or changes little, and the guide frame and grid are on the screen. The position of the telephoto camera is basically unchanged, so the mobile phone controls the telephoto camera to automatically move in the grid order, and the telephoto camera can still be matched with the grid in the guide frame one by one without displaying the telephoto frame.
203、手机根据获取的目标长焦图像生成拼接图像,并在拍摄界面上显示拼接图像缩略图。203. The mobile phone generates a stitched image according to the acquired target telephoto image, and displays a thumbnail of the stitched image on the shooting interface.
在拍照过程中,随着长焦摄像头的移动,手机可以通过长焦摄像头采集与引导框中的网格相匹配的多帧目标长焦图像。手机可以对目标长焦图像进行拼接处理,从而生成目标图像。During the photographing process, with the movement of the telephoto camera, the mobile phone can collect multiple frames of target telephoto images that match the grid in the guide frame through the telephoto camera. The mobile phone can stitch the target telephoto image to generate the target image.
其中,当长焦图像的内容与拍摄界面上引导框某个网格中广角图像的内容匹配时,该长焦图像与该网格匹配,该长焦图像可以称为目标长焦图像。长焦图像的内容与网格中广角图像的内容相匹配是指,长焦图像的内容与网格中广角图像的内容完全相同或基本相同。比如,长焦图像与网格中广角图像的相同内容的重叠比例大于或者等于预设值3(比如80%或90%等)。再比如,长焦图像与网格中广角图像的直方图的相 似度大于或者等于预设值4。其中,这里的直方图可以是亮度等特征参数值的直方图。再比如,长焦图像与网格中的广角图像在同种变换域(例如快速傅里叶变换(fast fourier transform,FFT)、小波变换(wavelet transform,WT)或离散余弦变换(discrete cosine transform,DCT)等)的相似度大于或者等于预设值5。相似度的度量可以用不同值对应的比例系数的差值和。再比如,长焦图像与网格中广角图像的特征匹配度大于或者等于预设值6,例如该特征包括角点、卷积神经网络特征或SIFI特征等。Wherein, when the content of the telephoto image matches the content of the wide-angle image in a certain grid of the guide frame on the shooting interface, the telephoto image matches the grid, and the telephoto image may be called the target telephoto image. The content of the telephoto image matches the content of the wide-angle image in the grid means that the content of the telephoto image is exactly or substantially the same as the content of the wide-angle image in the grid. For example, the overlap ratio of the telephoto image and the same content of the wide-angle image in the grid is greater than or equal to a preset value of 3 (eg, 80% or 90%, etc.). For another example, the similarity between the histogram of the telephoto image and the wide-angle image in the grid is greater than or equal to the preset value of 4. The histogram here may be a histogram of characteristic parameter values such as brightness. For another example, the telephoto image and the wide-angle image in the grid are in the same transform domain (such as fast Fourier transform (FFT), wavelet transform (WT) or discrete cosine transform (discrete cosine transform), The similarity of DCT), etc.) is greater than or equal to the preset value of 5. The measure of similarity can be the sum of the differences of the scale coefficients corresponding to different values. For another example, the feature matching degree between the telephoto image and the wide-angle image in the grid is greater than or equal to a preset value of 6, for example, the feature includes a corner point, a convolutional neural network feature, or a SIFI feature.
手机获得目标长焦图像的方式可以包括:方式1、手机确定某帧长焦图像与网格匹配后,拍摄获得与该网格匹配的目标长焦图像;方式2、手机在某帧长焦图像与网格匹配后,确定该帧长焦图像即为目标长焦图像。The ways for the mobile phone to obtain the target telephoto image may include: mode 1. After the mobile phone determines that a certain frame of telephoto image matches the grid, the mobile phone captures and obtains the target telephoto image that matches the grid; After matching with the grid, it is determined that this frame of telephoto image is the target telephoto image.
在一些实施例中,手机检测到用户的拍照操作后,可以将引导框中网格的拍摄顺序提示给用户,以便用户在拍照过程中根据该拍摄顺序移动长焦摄像头。In some embodiments, after detecting the user's photographing operation, the mobile phone can prompt the user of the photographing sequence of the grid in the guide frame, so that the user can move the telephoto camera according to the photographing sequence during the photographing process.
若手机在预览状态下确定了引导框中网格的拍摄顺序,则手机可以在拍照过程中将该拍摄顺序提示给用户,以便用户可以根据该拍摄顺序移动手机或直接移动长焦摄像头,从而使得长焦摄像头采集的长焦图像按拍摄顺序与引导框中的网格进行匹配。在一种可能的实现方式中,手机可以将完整的拍摄顺序提示给用户。在另一种可能的实现方式中,手机可以根据拍摄情况仅提示当前需要的部分拍摄顺序,而不用将完整的拍摄顺序提示给用户。If the mobile phone determines the shooting order of the grid in the guide frame in the preview state, the mobile phone can prompt the user for the shooting order during the shooting process, so that the user can move the mobile phone or directly move the telephoto camera according to the shooting order, so that the The telephoto image captured by the telephoto camera is matched to the grid in the guide frame in the order in which it was taken. In a possible implementation manner, the mobile phone may prompt the user for the complete shooting sequence. In another possible implementation manner, the mobile phone may only prompt a part of the currently required shooting sequence according to the shooting situation, instead of prompting the user for the complete shooting sequence.
若手机在预览状态下未确定引导框中网格的拍摄顺序,则用户可以根据自己的需求、习惯或意愿移动手机或直接移动长焦摄像头,使得长焦摄像头采集的长焦图像与引导框中的网格进行匹配。其中,对于同一行或同一列网格来说,长焦图像应尽量依次与该行/列中相邻的网格进行匹配。在拍照过程中,若某个网格已经匹配过,则该网格不再重复匹配。If the mobile phone does not determine the shooting order of the grids in the guide frame in the preview state, the user can move the mobile phone or directly move the telephoto camera according to their needs, habits or wishes, so that the telephoto image collected by the telephoto camera and the guide frame grid to match. Among them, for the grid of the same row or column, the telephoto image should be matched with the adjacent grids in the row/column as far as possible. During the photographing process, if a grid has already been matched, the grid will not be matched again.
其中,由于长焦摄像头实时采集的长焦图像的视场角较小,稍微移动手机或长焦摄像头就可能导致长焦摄像头的视角偏移较大,从而使得长焦图像的内容偏移较大,因而不容易与下一个待匹配网格的内容相匹配。在拍照过程中,拍摄界面上的广角图像可以为用户提供大的视场角内的全景图像,因而广角图像可以为用户移动手机或长焦摄像头提供参考,用户可以根据广角图像的内容,根据长焦图像的内容在广角图像上的对应位置,来准确控制手机或长焦摄像头的移动路径(例如移动方向和幅度)等,使得长焦图像能够快速、准确地与下一个网格相匹配。Among them, due to the small field of view of the telephoto image collected in real time by the telephoto camera, a slight movement of the mobile phone or the telephoto camera may cause the telephoto camera to have a larger angle of view shift, thereby causing a larger content shift in the telephoto image. , so it is not easy to match the content of the next grid to be matched. During the shooting process, the wide-angle image on the shooting interface can provide the user with a panoramic image within a large field of view, so the wide-angle image can provide a reference for the user to move the mobile phone or telephoto camera. The corresponding position of the content of the focus image on the wide-angle image is used to accurately control the movement path (such as the moving direction and amplitude) of the mobile phone or telephoto camera, so that the telephoto image can be quickly and accurately matched with the next grid.
并且,拍摄界面上可以实时显示长焦框,以引导用户将长焦摄像头的拍摄范围和长焦框移动到第一个待匹配的网格所在的位置。示例性的,第一个待匹配的网格为如图11中的(a)所示的中间一行左侧的第一个网格,预览界面上包括广角图像和引导框。手机检测到用户点击图11中的(a)所示的预览界面上的拍摄控件1100的操作后,进入目标图像的拍照过程并显示如图11中的(b)、(c)或(d)所示的拍摄界面,拍摄界面上包括广角图像、引导框以及长焦框1101。其中,图11中的(b)所示的拍摄界面上未显示有拍摄顺序的提示信息。图11中的(c)所示的拍摄界面上显示有完整的拍摄顺序的提示信息,图11中的(d)所示的拍摄界面上显示有部分拍摄顺序的提示信息。在一些实施例中,如图11中的(c)-(d)所示,手机还可以在拍摄界面上提示用户:请沿箭头方向移动手机并匹配网格。Moreover, the telephoto frame can be displayed in real time on the shooting interface, so as to guide the user to move the shooting range of the telephoto camera and the telephoto frame to the position where the first grid to be matched is located. Exemplarily, the first grid to be matched is the first grid on the left side of the middle row as shown in (a) of FIG. 11 , and the preview interface includes a wide-angle image and a guide frame. After the mobile phone detects that the user clicks the shooting control 1100 on the preview interface shown in (a) in FIG. 11 , it enters the process of taking pictures of the target image and displays (b), (c) or (d) in FIG. 11 . As shown in the shooting interface, the shooting interface includes a wide-angle image, a guide frame and a telephoto frame 1101 . Wherein, the photographing interface shown in (b) of FIG. 11 does not display the prompt information of the photographing sequence. The photographing interface shown in (c) of FIG. 11 displays prompt information of the complete photographing sequence, and the photographing interface shown in (d) of FIG. 11 displays prompt information of part of the photographing sequence. In some embodiments, as shown in (c)-(d) of FIG. 11 , the mobile phone may also prompt the user on the shooting interface: please move the mobile phone in the direction of the arrow and match the grid.
以下将以图11中的(c)所示的拍摄顺序,且拍摄界面上显示部分拍摄顺序的提示信息为例,对拍照过程进行阐述。The photographing process will be described below by taking the photographing sequence shown in (c) of FIG. 11 and the prompt information of a part of the photographing sequence displayed on the photographing interface as an example.
在一些实施例中,手机可以根据参考广角图像,确定长焦摄像头采集不同网格对应的目标长焦图像时的配置参数。手机根据该配置参数对目标长焦图像进行自动曝光(automatic exposure,AE)配置、自动白平衡(automatic white balance,AWB)调节和动态范围校正(dynamic range correction,DRC)等配置,从而获得目标长焦图像。由于拼接图像是由多个目标长焦图像拼接获得的,每个目标长焦图像的拍摄环境有所差异,且只能拍摄局部范围的画面,无法兼顾大视野的全局画面的整体效果,因而整个拼接图像在亮度、动态范围或色彩等方面可能会不自然、突兀或不平滑。手机根据全局范围对应的参考广角图像,确定长焦摄像头采集不同网格对应的目标长焦图像时的配置参数,可以使得根据目标长焦图像获得的拼接图像整体的曝光效果、AWB效果和动态范围尽量与参考广角图像一致,使得拼接图像整体变化较为平滑且过渡自然。In some embodiments, the mobile phone may determine, according to the reference wide-angle image, configuration parameters when the telephoto camera collects the target telephoto images corresponding to different grids. The mobile phone performs automatic exposure (AE) configuration, automatic white balance (AWB) adjustment and dynamic range correction (DRC) on the target telephoto image according to the configuration parameters, so as to obtain the target length. focus image. Since the stitched image is obtained by stitching multiple target telephoto images, the shooting environment of each target telephoto image is different, and only a local range of pictures can be taken, and the overall effect of the global picture with a large field of view cannot be taken into account. Stitched images may be unnatural, sharp, or not smooth in terms of brightness, dynamic range, or color. The mobile phone determines the configuration parameters of the telephoto camera when collecting the target telephoto images corresponding to different grids according to the reference wide-angle image corresponding to the global scope, which can make the overall exposure effect, AWB effect and dynamic range of the stitched image obtained according to the target telephoto image. Try to be consistent with the reference wide-angle image, so that the overall change of the stitched image is smooth and the transition is natural.
其中,该参考广角图像用于在拍照过程中确定采集目标长焦图像的配置参数,该参考广角图像在拍照过程中为同一帧图像。例如,该参考广角图像可以为上述初始广角图像,或者为检测到用户的拍照操作后广角摄像头采集到的第一帧图像等。Wherein, the reference wide-angle image is used to determine the configuration parameters of the telephoto image of the acquisition target during the photographing process, and the reference wide-angle image is the same frame image during the photographing process. For example, the reference wide-angle image may be the above-mentioned initial wide-angle image, or the first frame image collected by the wide-angle camera after detecting the user's photographing operation.
在一些实施例中,为保证参考广角图像的质量较好(例如动态范围较高、色彩配置较好等),以便根据参考广角图像获得的长焦图像的拼接图像的质量也较好,参考广角图像可以为上述多帧图像融合获得的初始广角图像。In some embodiments, in order to ensure better quality of the reference wide-angle image (eg, higher dynamic range, better color configuration, etc.), so that the quality of the stitched image of the telephoto image obtained from the reference wide-angle image is also better, The image may be an initial wide-angle image obtained by fusing the above-mentioned multiple frames of images.
在一种可能的实现方式中,参考广角图像按照引导框的网格对应划分为多个图像块(patch),每个图像块对应引导框的一个网格。例如,网格1对应图像块1,网格2对应图像块2,网格3对应图像块3。手机根据参考广角图像每个图像块的亮度、色彩和动态范围等参数,设置图像块对应网格的目标长焦图像的AE、AWB或DRC等配置参数。手机根据该配置参数采集目标长焦图像,实现根据广角图像引导对应网格内的目标长焦图像进行AE、AWB和DRC等配置。In a possible implementation manner, the reference wide-angle image is correspondingly divided into a plurality of image patches (patches) according to the grid of the guide frame, and each image patch corresponds to a grid of the guide frame. For example, grid 1 corresponds to image block 1, grid 2 corresponds to image block 2, and grid 3 corresponds to image block 3. The mobile phone sets configuration parameters such as AE, AWB or DRC of the target telephoto image of the grid corresponding to the image block according to the parameters such as brightness, color and dynamic range of each image block of the reference wide-angle image. The mobile phone collects the target telephoto image according to the configuration parameters, and realizes the configuration of AE, AWB and DRC according to the wide-angle image to guide the target telephoto image in the corresponding grid.
以第一个待匹配网格为网格1,网格1对应目标长焦图像1为例进行说明。对于上述方式1,手机可以先采集长焦图像,在确定长焦图像与网格1匹配后,根据参考广角图像上网格1对应的图像块1设置长焦摄像头的配置参数,以便长焦摄像头根据该配置参数采集获得与网格1对应的目标长焦图像1。对于上述方式2,手机可以根据参考广角图像上网格1对应的图像块1设置长焦摄像头的配置参数,以便长焦摄像头根据该配置参数采集长焦图像,直至某帧长焦图像与网格1匹配后,手机确定该帧长焦图像即为目标长焦图像1。The first grid to be matched is taken as grid 1, and grid 1 corresponds to target telephoto image 1 as an example for description. For the above method 1, the mobile phone can first collect the telephoto image, and after determining that the telephoto image matches grid 1, set the configuration parameters of the telephoto camera according to the image block 1 corresponding to grid 1 on the reference wide-angle image, so that the telephoto camera can The configuration parameters are collected to obtain the target telephoto image 1 corresponding to the grid 1 . For the above method 2, the mobile phone can set the configuration parameters of the telephoto camera according to the image block 1 corresponding to grid 1 on the reference wide-angle image, so that the telephoto camera can collect telephoto images according to the configuration parameters, until a certain frame of telephoto images and grid 1 After matching, the mobile phone determines that the telephoto image of the frame is the target telephoto image 1 .
以下针对长焦摄像头的不同配置参数分别进行说明:The following describes the different configuration parameters of the telephoto camera:
AE配置参数:AE configuration parameters:
手机可以对参考广角图像上的图像块1进行测光,从而获得图像块1的亮度值、亮度平均值和最大值等亮度参数,该亮度参数可以反映环境亮度情况。手机中的曝光表预设有环境亮度与曝光参数之间的对应关系。手机可以根据广角图像上图像块1的亮度参数反应的环境亮度情况,结合长焦图像的曝光表确定网格1对应的待采集长焦图像的AE配置参数,例如确定长焦图像的曝光时间和ISO等曝光参数。手机采用该曝光参数对网格1对应的目标长焦图像1进行自动曝光,以提高目标长焦图像1的曝 光效果。The mobile phone can perform light metering on the image block 1 on the reference wide-angle image, so as to obtain brightness parameters such as the brightness value, brightness average value, and maximum value of the image block 1, which can reflect the ambient brightness. The exposure meter in the mobile phone is preset with a corresponding relationship between ambient brightness and exposure parameters. The mobile phone can determine the AE configuration parameters of the telephoto image to be collected corresponding to grid 1 according to the ambient brightness situation reflected by the brightness parameter of the image block 1 on the wide-angle image, combined with the exposure table of the telephoto image, for example, determine the exposure time and the exposure time of the telephoto image. Exposure parameters such as ISO. The mobile phone uses this exposure parameter to automatically expose the target telephoto image 1 corresponding to grid 1, so as to improve the exposure effect of the target telephoto image 1.
由于参考广角图像整体的曝光效果较好,因而根据参考广角图像中图像块的曝光信息确定目标长焦图像的曝光参数,可以从全局出发使得根据不同目标长焦图像获得的拼接图像的曝光效果尽量与参考广角图像一致,从而使得拼接图像的整体曝光效果也较好。Since the overall exposure effect of the reference wide-angle image is good, the exposure parameters of the target telephoto image can be determined according to the exposure information of the image blocks in the reference wide-angle image, and the exposure effect of the stitched images obtained from different target telephoto images can be made global as much as possible. Consistent with the reference wide-angle image, so that the overall exposure of the stitched image is also better.
此外,由于参考广角图像上不同图像块之间的亮度过渡较为自然,因而在一些实施例中,手机还可以根据图像块1的相邻图像块的亮度情况,调整图像块1对应的目标长焦图像1的曝光参数,使得目标长焦图像1的亮度与相邻目标长焦图像之间的亮度过渡较为自然,避免手机独立对每个网格对应的目标长焦图像进行自动曝光,导致的不同目标长焦图像曝光效果差异较大,拼接图像的亮度过程不够平滑和自然,以及拼接痕迹明显等问题,从而可以提高拼接图像的整体质量。例如,若图像块1较暗,图像块1相邻的图像块2较亮,则手机可以将根据图像块1确定的目标长焦图像1的曝光参数提高一个亮度档位,以使得目标长焦图像1与图像块2对应的目标长焦图像2之间的亮度过渡较为自然。In addition, since the brightness transition between different image blocks on the reference wide-angle image is relatively natural, in some embodiments, the mobile phone can also adjust the target telephoto corresponding to the image block 1 according to the brightness of the adjacent image blocks of the image block 1 The exposure parameters of image 1 make the brightness transition between the brightness of the target telephoto image 1 and the adjacent target telephoto images more natural, and avoid the mobile phone independently automatically exposing the target telephoto image corresponding to each grid, resulting in different The exposure effect of the target telephoto image varies greatly, the brightness process of the spliced image is not smooth and natural, and the splicing traces are obvious, which can improve the overall quality of the spliced image. For example, if image block 1 is dark and image block 2 adjacent to image block 1 is brighter, the mobile phone can increase the exposure parameter of target telephoto image 1 determined according to image block 1 by one brightness level, so that the target telephoto The brightness transition between image 1 and target telephoto image 2 corresponding to image block 2 is relatively natural.
AWB配置参数:AWB configuration parameters:
手机可以根据参考广角图像上图像块1的色彩分布情况,确定网格1对应的目标长焦图像1的AWB配置参数,例如确定与网格1对应的目标长焦图像1的WB值,即RGB三原色的比例。手机依据该比例相应调整与网格1对应的目标长焦图像1的RGB比例,以提高目标长焦图像的色彩配置效果。The mobile phone can determine the AWB configuration parameters of the target telephoto image 1 corresponding to the grid 1 according to the color distribution of the image block 1 on the reference wide-angle image, for example, determine the WB value of the target telephoto image 1 corresponding to the grid 1, that is, RGB The ratio of the three primary colors. The mobile phone correspondingly adjusts the RGB ratio of the target telephoto image 1 corresponding to the grid 1 according to the ratio, so as to improve the color configuration effect of the target telephoto image.
其中,由于参考广角图像整个图像的白平衡较好,且不同图像块之间的色彩过渡较为自然,因而根据参考广角图像的图像块的白平衡信息可以从全局出发,使得目标长焦图像的白平衡效果尽量与参考广角图像一致,从而使得拼接图像包括的不同目标长焦图像之间的色彩过渡也较为自然,避免手机单独针对每个网格对应的目标长焦图像进行自动白平衡调节,导致的不同目标长焦图像白平衡效果差异较大,拼接图像的色彩过渡不够平滑和自然,以及拼接痕迹明显等问题,从而可以提高拼接图像的整体质量。Among them, since the white balance of the entire image of the reference wide-angle image is good, and the color transition between different image blocks is relatively natural, according to the white balance information of the image blocks of the reference wide-angle image, the white balance information of the image block of the reference wide-angle image can be taken from the global perspective, so that the white balance of the target telephoto image can be achieved from a global perspective. The balance effect is as consistent as possible with the reference wide-angle image, so that the color transition between different target telephoto images included in the spliced image is also more natural, avoiding the mobile phone to perform automatic white balance adjustment for the target telephoto image corresponding to each grid. The white balance effect of different target telephoto images is quite different, the color transition of the stitched image is not smooth and natural enough, and the stitching traces are obvious, which can improve the overall quality of the stitched image.
DRC配置参数:DRC configuration parameters:
手机可以根据参考广角图像上图像块1的动态范围,确定网格1对应的目标长焦图像1的DRC配置参数,从而对应调整网格1对应的目标长焦图像1的动态范围,以使得目标长焦图像1的亮度分布情况与对应图像块的亮度分布情况较为一致。该动态范围可以包括图像上不同像素点的亮度分布情况,不同像素点之间的亮度差异情况等。例如,手机可以通过亮度直方图来统计图像块1的动态范围。举例来说,图像块1包括亮度低于100的多个像素点和亮度高于200的像素点。手机可以控制目标长焦图像的像素点的亮度,以使得目标长焦图像包括亮度低于100的多个像素点和亮度高于200的像素点,从而增大目标长焦图像的动态范围。The mobile phone can determine the DRC configuration parameters of the target telephoto image 1 corresponding to the grid 1 according to the dynamic range of the image block 1 on the reference wide-angle image, so as to adjust the dynamic range of the target telephoto image 1 corresponding to the grid 1 accordingly, so that the target The brightness distribution of the telephoto image 1 is relatively consistent with the brightness distribution of the corresponding image block. The dynamic range may include the brightness distribution of different pixels on the image, the brightness difference between different pixels, and the like. For example, the mobile phone can count the dynamic range of image block 1 through the luminance histogram. For example, the image block 1 includes a plurality of pixels whose brightness is lower than 100 and pixels whose brightness is higher than 200. The mobile phone can control the brightness of the pixels of the target telephoto image, so that the target telephoto image includes multiple pixels with a brightness lower than 100 and pixels with a brightness higher than 200, thereby increasing the dynamic range of the target telephoto image.
其中,由于参考广角图像的动态范围较大,因而根据参考广角图像上的图像块1的动态范围,调整网格1对应的目标长焦图像1的动态范围,可以增大目标长焦图像1的动态范围,使得目标长焦图像1的亮度范围更大,亮暗层次更为丰富,能够提供更多亮部和暗部的图像细节。手机根据参考广角图像的图像块的动态范围信息配置目 标长焦图像的DRC参数,可以从全局出发使得拼接图像上不同目标长焦图像之间的亮度分布过渡较为自然,避免手机分别对每个网格对应的目标长焦图像进行DRC导致的不同目标长焦图像动态范围差异较大,拼接图像的动态范围较差,以及拼接痕迹明显等问题,从而可以提高拼接图像的整体质量。Among them, since the dynamic range of the reference wide-angle image is relatively large, adjusting the dynamic range of the target telephoto image 1 corresponding to the grid 1 according to the dynamic range of the image block 1 on the reference wide-angle image can increase the dynamic range of the target telephoto image 1. The dynamic range makes the target telephoto image 1 have a larger brightness range, richer levels of light and dark, and can provide more image details in bright and dark parts. The mobile phone configures the DRC parameters of the target telephoto image according to the dynamic range information of the image block of the reference wide-angle image, which can make the brightness distribution transition between different target telephoto images on the spliced image more natural from a global perspective, and avoid the mobile phone to separate each network. The DRC of the corresponding target telephoto image results in a large difference in the dynamic range of different target telephoto images, poor dynamic range of the stitched image, and obvious stitching traces, which can improve the overall quality of the stitched image.
在长焦图像与引导框中的网格1匹配后,长焦摄像头可以移动并继续采集长焦图像,以获取与下一个待匹配的网格2相匹配的目标长焦图像2。其中,为方便拼接与网格匹配的目标长焦图像,下一个待匹配的网格2与已匹配的至少一个网格(例如网格1)相邻。After the telephoto image is matched with the grid 1 in the guide frame, the telephoto camera can move and continue to collect the telephoto image to acquire the target telephoto image 2 that matches the next grid 2 to be matched. Wherein, in order to facilitate the splicing of the target telephoto image matched with the grid, the next grid 2 to be matched is adjacent to at least one grid (eg grid 1 ) that has already been matched.
后续,随着长焦摄像头的移动,手机还可以根据参考广角图像的图像块,配置长焦摄像头采集其他网格对应的目标长焦图像(例如网格2对应的目标长焦图像2,网格3对应的目标长焦图像3等)的配置参数,不再赘述。Subsequently, with the movement of the telephoto camera, the mobile phone can also configure the telephoto camera to collect the target telephoto image corresponding to other grids according to the image block of the reference wide-angle image (for example, the target telephoto image 2 corresponding to grid 2, the grid The configuration parameters of the corresponding target telephoto image 3, etc.) are not repeated here.
在一些实施例中,手机在目标长焦图像与网格匹配后,还可以将该网格提示给用户,以方便用户获知当前匹配的网格所在的位置,获知当前的拍摄进度。其中,手机可以将所匹配的网格与其他网格进行差异化的显示,以提示用户当前所匹配的网格所在的位置,方便用户获知当前的拍摄进度以及后续的拍摄方向和长焦摄像头的移动方向。比如,当前匹配的网格可以高亮显示,加粗显示,以区别于其他网格的颜色显示,以特定颜色显示,或变换为不同于其他网格的线型进行显示等。In some embodiments, after the target telephoto image is matched with the grid, the mobile phone can also prompt the grid to the user, so that the user can know the location of the currently matched grid and the current shooting progress. Among them, the mobile phone can display the matched grid and other grids in a differentiated manner to prompt the user where the currently matched grid is located, so that the user can know the current shooting progress, the subsequent shooting direction and the telephoto camera. direction of movement. For example, the currently matched grid can be highlighted, bolded, displayed in a color different from other grids, displayed in a specific color, or transformed into a line type different from other grids for display, etc.
举例来说,在拍照过程中,用户移动手机或长焦摄像头,以使得目标长焦图像1与引导框中间一行最左边的网格1中广角图像的内容相匹配。如图12A中的(a)所示,网格1的边界由虚线变为粗实线,从而区别于其他网格进行显示,以方便用户获知当前匹配的是网格1,当前的拍摄进度与网格1相对应。当目标长焦图像2的内容与引导框中网格2中广角图像的内容相匹配时,手机还可以将网格2区别于其他网格显示,以方便用户获知当前匹配的是网格2,当前的拍摄进度与网格2相对应。For example, during the photographing process, the user moves the mobile phone or the telephoto camera so that the target telephoto image 1 matches the content of the wide-angle image in the leftmost grid 1 in the middle row of the guide frame. As shown in (a) of FIG. 12A , the boundary of grid 1 is changed from a dotted line to a thick solid line, so that it is displayed differently from other grids, so that the user can know that grid 1 is currently matched, and the current shooting progress is the same as that of other grids. Grid 1 corresponds. When the content of the target telephoto image 2 matches the content of the wide-angle image in grid 2 in the guide frame, the mobile phone can also display grid 2 differently from other grids, so that the user can know that grid 2 is currently matched. The current shooting progress corresponds to grid 2.
在本申请的一些实施例中,在拍照过程中,手机可以在每次获得新的目标长焦图像后即与之前获得的拼接图像进行拼接,从而生成新的拼接图像。也就是说,在引导框中的所有网格未匹配完成时,根据已匹配网格对应的多帧目标长焦图像生成拼接图像。在另一些实施例中,手机在获得与引导框中的所有网格均匹配的目标长焦图像后,或者在拍摄结束后,再根据目标长焦图像生成拼接图像。本申请实施例对拼接图像的拼接时机不予限定。In some embodiments of the present application, during the photographing process, the mobile phone may spliced with the previously obtained spliced image every time a new target telephoto image is obtained, thereby generating a new spliced image. That is, when all grids in the guide frame are not matched, a stitched image is generated according to the multi-frame target telephoto images corresponding to the matched grids. In other embodiments, the mobile phone generates a stitched image according to the target telephoto image after obtaining the target telephoto image that matches all the grids in the guide frame, or after shooting ends. This embodiment of the present application does not limit the stitching timing of the stitched images.
手机对不同目标长焦图像进行拼接生成拼接图像的过程,可以包括图像配准、图像匀光匀色以及图像融合等过程。其中,图像配准是指将不同图像进行匹配和叠加的过程。例如,手机可以对待配准的两帧图像进行特征提取得到特征点,通过进行相似性度量找到匹配的特征点对,然后通过匹配的特征点对得到图像空间坐标变换参数,最后由坐标变换参数进行图像配准。手机可以计算目标长焦图像2相对于目标长焦图像1的单应性矩阵,从而根据该单应性矩阵将目标长焦图像2与目标长焦图像1进行配准。例如,图像配准算法可以包括SURF特征匹配算法、SKB特征匹配算法、ORB特征匹配算法、网格配准算法、光流配准算法或卷积神经网络(人工智能(artificial intelligence,AI)网络)配准算法等,本申请实施例对图像配准算法的具体类型不予限定。The process of splicing different target telephoto images to generate a spliced image by a mobile phone may include image registration, image uniformity and color uniformity, and image fusion. Among them, image registration refers to the process of matching and stacking different images. For example, the mobile phone can perform feature extraction on the two frames of images to be registered to obtain feature points, find the matching feature point pairs by performing similarity measurement, and then obtain the image space coordinate transformation parameters through the matching feature point pairs, and finally use the coordinate transformation parameters. Image registration. The mobile phone can calculate the homography matrix of the target telephoto image 2 relative to the target telephoto image 1, so as to register the target telephoto image 2 with the target telephoto image 1 according to the homography matrix. For example, the image registration algorithm may include SURF feature matching algorithm, SKB feature matching algorithm, ORB feature matching algorithm, grid registration algorithm, optical flow registration algorithm or convolutional neural network (artificial intelligence (AI) network) A registration algorithm, etc., the embodiment of the present application does not limit the specific type of the image registration algorithm.
其中,图像匀光是指图像配准之后,对配准的图像进行亮度的均衡,使得相邻目标长焦图像之间的亮度过渡自然。图像拼接的亮度均衡是一个成熟的技术,在此不做限制。Among them, the image homogenization refers to the brightness equalization of the registered images after image registration, so that the brightness transition between adjacent target telephoto images is natural. Brightness equalization of image stitching is a mature technology, which is not limited here.
图像匀光匀色是指图像配准之后,对于配准图像重叠的部分进行亮度直方图和颜色直方图的统计,通过曲线拟合(比如样条曲线),获得图像亮度和图像颜色的累计分布函数。可以以其中一张图像的亮度和颜色分布为准,根据它的亮度和颜色累计分布函数,对其他图像的亮度和颜色进行校正,达到匀光匀色的目的;也可以以多个图像的亮度和颜色参数作为共同优化目标,迭代优化,达到所有图像匀光匀色的目的。Image homogenization means that after image registration, the statistics of brightness histogram and color histogram are performed for the overlapping part of the registered images, and the cumulative distribution of image brightness and image color is obtained by curve fitting (such as spline curve). function. The brightness and color distribution of one image can be used as the criterion, and the brightness and color of other images can be corrected according to its cumulative distribution function of brightness and color to achieve the purpose of uniform light and color; it can also be based on the brightness of multiple images. And color parameters as the common optimization goal, iterative optimization, to achieve the purpose of uniform light and color of all images.
图像融合是指将多帧图像经过图像处理和计算机技术等,最大限度的提取各图像中的相关信息,综合成高质量的图像的过程。例如,图像融合算法可以包括alpha融合算法、泊松融合算法或者卷积神经网络融合(AI融合)算法等。本申请实施例对图像融合算法的具体类型不予限定。Image fusion refers to the process of extracting the relevant information from each image to the maximum extent and synthesizing it into a high-quality image through image processing and computer technology. For example, the image fusion algorithm may include an alpha fusion algorithm, a Poisson fusion algorithm, or a convolutional neural network fusion (AI fusion) algorithm, and the like. The embodiment of the present application does not limit the specific type of the image fusion algorithm.
例如,手机在获得目标长焦图像2后,可以将目标长焦图像2与目标长焦图像1进行配准、匀光匀色和融合等处理,从而拼接成一幅视场角较大的拼接图像。For example, after the mobile phone obtains the target telephoto image 2, the target telephoto image 2 and the target telephoto image 1 can be registered, lighted and evened, and fused to form a stitched image with a larger field of view. .
在一些实施例中,目标长焦图像2与目标长焦图像1可以根据图像配准算法直接进行配准和融合,从而生成拼接图像。该种情况下,待配准的目标长焦图像2与目标长焦图像1之间需要有一定的重叠比例(例如20%),这样才能保证配准结果较为准确。例如,手机可以根据预设的图像配准算法,分别对目标长焦图像1和目标长焦图像2提取特征,并根据两者之间的特征匹配对进行图像配准。In some embodiments, the target telephoto image 2 and the target telephoto image 1 can be directly registered and fused according to an image registration algorithm, thereby generating a stitched image. In this case, a certain overlap ratio (for example, 20%) is required between the target telephoto image 2 to be registered and the target telephoto image 1, so as to ensure a more accurate registration result. For example, the mobile phone can extract features from the target telephoto image 1 and the target telephoto image 2 respectively according to a preset image registration algorithm, and perform image registration according to the feature matching pair between the two.
在另一些实施例中,目标长焦图像2与目标长焦图像1直接进行配准和融合,从而生成拼接图像。而后,手机还可以根据参考广角图像对配准后的图像或拼接图像进行修正,避免待配准目标长焦图像之间的特征点对较少导致的配准错误。例如,目标长焦图像2与目标长焦图像1直接进行配准和融合后生成的拼接图像上,部分图像内容可能存在畸变,手机可以按照参考广角图像上相同内容的坐标位置,调整拼接图像上发生畸变的图像内容的坐标,从而对该畸变进行修正,提高拼接图像的质量。In other embodiments, the target telephoto image 2 and the target telephoto image 1 are directly registered and fused to generate a stitched image. Then, the mobile phone can also correct the registered image or the stitched image according to the reference wide-angle image, so as to avoid registration errors caused by less feature point pairs between the telephoto images of the target to be registered. For example, on the spliced image generated after the target telephoto image 2 and the target telephoto image 1 are directly registered and fused, some image contents may be distorted. The coordinates of the distorted image content, so as to correct the distortion and improve the quality of the stitched image.
在另一些实施例中,目标长焦图像2和目标长焦图像1根据参考广角图像进行配准和融合。该种情况下,待配准的目标长焦图像2与目标长焦图像1之间的重叠比例可以较小(例如可以为10%或5%等);或者,即便目标长焦图像2与目标长焦图像1之间没有重叠,手机根据参考广角图像也可以准确地对目标长焦图像2与目标长焦图像1进行配准和融合。这样,待匹配的目标长焦图像的要求较为宽松,在用户移动手机或长焦摄像头的过程中,手机可以快速、容易地获得目标长焦图像,减少用户的拍摄时长,并且还可以避免待配准目标长焦图像之间的特征点对较少导致的配准错误。而且,若目标长焦图像之间的重叠比例较小或无重叠,则用户拍摄少数的目标长焦图像即可完成拍照过程,从而可以减少拍摄帧数和拍摄时长,提高拍摄效率和用户拍摄体验。In other embodiments, the target telephoto image 2 and the target telephoto image 1 are registered and fused according to the reference wide-angle image. In this case, the overlap ratio between the target telephoto image 2 to be registered and the target telephoto image 1 may be small (for example, it may be 10% or 5%, etc.); There is no overlap between the telephoto images 1, and the mobile phone can also accurately register and fuse the target telephoto image 2 and the target telephoto image 1 according to the reference wide-angle image. In this way, the requirements for the target telephoto image to be matched are relatively loose. When the user moves the mobile phone or the telephoto camera, the mobile phone can quickly and easily obtain the target telephoto image, reducing the user's shooting time, and avoiding the need to be matched. Registration errors caused by fewer feature point pairs between quasi-target telephoto images. Moreover, if the overlap ratio between the target telephoto images is small or non-overlapping, the user can complete the photographing process by taking a few target telephoto images, thereby reducing the number of shooting frames and the shooting time, and improving the shooting efficiency and user shooting experience. .
在一种可能的实现方式中,目标长焦图像2、目标长焦图像1和参考广角图像可以一起进行配准和融合。参见图13A,目标长焦图像2、目标长焦图像1和参考广角图像可以分别提取特征,两两匹配,在三者的重叠区域可以获得更多的特征匹配对。这样,手机可以获得更多更精确的特征匹配对,从而计算出更准确的单应性矩阵,根 据单应性矩阵将目标长焦图像2变形,从而达到更好的配准、拼接和融合效果。In a possible implementation manner, the target telephoto image 2, the target telephoto image 1 and the reference wide-angle image can be registered and fused together. Referring to FIG. 13A , the target telephoto image 2, the target telephoto image 1 and the reference wide-angle image can extract features respectively and match them in pairs, and more feature matching pairs can be obtained in the overlapping area of the three. In this way, the mobile phone can obtain more and more accurate feature matching pairs, thereby calculating a more accurate homography matrix, and deforming the target telephoto image 2 according to the homography matrix, so as to achieve better registration, stitching and fusion effects. .
在另一种可能的实现方式中,目标长焦图像2和目标长焦图像1可以分别与参考广角图像进行配准和融合,目标长焦图像2与目标长焦图像1之间不用做配准和融合。例如,如图13B所示,目标长焦图像2和参考广角图像可以分别提取特征后进行匹配,从而计算出单应性矩阵,根据单应性矩阵将目标长焦图像2变形,从而与目标长焦图像1更好地融合。该种情况下,待配准的目标长焦图像2与目标长焦图像1之间的重叠比例可以较小(例如可以为10%或5%等)。或者,即便目标长焦图像2与目标长焦图像1之间没有重叠,由于有公共的广角图像,因此也可以实现很好的融合拼接效果。这样,待匹配的目标长焦图像的要求较为宽松,在用户移动手机或长焦摄像头的过程中,手机可以快速、容易地获得目标长焦图像,减少用户的拍摄时长。而且,若目标长焦图像之间的重叠比例较小或无重叠,则用户拍摄少数的目标长焦图像即可完成拍照过程,从而可以减少拍摄帧数和拍摄时长,提高拍摄效率和用户拍摄体验。In another possible implementation manner, the target telephoto image 2 and the target telephoto image 1 can be registered and fused with the reference wide-angle image respectively, and no registration is required between the target telephoto image 2 and the target telephoto image 1 and fusion. For example, as shown in Fig. 13B, the target telephoto image 2 and the reference wide-angle image can be extracted and matched respectively, so as to calculate the homography matrix, and the target telephoto image 2 can be deformed according to the homography matrix, so that the target telephoto image 2 is longer than the target image. Focus image 1 blends better. In this case, the overlap ratio between the target telephoto image 2 to be registered and the target telephoto image 1 may be small (for example, it may be 10% or 5%, etc.). Alternatively, even if there is no overlap between the target telephoto image 2 and the target telephoto image 1, since there is a common wide-angle image, a good fusion and splicing effect can be achieved. In this way, the requirements for the target telephoto image to be matched are relatively loose. When the user moves the mobile phone or the telephoto camera, the mobile phone can quickly and easily obtain the target telephoto image, reducing the user's shooting time. Moreover, if the overlap ratio between the target telephoto images is small or non-overlapping, the user can complete the photographing process by taking a few target telephoto images, thereby reducing the number of shooting frames and the shooting time, and improving the shooting efficiency and user shooting experience. .
在又一种可能的实现方式中,目标长焦图像1可以按照参考广角图像的坐标系进行配准,即目标长焦图像1可以贴合到参考广角图像上相同内容的坐标位置。类似地,目标长焦图像2也可以按照参考广角图像的坐标系进行配准,即目标长焦图像2可以贴合到参考广角图像上相同内容所在的坐标位置。若贴合到参考广角图像上的目标长焦图像1和目标长焦图像2之间没有空洞,则目标长焦图像1和目标长焦图像2贴合后形成的整体即为拼接图像。In another possible implementation manner, the target telephoto image 1 may be registered according to the coordinate system of the reference wide-angle image, that is, the target telephoto image 1 may be fitted to the coordinate position of the same content on the reference wide-angle image. Similarly, the target telephoto image 2 can also be registered according to the coordinate system of the reference wide-angle image, that is, the target telephoto image 2 can be fitted to the coordinate position of the same content on the reference wide-angle image. If there is no void between the target telephoto image 1 and the target telephoto image 2 that are attached to the reference wide-angle image, the whole formed by the attachment of the target telephoto image 1 and the target telephoto image 2 is the stitched image.
此外,由于用户手抖或手机旋转等原因可能导致长焦摄像头的采集角度发生偏转,从而使得目标长焦图像2与目标长焦图像1之间的图像偏移较大,容易使得目标长焦图像2与目标长焦图像1之间出现空洞,例如两帧图像之间存在空隙或者两帧图像在上/下边缘位置错位从而出现空边等。In addition, the acquisition angle of the telephoto camera may be deflected due to the user's hand shaking or the rotation of the mobile phone, so that the image shift between the target telephoto image 2 and the target telephoto image 1 is large, and it is easy to make the target telephoto image. There is a gap between 2 and the target telephoto image 1, for example, there is a gap between the two frames of images, or the upper/lower edge positions of the two frames of images are misplaced, resulting in a gap, etc.
其中,手机可以通过多种方法检测该空洞。比如,目标长焦图像1和目标长焦图像2可以均贴合到参考广角图像上相同内容所在的位置,以确定贴合后的目标长焦图像1和目标长焦图像2之间是否出现空隙,从而检测是否出现空洞。再比如,当目标长焦图像1和目标长焦图像2为左右分布时,目标长焦图像1和目标长焦图像2都匹配到广角图像的坐标系后,若右图最左边像素点的横坐标大于左图最右边像素点的横坐标,则手机可以确定检测到空洞。Among them, the mobile phone can detect the hole through various methods. For example, the target telephoto image 1 and the target telephoto image 2 can both be attached to the position of the same content on the reference wide-angle image to determine whether there is a gap between the attached target telephoto image 1 and the target telephoto image 2 , thereby detecting the presence of voids. For another example, when the target telephoto image 1 and the target telephoto image 2 are distributed left and right, after both the target telephoto image 1 and the target telephoto image 2 are matched to the coordinate system of the wide-angle image, if the horizontal direction of the leftmost pixel in the right image is If the coordinates are greater than the abscissa of the rightmost pixel in the left image, the phone can determine that a hole has been detected.
除此之外,手机还可以通过手机的惯性测量单元(inertial measurement unit,IMU)(例如陀螺仪),测量和计算目标长焦图像1和目标长焦图像2拍摄时的空间位置关系,并依次来检测是否出现空洞。In addition, the mobile phone can also measure and calculate the spatial positional relationship between the target telephoto image 1 and the target telephoto image 2 when shooting through an inertial measurement unit (IMU) (such as a gyroscope) of the mobile phone, and sequentially to detect the presence of voids.
手机在确定目标长焦图像2与目标长焦图像1之间存在空洞的情况下,可以将参考广角图像上相同位置的内容填充到目标长焦图像1和目标长焦图像2之间的空洞部分。这样,目标长焦图像1、目标长焦图像2以及填充部分形成的整体即为拼接图像。When the mobile phone determines that there is a hole between the target telephoto image 2 and the target telephoto image 1, the mobile phone can fill the content of the same position on the reference wide-angle image into the hole between the target telephoto image 1 and the target telephoto image 2. . In this way, the whole formed by the target telephoto image 1 , the target telephoto image 2 and the filled portion is a stitched image.
这样,手机可以根据参考广角图像对待拼接目标长焦图像之间的空洞进行填充,而不会由于空洞导致目标长焦图像无法进行配准和拼接,也不需要依据空洞对目标长焦图像进行裁剪从而导致拼接时图像视场角和图像分辨率的损失,能够使得拼接图像具有较大的视场角和图像分辨率。而在目前已有的其他技术方案中,当由于手动旋转的采用角度问题使得待拼接的长焦图像出现上/下偏移时,以最小图像高度进行裁剪, 从而会损失图像分辨率和图像视场角。In this way, the mobile phone can fill in the holes between the telephoto images of the target to be spliced according to the reference wide-angle image, and the target telephoto images cannot be registered and spliced due to the holes, and the target telephoto image does not need to be cropped according to the holes. As a result, the image field angle and image resolution are lost during stitching, and the stitched image can have a larger field angle and image resolution. In other existing technical solutions, when the telephoto image to be spliced is shifted up/down due to the angle of manual rotation, cropping is performed at the minimum image height, which will lose image resolution and image view. field angle.
示例性的,参考广角图像可以参见图12B中的(a)所示的图像1210,目标长焦图像1可以参见图12B中的(a)所示的图像1211、目标长焦图像2可以参见图12B中的(b)所示的图像1212。目标长焦图像1和目标长焦图像2之间存在空洞1213,手机可以根据参考广角图像对应位置的内容对该空洞1213进行填充。这样,如图12B中的(b)所示,目标长焦图像1、目标长焦图像2以及填充部分形成的整体图像1214即为拼接图像。Exemplarily, the reference wide-angle image can refer to the image 1210 shown in FIG. 12B (a), the target telephoto image 1 can refer to the image 1211 shown in FIG. 12B (a), and the target telephoto image 2 can refer to FIG. Image 1212 shown in (b) in 12B. There is a hole 1213 between the target telephoto image 1 and the target telephoto image 2, and the mobile phone can fill the hole 1213 according to the content of the corresponding position of the reference wide-angle image. In this way, as shown in (b) of FIG. 12B , the overall image 1214 formed by the target telephoto image 1 , the target telephoto image 2 and the filling portion is a stitched image.
此外,在手机确定目标长焦图像2与目标长焦图像1之间存在空洞的情况下,在另一些实施例中,手机可以引导用户补拍一帧新的目标长焦图像2,以填充该空洞。比如,在一种可能的实现方式中,在存在空洞的情况下,目标长焦图像2对应的网格2不会区别于其他网格显示,以引导用户再次拍摄一帧与网格2匹配的目标长焦图像2。在另一种可能的实现方式中,手机通过显示信息或语音播放等方式提示用户,请再次采集一帧目标长焦图像以与当前网格相对应。In addition, when the mobile phone determines that there is a void between the target telephoto image 2 and the target telephoto image 1, in other embodiments, the mobile phone may guide the user to take a new frame of the target telephoto image 2 to fill the gap. Empty. For example, in a possible implementation manner, in the presence of holes, the grid 2 corresponding to the target telephoto image 2 will not be displayed differently from other grids, so as to guide the user to shoot a frame matching grid 2 again. Target telephoto image 2. In another possible implementation manner, the mobile phone prompts the user by displaying information or voice playback, etc., to collect a frame of the target telephoto image again to correspond to the current grid.
其中,空洞填充采用的是广角图像上的信息,而周围其他区域是目标长焦图像2和目标长焦图像1融合拼接的结果,导致空洞填充区域在分辨率和解析力上与周围有明显差异。因此,手机可以对空洞区域进行图像超分辨率的处理,降低空洞填充区域与周围的分辨率差异,达到更好的用户体验。除此之外,手机还可以采用AI局部搜索的方法或者AI图像修复的方法,对空洞区域进行预测和填充。本申请实施例对于填充和图像超分辨率的具体方法不限制。Among them, the information on the wide-angle image is used for the hole filling, and the other surrounding areas are the result of fusion and splicing of the target telephoto image 2 and the target telephoto image 1, resulting in obvious differences in the resolution and resolution of the hole filling area from the surrounding area. . Therefore, the mobile phone can perform image super-resolution processing on the cavity area to reduce the resolution difference between the cavity filled area and the surrounding area, so as to achieve a better user experience. In addition, the mobile phone can also use the AI local search method or the AI image restoration method to predict and fill in the hollow area. The embodiments of the present application do not limit the specific methods for filling and image super-resolution.
在本申请的一些实施例中,手机还可以在拼接过程中,对拍摄到的运动物体进行去鬼影处理。In some embodiments of the present application, the mobile phone may also perform ghost removal processing on the photographed moving objects during the splicing process.
在拍照过程中,由于多帧目标长焦图像的拍摄需要一定的时间,当拍摄范围内出现运动物体时,相邻N帧(N为大于2的整数)目标长焦图像上可能均出现了该物体的图像,从而导致拼接图像上出现运动物体的鬼影(或称重影、虚影等)。该种情况下,手机还可以在拍照过程中进行去鬼影处理。During the photographing process, since it takes a certain amount of time to photograph multiple frames of the target telephoto image, when there is a moving object within the shooting range, the target telephoto image may appear on the adjacent N frames (N is an integer greater than 2) of the target telephoto image. The image of the object, resulting in ghosts (or ghosts, ghosts, etc.) of moving objects appear on the stitched image. In this case, the mobile phone can also perform ghost removal processing during the photographing process.
以下以目标长焦图像2和目标长焦图像1的拼接场景为例,通过两种情况分别对去除运动物体鬼影的方法进行阐述。The following takes the splicing scene of the target telephoto image 2 and the target telephoto image 1 as an example, and describes the method for removing the ghost image of the moving object through two cases.
(1)、慢速运动的物体(1), slow moving objects
运动物体的运动速度较慢,运动物体在广角图像上未出现鬼影。运动物体在相邻目标长焦图像2和目标长焦图像1上均出现,不同目标长焦图像上运动物体的图像是相互区分、无连通的,这样容易导致拼接图像上出现运动物体的多个图像即鬼影。其中,鬼影区域(也可以称为运动区域)的检测是目前较为成熟的技术,例如可以通过光流法或者结合手机的陀螺仪数据来进行估计检测,这里不予细述。Moving objects move at a slower speed, and moving objects do not appear ghosted on wide-angle images. Moving objects appear on both the adjacent target telephoto image 2 and target telephoto image 1. The images of moving objects on different target telephoto images are distinguished from each other and are not connected, which easily leads to multiple moving objects appearing on the spliced image. Images are ghosts. Among them, the detection of ghost image area (also called motion area) is a relatively mature technology at present. For example, it can be estimated and detected by optical flow method or combined with gyroscope data of mobile phone, which will not be described in detail here.
该种情况下,手机可以先对运动物体的位置进行检测(可以使用光流法、物体检测和跟踪法、语义分割的方法以及亮度求差和膨胀腐蚀的方法等)。而后,手机可以在目标长焦图像2和目标长焦图像1的拼接图像上,保留目标长焦图像1、目标长焦图像2或广角图像上该运动物体的完整图像(也称无鬼影图像),删除其他区域运动物体的图像,并采用参考广角图像上删除的区域对应位置的内容对删除区域进行空洞填充,从而避免拼接图像上出现运动物体的鬼影。其中,用于进行空洞填充的广角图 像可以是最近采集到的一帧广角图像,手机之前在拍照过程中采集到的某帧广角图像,或者参考广角图像等,本申请实施例不予限定。In this case, the mobile phone can first detect the position of the moving object (the optical flow method, the object detection and tracking method, the method of semantic segmentation, and the method of brightness difference and expansion corrosion can be used). Then, on the spliced image of the target telephoto image 2 and the target telephoto image 1, the mobile phone can retain the complete image of the moving object on the target telephoto image 1, the target telephoto image 2 or the wide-angle image (also called ghost-free image). ), delete the images of moving objects in other areas, and fill the deleted area with the content corresponding to the deleted area on the reference wide-angle image, so as to avoid ghosting of moving objects on the spliced image. Wherein, the wide-angle image used for hole filling may be a recently collected frame of wide-angle image, a certain frame of wide-angle image previously collected by the mobile phone during the photographing process, or a reference wide-angle image, etc., which are not limited in the embodiments of the present application.
比如,作为一种简单的实现方案,手机可以保留广角图像上该运动物体的完整图像。再比如,为了使得最终的目标图像上运动物体的位置和用户最后看到的更为接近,手机可以保留最后一帧目标长焦图像上该运动物体的完整图像。For example, as a simple implementation solution, the mobile phone can retain the complete image of the moving object on the wide-angle image. For another example, in order to make the position of the moving object on the final target image closer to what the user sees last, the mobile phone can retain the complete image of the moving object on the last frame of the target telephoto image.
这里提到的运动物体在目标长焦图像2、目标长焦图像1和广角图像三种图像上的位置可能不同,手机可以根据相应的测量确定保留某种图像上的运动物体的完整图像。The positions of the moving objects mentioned here may be different on the three images of the target telephoto image 2, the target telephoto image 1 and the wide-angle image. The mobile phone can determine to retain the complete image of the moving object on a certain image according to the corresponding measurement.
其中,当手机在目标长焦图像2和目标长焦图像1的拼接图像上,保留目标长焦图像1上该运动物体的完整图像时,手机可以删除目标长焦图像2上该运动物体的图像,并采用广角图像上对应位置的内容对删除区域进行空洞填充。Wherein, when the mobile phone retains the complete image of the moving object on the target telephoto image 1 on the spliced image of the target telephoto image 2 and the target telephoto image 1, the mobile phone can delete the image of the moving object on the target telephoto image 2 , and fill the deleted area with the content of the corresponding position on the wide-angle image.
比如,手机可以在目标长焦图像1和目标长焦图像2进行配准之前,保留目标长焦图像1上该运动物体的完整图像,删除目标长焦图像2上该运动物体的图像。而后,手机可以对目标长焦图像1和进行删除处理后的目标长焦图像2进行配准和融合,采用参考广角图像上对应位置的内容对删除后的空白区域进行空洞填充,从而生成拼接图像。For example, the mobile phone can retain the complete image of the moving object on the target telephoto image 1 and delete the image of the moving object on the target telephoto image 2 before the target telephoto image 1 and the target telephoto image 2 are registered. Then, the mobile phone can register and fuse the target telephoto image 1 and the deleted target telephoto image 2, and use the content of the corresponding position on the reference wide-angle image to fill the deleted blank area to generate a stitched image. .
再比如,手机可以先将目标长焦图像1和目标长焦图像2进行配准和融合生成拼接图像。而后,手机可以删除拼接图像上运动物体的图像(包括目标长焦图像1和目标长焦图像2上运动物体的图像)。手机将目标长焦图像1上该运动物体的完整图像,贴合到拼接图像上的相应位置。手机采用参考广角图像上对应位置的内容对拼接图像进行空洞填充,该空洞位置为目标长焦图像2上已删除的运动物体的图像所在的区域。For another example, the mobile phone can first register and fuse the target telephoto image 1 and the target telephoto image 2 to generate a stitched image. Then, the mobile phone can delete the images of the moving objects on the stitched image (including the images of the moving objects on the target telephoto image 1 and the target telephoto image 2). The mobile phone fits the complete image of the moving object on the target telephoto image 1 to the corresponding position on the stitched image. The mobile phone uses the content of the corresponding position on the reference wide-angle image to fill the hole in the stitched image, and the hole position is the area where the image of the deleted moving object on the target telephoto image 2 is located.
当手机在目标长焦图像2和目标长焦图像1的拼接图像上,保留目标长焦图像2上该运动物体的完整图像时,手机可以删除目标长焦图像1上该运动物体的图像,并采用广角图像上对应位置的内容对删除的区域进行空洞填充。When the mobile phone retains the complete image of the moving object on the target telephoto image 2 on the spliced image of the target telephoto image 2 and the target telephoto image 1, the mobile phone can delete the image of the moving object on the target telephoto image 1, and Fill the deleted area with the content of the corresponding position on the wide-angle image.
当手机在目标长焦图像2和目标长焦图像1的拼接图像上,保留广角图像上该运动物体的完整图像时,手机可以删除目标长焦图像1和目标长焦图像2上该运动物体的图像,并采用广角图像上对应位置的内容对删除的区域进行空洞填充。When the mobile phone retains the complete image of the moving object on the wide-angle image on the spliced image of the target telephoto image 2 and the target telephoto image 1, the mobile phone can delete the moving object on the target telephoto image 1 and the target telephoto image 2. image, and fill the deleted area with the content of the corresponding position on the wide-angle image.
示例性的,参考广角图像可以参见图12C中的(a)。目标长焦图像1可以参见图12C中的(b),包括运动物体的图像1221。目标长焦图像2可以参见图12C中的(c),包括运动物体的图像1222。手机删除目标长焦图像1和目标长焦图像2上该运动物体的图像,并采用参考广角图像上对应位置的内容对删除的区域进行空洞填充,从而得到如图12C中的(d)所示的拼接图像。Exemplarily, reference to the wide-angle image may refer to (a) in FIG. 12C . The target telephoto image 1 can be seen in (b) of FIG. 12C , including an image 1221 of a moving object. The target telephoto image 2 can be seen in (c) of FIG. 12C, including an image 1222 of a moving object. The mobile phone deletes the image of the moving object on the target telephoto image 1 and the target telephoto image 2, and fills the deleted area with the content of the corresponding position on the reference wide-angle image, so as to obtain the image shown in (d) in Figure 12C stitched image.
(2)、快速运动的物体(2), fast moving objects
当运动物体的运动速度较快时,可能存在以下情况:When the moving speed of the moving object is fast, the following situations may exist:
情况a、参考广角图像上未出现运动物体的鬼影。手机可以采用与上述慢速运动物体相同的方法进行去鬼影处理,采用参考广角图像上对应位置的内容对拼接图像上删除的鬼影区域进行空洞填充。Case a. No ghosts of moving objects appear on the reference wide-angle image. The mobile phone can use the same method as the above-mentioned slow-moving object to perform ghost removal processing, and use the content of the corresponding position on the reference wide-angle image to fill the ghost area deleted on the stitched image.
情况b、参考广角图像上出现了运动物体的鬼影,并且手机实时采集的多帧广角图像上出现了运动物体的鬼影。该种情况下,手机可以结合拍照过程中采集到的多帧 广角图像进行运动矢量估计或者光流估计等处理,从而判断运动物体的运动轨迹,去除广角图像上的运动物体的连通区域得到完整的无鬼影的运动物体的图像。也就是说,手机可以直接得到或者经过处理后得到不具有运动物体的鬼影的广角图像。Case b. The ghost of a moving object appears on the reference wide-angle image, and the ghost of a moving object appears on the multi-frame wide-angle images collected in real time by the mobile phone. In this case, the mobile phone can perform motion vector estimation or optical flow estimation in combination with the multi-frame wide-angle images collected during the photographing process, so as to determine the motion trajectory of the moving object, and remove the connected area of the moving object on the wide-angle image to obtain a complete Images of moving objects without ghosting. That is to say, the mobile phone can obtain a wide-angle image without ghost images of moving objects directly or after processing.
当运动物体的运动速度较快时,运动物体在相邻目标长焦图像2和目标长焦图像1上均出现,且不同目标长焦图像上运动物体的图像相互连通,从而容易导致拼接图像上出现运动物体的鬼影。When the moving speed of the moving object is fast, the moving object appears on both the adjacent target telephoto image 2 and the target telephoto image 1, and the images of the moving object on different target telephoto images are connected with each other, which easily leads to the splicing of images. Ghosting of moving objects appears.
该种情况下,在一些实施例中,手机可以将目标长焦图像1和目标长焦图像2贴合到无鬼影的广角图像上,从而标记出目标长焦图像1和目标长焦图像2贴合后的整体图像上运动物体图像的连通区域,即鬼影区域。其中,无鬼影的广角图像可以是某帧未出现鬼影的广角图像,或者进行去鬼影处理后获得的广角图像。当无鬼影的广角图像为参考广角图像时,手机可以在配准过程中将目标长焦图像1和目标长焦图像2贴合到无鬼影的广角图像上,并标记出连通区域。In this case, in some embodiments, the mobile phone can attach the target telephoto image 1 and the target telephoto image 2 to the ghost-free wide-angle image, thereby marking the target telephoto image 1 and the target telephoto image 2 The connected area of the moving object image on the fitted overall image, that is, the ghost area. Wherein, the wide-angle image without ghost image may be a wide-angle image without ghost image in a certain frame, or a wide-angle image obtained after performing ghost removal processing. When the ghost-free wide-angle image is the reference wide-angle image, the mobile phone can fit the target telephoto image 1 and the target telephoto image 2 to the ghost-free wide-angle image during the registration process, and mark the connected area.
在另一些实施例中,手机可以结合拍照过程中采集到的多帧广角图像进行运动矢量估计等处理,从而确定目标长焦图像2和目标长焦图像1上运动物体图像的连通区域。手机可以删除目标长焦图像2和目标长焦图像1的拼接图像上运动物体的图像区域,并根据无鬼影的广角图像上对应位置的内容对删除的区域进行空洞填充,以避免拼接图像上出现运动物体的鬼影。In other embodiments, the mobile phone can perform motion vector estimation and other processing in combination with multiple frames of wide-angle images collected during the photographing process, thereby determining the connected area of the moving object image on the target telephoto image 2 and the target telephoto image 1 . The mobile phone can delete the image area of the moving object on the spliced image of the target telephoto image 2 and the target telephoto image 1, and fill the deleted area according to the content of the corresponding position on the ghost-free wide-angle image to avoid the spliced image. Ghosting of moving objects appears.
示例性的,参考广角图像可以参见图12D中的(a)。目标长焦图像1可以参见图12D中的(b),包括运动物体的鬼影1231。目标长焦图像2可以参见图12D中的(c),包括运动物体的鬼影1232。手机删除目标长焦图像1和目标长焦图像2上运动物体的鬼影,并采用参考广角图像上对应位置的内容对删除的区域进行空洞填充,从而得到如图12D中的(d)所示的拼接图像。Exemplarily, reference to the wide-angle image may refer to (a) in FIG. 12D . The target telephoto image 1 can be seen in (b) of FIG. 12D , including the ghost image 1231 of the moving object. The target telephoto image 2 can be seen in (c) of FIG. 12D , including the ghost image 1232 of the moving object. The mobile phone deletes the ghost image of the moving object on the target telephoto image 1 and the target telephoto image 2, and fills the deleted area with the content of the corresponding position on the reference wide-angle image, so as to obtain (d) in Figure 12D stitched image.
这样,手机可以在拍照过程中,消除目标长焦图像的拼接图像上运动物体的鬼影,在拍摄界面上为用户呈现清晰、无鬼影的拼接图像,提高拍照过程中的图像展示效果。In this way, the mobile phone can eliminate the ghosting of moving objects on the stitched image of the target telephoto image during the photographing process, and present a clear, ghost-free stitched image to the user on the shooting interface, thereby improving the image display effect during the photographing process.
以上是以鬼影出现在目标长焦图像1和目标长焦图像2上为例进行说明的。可以理解的是,鬼影也可能出现在连续多帧目标长焦图像上,比如连续多帧目标长焦图像上的鬼影区域为一只身体拖的很长的猫。The above description is given by taking the ghost image appearing on the target telephoto image 1 and the target telephoto image 2 as an example. It is understandable that ghost images may also appear on consecutive multi-frame target telephoto images, for example, the ghost area on consecutive multi-frame target telephoto images is a cat whose body is dragged for a long time.
以上是以目标长焦图像2与目标长焦图像1进行拼接,从而获得拼接图像为例进行说明的。类似地,手机可以采用相同的拼接方法将后续的目标长焦图像k(k为大于2的整数),与之前生成的拼接图像进行拼接,从而生成新的拼接图像。例如,手机在根据目标长焦图像2与目标长焦图像1获得拼接图像之后,可以将目标长焦图像3与之前生成的拼接图像进行拼接,从而生成新的拼接图像。其中,目标长焦图像3与之前的拼接图像进行拼接,也可以理解为目标长焦图像3与之前的拼接图像中,与目标长焦图像3相邻的目标长焦图像2进行拼接。此处对后续目标长焦图像的拼接过程不再详细说明。The above description is given by taking the splicing of the target telephoto image 2 and the target telephoto image 1 as an example to obtain a spliced image. Similarly, the mobile phone can use the same stitching method to stitch the subsequent target telephoto image k (k is an integer greater than 2) with the previously generated stitched image, thereby generating a new stitched image. For example, after obtaining the stitched image according to the target telephoto image 2 and the target telephoto image 1, the mobile phone can stitch the target telephoto image 3 with the previously generated stitched image to generate a new stitched image. The splicing of the target telephoto image 3 with the previous spliced image can also be understood as the splicing of the target telephoto image 3 and the target telephoto image 2 adjacent to the target telephoto image 3 in the previous spliced image. The stitching process of the subsequent target telephoto images will not be described in detail here.
其中,对于非首帧目标长焦图像可以与一个或多个相邻目标长焦图像进行拼接。例如,对于引导框中第一行第一列的网格对应的目标长焦图像,可以仅与第一行第二列的网格对应的目标长焦图像进行配准和拼接,还可以与所有与其相邻目标长焦图像进行配准和拼接。Wherein, the non-first frame target telephoto image may be spliced with one or more adjacent target telephoto images. For example, for the target telephoto image corresponding to the grid in the first row and first column of the guide frame, registration and splicing can be performed only with the target telephoto image corresponding to the grid in the first row and second column, or it can be registered with all the target telephoto images corresponding to the grid in the first row and second column. Registration and stitching with its adjacent target telephoto images.
在本申请的一些实施例中,手机在获得与网格1(即第一个待匹配的网格)相匹配的目标长焦图像1后,可以将目标长焦图像1的缩略图与作为背景图像的广角图像进行匹配融合后,在拍摄界面上显示目标长焦图像1的缩略图,以便用户看到与网格1匹配的目标长焦图像1的真实画面。目标长焦图像1的缩略图贴合在广角图像上与目标长焦图像1具有相同图像内容的区域之上。其中,目标长焦图像1的缩略图的位置和大小与所匹配的网格1可能会存在一些偏差,也可能与所匹配的网格1的位置和大小刚好一致。示例性的,参见图12A中的(b)所示的拍摄界面,目标长焦图像1的缩略图覆盖在广角图像相同图像内容的区域之上。In some embodiments of the present application, after obtaining the target telephoto image 1 that matches the grid 1 (ie, the first grid to be matched), the mobile phone can use the thumbnail of the target telephoto image 1 as the background After the wide-angle images of the images are matched and fused, a thumbnail of the target telephoto image 1 is displayed on the shooting interface, so that the user can see the real picture of the target telephoto image 1 that matches the grid 1 . The thumbnail of the target telephoto image 1 is attached to an area on the wide-angle image that has the same image content as the target telephoto image 1 . Wherein, the position and size of the thumbnail of the target telephoto image 1 may have some deviations from the matched grid 1, or may be exactly the same as the position and size of the matched grid 1. Illustratively, referring to the photographing interface shown in (b) of FIG. 12A , the thumbnail image of the target telephoto image 1 is overlaid on the area of the same image content of the wide-angle image.
其中,目标长焦图像1的缩略图是长焦摄像头采集的目标长焦图像1下采样后得到的图像。手机在预览界面和拍摄界面上显示的广角图像,通常也是对广角摄像头采集的图像下采样后得到的图像。由于目标长焦图像的缩略图与界面上显示的广角图像来自于不同的摄像头和数据源,因而目标长焦图像的缩略图贴合前后,界面的显示效果也可能有所区别。The thumbnail of the target telephoto image 1 is an image obtained by down-sampling the target telephoto image 1 collected by the telephoto camera. The wide-angle image displayed by the mobile phone on the preview interface and the shooting interface is usually an image obtained by down-sampling the image collected by the wide-angle camera. Since the thumbnail of the target telephoto image and the wide-angle image displayed on the interface come from different cameras and data sources, the display effect of the interface may be different before and after the thumbnail of the target telephoto image is attached.
在一些实施例中,在拍照过程中,手机可以在拍摄界面上显示拼接图像缩略图,以方便用户获知当前实时的拍摄进度。例如,手机可以将拼接图像缩略图与作为背景图像的广角图像进行匹配融合后,将拼接图像缩略图贴合在广角图像与拼接图像缩略图具有相同图像内容的区域之上。In some embodiments, during the photographing process, the mobile phone may display a thumbnail of the spliced image on the photographing interface, so as to facilitate the user to know the current real-time photographing progress. For example, after matching and fusing the stitched image thumbnail with the wide-angle image as the background image, the mobile phone can fit the stitched image thumbnail on the area where the wide-angle image and the stitched image thumbnail have the same image content.
其中,该拼接图像缩略图可以采用不同的方式来获得。在一种实现方式中,手机对下采样后的相邻目标长焦图像进行配准和拼接后获得拼接图像缩略图,并将拼接图像缩略图贴合在广角图像与拼接图像缩略图具有相同图像内容的区域之上。在该实现方式中,基于下采样后分辨率较低的目标长焦图像,手机获得拼接图像缩略图的处理过程较为简单,处理时长较短,可以实时获得拼接图像缩略图并及时显示在拍摄界面上,避免出现卡顿。手机获得拼接图像缩略图的过程,与手机获得拼接图像的过程是并行处理的。Wherein, the stitched image thumbnail can be obtained in different ways. In one implementation, the mobile phone registers and splices the down-sampled adjacent target telephoto images to obtain spliced image thumbnails, and attaches the spliced image thumbnails to the wide-angle image and the spliced image thumbnails that have the same image above the content area. In this implementation, based on the target telephoto image with lower resolution after downsampling, the processing process of obtaining the stitched image thumbnail by the mobile phone is relatively simple, and the processing time is short, and the stitched image thumbnail can be obtained in real time and displayed on the shooting interface in time to avoid stuttering. The process of obtaining the stitched image thumbnail by the mobile phone is processed in parallel with the process of obtaining the stitched image by the mobile phone.
需要说明的是,根据以上描述可知,拼接图像可以在拍照过程中实时拼接获得;也可以在获得与所有网格匹配的目标长焦图像或拍摄结束后再统一拼接获得。而在拍摄界面上显示拼接图像缩略图的方案中,为方便用户获知拍摄进度,手机可以在拍照过程中根据每次获得的目标长焦图像实时获得拼接图像缩略图并显示。It should be noted that, according to the above description, the stitched images can be obtained by stitching in real time during the photographing process; they can also be obtained by uniform stitching after obtaining the target telephoto images matching all grids or after shooting. In the solution of displaying stitched image thumbnails on the shooting interface, in order to facilitate the user to know the shooting progress, the mobile phone can obtain and display the stitched image thumbnails in real time according to the target telephoto image obtained each time during the photographing process.
在另一种实现方式中,手机对拼接图像进行下采样从而获得拼接图像缩略图,并将拼接图像缩略图贴合在广角图像上与拼接图像缩略图具有相同图像内容的区域之上。在拍摄界面上,拼接图像缩略图的位置和大小,可能与已匹配的多个网格的位置和大小存在一些偏差,也可能与已匹配的多个网格的位置和大小刚好一致。手机在拍摄界面的广角图像上贴合拼接图像缩略图,可以让用户感受到真实的、实时的拼接过程和拼接进度。In another implementation manner, the mobile phone downsamples the stitched image to obtain a stitched image thumbnail, and fits the stitched image thumbnail on the wide-angle image on an area having the same image content as the stitched image thumbnail. On the shooting interface, the position and size of the thumbnails of the spliced images may have some deviations from the positions and sizes of the multiple grids that have been matched, or may be exactly the same as the positions and sizes of the multiple grids that have been matched. The mobile phone fits the stitched image thumbnail on the wide-angle image of the shooting interface, allowing users to feel the real, real-time stitching process and stitching progress.
以下针对背景图像固定和不固定两种情况下,对拼接图像缩略图在拍摄界面上的显示情况分别进行说明。The following describes the display situations of the spliced image thumbnails on the shooting interface, respectively, in the two cases that the background image is fixed and not fixed.
情况1、背景图像固定为参考广角图像 Case 1. The background image is fixed as the reference wide-angle image
在本申请的实施例中,用户可以通过移动手机来移动长焦摄像头,或者用户可以直接移动长焦摄像头,或者手机可以自动控制长焦摄像头移动。在情况1中,拍摄界 面上的背景图像固定为参考广角图像,引导框与背景图像的相对位置保持不变,每个网格对应的背景图像的内容也保持不变,长焦框相对于背景图像的位置可以实时变化。In the embodiments of the present application, the user can move the telephoto camera by moving the mobile phone, or the user can directly move the telephoto camera, or the mobile phone can automatically control the telephoto camera to move. In case 1, the background image on the shooting interface is fixed as the reference wide-angle image, the relative position of the guide frame and the background image remains unchanged, the content of the background image corresponding to each grid also remains unchanged, and the telephoto frame is relative to the background. The position of the image can be changed in real time.
示例性的,按照图11中的(c)所示的拍摄顺序,手机在拍照过程中先匹配引导框中间一行的网格,再匹配引导框上方一行的网格,然后再匹配引导框下方一行的网格。在手机获得中间一行中间网格对应的目标长焦图像后,显示有拼接图像缩略图的拍摄界面可以参见图12A中的(c)。而后,长焦摄像头继续移动,如图12A中的(c)所示,手机在拍摄界面上显示长焦摄像头的拍摄范围对应的实时的长焦框。在手机获得引导框上方一行最右侧的网格匹配的目标长焦图像后,显示有拼接图像缩略图的拍摄界面可以参见图12A中的(d)。在手机获得引导框下方一行最左侧的网格匹配的目标长焦图像后,显示有拼接图像缩略图的拍摄界面可以参见图12A中的(e)。在手机获得引导框中的最后一个网格匹配的目标长焦图像后,显示有拼接图像缩略图的拍摄界面可以参见图12A中的(f),手机生成与3*3的网格对应的拼接图像缩略图。再示例性的,在拍摄界面显示有拍摄顺序提示信息的情况下,拍摄界面的示意图可以参见图14中的(a)-(e)。Exemplarily, according to the photographing sequence shown in (c) in FIG. 11 , during the photographing process, the mobile phone first matches the grid in the middle row of the guide frame, then matches the grid in the row above the guide frame, and then matches the row below the guide frame. grid. After the mobile phone obtains the target telephoto image corresponding to the middle grid in the middle row, the photographing interface displaying the thumbnails of the spliced images can be referred to (c) in FIG. 12A . Then, the telephoto camera continues to move. As shown in (c) of FIG. 12A , the mobile phone displays a real-time telephoto frame corresponding to the shooting range of the telephoto camera on the shooting interface. After the mobile phone obtains the target telephoto image that matches the grid on the rightmost row above the guide frame, the photographing interface displaying the thumbnails of the stitched images can be seen in (d) of FIG. 12A . After the mobile phone obtains the target telephoto image that matches the leftmost grid in the row below the guide frame, the photographing interface displaying the thumbnails of the spliced images can be referred to (e) in FIG. 12A . After the mobile phone obtains the target telephoto image that matches the last grid in the guide frame, the shooting interface showing the thumbnails of the stitched images can be seen in (f) in Figure 12A, and the mobile phone generates a stitching corresponding to the 3*3 grid Image thumbnail. For another example, in the case where the photographing interface displays the photographing sequence prompt information, the schematic diagram of the photographing interface may refer to (a)-(e) in FIG. 14 .
情况2、背景图像不固定且为手机实时采集的广角图像 Case 2. The background image is not fixed and is a wide-angle image collected in real time by a mobile phone
该种情况下,当用户移动手机来同步移动广角摄像头和长焦摄像头时,每个网格对应的背景图像的内容不变,但由于背景图像不固定且是实时变化的,因而引导框与背景图像的相对位置会随着背景图像内容的变化而实时变化。可以理解的是,由于长焦框的位置是由广角摄像头和长焦摄像头的镜头中心、拍摄的物距以及视场角的大小决定的,因而在物距基本不变的情况下,鉴于广角摄像头和长焦摄像头的镜头中心的相对位置不变,长焦框与背景图像的相对位置也基本不变。例如,在拍照过程中,长焦框始终位于背景图像靠近中间的位置。In this case, when the user moves the mobile phone to move the wide-angle camera and the telephoto camera synchronously, the content of the background image corresponding to each grid remains unchanged, but since the background image is not fixed and changes in real time, the guide frame and the background The relative position of the image changes in real time as the content of the background image changes. It is understandable that since the position of the telephoto frame is determined by the lens center of the wide-angle camera and the telephoto camera, the object distance and the size of the field of view, when the object distance is basically unchanged, in view of the wide-angle camera. The relative position of the lens center of the telephoto camera remains unchanged, and the relative position of the telephoto frame and the background image is basically unchanged. For example, when taking a photo, the telephoto frame is always positioned near the middle of the background image.
在拍照过程中,当手机移动时,广角摄像头也随之移动,作为背景图像的广角图像的内容也随之变化,但每个网格对应的背景图像的内容保持不变。也可以理解为,在拍照过程中,网格与网格内广角图像的内容之间的对应关系保持不变,网格与作为背景图像的广角图像的内容是绑定的。During the photographing process, when the mobile phone moves, the wide-angle camera also moves, and the content of the wide-angle image as the background image also changes, but the content of the background image corresponding to each grid remains unchanged. It can also be understood that during the photographing process, the corresponding relationship between the grid and the content of the wide-angle image in the grid remains unchanged, and the grid and the content of the wide-angle image serving as the background image are bound.
手机可以通过多种方式来实现网格与广角图像内容的绑定。例如,手机可以记录检测到拍照操作后每个网格对应的广角图像的内容;在后续的拍照过程中,手机可以采用图像匹配的方式,将网格与实时获取的广角图像的内容进行匹配,从而实现网格与广角图像内容的绑定。再例如,手机可以记录检测到拍照操作后每个网格及对应的广角图像内容的坐标位置;在后续的拍照过程中,手机可以根据陀螺仪等惯性测量单元的数据,确定手机的平移量和/旋转量,从而根据该平移量和/旋转量计算每个网格及对应的广角图像内容新的坐标位置,实现网格与广角图像内容的绑定。Mobile phones can bind grids to wide-angle image content in a number of ways. For example, the mobile phone can record the content of the wide-angle image corresponding to each grid after the photo-taking operation is detected; in the subsequent photo-taking process, the mobile phone can use the image matching method to match the grid with the content of the wide-angle image acquired in real time, In this way, the binding of the grid and the content of the wide-angle image is realized. For another example, the mobile phone can record the coordinate position of each grid and the corresponding wide-angle image content after the photo-taking operation is detected; in the subsequent photo-taking process, the mobile phone can determine the translation amount and /Rotation amount, so as to calculate the new coordinate position of each grid and the corresponding wide-angle image content according to the translation amount and /rotation amount, so as to realize the binding of the grid and the wide-angle image content.
举例来说,当手机向右移动时,广角摄像头和长焦摄像头同时向右移动,广角图像的视场角和图像内容向右移动,引导框在屏幕上的位置随着广角图像内容的右移而向左偏移,长焦框相对于广角图像的位置基本保持不变。示例性的,在背景图像为手机实时采集的广角图像的情况下,在中间一行最左侧的网格匹配后,拍摄界面的示意图可以参见图13C中的(a),拍摄界面上显示有目标长焦图像1的缩略图;在中间一行中间的网格匹配后,拍摄界面的示意图可以参见图13C中的(b),拍摄界面上显 示有拼接图像缩略图;在中间一行最右侧的网格匹配后,拍摄界面的示意图可以参见图13C中的(c),拍摄界面上显示有拼接图像缩略图。如图13C中的(a)-(c)所示,广角图像向右偏移,引导框向左偏移,且长焦框的基本位于广角图像的中间位置。For example, when the phone moves to the right, the wide-angle camera and telephoto camera move to the right at the same time, the field of view and image content of the wide-angle image move to the right, and the position of the guide frame on the screen moves to the right with the content of the wide-angle image. Shifting to the left, the position of the telephoto frame relative to the wide-angle image remains largely unchanged. Exemplarily, in the case where the background image is a wide-angle image collected in real time by a mobile phone, after the leftmost grid in the middle row is matched, a schematic diagram of the shooting interface can be seen in (a) in FIG. 13C , and a target is displayed on the shooting interface. Thumbnail of telephoto image 1; after the grids in the middle row are matched, the schematic diagram of the shooting interface can be seen in (b) in Figure 13C, and the stitched image thumbnails are displayed on the shooting interface; After grid matching, the schematic diagram of the photographing interface can be seen in (c) in FIG. 13C , and the stitched image thumbnails are displayed on the photographing interface. As shown in (a)-(c) of FIG. 13C , the wide-angle image is shifted to the right, the guide frame is shifted to the left, and the telephoto frame is substantially located in the middle of the wide-angle image.
需要说明的是,图12A是以目标长焦图像的缩略图与已匹配网格的边缘基本对齐为例进行说明的。在拍照过程中,如图13C中的(a)-(c)所示,当目标长焦图像的缩略图与网格的位置有所偏差时,拼接图像的边缘可能是参差不齐的,并不与已匹配网格的边缘基本对齐。It should be noted that, FIG. 12A is described by taking an example that the thumbnail of the target telephoto image is basically aligned with the edge of the matched grid. During the photographing process, as shown in (a)-(c) in Fig. 13C, when the thumbnail of the target telephoto image is deviated from the position of the grid, the edges of the stitched image may be jagged, and Not substantially aligned with the edges of the matched grid.
此外,在用户直接移动长焦摄像头或手机自动控制长焦摄像头移动的情况下,长焦摄像头与广角摄像头可以不同步移动。在背景图像不固定且为手机实时采集的广角图像的情况下,比如背景图像由于手机的抖动等原因实时变化时,引导框与背景图像的相对位置会随着背景图像内容的变化而实时变化,每个网格对应的背景图像的内容基本保持不变,长焦框与背景图像的相对位置可随着长焦摄像头的而移动而实时变化。In addition, in the case where the user directly moves the telephoto camera or the mobile phone automatically controls the movement of the telephoto camera, the telephoto camera and the wide-angle camera may not move synchronously. When the background image is not fixed and is a wide-angle image collected in real time by the mobile phone, for example, when the background image changes in real time due to the shaking of the mobile phone, the relative position of the guide frame and the background image will change in real time with the content of the background image. The content of the background image corresponding to each grid remains basically unchanged, and the relative position of the telephoto frame and the background image can change in real time as the telephoto camera moves.
在本申请的实施例中,拼接图像缩略图与广角图像被覆盖的图像尺寸、位置以及内容基本相同。拼接图像缩略图的尺寸较小,不便于用户查看图像细节。在一些实施例中,手机可以响应于用户的点击或长按等预设操作,在拍摄界面上放大显示拼接图像缩略图,以便用户随时清楚地看到长焦摄像头采集的目标长焦拼接图像上物体的具体细节。In the embodiment of the present application, the size, position, and content of the image covered by the stitched image thumbnail and the wide-angle image are basically the same. The size of the stitched image thumbnail is small, which is inconvenient for users to view the image details. In some embodiments, in response to a user's click or long press and other preset operations, the mobile phone can zoom in and display a thumbnail of the stitched image on the shooting interface, so that the user can clearly see the target telephoto stitched image captured by the telephoto camera at any time. The specific details of the object.
示例性的,如图15A中的(a)所示,手机检测到用户在拍摄界面上点击拼接图像缩略图的操作后,如图15A中的(b)所示在拍摄界面上放大显示拼接图像缩略图。手机检测到用户再次点击拼接图像的操作或者检测到用户的返回操作后,恢复显示如图15A中的(a)所示的拼接图像缩略图。Exemplarily, as shown in (a) of FIG. 15A , after the mobile phone detects that the user clicks the thumbnail of the stitched image on the shooting interface, as shown in (b) of FIG. 15A , the stitched image is enlarged and displayed on the shooting interface. Thumbnail. After the mobile phone detects the user's operation of clicking the stitched image again or detects the user's return operation, the mobile phone resumes displaying the stitched image thumbnail as shown in (a) of FIG. 15A .
在另一些实施例中,为避免拼接图像缩略图的尺寸较小(尤其在长焦摄像头与广角摄像头的等效焦距差别较大时,比如等效焦距的比例大于某个预设值),导致用户不便于查看图像细节,手机可以在拍摄界面上自动放大显示拼接图像缩略图。类似地,手机也可以在拍摄界面上放大显示目标长焦图像1的缩略图。该放大显示的倍数可以是默认值,也可以和广角摄像头与长焦摄像头等效焦距的比例相关,还可以是用户设置的数值,不予限定。In other embodiments, in order to avoid the size of the stitched image thumbnails being small (especially when the equivalent focal lengths of the telephoto camera and the wide-angle camera are quite different, for example, the ratio of the equivalent focal lengths is greater than a certain preset value), resulting in It is inconvenient for users to view the details of the images, and the mobile phone can automatically zoom in and display the thumbnails of the stitched images on the shooting interface. Similarly, the mobile phone can also enlarge and display the thumbnail of the target telephoto image 1 on the shooting interface. The magnified display multiple may be a default value, or may be related to the ratio of the equivalent focal length of the wide-angle camera to the telephoto camera, or may be a value set by the user, which is not limited.
为方便引导用户移动手机或长焦摄像头,放大显示后的目标长焦图像1的缩略图或拼接图像缩略图不能遮挡待匹配的网格。示例性的,参见图15B中的(a)-(b),当按照从左往右的网格顺序拍摄时,拍摄界面上放大后的目标长焦图像1的缩略图以及拼接图像缩略图的右侧与最近已匹配的网格的右侧对齐,即与待匹配网格的左侧对齐,避免目标长焦图像1的缩略图以及拼接图像缩略图遮挡右侧待匹配的网格。当按照从上往下的网格顺序拍摄时,放大后的目标长焦图像1的缩略图或拼接图像缩略图的下侧与最近已匹配的网格的下侧对齐,即与待匹配网格的上侧对齐,避免目标长焦图像1的缩略图以及拼接图像缩略图遮挡下侧待匹配的网格。再比如,引导框中间一行的网格通常对应用户最想要拍摄的图像内容,因而目标长焦图像1的缩略图以及拼接图像缩略图尽量不遮挡中间一行未匹配的网格。In order to conveniently guide the user to move the mobile phone or the telephoto camera, the thumbnail of the target telephoto image 1 after enlarged display or the thumbnail of the spliced image cannot block the grid to be matched. Exemplarily, referring to (a)-(b) in FIG. 15B , when shooting in a grid order from left to right, the thumbnail of the zoomed-in target telephoto image 1 and the thumbnail of the stitched image on the shooting interface. The right side is aligned with the right side of the recently matched grid, that is, aligned with the left side of the grid to be matched, so as to avoid the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image from blocking the grid to be matched on the right side. When shooting in grid order from top to bottom, the lower side of the thumbnail of the zoomed-in target telephoto image 1 or the thumbnail of the stitched image is aligned with the lower side of the grid that has been matched recently, that is, the grid to be matched align the upper side of the target telephoto image 1 and the thumbnail of the spliced image to block the grid to be matched on the lower side. For another example, the grid in the middle row of the guide frame usually corresponds to the image content that the user most wants to capture, so the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image try not to block the unmatched grid in the middle row.
在其他一些实施例中,手机在拍摄界面上显示广角图像上与引导框对应的目标区域图像,而不显示完整的广角图像。该目标区域图像的尺寸与引导框的尺寸的比例为 r,且r≥1。该目标区域图像可以通过对完整的广角图像进行裁剪和放大获得。这样,拍摄界面上显示的引导框和网格的尺寸较大,便于手机根据尺寸较大的网格进行移动拍摄和匹配。In some other embodiments, the mobile phone displays the target area image corresponding to the guide frame on the wide-angle image on the shooting interface, instead of displaying the complete wide-angle image. The ratio of the size of the target area image to the size of the guide frame is r, and r≥1. The target area image can be obtained by cropping and zooming in on the full wide-angle image. In this way, the size of the guide frame and the grid displayed on the shooting interface is larger, which is convenient for the mobile phone to perform mobile shooting and matching according to the larger size grid.
尤其地,当长焦摄像头的等效焦距与广角摄像头的等效焦距相差较大时,若在拍摄界面上显示完整的广角图像以及相应显示引导框,则引导框、网格、目标长焦图像1的缩略图/拼接图像缩略图的尺寸较小,不便于用户查看。手机可以将目标区域图像、引导框、目标长焦图像1的缩略图/拼接图像缩略图等比例放大后显示在拍摄界面上,以方便用户查看尺寸较大的目标长焦图像1的缩略图/拼接图像缩略图的具体内容。In particular, when the equivalent focal length of the telephoto camera is quite different from the equivalent focal length of the wide-angle camera, if a complete wide-angle image and a corresponding guide frame are displayed on the shooting interface, the guide frame, grid, and target telephoto image 1 Thumbnails/stitched image thumbnails are small in size and inconvenient for users to view. The mobile phone can enlarge the target area image, the guide frame, the thumbnail of the target telephoto image 1/stitched image thumbnail, etc., and display it on the shooting interface, so that the user can view the thumbnail of the larger target telephoto image 1/ The specific content of the stitched image thumbnail.
示例性的,上述图12A中的(d)所示的拍摄界面上完整的广角图像可以替换为图15C所示的拍摄界面上广角图像中的目标区域图像1500。其中,与图12A中的(d)所示的拍摄界面相比,在图15C所示的拍摄界面上,目标区域图像、引导框和拼接图像缩略图进行了等比例的放大,且该目标区域图像的尺寸与引导框的尺寸的比例r大于1。Exemplarily, the complete wide-angle image on the shooting interface shown in (d) of FIG. 12A may be replaced with the target area image 1500 in the wide-angle image on the shooting interface shown in FIG. 15C . Wherein, compared with the photographing interface shown in (d) in FIG. 12A , on the photographing interface shown in FIG. 15C , the target area image, the guide frame and the stitched image thumbnails are enlarged in equal proportions, and the target area is enlarged in equal proportions. The ratio r of the size of the image to the size of the guide frame is greater than 1.
在以上实施例描述的方案中,在拍照过程中,手机在拍摄界面上显示目标长焦图像1的缩略图和拼接图像缩略图。在其他一些实施例中,在拍照过程中,手机可以不显示目标长焦图像1的缩略图和拼接图像缩略图,而仅在广角图像上以显示拼接框,该拼接框为目标长焦图像1的缩略图的边框,或者拼接图像缩略图的边框。这样,手机可以通过拼接框提示用户当前的拍摄进度,且不需要获取目标长焦图像1的缩略图和拼接图像缩略图并显示,可以减少手机的处理负载。在另一些实施例中,在拍照过程中,手机可以不显示目标长焦图像1的缩略图和拼接图像缩略图,而仅突出显示(例如高亮或加粗显示)已匹配的网格或已匹配的网格的边框。这样,手机可以通过突出显示已拼接的网格提示用户当前的拍摄进度,且不需要获取目标长焦图像1的缩略图和拼接图像缩略图并显示,可以减少手机的处理负载。In the solution described in the above embodiment, during the photographing process, the mobile phone displays the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image on the photographing interface. In some other embodiments, during the photographing process, the mobile phone may not display the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image, but only display a splicing frame on the wide-angle image, and the splicing frame is the target telephoto image 1 , or the border of a stitched image thumbnail. In this way, the mobile phone can remind the user of the current shooting progress through the splicing box, and does not need to acquire and display the thumbnail of the target telephoto image 1 and the thumbnail of the spliced image, which can reduce the processing load of the mobile phone. In other embodiments, during the photographing process, the mobile phone may not display the thumbnail of the target telephoto image 1 and the thumbnail of the stitched image, but only highlight (for example, highlight or bold) the matched grid or the stitched image. Matches the border of the grid. In this way, the mobile phone can remind the user of the current shooting progress by highlighting the stitched grid, and does not need to acquire and display the thumbnail of the target telephoto image 1 and the stitched image thumbnail, which can reduce the processing load of the mobile phone.
此外,在一些实施例中,在拍照过程中,手机还可以根据当前实时地拍摄情况给用户以相应的提示。例如,当手机移动过快,长焦图像来不及与网格匹配时,手机可以提示用户请缓慢移动手机。再例如,当手机的移动方向与拍摄顺序指示方向相反,或者手机向已匹配网格的方向移动时,手机可以提示用户请沿指示方向移动手机。或者,手机直接终止拍摄过程,根据已获取的目标长焦图像生成最终的目标图像。再例如,当长焦框偏离待匹配网格的上方较远时。手机可以提示用户请向下移动手机;当长焦框偏离待匹配网格的下方较远时,手机可以提示用户请向上移动手机。In addition, in some embodiments, during the photographing process, the mobile phone can also give a corresponding prompt to the user according to the current real-time photographing situation. For example, when the phone is moving too fast for the telephoto image to match the grid, the phone can prompt the user to move the phone slowly. For another example, when the moving direction of the mobile phone is opposite to the direction indicated by the shooting sequence, or when the mobile phone moves in the direction of the matched grid, the mobile phone may prompt the user to move the mobile phone in the indicated direction. Or, the mobile phone directly terminates the shooting process, and generates the final target image according to the acquired target telephoto image. For another example, when the telephoto frame is far away from the top of the grid to be matched. The mobile phone can prompt the user to move the mobile phone downwards; when the telephoto frame deviates far below the grid to be matched, the mobile phone can prompt the user to move the mobile phone upwards.
值得注意的是,在拍照过程中,对于手机实时采集的广角图像,一方面可以用于在背景图像不固定的情况下,作为背景图像进行显示;另一方面还可以用于对运动物体进行运动矢量估计,从而确定运动物体的连通区域,辅助去除鬼影。而在拍照过程中,质量较好的参考广角图像可以用于作为参考来对目标长焦图像进行AE、AWB和DRC配置,用于作为参考来配准和融合多帧目标长焦图像,以及用于作为参考来进行空洞填充等处理。It is worth noting that, in the process of taking pictures, the wide-angle image collected by the mobile phone in real time can be used to display as a background image when the background image is not fixed; on the other hand, it can also be used to move moving objects. Vector estimation to determine the connected regions of moving objects and assist in ghost removal. In the process of taking pictures, the reference wide-angle image with better quality can be used as a reference to perform AE, AWB and DRC configuration on the target telephoto image, used as a reference to register and fuse multiple target telephoto images, and use It is used as a reference to perform processing such as hole filling.
204、手机确定拍摄结束后,根据拼接图像生成目标图像。204. After the mobile phone determines that the shooting is completed, a target image is generated according to the stitched image.
手机在确定拍摄结束后,可以根据多帧目标长焦图像获得的拼接图像生成目标图像。After the mobile phone determines that the shooting is completed, the target image can be generated according to the stitched images obtained from the multiple frames of target telephoto images.
在一些实施例中,手机在拍摄结束之后,根据拼接图像生成目标图像之前,还可以对拼接图像进行去鬼影、动态范围增强或空洞填充等处理,以提高拼接图像的质量,从而根据处理后的拼接图像生成目标图像,提高目标图像的质量。In some embodiments, after the shooting, the mobile phone can also perform processing such as ghost removal, dynamic range enhancement, or hole filling on the stitched image before generating the target image according to the stitched image, so as to improve the quality of the stitched image. The spliced image of the target image is generated and the quality of the target image is improved.
去鬼影:Go ghosting:
如果手机在拍照过程中未对运动物体进行去鬼影处理,则手机可以在拍摄结束之后,且根据拼接图像生成目标图像之前,对拼接图像进行去鬼影处理,从而根据去鬼影后的拼接图像生成目标图像。例如,当相邻多帧目标图像上均出现运动物体时,手机可以一起对拍摄结束后获得的拼接图像上的鬼影进行处理。在一种可能的实现方案中,为了使得最终的目标图像上运动物体的位置和用户最后看到的更为接近,手机可以保留最后一帧目标长焦图像上该运动物体的完整图像。再例如,当手机在拍摄结束后才生成拼接图像时,手机可以一起对拼接图像上的鬼影进行处理。If the mobile phone does not perform ghost removal processing on moving objects during the photographing process, the mobile phone can perform ghost removal processing on the stitched image after the shooting ends and before generating the target image according to the stitched image, so that according to the stitching after ghost removal image to generate the target image. For example, when there are moving objects on adjacent multiple frames of target images, the mobile phone can process the ghosts on the stitched images obtained after shooting together. In a possible implementation solution, in order to make the position of the moving object on the final target image closer to what the user sees last, the mobile phone can retain the complete image of the moving object on the last frame of the target telephoto image. For another example, when the mobile phone generates a stitched image after the shooting, the mobile phone can process ghost images on the stitched image together.
该种情况下,与上述拍照过程中去鬼影的方法类似,对于慢速运动的物体,手机可以在拼接图像上删除运动物体的图像,保留某帧目标长焦图像或某帧广角图像上该运动物体的完整图像,并采用广角图像上对应位置的内容进行空洞填充。对于快速运动的物体,手机可以根据多帧广角图像进行运动矢量估计,从而去除广角图像上的运动物体的连通区域得到无鬼影的完整的运动物体的图像。手机删除拼接图像上运动物体的图像区域,并采用无鬼影的广角图像上对应位置的内容对删除区域进行空洞填充。In this case, similar to the above-mentioned method for removing ghost images in the photographing process, for slow-moving objects, the mobile phone can delete the image of the moving object on the spliced image, and keep the target telephoto image of a certain frame or the wide-angle image of a certain frame of the image. A complete image of a moving object, and fill the hole with the content of the corresponding location on the wide-angle image. For fast-moving objects, the mobile phone can perform motion vector estimation based on multiple frames of wide-angle images, so as to remove the connected areas of moving objects on the wide-angle images to obtain a complete image of moving objects without ghosts. The mobile phone deletes the image area of the moving object on the spliced image, and fills the deleted area with the content of the corresponding position on the wide-angle image without ghosting.
本申请实施例对去鬼影处理在拍摄过程中执行还是在拍摄结束后执行不予限定。This embodiment of the present application does not limit whether the ghost removal process is performed during the shooting process or after the shooting ends.
动态范围增强:Dynamic range enhancement:
在本申请的实施例中,多帧目标长焦图像的拼接图像的动态范围可能较小,明亮层次较少,亮度范围较小,亮暗对比不充分,暗部和亮部细节不够充分。在一些实施例中,手机在拍摄结束后,在根据拼接图像生成目标图像之前,可以增强整个拼接图像的动态范围,比如采用一种增强拍摄照片的动态范围的方法(HDRnet),使得拼接图像明亮层次更加丰富,亮暗范围更大,而后再根据动态范围增强后的拼接图像生成目标图像。In the embodiment of the present application, the stitched image of the multi-frame target telephoto images may have a smaller dynamic range, fewer bright layers, a smaller brightness range, insufficient contrast between bright and dark, and insufficient details of dark and bright parts. In some embodiments, the mobile phone can enhance the dynamic range of the entire stitched image after the shooting ends and before generating the target image according to the stitched image, for example, a method of enhancing the dynamic range of the photographed photo (HDRnet) can be used to make the stitched image bright The layers are richer and the range of light and dark is larger, and then the target image is generated according to the stitched image with enhanced dynamic range.
例如,在增强动态范围的过程中,手机可以通过卷积神经网络(AI网络)对拼接图像进行处理,直接获得高动态范围的效果,从而获得具有高动态范围的目标图像。For example, in the process of enhancing the dynamic range, the mobile phone can process the stitched images through the convolutional neural network (AI network) to directly obtain the effect of high dynamic range, thereby obtaining the target image with high dynamic range.
在增强动态范围的过程中,手机还可以根据参考广角图像的亮度分布情况调整拼接图像的亮度分布,增大拼接图像的亮度范围,从而增强拼接图像的动态范围。举例来说,由参考广角图像与拼接图像的亮度直方图可知,参考广角图像与拼接图像对应区域内的亮度值范围为30-250,拼接图像的亮度值范围为180-230。手机可以将拼接图像上亮度值靠近180的部分像素点(例如随机选取的像素点或边缘部分的像素点等)的亮度值调整到30-180之间;将拼接图像上亮度值靠近230的部分像素点的亮度值调整到230-250之间;从而增大拼接图像的亮度范围,增强拼接图像的动态范围。In the process of enhancing the dynamic range, the mobile phone can also adjust the brightness distribution of the spliced image according to the brightness distribution of the reference wide-angle image, so as to increase the brightness range of the spliced image, thereby enhancing the dynamic range of the spliced image. For example, according to the luminance histograms of the reference wide-angle image and the stitched image, the luminance values in the corresponding regions of the reference wide-angle image and the stitched image range from 30 to 250, and the luminance value of the stitched image ranges from 180 to 230. The mobile phone can adjust the brightness value of some pixels whose brightness value is close to 180 on the spliced image (such as randomly selected pixels or pixels in the edge part, etc.) to 30-180; The brightness value of the pixel is adjusted to between 230-250; thereby increasing the brightness range of the spliced image and enhancing the dynamic range of the spliced image.
此外,手机还可以提取参考广角图像的高频分量图像,将高频分量图像和拼接图像进行融合,以增加拼接图像的高频细节(也可以称为高频分量融合)。比如,该高频分量图像包括参考广角图像上边缘部分的像素点或不同物体边缘的过渡部分的像素点等。手机可以采用小波变换或者深度学习等方法提取参考广角图像的高频分量图像,从而提取频率和纹理变化较大的高频细节并叠加在拼接图像上,以增强拼接图像的高 频细节,增强拼接图像和目标图像的清晰度和细节。In addition, the mobile phone can also extract the high-frequency component image of the reference wide-angle image, and fuse the high-frequency component image and the stitched image to increase the high-frequency detail of the stitched image (also called high-frequency component fusion). For example, the high-frequency component image includes pixels in the upper edge portion of the reference wide-angle image or pixels in the transition portion of the edges of different objects, and the like. The mobile phone can use wavelet transform or deep learning to extract the high-frequency component image of the reference wide-angle image, so as to extract high-frequency details with large frequency and texture changes and superimpose them on the stitched image to enhance the high-frequency details of the stitched image and enhance the stitching. Image and target image clarity and detail.
在增强动态范围的过程中,手机还可以对多帧广角图像进行高动态范围的合成,并将合成的高动态范围效果通过匀光匀色的算法,作用到拼接图像上,即根据合成的高动态范围信息对拼接图像进行匀光匀色处理,从而增强拼接图像的动态范围。除此之外,手机还可以将拼接图像的细节回叠到具有高动态范围效果的广角图像上,最终获得具有高动态范围、丰富纹理细节的目标图像。In the process of enhancing the dynamic range, the mobile phone can also synthesize multiple frames of wide-angle images with high dynamic range, and apply the synthesized high dynamic range effect to the stitched image through the algorithm of uniform light and color. The dynamic range information performs uniform light and color processing on the stitched image, thereby enhancing the dynamic range of the stitched image. In addition, the mobile phone can also superimpose the details of the stitched image onto the wide-angle image with high dynamic range effect, and finally obtain the target image with high dynamic range and rich texture details.
例如,在有些实施例中,手机可以利用多帧广角图像的不同曝光,合成具有高动态范围的广角图像,然后以广角图像的高动态范围为基础,对拼接图像进行匀光匀色的处理或者风格迁移的处理,从而让拼接图像也拥有高动态范围的效果。For example, in some embodiments, the mobile phone can use different exposures of multiple frames of wide-angle images to synthesize a wide-angle image with high dynamic range, and then perform uniform light and color processing on the stitched image based on the high dynamic range of the wide-angle image, or The processing of style transfer, so that the stitched image also has the effect of high dynamic range.
例如,在有些实施例中,手机可以利用多帧广角图像的不同曝光,合成具有高动态范围的广角图像。然后,手机可以提取拼接图像中的细节和纹理,回叠到具有高动态范围的广角图像上,进行细节、颜色和亮度的融合,最终获得具有高动态范围和高清细节的目标图像。For example, in some embodiments, a cell phone may utilize different exposures of multiple frames of wide-angle images to synthesize a wide-angle image with high dynamic range. The phone can then extract details and textures from the stitched image, overlay it onto a wide-angle image with high dynamic range, and fuse details, color, and brightness, and finally obtain a target image with high dynamic range and high-definition detail.
其中,增强动态范围的算法不限于传统的算法或者卷积神经网络的算法。多帧广角图像合成具有高动态范围的广角图像的算法也不限于传统的算法或者卷积神经网络的算法。Wherein, the algorithm for enhancing the dynamic range is not limited to the traditional algorithm or the algorithm of the convolutional neural network. The algorithm for synthesizing a wide-angle image with high dynamic range from multiple frames of wide-angle images is not limited to traditional algorithms or convolutional neural network algorithms.
空洞填充:Hole filling:
在本申请的实施例中,拼接图像上的不同目标长焦图像之间可能存在一些空洞。在一些实施例中,手机还可以对拼接图像进行空洞填充,而后再根据空洞填充后的拼接图像生成目标图像。由于目标长焦图像之间可能有错位,拼接图像的边缘可能不够平滑,来自不同目标长焦图像的图像部分之间可能存在空边,因而手机还可以根据参考广角图像对空边进行空洞填充,以获得整齐、美观的矩形或方形拼接图像。这样,手机根据参考广角图像的对应内容对空边进行填充,而不需要依据空边对目标长焦图像进行裁剪从而导致拼接时图像视场角和图像分辨率的损失,能够使得拼接图像具有较大的视场角和图像分辨率,因而能够使得根据拼接图像生成的目标图像具有较大的视场角和图像分辨率。除此之外,对于空洞和空边的填充,手机可以采用多帧广角图像的相应区域进行高分辨率的合成,也可以使用图像超分辨率算法对单帧参考广角图像的相应区域进行处理,使得空洞和空边的填充能拥有较高的分辨率,提升用户体验。In the embodiments of the present application, there may be some holes between different target telephoto images on the stitched image. In some embodiments, the mobile phone can also perform hole filling on the stitched image, and then generate the target image according to the stitched image after the holes are filled. Since there may be misalignment between the target telephoto images, the edges of the stitched images may not be smooth enough, and there may be empty edges between image parts from different target telephoto images. Therefore, the mobile phone can also fill in the empty edges according to the reference wide-angle image. For neat, beautiful rectangular or square stitched images. In this way, the mobile phone fills the empty edge according to the corresponding content of the reference wide-angle image, and does not need to crop the target telephoto image according to the empty edge, which leads to the loss of the image field angle and image resolution during splicing, which can make the spliced image more efficient. Large field of view and image resolution, so that the target image generated from the spliced image has a large field of view and image resolution. In addition, for the filling of holes and empty edges, the mobile phone can use the corresponding areas of multiple frames of wide-angle images for high-resolution synthesis, or use the image super-resolution algorithm to process the corresponding areas of a single frame of reference wide-angle images. The filling of holes and empty edges can have a higher resolution and improve the user experience.
示例性的,手机根据多帧目标长焦图像得到的,存在空边的拼接图像可以参见图15D中的(a)所示的实线框起来的图像,手机根据参考广角图像进行空洞填充处理后,得到的拼接图像可以参见图15D中的(b)所示的实线框起来的图像。Exemplarily, the stitched image with empty edges obtained by the mobile phone according to multiple frames of target telephoto images can refer to the image framed by the solid line shown in (a) in FIG. 15D . After the mobile phone performs hole filling processing according to the reference wide-angle image , the obtained stitched image can refer to the image framed by the solid line shown in (b) of FIG. 15D .
需要说明的是,在拍照过程中,质量较好的参考广角图像用于作为参考来对目标长焦图像进行AE、AWB调节、DRC配置,用于作为参考来配准和融合多帧目标长焦图像,用于作为参考来进行空洞填充,用于在拍摄结束后作为参考来增强整个拼接图像的动态范围等处理。并且,在整个拍照过程中,各帧目标长焦图像均根据相同的参考广角图像来进行这些处理,可以使得各目标长焦图像的效果与参考广角图像尽量保持一致,从而使得最终的拼接图像和目标图像的整体效果与参考广角图像的图像效果较为一致,使得最终的拼接图像和目标图像整体较为自然、过渡平滑且质量较好。It should be noted that in the process of taking pictures, the reference wide-angle image with better quality is used as a reference to perform AE, AWB adjustment, and DRC configuration on the target telephoto image, which is used as a reference to register and fuse multi-frame target telephoto. The image is used as a reference for hole filling, and is used as a reference to enhance the dynamic range of the entire stitched image after shooting. In addition, in the whole photographing process, each frame of target telephoto image is processed according to the same reference wide-angle image, which can make the effect of each target telephoto image and the reference wide-angle image as consistent as possible, so that the final stitched image and The overall effect of the target image is more consistent with the image effect of the reference wide-angle image, so that the final stitched image and the target image as a whole are more natural, with smooth transition and better quality.
此外,由于手机根据拼接图像生成目标图像的过程中,可能需要花费一定的时间 进行动态范围增强等处理。因而,在一些实施例中,手机在该处理过程中可以提示用户正在处理生成目标图像,避免用户误认为手机发生了卡顿或其他异常情况。比如,手机可以通过文字提示、语音提示、或转动的圆圈标识等方式来提示用户。示例性的,参见图16,手机可以通过文字信息:正在处理,请稍后;以及转动的圆圈标识,来提示用户当前正在处理生成目标图像。In addition, since the mobile phone generates the target image from the stitched image, it may take a certain amount of time to perform processing such as dynamic range enhancement. Therefore, in some embodiments, the mobile phone may prompt the user that the target image is being generated during the processing, so as to prevent the user from mistakenly thinking that the mobile phone is stuck or other abnormal conditions have occurred. For example, the mobile phone can prompt the user through text prompts, voice prompts, or a rotating circle logo. Exemplarily, referring to FIG. 16 , the mobile phone can prompt the user that the target image is currently being generated through text information: processing, please wait; and a rotating circle mark.
其中,手机确定拍摄结束的方法可以有多种,手机根据拼接图像生成目标图像的方法也可以有多种。Among them, there may be various methods for the mobile phone to determine the end of shooting, and there may also be various methods for the mobile phone to generate the target image according to the spliced image.
在一些情况下,在引导框中的网格未完成拍摄(即引导框中的网格未完成匹配)前,手机检测到用户的停止拍照操作后确定拍摄结束。示例性的,手机检测到用户点击如图12A中的(e)所示的停止拍照控件1200的操作后,确定拍摄结束。可以理解的是,该停止拍照操作还可以是其他手势操作或用户语音指示操作等,本申请实施例对触发手机结束拍照过程的操作不予限定。在另一些情况下,在引导框中的网格未完成拍摄前,若手机移动方向严重偏离引导框的指示方向(例如移动方向与引导框的指示方向的偏离范围大于或者等于某个预设值)或者移动出了引导框,则自动结束拍摄。In some cases, before the grids in the guide frame have not been photographed (that is, the grids in the guide frame have not been matched), the mobile phone determines that the photographing is ended after detecting the user's operation of stopping photographing. Exemplarily, after the mobile phone detects that the user clicks the operation of the stop photographing control 1200 as shown in (e) in FIG. 12A , it determines that the photographing is ended. It can be understood that the operation to stop taking pictures may also be other gesture operations or user voice instruction operations, and the embodiment of the present application does not limit the operations that trigger the mobile phone to end the taking pictures process. In other cases, before the grid in the guide frame is photographed, if the moving direction of the mobile phone seriously deviates from the indicated direction of the guide frame (for example, the deviation range between the moving direction and the indicated direction of the guide frame is greater than or equal to a certain preset value) ) or move out of the guide frame, the shooting ends automatically.
在一些实施例中,若手机在引导框中的网格未完成拍摄前确定拍摄结束,则从参考广角图像上截取与引导框对应的部分生成目标图像。In some embodiments, if the mobile phone determines that the shooting is completed before the grid in the guide frame is completed, the target image is generated by intercepting the part corresponding to the guide frame from the reference wide-angle image.
在另一些实施例中,若手机在引导框中的网格未完成拍摄前确定拍摄结束,且拍照过程中是按网格的行进行拍摄的,则手机舍去拼接图像上未完成整行网格拍摄的部分,根据已拍摄的整行网格对应的拼接图像生成目标图像,以使得目标图像为整行网格对应的图像。示例性的,在图12A中的(e)所示的情况下,若手机检测到用户的停止拍照操作,则根据引导框的中间一行和上方一行的网格对应的拼接图像生成如图17中的(a)所示的目标图像。In other embodiments, if the mobile phone determines that the shooting is completed before the grid in the guide frame is completed, and the shooting process is performed according to the rows of the grid, the mobile phone discards the entire row of grids that are not completed on the spliced image. For the part of grid shooting, a target image is generated according to the stitched images corresponding to the entire row of grids that have been captured, so that the target image is an image corresponding to the entire row of grids. Exemplarily, in the case shown in (e) in FIG. 12A , if the mobile phone detects the user’s operation to stop taking pictures, the stitched images corresponding to the grids in the middle row and the upper row of the guide frame are generated as shown in FIG. 17 . The target image shown in (a).
类似地,若手机在引导框中的网格未完成拍摄前确定拍摄结束,且拍照过程中是按网格的列进行拍摄的,则手机去掉拼接图像上未完成整列网格拍摄的部分,根据已拍摄的整列网格对应的拼接图像生成目标图像,以使得目标图像为整列网格对应的图像。Similarly, if the mobile phone determines that the shooting is over before the grid in the guide frame has been shot, and the photo is taken according to the columns of the grid, the mobile phone removes the part of the stitched image that has not been photographed in the entire column, according to the A target image is generated from the stitched images corresponding to the entire column of grids that have been captured, so that the target image is an image corresponding to the entire column of grids.
在另一些实施例中,若手机在引导框中的网格未完成拍摄前确定拍摄结束,且拍照过程中是按网格的行进行拍摄的,则手机在拼接图像上根据参考广角图像补充完最新一行网格对应的图像,从而生成目标图像。类似地,若手机在引导框中的网格未完成拍摄前确定拍摄结束,且拍照过程中是按网格的列进行拍摄的,则手机在拼接图像上根据参考广角图像补充完最新一列网格对应的图像,从而生成目标图像。In other embodiments, if the mobile phone determines that the shooting is completed before the grid in the guide frame is completed, and the shooting process is performed according to the rows of the grid, the mobile phone supplements the stitched image according to the reference wide-angle image. The image corresponding to the latest row of grids, thereby generating the target image. Similarly, if the mobile phone determines that the shooting is over before the grid in the guide frame has been shot, and the shooting process is carried out according to the columns of the grid, the mobile phone will supplement the latest grid column on the stitched image according to the reference wide-angle image. corresponding image to generate the target image.
在其他一些实施例中,若手机在引导框中的网格未完成拍摄前确定拍摄结束,则拍照过程异常,手机不生成目标图像。并且,手机还可以提示用户拍摄中止或拍摄异常等。In some other embodiments, if the mobile phone determines that the shooting is completed before the grid in the guide frame is completed, the photographing process is abnormal, and the mobile phone does not generate the target image. In addition, the mobile phone can also prompt the user that the shooting is stopped or the shooting is abnormal.
在另一些情况下,在引导框中的网格都拍摄完成后,手机自动结束拍摄,并根据拼接图像生成目标图像。在一些实施例中,目标图像的尺寸可以与引导框的尺寸相同。若由于拼接时目标长焦图像之间有错位等原因,使得拼接图像的尺寸与引导框的尺寸不一致,则手机可以根据引导框的尺寸对拼接图像进行裁剪或空洞填充(根据参考广角图像进行填充),从而使得拼接图像的尺寸与引导框的尺寸相一致。示例性的,手 机生成的目标图像可以参见图17中的(b)。在另一些实施例中,若由于拼接时目标长焦图像之间有错位等原因,使得拼接图像的边缘未对齐,则手机可以根据参考广角图像对拼接图像进行填充,从而获得矩形或方形等规则形状的目标图像,目标图像的位置和尺寸与引导框的位置和尺寸可能有所差异。In other cases, after all the grids in the guide frame are captured, the phone automatically ends capturing and generates a target image based on the stitched image. In some embodiments, the size of the target image may be the same as the size of the guide frame. If the size of the stitched image is inconsistent with the size of the guide frame due to the dislocation between the target telephoto images during stitching, the mobile phone can crop or fill the stitched image according to the size of the guide frame (fill according to the reference wide-angle image). ), so that the size of the stitched image is consistent with the size of the guide frame. Exemplarily, the target image generated by the mobile phone can be referred to (b) in Fig. 17 . In other embodiments, if the edges of the spliced images are not aligned due to the misalignment between the target telephoto images during splicing, the mobile phone can fill the spliced images according to the reference wide-angle image, so as to obtain rules such as rectangles or squares. The shape of the target image, the position and size of the target image and the position and size of the guide frame may differ.
其中,广角摄像头采集的广角图像的分辨率和长焦摄像头采集的长焦图像的分辨率均较大。由于广角摄像头的视场角远大于长焦摄像头的视场角,因而长焦图像在单位视场角内对应的像素点的数量远大于广角图像在单位视场角内对应的像素点的数量。例如,广角摄像头采集的广角图像的分辨率为4000*3000,即1200万像素,长焦摄像头采集的长焦图像的分辨率为3264*2448,即800万像素。若广角摄像头的视场角是长焦摄像头的视场角的5倍,则长焦图像在单位视场角内对应的像素点的数量,是广角图像在单位视场角内对应的像素点的数量的5倍。即,在单位视场角内长焦图像的分辨率是广角图像的分辨率的800/(1200/5)=3.33倍。也就是说,在单位视场角内长焦图像的分辨率大于广角图像的分辨率,与广角图像相比,长焦图像更为清晰,细节更为清楚。Among them, the resolution of the wide-angle image collected by the wide-angle camera and the resolution of the telephoto image collected by the telephoto camera are both larger. Since the field of view of the wide-angle camera is much larger than that of the telephoto camera, the number of pixels corresponding to the telephoto image per unit field of view is much larger than the number of pixels corresponding to the wide-angle image per unit field of view. For example, the resolution of the wide-angle image collected by the wide-angle camera is 4000*3000, that is, 12 million pixels, and the resolution of the telephoto image collected by the telephoto camera is 3264*2448, that is, 8 million pixels. If the field of view of the wide-angle camera is 5 times that of the telephoto camera, the number of pixels corresponding to the telephoto image per unit field of view is equal to the number of pixels corresponding to the wide-angle image per unit field of view. 5 times the number. That is, the resolution of the telephoto image is 800/(1200/5)=3.33 times the resolution of the wide-angle image within a unit angle of view. That is to say, the resolution of the telephoto image is larger than that of the wide-angle image within a unit field of view, and compared with the wide-angle image, the telephoto image is clearer and the details are clearer.
由于在单位视场角内长焦图像的分辨率大于广角图像的分辨率,因而手机根据多帧目标长焦图像的拼接图像生成的目标图像,比广角图像的清晰度更高,细节更清楚,拍摄效果更好。并且,手机通过多帧目标长焦图像进行拼接可以获得视场角较大的高清晰目标图像。Since the resolution of the telephoto image is greater than the resolution of the wide-angle image within a unit field of view, the target image generated by the mobile phone based on the spliced image of the multi-frame target telephoto image has higher definition and clearer details than the wide-angle image. Shoot better. In addition, the mobile phone can obtain a high-definition target image with a large field of view by stitching multiple frames of target telephoto images.
还需要说明的是,前述实施例中的长焦图像为长焦摄像头采集到的单帧图像。在其他一些实施例中,前述实施例中涉及的长焦图像也可以是长焦摄像头采集到的多帧(例如2帧或3帧等)长焦图像进行配准融合后生成的质量较好的一帧图像。It should also be noted that the telephoto image in the foregoing embodiment is a single-frame image collected by the telephoto camera. In some other embodiments, the telephoto images involved in the foregoing embodiments may also be multiple frames (for example, 2 frames or 3 frames, etc.) of telephoto images collected by a telephoto camera and generated after registration and fusion of better quality. a frame of image.
在本申请的一些实施例中,手机在图库中保存的,根据目标长焦图像拼接获得的目标图像可以区别于其他图像而特别标识,以方便用户直观地获知该种类型的图像。比如,参见图18中的(a),手机获得的目标图像上显示有“cp”的文字标识1801。再比如,参见图18中的(b),手机获得的目标图像上显示有特定的符号标识1802。In some embodiments of the present application, the target image obtained by splicing the target telephoto image and obtained by splicing the target telephoto image stored in the mobile phone can be specially identified from other images, so as to facilitate the user to intuitively know this type of image. For example, referring to (a) in FIG. 18 , the target image obtained by the mobile phone has a character identification 1801 of "cp" displayed. For another example, referring to (b) in FIG. 18 , a specific symbol 1802 is displayed on the target image obtained by the mobile phone.
不显示引导框的方案:Scenarios that do not display the bootstrap frame:
以上实施例描述的拍摄方法可以称为显示引导框的方案。本申请其他一些实施例提供了另一种拍摄方法,与上述实施例不同,手机在预览界面和拍摄界面上并不显示引导框。The photographing method described in the above embodiments may be referred to as a solution for displaying a guide frame. Some other embodiments of the present application provide another shooting method. Different from the above-mentioned embodiments, the mobile phone does not display a guide frame on the preview interface and the shooting interface.
以下主要对与上述显示引导框的方案的不同之处进行具体阐述,而对于相同之处则不再细述。如图19所示,该拍摄方法可以包括:The differences from the above solution of displaying a guide frame are mainly described in detail below, and the similarities are not described in detail. As shown in Figure 19, the shooting method may include:
1900、手机启动拍照功能。1900. The mobile phone starts the camera function.
在一些实施例中,手机在启动拍照功能后,即可以通过本申请实施例提供的不显示引导框的方案进行拍照。In some embodiments, after the mobile phone starts the photographing function, the mobile phone can take a photograph through the solution provided by the embodiments of the present application without displaying the guide frame.
在另一些实施例中,手机启动拍照功能并进入目标拍照模式后,可以通过本申请实施例提供的不显示引导框的方案进行拍照。例如,目标拍照模式为上述宽景模式。In other embodiments, after the mobile phone activates the photographing function and enters the target photographing mode, the mobile phone can take photographs by using the solution provided by the embodiments of the present application without displaying the guide frame. For example, the target photographing mode is the aforementioned wide-view mode.
关于步骤1900的其他相关说明可以参见上述步骤200中的描述,此处不予赘述。For other relevant descriptions of step 1900, reference may be made to the description in the above-mentioned step 200, which will not be repeated here.
1901、手机在预览界面上显示广角图像和长焦框。1901. The mobile phone displays a wide-angle image and a telephoto frame on the preview interface.
在不显示引导框的方案中,手机在预览界面上显示广角图像。与上述显示引导框 的方案不同,在不显示引导框的方案中,手机在预览界面上显示长焦框,以方便用户获知长焦摄像头的实时拍摄范围;并且,手机在预览界面上不显示引导框。并且,在不显示引导框的方案中,手机在预览界面上。示例性的,参见图20中的(a),预览界面上包括广角图像和长焦框。In the scheme where the guide frame is not displayed, the mobile phone displays a wide-angle image on the preview interface. Different from the above-mentioned scheme of displaying the guide frame, in the scheme of not displaying the guide frame, the mobile phone displays a telephoto frame on the preview interface to facilitate the user to know the real-time shooting range of the telephoto camera; and the mobile phone does not display the guide on the preview interface. frame. And, in the solution where the guide frame is not displayed, the mobile phone is on the preview interface. Exemplarily, see (a) in FIG. 20 , the preview interface includes a wide-angle image and a telephoto frame.
关于步骤1901中的其他相关说明可以参见上述步骤201中的描述,这里不再赘述。For other related descriptions in step 1901, reference may be made to the description in the above-mentioned step 201, and details are not repeated here.
1902、手机检测到用户的拍照操作后,在拍摄界面上显示广角图像,以及叠加在广角图像之上的长焦框。1902. After detecting the user's photographing operation, the mobile phone displays a wide-angle image and a telephoto frame superimposed on the wide-angle image on the photographing interface.
与上述显示引导框的方案不同,在步骤1902中,手机检测到用户的拍照操作后,并不在拍摄界面上显示引导框,手机在拍摄界面上显示广角图像和长焦框。Different from the above solution of displaying the guide frame, in step 1902, after the mobile phone detects the user's photographing operation, it does not display the guide frame on the shooting interface, and the mobile phone displays the wide-angle image and the telephoto frame on the shooting interface.
关于步骤1902中的其他相关说明可以参见上述步骤202中的描述,这里不再赘述。For other related descriptions in step 1902, reference may be made to the descriptions in the foregoing step 202, and details are not repeated here.
1903、手机根据获取的目标长焦图像生成拼接图像,并在拍摄界面上显示拼接图像缩略图。1903. The mobile phone generates a stitched image according to the acquired target telephoto image, and displays a thumbnail of the stitched image on the shooting interface.
在不显示引导框的方案中,用户想要拍摄目标图像时,可以参考预览界面上的广角图像移动手机或长焦摄像头进行构图,以使得长焦摄像头的拍摄范围和长焦框位于用户想要拍摄的区域的起始位置。而后,用户可以触发拍照操作。手机检测到用户的拍照操作后,可以根据长焦摄像头的拍摄范围对应的参考广角图像的图像块,确定长焦摄像头的配置参数,比如该配置参数可以包括AE、AWB或DRC等的配置参数。手机根据AE、AWB或DRC等配置参数通过长焦摄像头采集长焦图像,并获得第一帧目标长焦图像,即目标长焦图像1。关于手机确定AE、AWB和DRC等配置参数的过程,可以参见上述显示引导框的方案中的相关描述,这里不再赘述。In the solution where the guide frame is not displayed, when the user wants to shoot the target image, he can refer to the wide-angle image on the preview interface to move the mobile phone or telephoto camera to compose the picture, so that the shooting range of the telephoto camera and the telephoto frame are located in the position where the user wants to The starting position of the captured area. Then, the user can trigger a photographing operation. After the mobile phone detects the user's photographing operation, it can determine the configuration parameters of the telephoto camera according to the image blocks of the reference wide-angle image corresponding to the shooting range of the telephoto camera. For example, the configuration parameters may include configuration parameters such as AE, AWB, or DRC. The mobile phone collects the telephoto image through the telephoto camera according to the configuration parameters such as AE, AWB or DRC, and obtains the first frame of the target telephoto image, that is, the target telephoto image 1. For the process of the mobile phone determining configuration parameters such as AE, AWB, and DRC, reference may be made to the relevant description in the solution for displaying a guide frame above, which will not be repeated here.
需要说明的是,不同于显示引导框的方案中目标长焦图像要与网格相匹配,在不显示引导框的方案中,由于拍摄界面上未显示引导框,因而目标长焦图像不与引导框的网格相匹配。比如,当手机采集到的某帧长焦图像与目标长焦图像1匹配时,该帧长焦图像可以为目标长焦图像2。其中,目标长焦图像2与目标长焦图像1匹配包括:目标长焦图像2的横坐标范围与目标长焦图像1的横坐标范围之间的偏差小于或者等于预设阈值1,或者目标长焦图像2的纵坐标范围与目标长焦图像1的纵坐标范围之间的偏差小于或者等于预设阈值2。也就是说,目标长焦图像2与目标长焦图像1基本呈左右并列分布或基本呈上下并列分布。It should be noted that, different from the scheme in which the guide frame is displayed, the target telephoto image needs to match the grid. In the scheme without the guide frame, since the guide frame is not displayed on the shooting interface, the target telephoto image does not match the guide frame. box to match the grid. For example, when a certain frame of telephoto image collected by the mobile phone matches the target telephoto image 1 , the frame of telephoto image may be the target telephoto image 2 . The matching of the target telephoto image 2 with the target telephoto image 1 includes: the deviation between the abscissa range of the target telephoto image 2 and the abscissa range of the target telephoto image 1 is less than or equal to the preset threshold 1, or the target length The deviation between the ordinate range of the focus image 2 and the ordinate range of the target telephoto image 1 is less than or equal to the preset threshold 2 . That is to say, the target telephoto image 2 and the target telephoto image 1 are basically distributed side-by-side in left and right, or basically distributed in up and down.
目标长焦图像2与目标长焦图像1匹配还包括:目标长焦图像2与目标长焦图像1之间的重叠区域大于或者等于预设值8,或者目标长焦图像2与目标长焦图像1之间的空隙小于或者等于预设值9等。比如,手机在确定采集的长焦图像与参考广角图像上的匹配内容,与目标长焦图像1在参考广角图像上的匹配内容的相似度大于或者等于预设值8时,确定获得与目标长焦图像1匹配的目标长焦图像2。The matching of the target telephoto image 2 and the target telephoto image 1 also includes: the overlapping area between the target telephoto image 2 and the target telephoto image 1 is greater than or equal to a preset value of 8, or the target telephoto image 2 and the target telephoto image 1. The gap between 1 is less than or equal to the preset value of 9, etc. For example, when the mobile phone determines that the matching content between the collected telephoto image and the reference wide-angle image and the matching content of the target telephoto image 1 on the reference wide-angle image are greater than or equal to the preset value of 8, the mobile phone determines that the matching content between the target telephoto image 1 and the reference wide-angle image is greater than or equal to the preset value of 8. The target telephoto image 2 is matched with the focal image 1.
在不显示引导框的方案中,由于拍摄界面上未显示引导框,因而用户无法根据引导框的指示来移动手机或长焦摄像头。该种情况下,用户可以根据已获得的目标长焦图像1的图像内容相对于全局范围的广角图像的位置,以及自己的需求、习惯或意愿移动手机或直接移动长焦摄像头。在长焦摄像头的移动过程中,手机可以根据长焦摄像头的拍摄范围对应的参考广角图像的图像块,实时调整长焦摄像头的配置参数,从而根据该配置参数采集目标长焦图像,从而根据广角图像引导目标长焦图像进行AE、 AWB和DRC等配置。In the solution where the guide frame is not displayed, since the guide frame is not displayed on the shooting interface, the user cannot move the mobile phone or the telephoto camera according to the instructions of the guide frame. In this case, the user can move the mobile phone or directly move the telephoto camera according to the position of the obtained image content of the target telephoto image 1 relative to the global wide-angle image, as well as his own needs, habits or wishes. During the movement of the telephoto camera, the mobile phone can adjust the configuration parameters of the telephoto camera in real time according to the image blocks of the reference wide-angle image corresponding to the shooting range of the telephoto camera, so as to collect the target telephoto image according to the configuration parameters. Image-guided target telephoto images for configurations such as AE, AWB, and DRC.
在一些实施例中,手机可以在拍照过程中,在每次获得新的目标长焦图像后即与之前获得的拼接图像进行拼接,从而生成新的拼接图像。例如,手机可以将目标长焦图像1和目标长焦图像2进行拼接获得拼接图像。后续,在某帧长焦图像与已获得的目标长焦图像匹配后,手机获得新的目标长焦图像,可以将新的目标长焦图像与之前已获得的拼接图像进行拼接获得新的拼接图像。在另一些实施例中,手机在拍摄结束后,再根据目标长焦图像生成拼接图像。本申请实施例对拼接图像的拼接时机不予限定。其中,图像拼接过程可以参考上述显示引导框的方案中的描述,这里不再赘述。In some embodiments, during the photographing process, the mobile phone may perform splicing with the previously obtained spliced image every time a new target telephoto image is obtained, thereby generating a new spliced image. For example, the mobile phone can stitch the target telephoto image 1 and the target telephoto image 2 to obtain a stitched image. Subsequently, after a certain frame of telephoto image matches the obtained target telephoto image, the mobile phone obtains a new target telephoto image, and the new target telephoto image can be stitched with the previously obtained stitched image to obtain a new stitched image. . In other embodiments, the mobile phone generates a stitched image according to the target telephoto image after the shooting is completed. This embodiment of the present application does not limit the stitching timing of the stitched images. For the image splicing process, reference may be made to the description in the solution for displaying the guide frame above, which will not be repeated here.
在本申请的一些实施例中,与显示引导框的方案类似,手机在获得目标长焦图像1后,可以在拍摄界面上显示目标长焦图像1的缩略图。示例性的,显示有目标长焦图像1的缩略图的拍摄界面可以参见图20中的(b)。在拍照过程中,手机可以在拍摄界面上显示拼接图像缩略图,以向用户提示当前实时的拍摄进度。示例性的,显示有拼接图像缩略图的拍摄界面可以参见图20中的(c)-(d)。在其他一些实施例中,在拍照过程中,手机在拍摄界面上显示拼接框。在另一些实施例中,为避免拼接图像缩略图的尺寸较小,不便于用户查看图像细节,手机可以在拍摄界面上自动放大显示目标长焦图像1的缩略图和拼接图像缩略图。示例性的,放大显示目标长焦图像1的缩略图的拍摄界面可以参见图21中的(a),放大显示拼接图像缩略图的拍摄界面可以参见图21中的(b)-(c)。在其他一些实施例中,手机在拍摄界面上显示广角图像上与引导框对应的目标区域图像,而不显示完整的广角图像。该目标区域图像的尺寸与引导框的尺寸的比例为r,且r≥1。该目标区域图像可以通过对完整的广角图像进行裁剪和放大获得。In some embodiments of the present application, similar to the solution for displaying the guide frame, after obtaining the target telephoto image 1, the mobile phone can display the thumbnail of the target telephoto image 1 on the shooting interface. Exemplarily, for a photographing interface displaying a thumbnail image of the target telephoto image 1, reference may be made to (b) in FIG. 20 . During the photographing process, the mobile phone can display the stitched image thumbnails on the photographing interface to prompt the user of the current real-time photographing progress. Exemplarily, reference may be made to (c)-(d) of FIG. 20 for the photographing interface displaying the thumbnails of the stitched images. In some other embodiments, during the photographing process, the mobile phone displays a splicing frame on the photographing interface. In other embodiments, in order to avoid the small size of the spliced image thumbnails, which is inconvenient for the user to view the image details, the mobile phone can automatically enlarge and display the thumbnail of the target telephoto image 1 and the spliced image thumbnail on the shooting interface. Exemplarily, the photographing interface for zooming in and displaying the thumbnail of the target telephoto image 1 may refer to (a) in FIG. 21 , and the photographing interface for zooming and displaying the thumbnail of the spliced image may refer to (b)-(c) in FIG. 21 . In some other embodiments, the mobile phone displays the target area image corresponding to the guide frame on the wide-angle image on the shooting interface, instead of displaying the complete wide-angle image. The ratio of the size of the target area image to the size of the guide frame is r, and r≥1. The target area image can be obtained by cropping and zooming in on the full wide-angle image.
1904、手机确定拍摄结束后,根据拼接图像生成目标图像。1904. After the mobile phone determines that the shooting is over, a target image is generated according to the stitched image.
与上述步骤204类似,在步骤1904中,手机在拍摄结束之后,根据拼接图像生成目标图像之前,还可以对拼接图像进行去鬼影、动态范围增强或空洞填充等处理,以提高拼接图像的质量,从而根据处理后的拼接图像生成目标图像,提高目标图像的质量,这里不予赘述。Similar to the above step 204, in step 1904, after the shooting is completed, the mobile phone can also perform processing such as ghost removal, dynamic range enhancement or hole filling on the stitched image before generating the target image according to the stitched image, so as to improve the quality of the stitched image. , so as to generate a target image according to the processed spliced image and improve the quality of the target image, which will not be repeated here.
在不显示引导框的方案中,手机检测到用户的停止拍照操作后结束拍摄。或者,手机可以预设一个最大拍摄帧数,手机获取到预设帧数的目标长焦图像后自动结束拍摄。手机在结束拍摄后根据目标长焦图像的拼接图像生成目标图像。In the solution in which the guide frame is not displayed, the mobile phone ends the photographing after detecting the user's operation of stopping the photographing. Alternatively, the mobile phone can preset a maximum number of shooting frames, and the mobile phone automatically ends the shooting after acquiring the target telephoto image with the preset number of frames. After the mobile phone finishes shooting, the target image is generated according to the stitched image of the target telephoto image.
在一些实施例中,若拼接图像的边缘未对齐,则手机可以对拼接图像的边缘进行最小限度地裁剪,以得到矩形或方形等规则形状的拼接图像,从而根据该拼接图像生成目标图像。示例性的,手机根据目标长焦摄像头得到的拼接图像缩略图的示意图可以参见图22中的(a),手机进行裁剪后得到的新的拼接图像缩略图的示意图可以参见图22中的(b)。In some embodiments, if the edges of the stitched image are not aligned, the mobile phone can minimize the edges of the stitched image to obtain a stitched image with a regular shape such as a rectangle or a square, so as to generate a target image according to the stitched image. Exemplarily, the schematic diagram of the stitched image thumbnails obtained by the mobile phone according to the target telephoto camera can refer to (a) in Figure 22, and the schematic diagram of the new stitched image thumbnails obtained by the mobile phone after cropping can refer to Figure 22 (b). ).
在另一些实施例中,若拼接图像的边缘未对齐,则对于空缺部分,手机可以根据参考广角图像上对应位置的内容进行空洞填充,以得到矩形或方形等规则形状的拼接图像,从而根据该拼接图像生成目标图像。示例性的,手机根据目标长焦摄像头得到的拼接图像缩略图的示意图可以参见图23A中的(a),手机根据参考广角图像进行空洞填充后得到的新的拼接图像缩略图的示意图可以参见图23A中的(b)。In other embodiments, if the edges of the stitched images are not aligned, for the vacant part, the mobile phone can fill the vacant part according to the content of the corresponding position on the reference wide-angle image, so as to obtain a stitched image of a regular shape such as a rectangle or a square, so as to obtain a stitched image with a regular shape such as a rectangle or a square. Stitch the images to generate the target image. Exemplarily, the schematic diagram of the stitched image thumbnails obtained by the mobile phone according to the target telephoto camera can refer to (a) in FIG. (b) in 23A.
在另一些实施例中,无论拼接图像的边缘是否对齐,手机均根据拼接图像生成目标图像,目标图像的尺寸与拼接图像的尺寸相一致。In other embodiments, regardless of whether the edges of the stitched image are aligned, the mobile phone generates a target image according to the stitched image, and the size of the target image is consistent with the size of the stitched image.
在其他一些实施例中,在不显示引导框的方案中,手机获得的目标图像的尺寸可能并不是用户想要的尺寸。因而,在一种可能的技术方案中,用户还可以对图库中已生成的目标图像进行编辑,以获得理想尺寸的目标图像。In some other embodiments, in the solution where the guide frame is not displayed, the size of the target image obtained by the mobile phone may not be the size desired by the user. Therefore, in a possible technical solution, the user can also edit the generated target image in the gallery to obtain the target image of the desired size.
在另一种可能的技术方案中,用户还可以对拼接图像进行编辑,以获得理想尺寸的拼接图像,从而生成理想尺寸的目标图像。示例性的,参见图23B中的(a),手机在拍摄结束后可以在拍摄界面上提示用户,请在拼接图像上设置目标图像的范围。手机检测到用户设置虚线框2300的操作并点击确定控件后,根据虚线框2300对拼接图像进行裁剪,从而生成如图23B中的(b)所示的用户指示范围内的目标图像。In another possible technical solution, the user can also edit the stitched image to obtain a stitched image of an ideal size, thereby generating a target image of an ideal size. Exemplarily, see (a) in FIG. 23B , the mobile phone may prompt the user on the shooting interface after the shooting is completed, please set the range of the target image on the stitched image. After the mobile phone detects the user's operation of setting the dotted frame 2300 and clicks the OK control, the stitched image is cropped according to the dotted frame 2300, thereby generating the target image within the range indicated by the user as shown in (b) in FIG. 23B .
在不显示引导框的方案中,由于在单位视场角内长焦图像的分辨率大于广角图像的分辨率,因而手机根据多帧目标长焦图像的拼接图像生成的目标图像,比广角图像的清晰度更高,细节更清楚,拍摄效果更好。并且,手机通过多帧目标长焦图像进行拼接可以获得视场角较大的高清晰目标图像。In the scheme of not displaying the guide frame, since the resolution of the telephoto image is larger than that of the wide-angle image within the unit field of view, the target image generated by the mobile phone based on the spliced image of the multi-frame target telephoto images is smaller than that of the wide-angle image. The sharpness is higher, the details are clearer, and the shooting effect is better. In addition, the mobile phone can obtain a high-definition target image with a large field of view by stitching multiple frames of target telephoto images.
并且,在不显示引导框的方案中,用户可以根据自身需求移动手机或长焦摄像头来采集长焦图像,从而获得用户想要位置的目标长焦图像,进而根据用户想要位置的目标长焦图像获得用户想要的任意尺寸或形状的拼接图像。手机根据该任意规格的拼接图像能够获得相应尺寸或形状的目标图像,可以方便用户拍摄获得各种尺寸的宽画幅、方画幅或全景画幅的目标图像。In addition, in the solution where the guide frame is not displayed, the user can move the mobile phone or telephoto camera to collect telephoto images according to their own needs, so as to obtain the target telephoto image of the user's desired position, and then according to the user's desired position. Image Get a stitched image of any size or shape the user wants. The mobile phone can obtain the target image of the corresponding size or shape according to the stitched image of any specification, which can facilitate the user to shoot and obtain the target image of various sizes in wide format, square format or panoramic format.
混合变焦方案:Hybrid zoom scheme:
本申请其他一些实施例还提供了一种拍摄方法,可以通过视场角较小的长焦图像进行拼接,获得视场角较大、较为清晰的拼接图像,而后再对拼接图像进行裁剪得到不同目标变焦倍率对应的清晰的目标图像。在该方案中,手机不需要通过数字变焦进行图像放大,因而可以保留长焦摄像头的高分辨率和长焦图像的高清晰度,实现光学变焦的变焦效果。该方案结合了长焦图像的拼接和裁剪处理,也可以称为混合变焦方案。Some other embodiments of the present application also provide a shooting method, which can obtain a stitched image with a larger and clearer field of view by stitching a telephoto image with a smaller field of view, and then crop the stitched image to obtain different A clear target image corresponding to the target zoom magnification. In this solution, the mobile phone does not need to use digital zoom to enlarge the image, so the high resolution of the telephoto camera and the high definition of the telephoto image can be retained, and the zoom effect of optical zoom can be realized. This scheme combines stitching and cropping of telephoto images, and can also be called a hybrid zoom scheme.
以下主要对与上述显示引导框的方案的不同之处进行具体阐述,而对于相同之处则不再细述。如图24所示,该混合变焦方案可以包括:The differences from the above solution of displaying a guide frame are mainly described in detail below, and the similarities are not described in detail. As shown in Figure 24, the hybrid zoom scheme may include:
2400、手机启动拍照功能。2400. The mobile phone starts the camera function.
在一些实施例中,手机在启动拍照功能后,即可以通过本申请实施例提供的混合变焦方法进行处理。In some embodiments, after the mobile phone starts the photographing function, the hybrid zoom method provided by the embodiments of the present application can be used for processing.
在另一些实施例中,手机启动拍照功能并进入目标拍照模式后,可以通过本申请实施例提供的混合变焦方法进行处理。In other embodiments, after the mobile phone starts the photographing function and enters the target photographing mode, it can be processed by the hybrid zoom method provided by the embodiments of the present application.
以下实施例中以目标拍照模式为混合变焦模式为例进行说明。In the following embodiments, the target photographing mode is taken as an example of the hybrid zoom mode for description.
关于步骤2400的其他相关说明可以参见上述步骤200中的描述,这里不再赘述。For other related descriptions of step 2400, reference may be made to the description in the foregoing step 200, and details are not repeated here.
2401、手机在预览界面上显示广角图像。2401. The mobile phone displays a wide-angle image on the preview interface.
与上述显示引导框的方案不同,在混合变焦模式的步骤2401中,手机可以先不在预览界面上显示引导框,而在后续获取目标变焦倍率后,再在预览界面上显示目标变焦倍率对应的引导框。Different from the above solution of displaying the guide frame, in step 2401 of the hybrid zoom mode, the mobile phone may not display the guide frame on the preview interface first, and then display the guide corresponding to the target zoom magnification on the preview interface after obtaining the target zoom magnification subsequently. frame.
在一些实施例中,手机在预览界面上不显示长焦框。在另一些实施例中,手机在预览界面上持续显示长焦框。在另一些实施例中,手机先不在预览界面上显示长焦框,而在后续获取目标变焦倍率后,再在预览界面上显示长焦框。In some embodiments, the phone does not display a telephoto frame on the preview interface. In other embodiments, the mobile phone continuously displays the telephoto frame on the preview interface. In some other embodiments, the mobile phone does not display the telephoto frame on the preview interface first, and displays the telephoto frame on the preview interface after obtaining the target zoom magnification subsequently.
2402、手机获取目标变焦倍率。2402. The mobile phone obtains the target zoom ratio.
其中,该目标变焦倍率大于广角摄像头(即第一摄像头)的变焦倍率,且小于长焦摄像头(即第二摄像头)的变焦倍率。该目标变焦倍率为基于目标长焦图像的拼接图像可获得的目标图像的变焦倍率,是用户想要拍摄获得的最终图像的变焦倍率,而并不是作为背景图像的广角图像的变焦倍率。在用户设置目标变焦倍率前、后,作为背景图像的广角图像的变焦倍率并不发生变化。Wherein, the target zoom ratio is greater than the zoom ratio of the wide-angle camera (ie, the first camera), and is smaller than the zoom ratio of the telephoto camera (ie, the second camera). The target zoom ratio is the zoom ratio of the target image obtained based on the stitched image of the target telephoto image, the zoom ratio of the final image the user wants to capture, not the zoom ratio of the wide-angle image as the background image. Before and after the user sets the target zoom magnification, the zoom magnification of the wide-angle image as the background image does not change.
在一些实施例中,目标变焦倍率为用户设置的变焦倍率。在一种可能的实现方式中,手机可以通过显示信息或语音播放等方式,提示用户设置目标变焦倍率。示例性的,参见图25中的(a)-(c),手机在预览界面上提示用户:在该模式下,您可以设置变焦倍率,以拍摄获得该变焦倍率对应的高清晰图像。In some embodiments, the target zoom magnification is the zoom magnification set by the user. In a possible implementation manner, the mobile phone may prompt the user to set the target zoom magnification by displaying information or playing a voice. Exemplarily, see (a)-(c) in Figure 25, the mobile phone prompts the user on the preview interface: In this mode, you can set the zoom ratio to capture a high-definition image corresponding to the zoom ratio.
在本申请的实施例中,用户设置目标变焦倍率的方式可以有多种。示例性的,参见图25中的(a),手机的预览界面上包括多个可选的变焦倍率控件,例如1.5X控件、2X控件、2.5X控件、3X控件、3.5X控件、4X控件和4.5X控件等,手机根据用户选择的变焦倍率控件,确定相应的目标变焦倍率。In the embodiments of the present application, there may be various manners for the user to set the target zoom magnification. Exemplarily, see (a) in FIG. 25 , the preview interface of the mobile phone includes multiple optional zoom magnification controls, such as 1.5X controls, 2X controls, 2.5X controls, 3X controls, 3.5X controls, 4X controls and 4.5X controls, etc., the mobile phone determines the corresponding target zoom magnification according to the zoom magnification control selected by the user.
再示例性的,手机检测到用户点击预览界面上的变焦倍率设置控件的操作后,可以显示设置界面,用户基于设置页面可设置目标变焦倍率。For another example, after the mobile phone detects that the user clicks on the zoom magnification setting control on the preview interface, a setting interface can be displayed, and the user can set the target zoom magnification based on the setting page.
再示例性的,如图25中的(b)所示,手机检测到用户在预览界面上的缩/放操作后,获取缩/放操作后对应的目标变焦倍率。For another example, as shown in (b) of FIG. 25 , after detecting the zooming/zooming operation of the user on the preview interface, the mobile phone obtains the corresponding target zoom ratio after the zooming/zooming operation.
再示例性的,如图25中的(c)所示,手机检测到用户在变焦倍率调节杆上的拖动操作后,获取拖动操作后的对应的目标变焦倍率。For another example, as shown in (c) of FIG. 25 , after detecting the user's drag operation on the zoom magnification adjustment lever, the mobile phone obtains the corresponding target zoom magnification after the drag operation.
再示例性的,手机检测到用户设置变焦倍率的语音指令后,获取用户语音设置的目标变焦倍率。For another example, after the mobile phone detects the user's voice instruction to set the zoom ratio, the mobile phone obtains the target zoom ratio set by the user's voice.
需要说明的是,在目标变焦倍率大于广角摄像头的变焦倍率,且小于长焦摄像头的变焦倍率的情况下,手机可以采用本申请实施例提供的混合变焦方法进行处理。若目标变焦倍率小于或者等于广角摄像头的变焦倍率,则手机可以不采用该混合变焦方案,而直接根据广角摄像头或超广角摄像头采集的图像,来生成目标变焦倍率对应的目标图像。若目标变焦倍率大于或者等于长角摄像头的变焦倍率,则手机也可以不采用该混合变焦方案,而直接根据长焦摄像头或超长焦摄像头采集的图像,来生成目标变焦倍率对应的目标图像。It should be noted that, when the target zoom ratio is larger than that of the wide-angle camera and smaller than that of the telephoto camera, the mobile phone can use the hybrid zoom method provided by the embodiment of the present application for processing. If the target zoom ratio is less than or equal to the zoom ratio of the wide-angle camera, the mobile phone may not use the hybrid zoom scheme, but directly generate the target image corresponding to the target zoom ratio according to the image captured by the wide-angle camera or the ultra-wide-angle camera. If the target zoom ratio is greater than or equal to the zoom ratio of the long-angle camera, the mobile phone may not use the hybrid zoom scheme, but directly generate the target image corresponding to the target zoom ratio according to the image captured by the telephoto camera or the ultra-telephoto camera.
在其他一些实施例中,目标变焦倍率也可以为默认的变焦倍率(例如默认为广角摄像头的变焦倍率)或者上次使用的变焦倍率。手机还可以根据用户的操作修改目标变焦倍率。In some other embodiments, the target zoom ratio may also be the default zoom ratio (for example, the default zoom ratio of the wide-angle camera) or the last used zoom ratio. The mobile phone can also modify the target zoom ratio according to the user's operation.
在本申请的一些实施例中,手机在预览界面的广角图像上,叠加显示目标变焦倍率对应的引导框。与上述显示引导框的方案中手机显示的引导框不同,混合变焦方案中的引导框与目标变焦倍率相对应,是包括目标变焦倍率的视场角对应的图像区域尺寸的最小规格的引导框。In some embodiments of the present application, the mobile phone superimposes and displays a guide frame corresponding to the target zoom magnification on the wide-angle image of the preview interface. Different from the guide frame displayed by the mobile phone in the above scheme of displaying the guide frame, the guide frame in the hybrid zoom scheme corresponds to the target zoom magnification, and is a guide frame of the minimum specification including the image area size corresponding to the field angle of the target zoom magnification.
在本申请的实施例中,目标变焦倍率的视场角对应的图像区域,默认位于广角图像的中间位置。举例来说,广角摄像头的变焦倍率为1X,长焦摄像头的变焦倍率为5X,引导框最多可以包括5*5个网格。若目标变焦倍率为2.5X,则目标变焦倍率的视场角对应图像区域2601;目标变焦倍率2.5X对应的引导框,可以参见图26A中的(a)所示的虚线引导框2602,该引导框2602包括3*3个网格,网格的尺寸与长焦摄像头的视场角对应;目标变焦倍率的视场角对应的图像区域尺寸为网格尺寸的2.5倍。示例性的,当目标变焦倍率为2.5X时,预览界面的示意图可以参见图26A中的(c),包括目标变焦倍率对应的引导框2604。若目标变焦倍率为3X,则目标变焦倍率3X对应的图像区域与引导框的尺寸大小一致,目标变焦倍率3X对应的引导框可以参见图26A中的(b)所示的虚线引导框2603,该引导框2603包括3*3个网格,目标变焦倍率的视场角对应的图像尺寸为网格尺寸的3倍。In the embodiment of the present application, the image area corresponding to the field of view of the target zoom magnification is located in the middle of the wide-angle image by default. For example, the zoom ratio of the wide-angle camera is 1X, the zoom ratio of the telephoto camera is 5X, and the guide frame can include up to 5*5 grids. If the target zoom magnification is 2.5X, the field of view of the target zoom magnification corresponds to the image area 2601; for the guide frame corresponding to the target zoom magnification 2.5X, please refer to the dashed guide frame 2602 shown in (a) in FIG. 26A . Block 2602 includes 3*3 grids, and the size of the grid corresponds to the field angle of the telephoto camera; the size of the image area corresponding to the field angle of the target zoom magnification is 2.5 times the grid size. Exemplarily, when the target zoom magnification is 2.5X, for a schematic diagram of the preview interface, see (c) in FIG. 26A , including a guide frame 2604 corresponding to the target zoom magnification. If the target zoom magnification is 3X, the image area corresponding to the target zoom magnification 3X is the same size as the guide frame. For the guide frame corresponding to the target zoom magnification 3X, please refer to the dotted guide frame 2603 shown in (b) in FIG. 26A . The guide frame 2603 includes 3*3 grids, and the image size corresponding to the field angle of the target zoom magnification is 3 times the grid size.
在一些实施例中,在预览状态下,手机可以通过显示信息、语音播报等方式提示用户,在拍照过程中请按引导框进行拍摄,以便对生成的拼接图像进行裁剪,获得符合目标变焦倍率的目标图像。示例性的,参见图26A中的(d),手机在预览界面上可以通过显示信息提示用户:请在拍照过程中按虚线引导框拍摄获得拼接图像,该拼接图像用于裁剪获得您指示的变焦倍率对应的图像!In some embodiments, in the preview state, the mobile phone can prompt the user by displaying information, voice broadcast, etc., during the photographing process, please press the guide frame to shoot, so as to crop the generated stitched image and obtain a zoom ratio that meets the target zoom ratio. target image. Exemplarily, see (d) in FIG. 26A , the mobile phone can prompt the user by displaying information on the preview interface: Please press the dotted guide frame to capture a stitched image during the photographing process, and the stitched image is used for cropping to obtain the zoom you instructed. The image corresponding to the magnification!
在一些实施例中,手机还可以持续在预览界面的广角图像上,叠加显示目标变焦倍率对应的目标框。该目标框的位置和尺寸,与目标变焦倍率的视场角对应的图像区域的位置和尺寸一致。手机获取目标变焦倍率后,可以在预览界面上显示目标变焦倍率对应的目标框,以向用户提示当前目标变焦倍率的视场角对应的图像区域尺寸的位置和大小,方便用户获知根据当前目标变焦倍率可获得的目标图像的大小。引导框为包括目标框的最小规格的引导框。引导框的尺寸大于或者等于目标框的尺寸,即大于或者等于目标变焦倍率的视场角对应的图像尺寸。In some embodiments, the mobile phone can also continuously display the target frame corresponding to the target zoom ratio on the wide-angle image of the preview interface. The position and size of the target frame are consistent with the position and size of the image area corresponding to the field angle of the target zoom magnification. After obtaining the target zoom magnification, the mobile phone can display the target frame corresponding to the target zoom magnification on the preview interface, so as to prompt the user with the position and size of the image area size corresponding to the field of view of the current target zoom magnification, so that the user can know the zoom according to the current target zoom ratio. The size of the target image that can be obtained by the magnification. The guide frame is the smallest size guide frame including the target frame. The size of the guide frame is greater than or equal to the size of the target frame, that is, greater than or equal to the image size corresponding to the field angle of the target zoom magnification.
在本申请的一些实施例中,目标框默认位于广角图像的中间位置。举例来说,广角摄像头的变焦倍率为1X,长焦摄像头的变焦倍率为5X,引导框最多可以包括5*5个网格。若目标变焦倍率为2.5X,则目标变焦倍率2.5X对应的目标框可以参见图26A中的(b)所示的实线矩形框2601。若目标变焦倍率为3X,则目标变焦倍率3X对应的目标框的尺寸与引导框的边框尺寸大小一致。示例性的,当目标变焦倍率为2.5X时,预览界面的示意图可以参见图26B,包括目标变焦倍率对应的引导框2604和目标变焦倍率对应的目标框2605。In some embodiments of the present application, the target frame is located in the middle of the wide-angle image by default. For example, the zoom ratio of the wide-angle camera is 1X, the zoom ratio of the telephoto camera is 5X, and the guide frame can include up to 5*5 grids. If the target zoom magnification is 2.5X, the target frame corresponding to the target zoom magnification of 2.5X may refer to the solid-line rectangular frame 2601 shown in (b) of FIG. 26A . If the target zoom magnification is 3X, the size of the target frame corresponding to the target zoom magnification 3X is consistent with the size of the frame of the guide frame. Exemplarily, when the target zoom magnification is 2.5X, see FIG. 26B for a schematic diagram of the preview interface, including a guide frame 2604 corresponding to the target zoom ratio and a target frame 2605 corresponding to the target zoom ratio.
在本申请的实施例中,预览界面上的目标框默认位于广角图像的中间位置。在一些技术方案中,用户还可以移动目标框的位置,引导框的位置也随着目标框位置的变化而相应变化。示例性的,在图27中的(a)所示的预览界面上,若手机检测到用户向右拖动目标框的操作,则如图27中的(b)所示,目标框和引导框均向右移动。或者,用户可以移动引导框的位置,目标框的位置也相应变化。In the embodiment of the present application, the target frame on the preview interface is located in the middle of the wide-angle image by default. In some technical solutions, the user can also move the position of the target frame, and the position of the guide frame also changes correspondingly with the change of the position of the target frame. Exemplarily, on the preview interface shown in (a) in FIG. 27 , if the mobile phone detects that the user drags the target frame to the right, as shown in (b) in FIG. 27 , the target frame and the guide frame are move to the right. Alternatively, the user can move the position of the guide frame, and the position of the target frame changes accordingly.
在其他一些实施例中,手机在获取目标变焦倍率后,在预览界面上短暂显示一下目标框,以向用户提示当前目标变焦倍率的视场角对应的图像尺寸的大小,便于用户确定当前的目标变焦倍率是否合适,而后便停止显示该目标框。在一些技术方案中,手机可以记录该目标框的位置和尺寸。手机确定拍摄结束后,可以根据记录的目标框 的位置和尺寸对拼接图像进行裁剪,从而获得目标图像。In some other embodiments, after acquiring the target zoom ratio, the mobile phone briefly displays the target frame on the preview interface to prompt the user the size of the image corresponding to the field of view of the current target zoom ratio, so as to facilitate the user to determine the current target Check whether the zoom ratio is appropriate, and then stop displaying the target frame. In some technical solutions, the mobile phone can record the position and size of the target frame. After the mobile phone determines that the shooting is over, the stitched image can be cropped according to the recorded position and size of the target frame to obtain the target image.
2403、手机检测到用户的拍照操作后,在拍摄界面上显示广角图像,以及叠加在广角图像之上的引导框,该引导框与目标变焦倍率对应。2403. After detecting the user's photographing operation, the mobile phone displays a wide-angle image on the photographing interface, and a guide frame superimposed on the wide-angle image, where the guide frame corresponds to the target zoom magnification.
在拍摄界面上,手机可以显示广角图像,以及叠加在广角图像之上的引导框。On the shooting interface, the phone can display a wide-angle image and a guide frame superimposed on the wide-angle image.
在一些实施例中,手机还可以在拍摄界面上显示长焦框。In some embodiments, the mobile phone can also display a telephoto frame on the shooting interface.
可选地,手机还可以在拍摄界面上显示目标框。Optionally, the mobile phone can also display a target frame on the shooting interface.
在一些实施例中,在拍照过程中,手机可以通过显示信息、语音播报等方式短暂地或持续地提示用户,在拍照过程中请按引导框进行拍摄,以便对拍摄获得的拼接图像进行裁剪,得到符合目标变焦倍率的目标图像。In some embodiments, during the photographing process, the mobile phone can temporarily or continuously prompt the user by displaying information, voice broadcast, etc., during the photographing process, please press the guide frame to photograph, so as to crop the stitched image obtained by photographing, Get the target image that matches the target zoom ratio.
在一些实施例中,如上所述,在混合变焦方案中,手机在预览界面和拍摄界面上显示采集到的完整的广角图像。在其他一些实施例中,与上述显示引导框的方案类似,手机可以将预览界面和拍摄界面上显示的完整的广角图像,替换为广角图像上与引导框对应的目标区域图像。In some embodiments, as described above, in the hybrid zoom scheme, the mobile phone displays the captured complete wide-angle image on the preview interface and the shooting interface. In some other embodiments, similar to the above solution of displaying the guide frame, the mobile phone can replace the complete wide-angle image displayed on the preview interface and the shooting interface with the target area image corresponding to the guide frame on the wide-angle image.
2404、手机根据获取的目标长焦图像生成拼接图像,并在拍摄界面上显示拼接图像缩略图。2404. The mobile phone generates a stitched image according to the acquired target telephoto image, and displays a thumbnail of the stitched image on the shooting interface.
关于步骤2404的相关说明可以参见步骤203中的描述,这里不予赘述。示例性的,参见图28中的(a),拍摄界面上显示有目标长焦图像1的缩略图,以及广角图像、引导框和长焦框。参见图28中的(b)-(c),拍摄界面上显示有拼接图像缩略图,以及广角图像、引导框和长焦框。For the relevant description of step 2404, reference may be made to the description in step 203, which will not be repeated here. Exemplarily, see (a) in FIG. 28 , a thumbnail image of the target telephoto image 1 , as well as a wide-angle image, a guide frame, and a telephoto frame are displayed on the shooting interface. Referring to (b)-(c) in FIG. 28 , the stitched image thumbnails, as well as a wide-angle image, a guide frame, and a telephoto frame are displayed on the shooting interface.
2405、手机确定拍摄结束后,对拼接图像进行裁剪从而生成目标图像。2405. After the mobile phone determines that the shooting is over, the stitched image is cropped to generate a target image.
与上述步骤204类似,在步骤2405中,手机在拍摄结束之后,根据拼接图像生成目标图像之前,还可以对拼接图像进行去鬼影、动态范围增强或空洞填充等处理,以提高拼接图像的质量,从而根据处理后的拼接图像生成目标图像,提高目标图像的质量,这里不予赘述。Similar to the above step 204, in step 2405, after the shooting is completed, the mobile phone can also perform processing such as ghost removal, dynamic range enhancement or hole filling on the stitched image before generating the target image according to the stitched image, so as to improve the quality of the stitched image. , so as to generate a target image according to the processed spliced image and improve the quality of the target image, which will not be repeated here.
其中,手机确定拍摄结束的情况有多种。例如,在第一种情况下,在引导框中的网格都拍摄完成后,手机自动结束拍摄,将拼接图像裁剪为目标框的大小从而生成目标图像。其中,在引导框的尺寸与目标框的尺寸相同的情况下,手机不需要对拼接图像进行裁剪,而可以直接根据拼接图像生成目标图像。示例性的,在图28中的(c)所示的情况下,手机生成的目标图像可以参见图28中的(d)。Among them, there are various situations in which the mobile phone determines that the shooting ends. For example, in the first case, after the grids in the guide frame are all photographed, the mobile phone automatically ends the photographing, and the stitched image is cropped to the size of the target frame to generate the target image. Wherein, when the size of the guide frame is the same as the size of the target frame, the mobile phone does not need to crop the stitched image, but can directly generate the target image according to the stitched image. Exemplarily, in the case shown in (c) of FIG. 28 , the target image generated by the mobile phone may refer to (d) of FIG. 28 .
在第二种情况下,在引导框中的网格未完成拍摄前,手机检测到用户的停止拍照操作后确定拍摄结束。该种情况下,手机对参考广角图像或广角图像进行裁剪和放大,从而通过数字变焦生成目标变焦倍率的图像。若拍摄界面未显示目标框,则手机确定拍摄结束后,可以根据目标变焦倍率确定目标框的位置和尺寸,从而根据目标框对参考广角图像或广角图像进行裁剪获得目标图像。In the second case, before the grid in the guide frame has not been photographed, the mobile phone determines that the photographing is ended after detecting the user's operation of stopping photographing. In this case, the mobile phone crops and enlarges the reference wide-angle image or the wide-angle image, thereby generating an image of the target zoom magnification through digital zooming. If the target frame is not displayed on the shooting interface, after the mobile phone determines that the shooting is over, the position and size of the target frame can be determined according to the target zoom magnification, so that the target image can be obtained by cropping the reference wide-angle image or wide-angle image according to the target frame.
其中,在拍摄界面未显示目标框的情况下,手机在确定拍摄结束后可以确定目标变焦倍率的视场角对应的图像区域的位置和尺寸,从而根据该图像区域的位置和尺寸,对拼接图像进行裁剪获得目标图像。或者,在拍摄界面未显示目标框的情况下,手机在确定拍摄结束后可以根据目标变焦倍率确定目标框的位置和尺寸,从而根据目标框的位置和尺寸对拼接图像进行裁剪获得目标图像。或者,在拍摄界面未显示目标框的 情况下,手机在获取目标变焦倍率后,可以根据目标变焦倍率确定目标框的位置和尺寸,并记录目标框的位置和尺寸,从而在拍摄结束后,根据目标框的位置和尺寸对拼接图像进行裁剪获得目标图像。其中,目标变焦倍率的视场角对应的图像区域的位置和尺寸,即为目标框的位置和尺寸。In the case where the target frame is not displayed on the shooting interface, the mobile phone can determine the position and size of the image area corresponding to the field of view of the target zoom magnification after the shooting is completed, so as to determine the position and size of the stitched image according to the position and size of the image area. Crop to get the target image. Alternatively, when the target frame is not displayed on the shooting interface, the mobile phone can determine the position and size of the target frame according to the target zoom ratio after the shooting is completed, so as to obtain the target image by cropping the stitched image according to the position and size of the target frame. Alternatively, if the target frame is not displayed on the shooting interface, after obtaining the target zoom ratio, the mobile phone can determine the position and size of the target frame according to the target zoom ratio, and record the position and size of the target frame, so that after the shooting, according to the The position and size of the target frame are used to crop the stitched image to obtain the target image. The position and size of the image area corresponding to the field of view of the target zoom magnification are the position and size of the target frame.
与通过广角图像和数字变焦实现目标变焦倍率对应的目标图像相比,上述第一种情况对应的方案通过对分辨率较高、较为清晰的小视场角的长焦图像进行拼接和裁剪,来获得目标变焦倍率对应的大视场角的目标图像,目标图像的分辨率和清晰度也更高,图像质量更好,能够实现光学变焦的变焦效果。Compared with the target image corresponding to the target zoom magnification achieved through the wide-angle image and digital zoom, the solution corresponding to the above-mentioned first case is obtained by stitching and cropping a telephoto image with a higher resolution and a clearer small field of view. For a target image with a large field of view corresponding to the target zoom magnification, the resolution and clarity of the target image are also higher, the image quality is better, and the zoom effect of optical zoom can be realized.
目前还存在另一种变焦方案,即使用不同FOV大小的两个摄像头采集的图像融合后进行裁剪来实现变焦。其中,小FOV的图像位于中间区域,可以改善目标图像画面中间的清晰度,但画面边缘的清晰度较差。而本申请实施例上述第一种情况对应的方案,可以使得整个目标图像的清晰度均较高,达到光学变焦的变焦效果。At present, there is another zoom scheme, that is, the images captured by two cameras with different FOV sizes are fused and then cropped to realize zooming. Among them, the image with small FOV is located in the middle area, which can improve the definition in the middle of the target image, but the definition at the edge of the picture is poor. However, the solution corresponding to the above-mentioned first case in the embodiment of the present application can make the definition of the entire target image higher, and achieve the zoom effect of optical zoom.
此外,在以上各实施例描述的拍摄方法中,长焦框内不显示实时采集到的长焦图像,仅用于指示长焦摄像头对应的实时的拍摄范围。在其他一些实施例中,长焦框内显示长焦摄像头实时采集到的长焦图像经过下采样处理后的图像,以为用户呈现长焦摄像头实时采集到的长焦图像。并且,长焦图像的位置与广角图像上相同内容所在的位置相对。在另一些实施例中,长焦框内显示长焦摄像头实时采集到的长焦图像。在另一些实施例中,长焦框位于界面上的预设位置,例如位于界面的左下角或右下角等位置。示例性的,参见图29中,长焦框2900位于界面的左下角。In addition, in the shooting methods described in the above embodiments, the telephoto image collected in real time is not displayed in the telephoto frame, but is only used to indicate the real-time shooting range corresponding to the telephoto camera. In some other embodiments, a down-sampling image of the telephoto image collected by the telephoto camera in real time is displayed in the telephoto frame, so as to present the telephoto image collected by the telephoto camera in real time to the user. And, the position of the telephoto image is opposite to the position of the same content on the wide-angle image. In other embodiments, a telephoto image captured in real time by the telephoto camera is displayed in the telephoto frame. In other embodiments, the telephoto frame is located at a preset position on the interface, for example, at the lower left corner or the lower right corner of the interface. Exemplarily, referring to FIG. 29 , the telephoto frame 2900 is located at the lower left corner of the interface.
以上是以第一摄像头为广角摄像头,第二摄像头为长焦摄像头为例进行说明的,当第一摄像头和/或第二摄像头为其他摄像头时,仍可以采用以上实施例提供的拍摄方法拍摄获得目标图像,本申请实施例不再赘述。The above description is given by taking the first camera as a wide-angle camera and the second camera as a telephoto camera as an example. When the first camera and/or the second camera are other cameras, the shooting method provided in the above embodiment can still be used to obtain the The target image is not repeated in this embodiment of the present application.
以上是以电子设备为手机为例进行说明的,当电子设备为平板电脑或智能手表等其他设备时,仍可以采用以上实施例提供的拍摄方法拍摄获得目标图像,本申请实施例不再赘述。The above description takes the electronic device as a mobile phone as an example. When the electronic device is other devices such as a tablet computer or a smart watch, the target image can still be obtained by using the shooting method provided in the above embodiment, which is not repeated in this embodiment of the present application.
可以理解的是,为了实现上述功能,电子设备包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to realize the above-mentioned functions, the electronic device includes corresponding hardware and/or software modules for executing each function. The present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the electronic device can be divided into functional modules according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that, the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
本申请实施例还提供一种电子设备,包括一个或多个处理器以及一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述相关方法步骤实现上述实施例中的拍摄方法。Embodiments of the present application further provide an electronic device, including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform The above-mentioned related method steps implement the shooting method in the above-mentioned embodiment.
本申请实施例还提供一种电子设备,如图30所示,包括:显示屏(或称屏幕)3001,一个或多个处理器3002,多个摄像头3003,存储器3004,以及一个或多个计算机程序3005,上述各器件可以通过一个或多个通信总线3006连接。其中该一个或多个计算机程序3005被存储在上述存储器3004中并被配置为被该一个或多个处理器3002执行,该一个或多个计算机程序3005包括指令,上述指令可以用于执行上述实施例中的各个步骤。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应实体器件的功能描述,在此不再赘述。An embodiment of the present application also provides an electronic device, as shown in FIG. 30 , including: a display screen (or screen) 3001, one or more processors 3002, multiple cameras 3003, a memory 3004, and one or more computers In procedure 3005, the above-mentioned devices may be connected through one or more communication buses 3006. wherein the one or more computer programs 3005 are stored in the aforementioned memory 3004 and configured to be executed by the one or more processors 3002, the one or more computer programs 3005 comprising instructions that may be used to perform the aforementioned implementations the steps in the example. Wherein, all relevant contents of the steps involved in the foregoing method embodiments can be cited in the functional description of the corresponding physical device, and details are not described herein again.
示例性的,上述处理器3002具体可以为图1所示的处理器110,上述存储器3004具体可以为图1所示的内部存储器121,上述摄像头3003具体可以为图1所示的摄像头193,上述显示屏3001具体可以为图1所示的显示屏194。Exemplarily, the processor 3002 may be the processor 110 shown in FIG. 1, the memory 3004 may be the internal memory 121 shown in FIG. 1, the camera 3003 may be the camera 193 shown in FIG. The display screen 3001 may specifically be the display screen 194 shown in FIG. 1 .
本申请的实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的拍摄方法。Embodiments of the present application further provide a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to realize the above-mentioned embodiments shooting method in .
本申请的实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中电子设备执行的拍摄方法。Embodiments of the present application also provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the photographing method executed by the electronic device in the above-mentioned embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中电子设备执行的拍摄方法。In addition, the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the photographing method executed by the electronic device in the foregoing method embodiments.
其中,本实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided method. The beneficial effects in the corresponding method will not be repeated here.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated by different The function module is completed, that is, the internal structure of the device is divided into different function modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成 的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be realized in the form of hardware, and can also be realized in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above content is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (32)

  1. 一种拍摄方法,应用于电子设备,所述电子设备包括第一摄像头和第二摄像头,所述第二摄像头的等效焦距大于所述第一摄像头的等效焦距,其特征在于,所述方法包括:A shooting method, applied to an electronic device, the electronic device comprising a first camera and a second camera, the equivalent focal length of the second camera is greater than the equivalent focal length of the first camera, wherein the method is include:
    启动拍照功能;Start the camera function;
    在预览界面上显示所述第一摄像头采集到的图像和引导框;Displaying the image and the guide frame collected by the first camera on the preview interface;
    检测到用户的拍照操作后,在拍摄界面上显示第一图像,以及叠加在所述第一图像之上的所述引导框;其中,所述第一图像根据所述第一摄像头采集的图像获得,所述引导框包括多个网格,单个所述网格与所述第二摄像头视场角的大小相对应;After detecting the user's photographing operation, a first image is displayed on the photographing interface, and the guide frame is superimposed on the first image; wherein, the first image is obtained according to the image collected by the first camera , the guide frame includes a plurality of grids, and a single said grid corresponds to the size of the field of view of the second camera;
    在所述拍摄界面上显示拼接信息,所述拼接信息用于指示拍摄进度,所述拼接信息与所述引导框中的多个网格所匹配的多帧目标拍摄图像相对应,所述目标拍摄图像通过所述第二摄像头采集获得;The stitching information is displayed on the shooting interface, the stitching information is used to indicate the shooting progress, and the stitching information corresponds to the multi-frame target shooting images matched with the grids in the guide frame. The image is acquired by the second camera;
    根据所述多帧目标拍摄图像生成拼接图像;generating a stitched image according to the multi-frame target captured images;
    在拍摄结束后,根据所述拼接图像生成目标图像。After the shooting is completed, a target image is generated according to the stitched image.
  2. 根据权利要求1所述的方法,其特征在于,所述第一图像为检测到用户的拍照操作后,所述第一摄像头采集到的第一帧图像;The method according to claim 1, wherein the first image is a first frame image collected by the first camera after detecting a user's photographing operation;
    或者,所述第一图像为检测到用户的拍照操作后,所述第一摄像头采集到的Q帧图像融合后的图像,Q为大于1的整数;Alternatively, the first image is an image obtained by merging Q frames of images collected by the first camera after detecting the user's photographing operation, where Q is an integer greater than 1;
    或者,所述第一图像为检测到用户的拍照操作后,所述第一摄像头在拍照过程中采集获得的图像。Alternatively, the first image is an image acquired by the first camera during the photographing process after detecting the photographing operation of the user.
  3. 根据权利要求1或2所述的方法,其特征在于,所述目标拍摄图像与所匹配的网格中,所述第一图像的相同内容的重叠比例大于或者等于第一预设值;The method according to claim 1 or 2, wherein, in the target captured image and the matched grid, the overlap ratio of the same content of the first image is greater than or equal to a first preset value;
    或者,所述目标拍摄图像与所匹配的网格中,所述第一图像的特征参数的直方图的相似度大于或者等于第二预设值;Or, in the target captured image and the matched grid, the similarity of the histogram of the feature parameter of the first image is greater than or equal to a second preset value;
    或者,所述目标拍摄图像与所匹配的网格中,所述第一图像在同种变换域的相似度大于或者等于第三预设值;Or, in the target captured image and the matched grid, the similarity of the first image in the same transformation domain is greater than or equal to a third preset value;
    或者,所述目标拍摄图像与所匹配的网格中,所述第一图像的特征匹配度大于或者等于第四预设值。Alternatively, in the target captured image and the matched grid, the feature matching degree of the first image is greater than or equal to a fourth preset value.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, wherein the method further comprises:
    根据参考图像上与所述网格对应的图像块,确定所述第二摄像头采集目标拍摄图像的配置参数;According to the image blocks corresponding to the grid on the reference image, determine the configuration parameters of the image captured by the second camera to capture the target;
    根据所述配置参数获取与所述网格相匹配的所述目标拍摄图像。The captured image of the target matched with the grid is acquired according to the configuration parameter.
  5. 根据权利要求4所述的方法,其特征在于,所述配置参数至少包括以下一种或多种:自动曝光AE配置参数、自动白平衡AWB配置参数或动态范围校正DRC配置参数。The method according to claim 4, wherein the configuration parameters include at least one or more of the following: automatic exposure AE configuration parameters, automatic white balance AWB configuration parameters or dynamic range correction DRC configuration parameters.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述多帧目标拍摄图像包括第一目标拍摄图像和第二目标拍摄图像,所述根据所述多帧目标拍摄图像生成拼接图像,包括:The method according to any one of claims 1-5, wherein the multi-frame target captured images include a first target captured image and a second target captured image, and the stitching is generated according to the multi-frame target captured images images, including:
    对所述第一目标拍摄图像和所述第二目标拍摄图像进行第一图像处理后,生成拼 接图像,所述第一图像处理包括图像配准。A mosaic image is generated after first image processing is performed on the first target captured image and the second target captured image, and the first image processing includes image registration.
  7. 根据权利要求6所述的方法,其特征在于,对所述第一目标拍摄图像和所述第二目标拍摄图像进行图像配准,包括:The method according to claim 6, wherein performing image registration on the captured image of the first target and the captured image of the second target comprises:
    根据预设的图像配准算法,分别对所述第一目标拍摄图像与所述第二目标拍摄图像提取特征;According to a preset image registration algorithm, features are respectively extracted from the first target captured image and the second target captured image;
    根据获得的特征匹配对,配准所述第一目标拍摄图像和所述第二目标拍摄图像。According to the obtained feature matching pairs, the first captured image of the target and the second captured image of the target are registered.
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:The method according to claim 7, wherein the method further comprises:
    根据参考图像对配准后的图像进行修正。The registered image is corrected according to the reference image.
  9. 根据权利要求6所述的方法,其特征在于,对所述第一目标拍摄图像和所述第二目标拍摄图像进行图像配准,包括:The method according to claim 6, wherein performing image registration on the captured image of the first target and the captured image of the second target comprises:
    分别对所述第一目标拍摄图像和参考图像提取特征,根据获得的特征匹配对配准所述第一目标拍摄图像和所述参考图像;Extracting features from the first target captured image and the reference image respectively, and registering the first target captured image and the reference image according to the obtained feature matching pair;
    分别对所述第二目标拍摄图像和所述参考图像提取特征,根据获得的特征匹配对配准所述第二目标拍摄图像和所述参考图像。Features are extracted from the second target captured image and the reference image, respectively, and the second target captured image and the reference image are registered according to the obtained feature matching pair.
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:The method according to claim 9, wherein the method further comprises:
    分别对所述第一目标拍摄图像和所述第二目标拍摄图像提取特征,根据获得的特征匹配对配准所述第一目标拍摄图像和所述第二目标拍摄图像;Extracting features from the first target captured image and the second target captured image, respectively, and registering the first target captured image and the second target captured image according to the obtained feature matching pair;
    根据所述第一目标拍摄图像、所述第二目标拍摄图像和所述参考图像的重叠区域的特征匹配对,计算单应性矩阵;Calculate a homography matrix according to feature matching pairs of overlapping regions of the first target captured image, the second target captured image and the reference image;
    根据所述单应性矩阵,对所述第二目标拍摄图像进行变形。The second target captured image is deformed according to the homography matrix.
  11. 根据权利要求6所述的方法,其特征在于,对所述第一目标拍摄图像和所述第二目标拍摄图像进行图像配准,包括:The method according to claim 6, wherein performing image registration on the captured image of the first target and the captured image of the second target comprises:
    将所述第一目标拍摄图像贴合在参考图像上具有相同图像内容的坐标位置;Attaching the first target captured image to a coordinate position with the same image content on the reference image;
    将所述第二目标拍摄图像贴合在所述参考图像上具有相同图像内容的坐标位置;Attaching the second target captured image to the reference image at a coordinate position with the same image content;
    若所述第一目标拍摄图像与所述第二目标拍摄图像之间存在空洞,则根据所述参考图像上与所述空洞对应位置的图像内容进行空洞填充。If a hole exists between the first target captured image and the second target captured image, filling the hole is performed according to the image content at the position corresponding to the hole on the reference image.
  12. 根据权利要求6-11任一项所述的方法,其特征在于,所述第一图像处理还包括去鬼影处理,所述对所述第一目标拍摄图像和所述第二目标拍摄图像进行第一图像处理后生成拼接图像,包括:The method according to any one of claims 6-11, wherein the first image processing further comprises ghost removal processing, and the first target captured image and the second target captured image are processed After the first image is processed, a stitched image is generated, including:
    保留所述第一目标拍摄图像上运动物体的无鬼影图像;Retain the ghost-free image of the moving object on the first target captured image;
    删除所述第二目标拍摄图像上所述运动物体的图像;deleting the image of the moving object on the second target captured image;
    对所述第一目标拍摄图像和所述第二目标拍摄图像进行图像配准后生成拼接图像;generating a stitched image after performing image registration on the first target captured image and the second target captured image;
    根据参考图像对所述拼接图像上的空洞进行填充。Fill the holes on the stitched image according to the reference image.
  13. 根据权利要求6-11任一项所述的方法,其特征在于,所述第一图像处理还包括去鬼影处理,所述对所述第一目标拍摄图像和所述第二目标拍摄图像进行第一图像处理后生成拼接图像,包括:The method according to any one of claims 6-11, wherein the first image processing further comprises ghost removal processing, and the first target captured image and the second target captured image are processed After the first image is processed, a stitched image is generated, including:
    对所述第一目标拍摄图像和所述第二目标拍摄图像进行图像配准;performing image registration on the captured image of the first target and the captured image of the second target;
    在配准后的图像上保留运动物体的无鬼影图像,所述无鬼影图像来自所述第一目标拍摄图像、所述第二目标拍摄图像或所述第一图像;retaining a ghost-free image of a moving object on the registered image, the ghost-free image from the first target captured image, the second target captured image, or the first image;
    删除配准后的图像上其他区域内的所述运动物体的图像;delete the images of the moving object in other regions on the registered image;
    根据参考图像对所述删除导致的空洞进行填充以生成拼接图像。The holes caused by the deletion are filled according to the reference image to generate a stitched image.
  14. 根据权利要求6-11任一项所述的方法,其特征在于,所述第一图像处理还包括去鬼影处理,所述对所述第一目标拍摄图像和所述第二目标拍摄图像进行第一图像处理后生成拼接图像,包括:The method according to any one of claims 6-11, wherein the first image processing further comprises ghost removal processing, and the first target captured image and the second target captured image are processed After the first image is processed, a stitched image is generated, including:
    删除所述第一目标拍摄图像和所述第二目标拍摄图像上运动物体的图像;deleting the images of moving objects on the first target captured image and the second target captured image;
    根据所述第一摄像头采集到的多帧图像判断运动物体的运动轨迹,以删除所述第一图像上所述运动物体的图像,得到无鬼影的第一图像;Determine the motion trajectory of the moving object according to the multi-frame images collected by the first camera, so as to delete the image of the moving object on the first image, and obtain a first image without ghost images;
    将删除运动物体的图像后的所述第一目标拍摄图像和所述第二目标拍摄图像,贴合到所述无鬼影的第一图像上;Attaching the first target captured image and the second target captured image after deleting the image of the moving object to the first image without ghost images;
    根据参考图像对所述删除导致的空洞进行填充以生成拼接图像。The holes caused by the deletion are filled according to the reference image to generate a stitched image.
  15. 根据权利要求6-14任一项所述的方法,其特征在于,所述第一图像处理还包括匀光匀色处理和图像融合处理。The method according to any one of claims 6-14, wherein the first image processing further includes light and color leveling processing and image fusion processing.
  16. 根据权利要求1-15任一项所述的方法,其特征在于,所述根据所述拼接图像生成目标图像,包括:The method according to any one of claims 1-15, wherein the generating a target image according to the spliced image comprises:
    对所述拼接图像进行第二图像处理后,生成所述目标图像,所述第二图像处理至少包括以下一种或多种:去鬼影处理、动态范围增强、高频分量融合、匀光匀色处理或空洞填充。After the second image processing is performed on the stitched image, the target image is generated, and the second image processing includes at least one or more of the following: anti-ghosting processing, dynamic range enhancement, high-frequency component fusion, uniform light and uniform color treatment or hole filling.
  17. 根据权利要求16所述的方法,其特征在于,对所述拼接图像进行高频分量融合,包括:The method according to claim 16, characterized in that, performing high-frequency component fusion on the stitched image, comprising:
    提取参考图像的高频分量图像,将所述高频分量图像与所述拼接图像进行融合。Extracting a high-frequency component image of the reference image, and fusing the high-frequency component image with the spliced image.
  18. 根据权利要求16所述的方法,其特征在于,对所述拼接图像进行匀光匀色处理,包括:The method according to claim 16, wherein performing uniform light and color processing on the stitched image, comprising:
    对多帧所述第一摄像头采集到的图像进行高动态范围的合成;performing high dynamic range synthesis on the images collected by the multiple frames of the first camera;
    根据获得的高动态范围信息对所述拼接图像进行匀光匀色处理。According to the obtained high dynamic range information, uniform light and color processing is performed on the spliced image.
  19. 根据权利要求16所述的方法,其特征在于,对所述拼接图像进行空洞填充,包括:The method according to claim 16, wherein filling holes in the stitched image comprises:
    对多帧所述第一摄像头采集到的图像上,所述拼接图像的空洞对应的区域,进行超分辨率图像合成;Perform super-resolution image synthesis on the regions corresponding to the holes of the spliced images on the images collected by the first camera in multiple frames;
    根据获得的图像信息,对所述拼接图像进行空洞填充。According to the obtained image information, the stitched image is filled with holes.
  20. 根据权利要求16所述的方法,其特征在于,对所述拼接图像进行空洞填充,包括:The method according to claim 16, wherein filling holes in the stitched image comprises:
    对参考图像上与所述拼接图像的空洞对应的区域,进行图像超分辨率处理;Perform image super-resolution processing on the region corresponding to the hole in the spliced image on the reference image;
    根据获得的图像信息,对所述拼接图像进行空洞填充。According to the obtained image information, the stitched image is filled with holes.
  21. 根据权利要求4-20任一项所述的方法,其特征在于,所述参考图像为检测到用户的拍照操作后,所述第一摄像头采集到的第一帧图像;The method according to any one of claims 4-20, wherein the reference image is a first frame image collected by the first camera after detecting a user's photographing operation;
    或者,所述第一图像为检测到用户的拍照操作后,所述第一摄像头采集到的Q帧图像融合后的图像,Q为大于1的整数。Alternatively, the first image is an image obtained by merging Q frames of images collected by the first camera after detecting the user's photographing operation, where Q is an integer greater than 1.
  22. 根据权利要求1-21任一项所述的方法,其特征在于,所述确定拍摄结束,包括:The method according to any one of claims 1-21, wherein the determining that the shooting is ended comprises:
    在所述引导框中的网格完成匹配后,确定拍摄结束。After the grids in the guide frame are matched, it is determined that the shooting ends.
  23. 根据权利要求22所述的方法,其特征在于,所述根据所述拼接图像生成目标图像,包括:The method according to claim 22, wherein the generating a target image according to the spliced image comprises:
    所述拼接图像即为所述目标图像;The stitched image is the target image;
    或者,若所述拼接图像的边缘未对齐,则对所述拼接图像进行裁剪,获得边缘对齐的所述目标图像;Or, if the edges of the spliced images are not aligned, then the spliced images are cropped to obtain the target image with aligned edges;
    或者,若所述拼接图像的边缘未对齐,则根据所述第一图像对所述拼接图像的边缘区域进行填充,获得边缘对齐的所述目标图像。Or, if the edges of the spliced images are not aligned, fill the edge regions of the spliced images according to the first image to obtain the target image with aligned edges.
  24. 根据权利要求1-21任一项所述的方法,其特征在于,所述确定拍摄结束,包括:The method according to any one of claims 1-21, wherein the determining that the shooting is ended comprises:
    在所述引导框中的网格未完成匹配前,若检测到用户的停止拍照操作,则确定拍摄结束;Before the matching of the grids in the guide frame is completed, if it is detected that the user stops the photographing operation, it is determined that the photographing is ended;
    或者,若所述电子设备的移动方向移动出所述引导框,则确定拍摄结束;Or, if the moving direction of the electronic device moves out of the guide frame, it is determined that the shooting ends;
    或者,若所述电子设备的移动方向,与所述引导框的指示方向的偏离范围大于或者等于第五预设值,则确定拍摄结束。Alternatively, if the deviation range between the moving direction of the electronic device and the indicated direction of the guide frame is greater than or equal to the fifth preset value, it is determined that the shooting ends.
  25. 根据权利要求24所述的方法,其特征在于,所述根据所述拼接图像生成目标图像,包括:The method according to claim 24, wherein the generating a target image according to the spliced image comprises:
    根据已匹配的整行/列网格对应的所述拼接图像,生成所述目标图像;generating the target image according to the stitched image corresponding to the matched whole row/column grid;
    或者,根据已匹配的网格对应的所述拼接图像,以及所述第一图像上未匹配网格对应的图像区域,生成所述目标图像。Alternatively, the target image is generated according to the stitched image corresponding to the matched grid and the image area corresponding to the unmatched grid on the first image.
  26. 根据权利要求1-25任一项所述方法,其特征在于,所述方法还包括:The method according to any one of claims 1-25, wherein the method further comprises:
    获取目标变焦倍率,所述引导框与所述目标变焦倍率相对应,所述目标变焦倍率大于所述第一摄像头的变焦倍率,且小于所述第二摄像头的变焦倍率;acquiring a target zoom magnification, the guide frame corresponds to the target zoom magnification, and the target zoom magnification is greater than the zoom magnification of the first camera and smaller than the zoom magnification of the second camera;
    所述根据所述拼接图像生成目标图像,包括:The generating a target image according to the spliced image includes:
    对所述拼接图像进行裁剪生成所述目标图像,所述目标图像与所述目标变焦倍率相对应。The stitched image is cropped to generate the target image, and the target image corresponds to the target zoom magnification.
  27. 一种拍摄方法,应用于电子设备,所述电子设备包括第一摄像头和第二摄像头,所述第二摄像头的等效焦距大于所述第一摄像头的等效焦距,其特征在于,所述方法包括:A shooting method, applied to an electronic device, the electronic device comprising a first camera and a second camera, the equivalent focal length of the second camera is greater than the equivalent focal length of the first camera, wherein the method is include:
    启动拍照功能;Start the camera function;
    在预览界面上显示第三图像和图像框,所述第三图像为所述第一摄像头采集的图像,所述图像框内所述第三图像的画面范围与第二图像的画面相对应,所述第二图像为所述第二摄像头采集的图像;A third image and an image frame are displayed on the preview interface, the third image is an image captured by the first camera, and the screen range of the third image in the image frame corresponds to the screen of the second image, so The second image is an image collected by the second camera;
    检测到用户的拍照操作后,在拍摄界面上显示第一图像和所述图像框,所述第一图像根据所述第一摄像头采集的图像获得;After detecting the user's photographing operation, displaying a first image and the image frame on the photographing interface, where the first image is obtained according to an image collected by the first camera;
    在所述拍摄界面上显示拼接信息,所述拼接信息用于指示拍摄进度,所述拼接信息与拍照过程中获取的多帧目标拍摄图像相对应,相邻所述目标拍摄图像之间相互匹配;Displaying splicing information on the shooting interface, the splicing information is used to indicate the shooting progress, the splicing information corresponds to the multi-frame target shooting images obtained during the photographing process, and the adjacent target shooting images match each other;
    根据所述多帧目标拍摄图像生成拼接图像;generating a stitched image according to the multi-frame target captured images;
    在拍摄结束后,根据所述拼接图像生成目标图像。After the shooting is completed, a target image is generated according to the stitched image.
  28. 根据权利要求27所述的方法,其特征在于,针对所述多帧目标拍摄图像中,相匹配的第三目标拍摄图像和第四目标拍摄图像,满足:The method according to claim 27, wherein, in the multi-frame target captured images, the matched third target captured image and the fourth target captured image satisfy:
    所述第三目标拍摄图像的横坐标范围与所述第四目标拍摄图像的横坐标范围之间的偏差小于或者等于第一预设阈值;The deviation between the abscissa range of the captured image of the third target and the abscissa range of the captured image of the fourth target is less than or equal to a first preset threshold;
    或者,所述第三目标拍摄图像的纵坐标范围与所述第四目标拍摄图像的纵坐标范围之间的偏差小于或者等于第二预设阈值。Alternatively, the deviation between the ordinate range of the third target captured image and the ordinate range of the fourth target captured image is less than or equal to a second preset threshold.
  29. 根据权利要求28所述的方法,其特征在于,相匹配的所述第三目标拍摄图像和所述第四目标拍摄图像,还满足:The method according to claim 28, wherein the matched third target captured image and the fourth target captured image also satisfy:
    所述第三目标拍摄图像与所述第四目标拍摄图像之间的重叠区域大于或者等于第六预设值;The overlapping area between the third target captured image and the fourth target captured image is greater than or equal to a sixth preset value;
    或者,所述第三目标拍摄图像与所述第四目标拍摄图像之间的空隙小于或者等于第七预设值。Alternatively, the gap between the third target captured image and the fourth target captured image is less than or equal to a seventh preset value.
  30. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    第一摄像头和第二摄像头,用于采集图像;a first camera and a second camera for capturing images;
    屏幕,用于显示界面;screen, used to display the interface;
    一个或多个处理器;one or more processors;
    存储器;memory;
    以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述电子设备执行时,使得所述电子设备执行如权利要求1-29中任一项所述的拍摄方法。and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions that, when executed by the electronic device, cause all The electronic device performs the shooting method according to any one of claims 1-29.
  31. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在计算机上运行时,使得所述计算机执行如权利要求1-29中任一项所述的拍摄方法。A computer-readable storage medium, characterized by comprising computer instructions, when the computer instructions are executed on a computer, causing the computer to execute the photographing method according to any one of claims 1-29.
  32. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-29中任一项所述的拍摄方法。A computer program product, characterized in that, when the computer program product runs on a computer, the computer is caused to execute the shooting method according to any one of claims 1-29.
PCT/CN2021/109836 2020-07-30 2021-07-30 Photographing method and device WO2022022715A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010754701 2020-07-30
CN202010754701.X 2020-07-30
CN202011296539.8 2020-11-18
CN202011296539.8A CN114071010A (en) 2020-07-30 2020-11-18 Shooting method and equipment

Publications (1)

Publication Number Publication Date
WO2022022715A1 true WO2022022715A1 (en) 2022-02-03

Family

ID=80037640

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/109836 WO2022022715A1 (en) 2020-07-30 2021-07-30 Photographing method and device

Country Status (1)

Country Link
WO (1) WO2022022715A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615435A (en) * 2022-03-25 2022-06-10 联想(北京)有限公司 Processing method and device
CN114745500A (en) * 2022-03-28 2022-07-12 联想(北京)有限公司 Image processing method and output detection system
CN115171200A (en) * 2022-09-08 2022-10-11 深圳市维海德技术股份有限公司 Target tracking close-up method and device based on zooming, electronic equipment and medium
CN115499594A (en) * 2022-09-30 2022-12-20 如你所视(北京)科技有限公司 Panoramic image generation method and computer-readable storage medium
CN116452481A (en) * 2023-04-19 2023-07-18 北京拙河科技有限公司 Multi-angle combined shooting method and device
CN116939363A (en) * 2022-03-29 2023-10-24 荣耀终端有限公司 Image processing method and electronic equipment
CN117119113A (en) * 2023-10-20 2023-11-24 安徽淘云科技股份有限公司 Camera self-calibration method and device of electronic equipment and electronic equipment
CN116939363B (en) * 2022-03-29 2024-04-26 荣耀终端有限公司 Image processing method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6215519B1 (en) * 1998-03-04 2001-04-10 The Trustees Of Columbia University In The City Of New York Combined wide angle and narrow angle imaging system and method for surveillance and monitoring
CN104052931A (en) * 2014-06-27 2014-09-17 宇龙计算机通信科技(深圳)有限公司 Image shooting device, method and terminal
CN108449546A (en) * 2018-04-04 2018-08-24 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN110248081A (en) * 2018-10-12 2019-09-17 华为技术有限公司 Image capture method and electronic equipment
CN110493514A (en) * 2019-08-07 2019-11-22 Oppo广东移动通信有限公司 Image processing method, storage medium and electronic equipment
CN111010510A (en) * 2019-12-10 2020-04-14 维沃移动通信有限公司 Shooting control method and device and electronic equipment
CN111294517A (en) * 2020-03-03 2020-06-16 华为技术有限公司 Image processing method and mobile terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6215519B1 (en) * 1998-03-04 2001-04-10 The Trustees Of Columbia University In The City Of New York Combined wide angle and narrow angle imaging system and method for surveillance and monitoring
CN104052931A (en) * 2014-06-27 2014-09-17 宇龙计算机通信科技(深圳)有限公司 Image shooting device, method and terminal
CN108449546A (en) * 2018-04-04 2018-08-24 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN110248081A (en) * 2018-10-12 2019-09-17 华为技术有限公司 Image capture method and electronic equipment
CN110493514A (en) * 2019-08-07 2019-11-22 Oppo广东移动通信有限公司 Image processing method, storage medium and electronic equipment
CN111010510A (en) * 2019-12-10 2020-04-14 维沃移动通信有限公司 Shooting control method and device and electronic equipment
CN111294517A (en) * 2020-03-03 2020-06-16 华为技术有限公司 Image processing method and mobile terminal

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615435A (en) * 2022-03-25 2022-06-10 联想(北京)有限公司 Processing method and device
CN114745500A (en) * 2022-03-28 2022-07-12 联想(北京)有限公司 Image processing method and output detection system
CN114745500B (en) * 2022-03-28 2023-09-19 联想(北京)有限公司 Image processing method and output detection system
CN116939363A (en) * 2022-03-29 2023-10-24 荣耀终端有限公司 Image processing method and electronic equipment
CN116939363B (en) * 2022-03-29 2024-04-26 荣耀终端有限公司 Image processing method and electronic equipment
CN115171200A (en) * 2022-09-08 2022-10-11 深圳市维海德技术股份有限公司 Target tracking close-up method and device based on zooming, electronic equipment and medium
CN115171200B (en) * 2022-09-08 2023-01-31 深圳市维海德技术股份有限公司 Target tracking close-up method and device based on zooming, electronic equipment and medium
CN115499594A (en) * 2022-09-30 2022-12-20 如你所视(北京)科技有限公司 Panoramic image generation method and computer-readable storage medium
CN115499594B (en) * 2022-09-30 2023-06-30 如你所视(北京)科技有限公司 Panoramic image generation method and computer-readable storage medium
CN116452481A (en) * 2023-04-19 2023-07-18 北京拙河科技有限公司 Multi-angle combined shooting method and device
CN117119113A (en) * 2023-10-20 2023-11-24 安徽淘云科技股份有限公司 Camera self-calibration method and device of electronic equipment and electronic equipment
CN117119113B (en) * 2023-10-20 2024-01-23 安徽淘云科技股份有限公司 Camera self-calibration method and device of electronic equipment and electronic equipment

Similar Documents

Publication Publication Date Title
WO2022022715A1 (en) Photographing method and device
WO2022022726A1 (en) Image capture method and device
EP2779628B1 (en) Image processing method and device
JP5136669B2 (en) Image processing apparatus, image processing method, and program
US9195880B1 (en) Interactive viewer for image stacks
WO2021223500A1 (en) Photographing method and device
US20050276596A1 (en) Picture composition guide
US20120057786A1 (en) Image processing apparatus, image processing method, image pickup apparatus, and storage medium storing image processing program
US20100134641A1 (en) Image capturing device for high-resolution images and extended field-of-view images
US20130076941A1 (en) Systems And Methods For Editing Digital Photos Using Surrounding Context
WO2021244104A1 (en) Time-lapse photography method and device
CN108234898A (en) Sync pulse jamming method, filming apparatus, mobile terminal and the readable storage medium storing program for executing of multi-cam
US8947558B2 (en) Digital photographing apparatus for multi-photography data and control method thereof
US20110032406A1 (en) Digital photographing apparatus, method of controlling the same, and computer-readable storage medium
CN114071010A (en) Shooting method and equipment
CN109089045A (en) A kind of image capture method and equipment and its terminal based on multiple photographic devices
JP2014050022A (en) Image processing device, imaging device, and program
WO2021185374A1 (en) Image capturing method and electronic device
WO2021238317A1 (en) Panoramic image capture method and device
WO2018196854A1 (en) Photographing method, photographing apparatus and mobile terminal
US20230353864A1 (en) Photographing method and apparatus for intelligent framing recommendation
JP2011217275A (en) Electronic device
CN114071009B (en) Shooting method and equipment
JP2011193066A (en) Image sensing device
US20120188413A1 (en) Digital photographing apparatus and method of providing image captured by using the apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21851003

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21851003

Country of ref document: EP

Kind code of ref document: A1