Shooting method and electronic equipment

By continuously obtaining multiple frame images from the image acquisition device, using the first algorithm to identify and process local areas, combined with the second algorithm optimization, the problem of unreal color restoration in image beautification processing is solved, and the clarity and aesthetic optimization of the motion goals are achieved.

CN120302172APending Publication Date: 2025-07-11LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510728879.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the prior art, image beautification processing will affect the color restoration of the entire shooting scene and lead to the problem of beauty lag.

Method used

Multi-frame images are continuously obtained by the image acquisition device, local areas are identified and processed using the first algorithm, and each frame image is optimized in combination with the second algorithm to generate a corresponding second acquired image to ensure the clarity and aesthetics of the local areas.

Benefits of technology

The clear and beautiful optimization of the local areas of the moving target in the image is achieved, avoiding image optimization lag and ensuring the real restoration of the scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120302172A_ABST
    Figure CN120302172A_ABST
Patent Text Reader

Abstract

The invention provides a shooting method and electronic equipment, and is applied to the technical field of image acquisition. The shooting method comprises the following steps: continuously acquiring multiple frames of first acquisition images through an image acquisition device; each multi-frame first acquisition image is processed based on a first algorithm, local areas of each multi-frame first acquisition image are determined, display content in each local area is the same, and the multi-frame first acquisition images at least comprise different relative positions of two adjacent local areas; based on a second algorithm, processing the local area of each multi-frame first acquisition image to obtain multiple frames of second acquisition images in one-to-one correspondence with the multiple frames of first acquisition images; wherein the multiple frames of second collection images are used for images output by the target application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of image acquisition, and in particular, to a shooting method and an electronic device. Background Art

[0002] Currently, image beautification processing usually adjusts the parameters of the entire image to improve the aesthetics of a certain object in the image. However, adjusting the parameters of the entire image will affect the color of the entire shooting scene, and it is easy to cause the problem of inaccurate scene restoration. Summary of the Invention

[0003] In view of this, the present disclosure provides a shooting method and an electronic device.

[0004] According to a first aspect of the present disclosure, a shooting method is provided, including: continuously obtaining multiple frames of first acquisition images through an image acquisition device; processing each frame of the multiple frames of first acquisition images based on a first algorithm to determine a local area of each frame of the multiple frames of first acquisition images, where the display content within each frame of the local area is the same, and at least the relative positions of the local areas of two adjacent frames in the multiple frames of first acquisition images are different; processing the local areas of each frame of the multiple frames of first acquisition images based on a second algorithm to obtain multiple frames of second acquisition images corresponding to the multiple frames of first acquisition images one by one; where the multiple frames of second acquisition images are used for the images output by the target application.

[0005] According to an embodiment of the present disclosure, processing each frame of the multiple frames of first acquisition images based on a first algorithm to determine the local area of each frame of the multiple frames of first acquisition images includes: processing the Nth frame of the first acquisition images based on the first algorithm to determine the local area of the Nth frame of the first acquisition images; the local area of the Nth frame of the first acquisition images is used for processing the Nth frame of the first acquisition images based on the second algorithm, and is also used to determine the focusing position of the (N + 1)th frame of the first acquisition images; where N is an integer greater than or equal to 1.

[0006] According to an embodiment of the present disclosure, the first algorithm makes the clarity of the local area of each frame of the multiple frames of first acquisition images higher than that of other areas.

[0007] According to an embodiment of the present disclosure, the method further includes: obtaining a shooting instruction; in response to the shooting instruction, if the target identifier indicates that the target function is enabled, perform the following steps: continuously obtaining multiple frames of first acquisition images through an image acquisition device; processing each frame of the multiple frames of first acquisition images based on a first algorithm to determine the local area of each frame of the multiple frames of first acquisition images; where the display content within each frame of the local area is the same, and at least the relative positions of the local areas of two adjacent frames in the multiple frames of first acquisition images are different; processing the local areas of each frame of the multiple frames of first acquisition images based on a second algorithm to obtain multiple frames of second acquisition images corresponding to the multiple frames of first acquisition images one by one.

[0008] According to an embodiment of the present disclosure, before obtaining a shooting instruction, it includes: if a target identifier indicates that a target function is enabled, obtaining a subject object, and the subject object acts on a first algorithm; obtaining a configuration value of a display parameter for the subject object, and the configuration value acts on a second algorithm.

[0009] According to an embodiment of the present disclosure, the method further includes: obtaining a preview image of an image acquisition device, the preview image including at least one object; in response to a selection operation on the object in the preview image, generating an identification frame corresponding to the selected object, and the identification frame acts on a first algorithm.

[0010] According to an embodiment of the present disclosure, the method further includes: inputting the preview image into an intelligent model to obtain at least one object; in response to a selection operation on the object, using the selected object as the subject object.

[0011] According to an embodiment of the present disclosure, the method further includes: determining a first neighborhood pixel and a second neighborhood pixel according to the edge information of the identification frame, the first neighborhood pixel representing a pixel point inside the identification frame, and the second neighborhood pixel representing a pixel point outside the identification frame; processing the pixels at the edge according to the first neighborhood pixel and the second neighborhood pixel to obtain a third acquisition image, and the display effect of the third acquisition image is better than that of the second acquisition image.

[0012] According to an embodiment of the present disclosure, the method further includes: determining first imaging information according to the non-local region of each frame of the first acquisition image; determining second imaging information according to the local region of each frame of the first acquisition image processed by the second algorithm; determining the second acquisition image according to the first imaging information and the second imaging information.

[0013] A second aspect of the present disclosure provides a shooting device, including: an acquisition module, configured to acquire multiple frames of first acquisition images continuously obtained by an image acquisition device; a first processing module, configured to process each frame of the multiple frames of first acquisition images based on a first algorithm to determine the local region of each frame of the multiple frames of first acquisition images; wherein, the display content within each frame of the local region is the same, and at least the relative positions of the local regions of two adjacent frames are different in the multiple frames of first acquisition images; a second processing module, configured to process the local region of each frame of the multiple frames of first acquisition images based on a second algorithm to obtain multiple frames of second acquisition images corresponding one-to-one to the multiple frames of first acquisition images; wherein, the multiple frames of second acquisition images are used as images output by a target application.

[0014] A third aspect of the present disclosure provides an electronic device, including: an image acquisition device for continuously acquiring multiple frames of first acquisition images; a processor for processing each frame of the multiple frames of first acquisition images based on a first algorithm to determine a local area of each frame of the multiple frames of first acquisition images; wherein, the display content within each frame of the local area is the same, and at least the relative positions of the local areas of two adjacent frames are different in the multiple frames of first acquisition images; processing the local area of each frame of the multiple frames of first acquisition images based on a second algorithm to obtain multiple frames of second acquisition images corresponding one-to-one to the multiple frames of first acquisition images; wherein, the multiple frames of second acquisition images are used for the images output by the target application.

[0015] A fourth aspect of the present disclosure further provides a computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor is caused to execute the above-mentioned shooting method.

[0016] A fifth aspect of the present disclosure further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above-mentioned shooting method is implemented.

[0017] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Through the following description of the embodiments of the present disclosure with reference to the drawings, the above-mentioned and other objects, features, and advantages of the present disclosure will become clearer. In the drawings:

[0019] Figure 1 Schematically shows a schematic diagram of an image processing method in the related art;

[0020] Figure 2A Schematically shows one of the flowcharts of the shooting method according to an embodiment of the present disclosure;

[0021] Figure 2B Schematically shows another flowchart of the shooting method according to an embodiment of the present disclosure;

[0022] Figure 3 Schematically shows the principle diagram of the shooting method according to an embodiment of the present disclosure;

[0023] Figure 4 Schematically shows the structural block diagram of the shooting device according to an embodiment of the present disclosure; and

[0024] Figure 5 Schematically shows the block diagram of an electronic device suitable for implementing the shooting method according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments can be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.

[0026] The terms used herein are merely for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising", etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0027] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0028] In the case of using expressions such as "at least one of A, B, and C, etc.", generally, it should be interpreted according to the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).

[0029] Embodiments of the present disclosure provide a photographing method and an electronic device. Before introducing the technical solutions provided by the embodiments of the present disclosure, the related technologies involved in the present disclosure will be described first.

[0030] Currently, image beautification processing usually adjusts the parameters of the entire image to improve the aesthetic degree of a certain object in the image. However, adjusting the parameters of the entire image will affect the color of the entire shooting scene and easily cause the problem of untrue scene restoration.

[0031] In the related art, refer to Figure 1, the image acquisition device (e.g., a camera) acquires the raw data of multiple frames of images, and the pre-image processing is used to correct the raw data (e.g., eliminate noise, lens distortion, etc.). The image processing unit is used to convert the format of the corrected image data and output a standard image in YUV format for display. For improving the beauty degree of a certain object in the image, for example, beauty treatment. Usually, the beauty treatment is performed according to the result of face recognition in the standard image. Face detection is usually located after the image processing unit and before forming the standard image. However, due to computing power issues, face detection will use skip-frame detection. For example, face is detected every 3 frames. Face is detected at position A in the first frame, and face is detected moving to position B in the fourth frame. The beauty treatment for the second and third frames acts on position A, but the face has actually moved to position B in the second and third frames. Therefore, it is easy to cause the problem of "beauty lag".

[0032] Embodiments of the present disclosure provide a shooting method, including: continuously obtaining multiple frames of first acquisition images through an image acquisition device; processing each frame of the multiple frames of first acquisition images based on a first algorithm to determine the local area of each frame of the multiple frames of first acquisition images, where the display content within each frame of the local area is the same, and at least the relative positions of the local areas of two adjacent frames are different in the multiple frames of first acquisition images; processing the local area of each frame of the multiple frames of first acquisition images based on a second algorithm to obtain multiple frames of second acquisition images corresponding one by one to the multiple frames of first acquisition images; where the multiple frames of second acquisition images are used for the images output by the target application.

[0033] It should be noted that the shooting method provided by the embodiments of the present disclosure can generally be executed by the processor of an electronic device. Correspondingly, the image acquisition device provided by the embodiments of the present disclosure is a camera in the electronic device.

[0034] The following will be through Figures 2A to 3 to describe in detail the shooting method of the embodiments of the present disclosure.

[0035] Figure 2A Schematically shows one of the flowcharts of the shooting method according to the embodiments of the present disclosure.

[0036] As Figure 2A shown, the shooting method of this embodiment includes operations S210 to S230.

[0037] In operation S210, multiple frames of first acquisition images are continuously obtained through the image acquisition device.

[0038] In operation S220, each frame of the multiple frames of first acquisition images is processed based on a first algorithm to determine the local area of each frame of the multiple frames of first acquisition images, where the display content within each frame of the local area is the same, and at least the relative positions of the local areas of two adjacent frames are different in the multiple frames of first acquisition images.

[0039] In operation S230, a local area of ​​each of the multiple frames of first acquired images is processed based on a second algorithm to obtain multiple frames of second acquired images that correspond one-to-one to the multiple frames of first acquired images.

[0040] The multiple frames of second acquired images are used as images output by the target application.

[0041] Exemplarily, the image acquisition device may be a device with an image acquisition function. For example, the image acquisition device may be a camera, a webcam, etc.

[0042] The multiple frames of first acquired images may be continuous multiple frames of images acquired in real time by the image acquisition device. For example, the multiple frames of first acquired images may be continuous frames in a video, or photos taken in rapid succession. The multiple frames of first acquired images have the same target but the positions of the target in the multiple frames may be different. For example, the multiple frames of first acquired images may be continuous multiple frames of images acquired in real time for a moving target. During the acquisition process, the moving target moves, which can change the relative position of the moving target in the image. For example, in the process of using the image acquisition device to acquire images for the moving target A, the moving target A is in the first position in the first acquired image of the first frame acquired, and in the second position in the first acquired image of the second frame acquired. It is in the third position in the first acquired image of the third frame acquired.

[0043] The first algorithm may be a target detection, feature matching or tracking algorithm, which is used to locate the same content area in each frame of the image.

[0044] The local area may be an area showing the same content in the first captured image. In two or more consecutive frames of images, since the image capture device is the same, the capture area of ​​the light sensing chip of the image capture device used to form the first captured image is unchanged, so the relative position of the local area of ​​each frame of the first captured image changes with the capture area of ​​the light sensing chip of the image capture device as a reference.

[0045] The local area can be automatically identified according to the needs of the user. The local area can be the area where the target that the user wants to optimize in the image is located. The type of the target can be a specific person, animal, object, environment, etc.

[0046] The second algorithm may be an algorithm for optimizing a local area of ​​each frame of the first acquired image. The second algorithm may include one algorithm or multiple algorithms. For example, the second algorithm may include a resolution enhancement algorithm, and the second algorithm may also include a resolution enhancement algorithm, a beauty algorithm, and the like. The disclosed embodiment does not specifically limit the type and number of the second algorithm, and may be adjusted according to actual image optimization requirements.

[0047] The second captured image can be an image generated after applying a second algorithm to a local area of each frame of the first captured image. The image quality (display effect) of the local area in the second captured image is better than that of the local area in the first captured image. The second captured image can be a standard image in YUV format.

[0048] The target application can be an application for outputting the image capture result of an image capture device for image display. That is, the image output by the target application can be intuitively seen by the user. For example, the target application can be a camera application, etc. The camera captures a video of a moving target A, and the video content (the image output by the camera application) is displayed on the display screen.

[0049] In the embodiments disclosed in the present application, for the video recording of a moving object, the user can be allowed to select the main object of motion tracking before the start. During the recording process after the start, in combination with the motion tracking algorithm (i.e., the first algorithm), the area of the main object in each frame of the image can be recognized (this area is used to determine the focus control to ensure that each frame of the image of the tracked main object is clear), and then the beautification algorithm (i.e., the second algorithm) can be used to optimize the display effect for each local part of each frame, so as to realize the optimization of the display effect of the local part of each frame of the video for the moving object. That is to say, in the embodiments disclosed in the present application, during the process of recording a video, not only can it be ensured that the local part corresponding to the tracked main object in each captured image is clear, but also the local part corresponding to the tracked main object in each captured image has an optimized display effect (for example, brightness, color, and saturation, etc.). When the video file formed at the end of the video recording is played, since each frame of the image for the local part where the main object is located is optimized in real time during the recording process. Therefore, the embodiments of the present application can not only optimize the local part of the main object of the recorded video; moreover, the main object shown in the video moves and the display effect for the main object is optimized and is in real-time synchronization, thus solving the problem of lag in the optimization effect.

[0050] It can be understood that through the first algorithm, the same display content in the real-time captured image data can be recognized frame by frame, and through the second algorithm, the same display content recognized frame by frame can be optimized. This can not only realize the optimization of the local area of the image, but also ensure that the same parts in each frame of the image can be optimized, thereby improving the display effect of the image. At the same time, by performing frame-by-frame recognition and optimization on the local area in the image before displaying the image, the problem of lag in image optimization can be avoided.

[0051] Figure 2B Schematically shows the second flowchart of the shooting method according to an embodiment of the present disclosure.

[0052] As described above, in operation S220, each frame of the multi-frame first captured images is processed based on the first algorithm to determine the local region of each frame of the multi-frame first captured images. In one implementable manner, this operation may further include operations S221 to S222.

[0053] In operation S221, the Nth frame of the first captured images is processed based on the first algorithm to determine the local region of the Nth frame of the first captured images.

[0054] In operation S222, the local region of the Nth frame of the first captured images is used for processing the Nth frame of the first captured images based on the second algorithm, and is also used to determine the focusing position for capturing the (N + 1)th frame of the first captured images.

[0055] Exemplarily, the first algorithm may be a motion tracking algorithm.

[0056] The first algorithm can identify the local region (i.e., the target to be optimized) in the current frame image. The local region identified by the first algorithm can, on the one hand, enable the second algorithm to optimize the local region in the current frame image, and on the other hand, act on the image capture device to make the image capture device focus on the local region in the next frame image. Therefore, the local regions in the next frame and subsequent images among the multi-frame images obtained by using the first algorithm are all clear; and the local regions in the multi-frame images can all achieve local optimization.

[0057] In one example, referring to Figure 2B , the user wants to perform beauty optimization on the target A in the captured image. The first frame of the first captured images regarding the target A is captured by the camera, and the region where the target A is located in the first frame of the first captured images is identified as the local region by using the motion tracking algorithm (the first algorithm). The first frame of the first captured images carrying the local region information is processed by using the beauty algorithm (the second algorithm) to perform beauty processing on the target A (the local region), and the second captured image of the first frame is obtained and displayed on the display screen. The information of the local region of the first frame of the first captured images is sent to the focusing module of the camera. During the process of capturing the second frame of the first captured images, the camera can adjust the camera focal length according to the position of the target A to make the target A in the captured second frame of the first captured images clearly visible. The region where the target A is located in the second frame of the first captured images is identified as the local region by using the motion tracking algorithm (the first algorithm), and beauty processing is performed on the target A in the second frame of the first captured images to obtain the second captured image of the second frame and display the second captured image on the display screen. In this cycle, the information of the local region of the second frame of the first captured images is sent to the focusing module of the camera. During the process of capturing the third frame of the first captured images, ….

[0058] It can be understood that the first algorithm can achieve the recognition and tracking of local regions in multiple frames of images. At the same time, taking the locally tracked and recognized region as the control target for focusing during the image acquisition process can quickly achieve focusing on the local region and realize clear shooting of multiple frames of images with respect to the local region, improving the quality of image acquisition.

[0059] As described above, the first algorithm makes the clarity of the local region of each frame of the multiple first acquisition images higher than that of other regions.

[0060] The first algorithm identifies the local region (i.e., the target to be optimized) in the current frame image, which can act on the image acquisition device to make the image acquisition device focus on the local region in the next frame image. Since the image acquisition device can adjust the focal length according to the change in the position of the local region in the first acquisition image, the clarity of the display of the local region in multiple frames of the first acquisition images is higher than that of the non-local region.

[0061] As described above, the shooting method of this embodiment may further include operations S310 to S320.

[0062] In operation S310, a shooting instruction is obtained.

[0063] In operation S320, in response to the shooting instruction, if the target identifier indicates that the target function is enabled, the following steps are performed: continuously obtaining multiple frames of first acquisition images through the image acquisition device; processing each frame of the multiple first acquisition images based on the first algorithm to determine the local region of each frame of the multiple first acquisition images; wherein, the displayed content within each frame of the local region is the same, and at least the relative positions of the local regions in two adjacent frames are different in the multiple first acquisition images; processing the local regions of each frame of the multiple first acquisition images based on the second algorithm to obtain multiple frames of second acquisition images corresponding one-to-one to the multiple first acquisition images.

[0064] Exemplarily, the shooting instruction may be an instruction to start the image acquisition device for image acquisition. The shooting instruction may be an operation such as a user manually pressing the shutter, a voice command, or a timed trigger.

[0065] The target function may be a function to achieve local optimization for each frame of image of a moving target during image acquisition.

[0066] The target identifier may be a representation for judging the on or off state of the target function. The target identifier may be a hardware identifier. For example, different positions of the hardware switch being toggled indicate that the target function is on or off; the target identifier may also be a software identifier. For example, a logo regarding the target function displayed on the shooting interface.

[0067] When the target function is turned on, the image acquisition device can implement the function of local optimization for each frame of the moving target during the image acquisition process. When the target function is turned off, the image acquisition device executes the conventional shooting process (i.e., local area recognition and optimization cannot be performed).

[0068] In one example, taking the camera application in a mobile phone to shoot target A as an example, the user opens the camera application and turns on the target function in the camera application. The user clicks on video shooting in the camera application and clicks the start recording button. At this time, it is detected that the target function is turned on, and then the first frame of the first acquisition image of target A is acquired through the lens. The motion tracking algorithm (the first algorithm) is used to identify the first position of the area where target A is located in the first frame of the first acquisition image as the local area. The beauty algorithm (the second algorithm) is used to process the first frame of the first acquisition image carrying the local area information, and perform beauty processing on target A (the local area) to obtain the second acquisition image of the first frame, and display the second acquisition image on the display screen. The information of the local area of the first frame of the first acquisition image is sent to the camera. During the process of acquiring the second frame of the first acquisition image, the camera can adjust the camera focus according to the position of target A to make target A in the acquired second frame of the first acquisition image clearly visible. The motion tracking algorithm (the first algorithm) is used to identify the area (the second position) where target A is located in the second frame of the first acquisition image as the local area, perform beauty processing on target A in the second frame of the first acquisition image to obtain the second acquisition image of the second frame, and display the second acquisition image on the display screen. And so on in a loop. A motion video of recording target A is obtained, and target A in each frame of the video is clear and beautified.

[0069] As described above, before operation S310: obtaining a shooting instruction. The shooting method of this embodiment may further include operation S410 to operation S420.

[0070] In operation S410, if the target identifier indicates that the target function is enabled, obtain the subject object, and the subject object acts on the first algorithm.

[0071] In operation S420, obtain the configuration value of the display parameter for the subject object, and the configuration value acts on the second algorithm.

[0072] Exemplarily, the subject object may be the target to be optimized. The local area includes at least the subject object. The subject object may be one or more. For example, perform resolution enhancement on the little monkey in the image, and perform beauty processing on multiple people in the image.

[0073] The main object can be manually selected by the user (such as clicking on the area where the object is located), or the user can pre-enter information about the main object (beautifying a person in a photo), and during shooting, it can be automatically detected according to the input information (such as, face recognition, object detection algorithms, etc.).

[0074] The configuration value of the display parameter for the main object can be an optimization parameter for the main object. For example, the level of beauty, the level of brightness, etc. The second algorithm optimizes the main object according to the optimization parameter.

[0075] In one example, continuing with the example of a camera application on a mobile phone shooting target A, the user opens the camera application and enables the target function in the camera application. Obtain the user's requirements for the captured image of target A: increase the display brightness of target A. The user clicks on video shooting in the camera application and clicks the start recording button. At this time, it is detected that the target function is enabled, so the first frame of the first captured image of target A is collected through the lens, and the area (the first position) where target A is located in the first frame of the first captured image is identified as the local area using a motion tracking algorithm (the first algorithm). The first frame of the first captured image carrying the local area information is processed using a brightness adjustment algorithm (the second algorithm), and beauty processing is performed on target A (the local area) to obtain the second captured image of the first frame, and the second captured image is displayed on the display screen. The information of the local area of the first frame of the first captured image is sent to the camera, and during the process of capturing the second frame of the first captured image, the camera can adjust the camera focus according to the position of target A, making target A in the captured second frame of the first captured image clearly visible. The area (the second position) where target A is located in the second frame of the first captured image is identified as the local area using a motion tracking algorithm (the first algorithm), and brightness adjustment processing is performed on target A in the second frame of the first captured image to obtain the second captured image of the second frame, and the second captured image is displayed on the display screen. This cycle continues. A motion video of recording target A is obtained, and target A in each frame of the video is clear and the brightness is increased.

[0076] As described above, before operation S310: obtaining a shooting instruction. The shooting method of this embodiment may further include operation S510 to operation S520.

[0077] In operation S510, a preview image of the image acquisition device is obtained, and the preview image includes at least one object.

[0078] In operation S520, in response to a selection operation on the object in the preview image, a recognition frame corresponding to the selected object is generated, and the recognition frame acts on the first algorithm.

[0079] Exemplarily, the preview image can be the preview screen displayed on the display screen before the image acquisition device enters image acquisition.

[0080] The recognition frame can be used to identify a local area. The recognition frame can be a frame corresponding to the contour of the object, or the minimum bounding rectangle of the contour of the object. The recognition frame can help the user confirm whether the local area is accurately selected, and can also isolate the pixels in the local area and non-local area of the image, defining the scope of application of the second algorithm.

[0081] In one example, continuing with the example of taking a picture of object A using the camera application on a mobile phone, the user opens the camera application and enables the target function in the camera application. Obtain the user's requirements for the captured image of object A: increase the display brightness of object A. At this time, the camera lens captures an image of object A and displays it on the display screen of the mobile phone (preview image). The user clicks on the location of object A on the display screen. When the user clicks on the location of object A, an identification frame is automatically generated according to the area where object A is located, indicating that the user selects the area where object A is located as the local area for frame-by-frame recognition and optimization.

[0082] As described above, the shooting method of this embodiment may further include operations S610 to S620.

[0083] In operation S610, the preview image is input into the intelligent model to obtain at least one object.

[0084] In operation S620, in response to a selection operation for the object, the selected object is used as the main object.

[0085] Among them, the intelligent model can be obtained through the following operations:

[0086] Obtain a plurality of sample data, where the sample data includes historical images, historical objects corresponding to each historical image, and historical recognition frames corresponding to each historical object;

[0087] Input the sample data into the intelligent model to obtain a predicted object corresponding to each historical image and a predicted recognition frame corresponding to the predicted object;

[0088] According to the differences between the predicted object and the historical object, historical recognition frame, and predicted recognition frame, adjust the parameters of the intelligent model until the difference between the predicted object and the historical object is less than the threshold or the model converges, obtaining the trained intelligent model.

[0089] In one example, continuing with the example of taking a picture of object A using the camera app on a mobile phone, the user opens the camera app and enables the target function in the camera app. The requirements of the user for taking a picture of object A are obtained: to increase the display brightness of object A. At this time, the camera lens captures an image of object A and displays it on the mobile phone's display screen (preview image). The preview image is input into the intelligent model for analysis, and multiple objects in the preview image are obtained: object 1: a puppy, object 2: object A, object 3: a big tree. If the user clicks on the location of object A on the display screen. Then object A is determined as the main object and a recognition frame is generated, and the area where object A is located is used as a local area for frame-by-frame recognition and optimization. If the user clicks on a location on the display screen that is not within objects 1-3, the main object cannot be determined and no recognition frame will be generated.

[0090] As described above, the shooting method of this embodiment may further include operations: according to the edge information of the recognition frame, the first neighborhood pixels and the second neighborhood pixels are determined. The first neighborhood pixels represent the pixel points inside the recognition frame, and the second neighborhood pixels represent the pixel points outside the recognition frame; according to the first neighborhood pixels and the second neighborhood pixels, the pixels at the edge are processed to obtain a third captured image, and the display effect of the third captured image is better than that of the second captured image.

[0091] Exemplarily, the first neighborhood pixels may be the pixels adjacent to the boundary of the main object and the recognition frame, and the first neighborhood pixels belong to the main object.

[0092] The second neighborhood pixels may be the pixels adjacent to the boundary of the image background and the recognition frame, and the second neighborhood pixels belong to the image background.

[0093] The third captured image may be an image in which the edge of the area where the main object is located is blurred. The connection between the area where the main object is located and the background area in the third captured image is more natural. Therefore, the display effect of the third captured image is better than that of the second captured image.

[0094] In one example, on the basis of recognizing the main object, the function of edge detection is embedded, and the edge detection is implemented using the Canny operator. When the main object is recognized, the edge information of the recognition frame is retained. When the second algorithm adjusts the parameters of the pixels of the main object within the recognition frame, the algorithm will automatically perform median blur processing on the pixel points (the first neighborhood pixels and the second neighborhood pixels) near the edge of the recognition frame, so that the transition between the edge of the area where the recognized main object is located and the background is more natural, and it is not easy to have the problem that the color and style of the area where the main object is located are significantly separated from the image background.

[0095] As described above, the shooting method of this embodiment may further include operations: determining first imaging information according to the non-local regions of each frame of the first captured image; determining second imaging information according to the local regions of each frame of the first captured image after being processed by the second algorithm; and determining a second captured image according to the first imaging information and the second imaging information.

[0096] Exemplarily, after local region recognition and beautification are performed on each frame of the first captured image, normal image processing procedures are carried out according to the original pixel data corresponding to the non-local regions in the first captured image to generate first imaging information. The original pixel data of the local regions in the first captured image are optimized by the second algorithm to obtain optimized pixel data, and normal image processing procedures are carried out according to the optimized pixel data to generate second imaging information. The first imaging information and the second imaging information are fused to obtain a second captured image.

[0097] For the convenience of understanding the shooting method of the embodiments of the present disclosure, it will be described in detail in combination with Figure 3 this shooting method.

[0098] Figure 3 FIG. schematically shows the principle diagram of the shooting method according to the embodiments of the present disclosure.

[0099] In one example, taking the case of a running athlete being photographed by the camera application in a mobile phone as an example, the user opens the camera application and enables the target function (local area recognition and optimization) in the camera application. Obtain the user's requirements for the photographed athlete: add a crown logo to the athlete's head. The user clicks on video shooting in the camera application and clicks the button to start recording. At this time, it is detected that the target function is enabled, so the first frame of the first acquisition image of the athlete is collected through the lens. The first position of the area where the athlete is located in the first frame of the first acquisition image is identified as the local area using a motion tracking algorithm (the first algorithm), and a recognition frame is generated. The edge of the recognition frame overlaps with the edge of the local area. The first frame of the first acquisition image carrying local area information is processed using an image processing algorithm (the second algorithm), and a crown is added to the head of the athlete (local area) to obtain the second acquisition image of the first frame. The second acquisition image is displayed on the display screen. The information of the local area of the first frame of the first acquisition image is sent to the camera. During the process of collecting the second frame of the first acquisition image, the camera can adjust the camera focus according to the position of the athlete, so that the athlete A in the collected second frame of the first acquisition image is clearly visible. The area (the second position) where the athlete is located in the second frame of the first acquisition image is identified as the local area using a motion tracking algorithm (the first algorithm), and a recognition frame is generated. A crown is added to the head of the athlete in the second frame of the first acquisition image to obtain the second acquisition image of the second frame. The second acquisition image is displayed on the display screen. And so on in a loop... A motion video of the recorded athlete is obtained, and the athlete in each frame of the video is clear and wears a crown on the head.

[0100] Based on the above shooting method, the present disclosure also provides a shooting device. The photographing device is a processing chip, and the following will be combined with Figure 4 to describe the device in detail.

[0101] Figure 4 Schematically shows a structural block diagram of a shooting device according to an embodiment of the present disclosure.

[0102] As Figure 4 shown, the shooting device 700 of this embodiment includes an acquisition module 710, a first processing module 720, and a second processing module 730.

[0103] The acquisition module 710 is used to continuously obtain multiple frames of the first acquisition image through an image acquisition device. In one embodiment, the acquisition module 710 can be used to perform the operation S210 described above, which will not be elaborated here.

[0104] The first processing module 720 is configured to process each frame of the multi-frame first acquisition images based on a first algorithm to determine a local area of each frame of the multi-frame first acquisition images, wherein the display content within the local area of each frame is the same, and at least two adjacent frames of the local areas in the multi-frame first acquisition images have different relative positions. In one embodiment, the first processing module 720 may be configured to perform the operation S220 described above, which will not be elaborated herein.

[0105] The second processing module 730 is configured to process the local area of each frame of the multi-frame first acquisition images based on a second algorithm to obtain multi-frame second acquisition images that correspond one-to-one to the multi-frame first acquisition images. In one embodiment, the second processing module 730 may be configured to perform the operation S230 described above, which will not be elaborated herein.

[0106] Wherein, the multi-frame second acquisition images are used for the images output by the target application.

[0107] According to an embodiment of the present disclosure, any multiple of the acquisition module 710, the first processing module 720, and the second processing module 730 may be combined and implemented in one module, or any one of them may be split into multiple modules. Or, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 710, the first processing module 720, and the second processing module 730 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or may be implemented by any other reasonable means such as hardware or firmware by integrating or packaging circuits, or may be implemented in any one of the three implementation manners of software, hardware, and firmware or in any appropriate combination of several of them. Or, at least one of the acquisition module 710, the first processing module 720, and the second processing module 730 may be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding functions may be executed.

[0108] An embodiment of the present disclosure also discloses an electronic device, which includes an image acquisition device and a processor.

[0109] The image acquisition device is configured to continuously obtain multi-frame first acquisition images;

[0110] A processor is configured to process each frame of the multiple frames of first captured images based on a first algorithm to determine a local region of each frame of the multiple frames of first captured images; wherein, the display content within each frame of the local region is the same, and at least two adjacent frames of local regions in the multiple frames of first captured images have different relative positions; process the local region of each frame of the multiple frames of first captured images based on a second algorithm to obtain multiple frames of second captured images that correspond one-to-one to the multiple frames of first captured images; wherein, the multiple frames of second captured images are used for images output by a target application.

[0111] Exemplarily, the image acquisition device can be a camera, a video camera, or a mobile terminal with a shooting function; for example, a mobile phone or a tablet computer, etc.; the embodiments of the present disclosure do not make specific limitations here.

[0112] Descriptions of features such as the first algorithm, the second algorithm, the local region, the first captured image, and the second captured image can refer to the description in FIG. 2 above, and will not be elaborated here.

[0113] Figure 5 A block diagram of an electronic device suitable for implementing a shooting method according to an embodiment of the present disclosure is schematically shown.

[0114] As Figure 5 shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage section 808 into a random access memory (RAM) 803. The processor 801 can include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 801 can also include on-board memory for caching purposes. The processor 801 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0115] An image acquisition device (not shown in the figure) is communicatively connected to the processor 801.

[0116] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. The processor 801 performs various operations of the method flow according to an embodiment of the present disclosure by executing the programs in the ROM 802 and / or the RAM 803. It should be noted that the program can also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 can also perform various operations of the method flow according to an embodiment of the present disclosure by executing the programs stored in one or more memories.

[0117] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, and the input / output (I / O) interface 805 is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. The drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read therefrom can be installed into the storage portion 808 as needed.

[0118] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.

[0119] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, device, or device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the above-described ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803.

[0120] Embodiments of the present disclosure also include a computer program product, which includes a computer program, and the computer program includes program codes for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program codes are used to cause the computer system to implement the shooting method provided by the embodiments of the present disclosure.

[0121] When the computer program is executed by the processor 801, the above functions defined in the system / apparatus of the embodiments of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described systems, apparatuses, modules, units, etc. can be implemented by computer program modules.

[0122] In one embodiment, the computer program can rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program can also be transmitted and distributed in the form of signals on a network medium, and be downloaded and installed through the communication part 809, and / or be installed from the removable medium 811. The program code included in the computer program can be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0123] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or be installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiments of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.

[0124] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include but are not limited to, such as Java, C++, python, the "C" language, or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, by using an Internet service provider to connect through the Internet).

[0125] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0126] Those skilled in the art will appreciate that the features recited in the various embodiments and / or claims of the present disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly recited in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features recited in the various embodiments and / or claims of the present disclosure can be combined and combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.

[0127] The embodiments of the present disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments have been described separately above, this does not mean that the measures in the respective embodiments cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present disclosure.

Claims

1. A shooting method, comprising: Continuously obtaining multiple frames of first captured images through an image capturing device; Processing each frame of the multiple frames of first captured images based on a first algorithm to determine a local area of each frame of the multiple frames of first captured images, wherein the display content within each local area of each frame is the same, and at least two adjacent frames of local areas in the multiple frames of first captured images have different relative positions; Processing the local area of each frame of the multiple frames of first captured images based on a second algorithm to obtain multiple frames of second captured images corresponding one-to-one to the multiple frames of first captured images; Wherein, the multiple frames of second captured images are used for the images output by the target application.

2. The method according to claim 1, processing each frame of the multiple frames of first captured images based on a first algorithm to determine a local area of each frame of the multiple frames of first captured images, comprising: Processing the Nth frame of first captured image based on a first algorithm to determine the local area of the Nth frame of first captured image; The local area of the Nth frame of first captured image is used for the processing of the Nth frame of first captured image based on the second algorithm, and is also used to determine the focusing position for capturing the (N + 1)th frame of first captured image; Wherein, N is an integer greater than or equal to 1.

3. The method according to claim 1 or 2, the first algorithm makes the clarity of the local area of each frame of the multiple frames of first captured images higher than the clarity of other areas.

4. The method according to claim 1, the method further comprises: Obtaining a shooting instruction; In response to the shooting instruction, if the target identifier indicates that the target function is enabled, perform the following steps: Continuously obtaining multiple frames of first captured images through an image capturing device; Processing each frame of the multiple frames of first captured images based on a first algorithm to determine a local area of each frame of the multiple frames of first captured images; wherein the display content within each local area of each frame is the same, and at least two adjacent frames of local areas in the multiple frames of first captured images have different relative positions; Processing the local area of each frame of the multiple frames of first captured images based on a second algorithm to obtain multiple frames of second captured images corresponding one-to-one to the multiple frames of first captured images.

5. The method according to claim 4, before obtaining the shooting instruction, comprising: If the target identifier indicates that the target function is enabled, obtaining a main object, and the main object acts on the first algorithm; Obtaining a configuration value of the display parameter for the main object, and the configuration value acts on the second algorithm.

6. The method according to claim 5, the method further comprises: Obtaining a preview image of the image capturing device, the preview image including at least one object; In response to a selection operation on the object in the preview image, generating an identification frame corresponding to the selected object, and the identification frame acts on the first algorithm.

7. The method according to claim 6, the method further comprises: Inputting the preview image into an intelligent model to obtain at least one object; In response to a selection operation on the object, using the selected object as the main object.

8. The method according to claim 6, the method further comprises: Determine a first neighborhood pixel and a second neighborhood pixel according to the edge information of the recognition frame, where the first neighborhood pixel represents a pixel point inside the recognition frame, and the second neighborhood pixel represents a pixel point outside the recognition frame; Process the pixels at the edge according to the first neighborhood pixel and the second neighborhood pixel to obtain a third acquisition image, and the display effect of the third acquisition image is better than that of the second acquisition image.

9. The method according to claim 1, wherein the method further comprises: Determine first imaging information according to the non-local region of each frame of the first acquisition image; Determine second imaging information according to the local region of each frame of the first acquisition image processed by the second algorithm; Determine a second acquisition image according to the first imaging information and the second imaging information.

10. An electronic device, comprising: An image acquisition device for continuously obtaining multiple frames of first acquisition images; A processor for processing each frame of the multiple frames of first acquisition images based on a first algorithm to determine the local region of each frame of the multiple frames of first acquisition images; wherein, the display content within each frame of the local region is the same, and at least the relative positions of the local regions of two adjacent frames are different in the multiple frames of first acquisition images; processing the local region of each frame of the multiple frames of first acquisition images based on a second algorithm to obtain multiple frames of second acquisition images corresponding to the multiple frames of first acquisition images one by one; wherein, the multiple frames of second acquisition images are used for the images output by the target application.