Shooting method, device, electronic device and storage medium
By pre-acquisitioning and using the target cache image processed by exposure parameters, the problem of photography delay in motion scene shooting is solved, and the shooting speed and user experience are improved.
Patent Information
- Application Number
- CN202210673199.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-06-15
AI Technical Summary
When shooting sports scenes, due to the long exposure time, the shooting effect is not ideal and serious shadowing phenomenon occurs. The existing technology solves the problem by reducing the exposure time and increasing the exposure gain, but this will cause the shooting speed to decrease and cannot be timely. Capture the moment the user wants to record.
By responding to the user's shooting preview interface input, the target cache image is obtained in advance according to the exposure parameters, and the image is directly used when receiving the input to avoid re-exposure, thereby improving the shooting speed.
It realizes rapid shooting during sports scene shooting, reduces photo delay, and improves the immediacy and user experience of capture.
Smart Images

Figure CN115278047B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of photography, and specifically relates to a photography method, device, electronic device and storage medium. Background Art
[0002] At present, when shooting moving scenes, due to the long exposure time, the capture effect is not ideal and serious ghosting occurs. In order to solve this problem, the method of reducing exposure time and increasing exposure gain is generally used to capture moving scenes, which can reduce ghosting. Reducing exposure time and increasing gain can be achieved during shooting.
[0003] When reducing the exposure time, the preview screen is normal, but because the exposure time and exposure gain are updated when shooting, it is necessary to reset the exposure time and exposure gain and re-output the image frame. This will greatly reduce the shooting speed, which is not in line with the concept of snapshot. The output image will have a larger delay than the moment of snapshot, and may not capture the moment the user wants to record. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a shooting method, device, electronic device and storage medium, which can solve the problem of photo delay in related technologies.
[0005] In a first aspect, an embodiment of the present application provides a shooting method, the method comprising:
[0006] Receive a first input from a user on the shooting preview interface;
[0007] In response to the first input, acquiring at least one frame of target cache image;
[0008] Based on the at least one frame of target cache image, obtaining a target image;
[0009] Among them, when the first input is performed, the shooting device moves relative to the shooting scene, or the shooting scene includes a moving object; the target cache image is an image obtained by exposing according to a first exposure parameter before receiving the first input; the first exposure parameter is determined based on a second exposure parameter and motion information, the second exposure parameter is an exposure parameter corresponding to a target preview image displayed on the shooting preview interface, the target preview image is a preview image whose brightness value meets a preset condition, and the motion information is the motion information of the shooting device relative to the shooting scene, or the motion information of the moving object.
[0010] In a second aspect, an embodiment of the present application provides a photographing device, the photographing device comprising:
[0011] A first receiving module, used to receive a first input from a user on the shooting preview interface;
[0012] A first acquisition module, configured to acquire at least one frame of target cache image in response to the first input;
[0013] A first determination module is used to obtain a target image based on the at least one frame of the target cache image; wherein, when the first input is performed, the shooting device moves relative to the shooting scene, or the shooting scene includes a moving object; the target cache image is an image obtained by exposing according to a first exposure parameter before receiving the first input; the first exposure parameter is determined based on a second exposure parameter and motion information, the second exposure parameter is an exposure parameter corresponding to the target preview image displayed on the shooting preview interface, the target preview image is a preview image whose brightness value meets a preset condition, and the motion information is the motion information of the shooting device relative to the shooting scene, or the motion information of the moving object.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0017] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0018] In an embodiment of the present application, by responding to the user's first input to the shooting preview interface, at least one frame of target cache image that is pre-exposed according to the first exposure parameter before receiving the first input can be directly obtained, and then the target image can be obtained based on the at least one frame of target cache image. Since the at least one frame of target cache image is at least one frame of image frame that is pre-exposed according to the first exposure parameter before receiving the first input, when shooting the shooting preview interface, the at least one frame of target cache image that is pre-exposed can be directly obtained without re-exposure, thereby improving the speed of taking pictures. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a schematic diagram showing exposure using a common exposure technology according to an exemplary embodiment;
[0020] Figure 2 is a schematic diagram showing exposure using an exposure overlap technique according to an exemplary embodiment;
[0021] Figure 3 is a flowchart of a shooting method according to an exemplary embodiment;
[0022] Figure 4 is a structural schematic diagram of a photographing device according to an exemplary embodiment;
[0023] Figure 5 is a schematic structural diagram of an electronic device according to an exemplary embodiment;
[0024] Figure 6 It is a schematic diagram of the hardware structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0026] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0027] As described in the background technology section, there is a problem of photo delay when performing motion capture in the prior art. In order to solve this problem, an embodiment of the present application provides a shooting method. By responding to a first input from a user to a shooting preview interface, at least one frame of target cache image pre-exposed according to a first exposure parameter before receiving the first input can be directly obtained, and then a target image can be obtained based on the at least one frame of target cache image. Since the at least one frame of target cache image is at least one frame of image frame pre-exposed according to the first exposure parameter before receiving the first input, when shooting the shooting preview interface, the at least one frame of target cache image obtained in advance can be directly obtained without re-exposure, thereby improving the speed of shooting.
[0028] Before introducing the technical solution of the embodiment of the present application, the exposure overlap technology to be used in the technical solution of the present application is first introduced.
[0029] like Figure 1 This is a schematic diagram of exposure using ordinary exposure technology. Assuming that the exposure time of the two frames is inconsistent, during exposure, after the first row 110 of the first frame is exposed and read, it is necessary to wait until the last row 140 of the first frame is exposed and read before the exposure data of the first row 120 of the second frame can be read. The exposure interval H1 between the two frames, that is, the time interval, is relatively large.
[0030] like Figure 2 This is a schematic diagram of exposure using the exposure overlap technology. Assuming that the exposure times of the two frames are inconsistent, during exposure, after the first line 210 of the first frame is exposed and read, there is no need to wait for the last line 240 of the first frame to be exposed and read, but the exposure and reading of the first line 220 of the second frame can be continued directly. The exposure interval H2 between the two frames is relatively short.
[0031] The following is a detailed description of the shooting method provided in the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0032] Figure 3 This is a flow chart of a shooting method provided in an embodiment of the present application. The execution subject of the shooting method may be a shooting device, which may be integrated into an electronic device or used alone, and is not limited here. It should be noted that the above execution subject does not constitute a limitation on the embodiments of the present application.
[0033] In an embodiment of the present application, the electronic device may be an intelligent terminal with a photographing function, and may be, but not limited to, a personal computer (PC), a smart phone, a tablet computer or a personal digital assistant (PDA).
[0034] like Figure 3 As shown, the shooting method provided in the embodiment of the present application may include steps 310 to 340.
[0035] Step 310: Receive a first input from a user on the shooting preview interface.
[0036] The first input may be an input for shooting the shooting preview interface. Specifically, the first input may be a click input, a double-click input, a slide input, a voice input, a gesture input, etc. on the shooting control of the electronic device by the user, or a combination of at least two of the above inputs, which is not limited here.
[0037] Step 320: In response to the first input, obtain at least one frame of target cache image.
[0038] The target cache image may be an image frame acquired in response to the first input. The specific target cache image may be at least one frame of the multiple images obtained by exposing according to the first exposure parameter before receiving the first input. That is, the target cache image is at least one frame of the multiple images obtained by controlling the shooting device to expose the photosensitive unit in the image sensor according to the first exposure parameter from the time when the user starts to shoot accurately (i.e., the shooting preview interface is displayed) until the user presses the shooting shutter to terminate.
[0039] Here, multiple frames of images obtained by exposing the photosensitive unit in the image sensor by the shooting device according to the first exposure parameter are stored in the cache space. After receiving the first input from the user on the shooting preview interface, at least one frame of the target cache image is obtained from the cache space in response to the first input.
[0040] When the photographing device exposes the photosensitive units in the image sensor according to the first exposure parameter, the photosensitive units in the image sensor may be exposed in an overlapping exposure manner to obtain multiple frames of images.
[0041] The first exposure parameter here may be determined based on the second exposure parameter and the motion information. The second exposure parameter may be an exposure parameter corresponding to the target preview image displayed on the shooting preview interface. The exposure parameters (the first exposure parameter and the second exposure parameter) here may include exposure time and exposure gain.
[0042] The target preview image may be a preview image whose brightness value satisfies a preset condition. The preset condition here may be a brightness value that satisfies normal exposure. That is to say, the second exposure parameter may specifically be a parameter value when the brightness value of the preview image displayed on the shooting preview interface satisfies normal brightness (for example, it may be a value determined based on the exposure time and the exposure gain).
[0043] The motion information may be motion information of the shooting device relative to the shooting scene corresponding to the shooting preview interface, or motion information of a moving object, where the moving object may be a moving object in the shooting scene.
[0044] The following is a detailed description of the specific application scenarios of motion information:
[0045] 1) Motion information of the shooting device relative to the shooting scene corresponding to the shooting preview interface:
[0046] A specific example may be a situation where shooting is performed on a moving car. At this time, the shooting device is always moving relative to the shooting scene corresponding to the shooting preview interface.
[0047] 2) Motion information of moving objects:
[0048] For example, the initial shooting scene is always static, and suddenly a bird enters, and the bird is the moving object. That is, a moving object is added to the static shooting scene.
[0049] Step 330: Obtain a target image based on at least one frame of the target cache image.
[0050] The target image may be a final image obtained by processing at least one frame of acquired target cache image.
[0051] In some embodiments of the present application, in order to further improve the speed of photographing, before step 310, the above-mentioned photographing method may further include:
[0052] Determining a second exposure parameter corresponding to the target preview image according to light intensity information in the shooting scene;
[0053] Acquiring motion information of the shooting device relative to the shooting scene, or motion information of a moving object in the shooting scene;
[0054] Determining a first exposure parameter based on the second exposure parameter and the motion information;
[0055] Based on the overlapping exposure mode, the image sensor of the shooting device is controlled to perform exposure according to the first exposure parameter to obtain at least one frame of cached image.
[0056] The second exposure parameter may be an exposure parameter for performing normal exposure on the shooting scene when shooting the shooting scene.
[0057] The first exposure parameter may be an exposure parameter for performing motion exposure on the shooting scene when shooting the shooting scene.
[0058] The at least one cached image frame may be an image frame obtained by exposing a photosensitive unit in the image sensor according to a first exposure parameter based on an overlapping exposure technique. The at least one cached image frame may include a target cached image.
[0059] In some embodiments of the present application, when performing motion capture, the automatic exposure control module in the electronic device can calculate the second exposure parameter for normal exposure when shooting the shooting scene based on the light intensity information in the shooting scene corresponding to the current shooting preview interface, that is, the exposure parameter corresponding to the target preview image displayed on the shooting preview interface. How to calculate the second exposure parameter for normal exposure when shooting the shooting scene based on the light intensity information in the current shooting scene belongs to the prior art and will not be described in detail here.
[0060] After obtaining the second exposure parameter, the second exposure parameter can be sent to the motion module, which can calculate the first exposure parameter of motion exposure when shooting the scene based on the second exposure parameter and motion information (i.e., motion information of the shooting device relative to the shooting scene, or motion information of the moving object in the shooting scene).
[0061] Specifically, according to the second exposure parameter and the motion information, the first exposure parameter for motion exposure when shooting the scene can be calculated by converting the first exposure parameter (exposure time and exposure gain) according to the motion level of the motion information. Specifically, the exposure time can be reduced and the exposure gain can be increased (the greater the motion level of the specific motion information, the more the exposure time is reduced and the greater the exposure gain is increased). However, the requirements shown in the following formula (1) need to be met:
[0062] normal exptime *normal gain =sport exptime *sport gain (1)
[0063] Among them, normal exptime Indicates the exposure time during normal exposure; normal gain Indicates the exposure gain during normal exposure; sport exptime Indicates the exposure time for sports exposure; gain Indicates the exposure gain during motion exposure.
[0064] Then, the first exposure parameter can be sent to the image sensor via the I2C transmission bus. After receiving the first exposure parameter, the image sensor can use overlapping exposure technology to expose the photosensitive unit in the sensor according to the first exposure parameter to obtain at least one frame of cached image.
[0065] The image sensor then transmits at least one frame cache image to the image signal processing module. Specifically, a mobile industry processor interface (MIPI) virtual channel identification code (VC ID) is set for each frame cache image, and each frame cache image is sent to the image signal processing module based on the VC ID. The image signal processing module can parse each received frame cache image based on a camera serial interface decoder (CSID), and then cache each frame cache image into a cache space.
[0066] It should be noted that each cached image frame in the cache space has its corresponding VC ID. The larger the VC ID, the more recent it is, that is, the shorter the time it has been stored. The smaller the VC ID, the longer the time it has been stored.
[0067] In an embodiment of the present application, a second exposure parameter corresponding to the target preview image can be determined based on the light intensity information in the shooting scene, and then based on the second exposure parameter and motion information (motion information of the shooting device relative to the shooting scene, or motion information of the moving object in the shooting scene), a first exposure parameter for motion exposure when shooting the shooting scene can be calculated. In this way, based on the overlapping exposure method, the image sensor of the shooting device can be controlled to expose according to the first exposure parameter to obtain at least one frame of cached image. In this way, when shooting the shooting preview interface, at least one frame of target cached image can be directly obtained from the at least one frame of cached image without re-exposure, thereby further improving the speed of shooting.
[0068] In some embodiments of the present application, reducing exposure time and increasing gain can be achieved not only during shooting, but also during shooting preview. If reducing exposure time is achieved during shooting preview, serious banding phenomenon is likely to occur due to the sharp reduction of exposure time, and because the exposure time becomes particularly small, when the environment changes, the compensation value of exposure gain will change greatly, which will cause the color, noise and tone of the shooting preview to jump, which is very bad experience.
[0069] In order to solve the above problem, after determining the first exposure parameter based on the second exposure parameter and the motion information, the above shooting method may further include:
[0070] Based on the overlapping exposure mode, according to the second exposure parameter, the image sensor of the shooting device is controlled to perform exposure to obtain a target preview image;
[0071] The target preview image is displayed in the shooting preview interface.
[0072] The target preview image may be an image obtained by controlling the image sensor of the shooting device to perform exposure according to the second exposure parameter based on the overlapping exposure mode.
[0073] In some embodiments of the present application, after the sensor module receives the second exposure parameter, it can also control the image sensor of the shooting device to expose according to the second exposure parameter based on the overlapping exposure mode to obtain multiple frames of preview images (i.e., target preview images). Then, the target preview image is transmitted to the image signal processing module, and specifically, a mobile industry processor interface (MIPI) virtual channel identification code (VC ID) is set for the target preview image, and the target preview image is sent to the image signal processing module based on the VC ID. The image signal processing module can parse the received target preview image based on the CSID, and then the target preview image can be sent to the shooting preview processing flow for processing, specifically, the processing flow of sending the RAW format image to the YUV processing module, which includes color, noise, and tone processing, and then the preview image displayed on the shooting preview interface is updated, that is, the processed target preview image is updated to the preview image displayed on the shooting preview interface.
[0074] It should be noted that when both the first exposure parameter and the second exposure parameter are sent to the sensor module, the first exposure parameter can be sent first, and then the second exposure parameter can be sent. In this way, the sensor module uses an overlapping exposure method to respectively use the first exposure parameter and the second exposure parameter to control the image sensor of the shooting device for exposure. Specifically, the exposure can be performed first according to the first exposure parameter, and then according to the second exposure parameter. In this way, what you see is what you get can be better obtained, and the image frame of the moving moment can be captured.
[0075] It should be noted that when both the first exposure parameter and the second exposure parameter are sent to the sensor module, different VC IDs are used to send the first exposure parameter and the second exposure parameter to the sensor module respectively.
[0076] In some embodiments of the present application, the exposure parameters may include exposure time and exposure gain. Specifically, the first exposure parameter may include: first exposure time and first exposure gain. The second exposure parameter may include: second exposure time and second exposure gain.
[0077] When the first exposure parameter is calculated based on the second exposure parameter, specifically, the product of the first exposure time and the first exposure gain is equal to the product of the second exposure time and the second exposure gain.
[0078] Correspondingly, the brightness value of the target cache image is equal to the brightness value of the target preview image.
[0079] In an embodiment of the present application, based on the overlapping exposure method, the image sensor of the shooting device is controlled to perform exposure according to the second exposure parameter to obtain a target preview image, and then the target preview image is displayed in the shooting preview interface. The target preview image displayed in this way has a stable effect, no stripes will appear, and the color, noise and tone of the target preview image finally obtained do not jump.
[0080] In some embodiments of the present application, the acquisition of at least one frame of target cache image is introduced below with respect to the above two types of motion information respectively.
[0081] 1) In the case where the shooting device moves relative to the shooting scene, step 320 may specifically include:
[0082] When the shooting device moves relative to the shooting scene, at least one frame of target cache image is acquired from at least one frame of cache image.
[0083] The matching degree of at least one frame of the target cache image with the current preview image may be less than a preset threshold.
[0084] The current preview image may be an image displayed on the shooting preview interface when the first input is received.
[0085] The matching degree between the at least one frame of the target cache image and the current preview image may be the matching degree between the image content of the at least one frame of the target cache image and the image content of the current preview image.
[0086] The preset threshold may be a preset threshold of the matching degree between at least one frame of the target cache image and the current preview image. The threshold may be set according to user needs and is not limited here.
[0087] In some embodiments of the present application, when the motion information is the first case: when the shooting device moves relative to the shooting scene, for example, when shooting in a speeding car, the user actually suddenly sees a certain scene and wants to capture it. This capture is sudden, and there should be a certain delay from seeing the scene to clicking to take a picture. Moreover, since the shooting scene is constantly changing, when the first input of the user clicking the shooting control is received, the cached image (i.e., the target cached image) that has been stored for a period of time can be obtained from the cache space as much as possible.
[0088] In some embodiments of the present application, when the shooting device moves relative to the shooting scene, at least one frame of target cache image is obtained from at least one frame of cache image, where the at least one frame of target cache image may have a matching degree with the current preview image that is less than a preset threshold, and the current preview image may be an image displayed on the shooting preview interface when the first input is received, that is, when the shooting device moves relative to the shooting scene, the image with the largest matching difference with the current preview image may be selected, because considering that the shooting scene is always changing, when clicking to take a picture, there is a difference between the current preview image and the scene to be captured, so a cache image with a relatively large difference in image content from the current preview image may be obtained, so that a target cache frame that better meets user needs can be obtained, and what you see is what you get can be better achieved, thereby improving user experience.
[0089] 2) When the shooting scene includes a moving object, step 320 may specifically include:
[0090] When the captured scene includes a moving object, acquiring at least one frame of target cache image from at least one frame of cache image;
[0091] The matching degree of at least one frame of the target cache image with the current preview image may be greater than a preset threshold.
[0092] The current preview image may be an image displayed on the shooting preview interface when the first input is received.
[0093] The matching degree between the at least one frame of the target cache image and the current preview image may be the matching degree between the image content of the at least one frame of the target cache image and the image content of the current preview image.
[0094] The preset threshold may be a preset threshold of the matching degree between at least one frame of the target cache image and the current preview image. The threshold may be set according to user needs and is not limited here.
[0095] In some embodiments of the present application, when the motion information is the second case: the shooting scene includes a moving object, for example, the initial shooting scene may be static, and suddenly a moving object such as a bird enters. In this case, the user should be in a fixed shooting scene to capture a moving object. The user is already prepared, and there is no suddenness. The delay from seeing the moving object to clicking to take a photo is relatively short. In this case, the preview screen is similar to the screen you want to capture, so you can select the cache image with the best match, that is, you can try to obtain the cache image that has just been stored (that is, the target cache image) from the cache space.
[0096] In one example, assuming that there are 8 cached images in the cache space, and these 8 cached images have different VC IDs, when the shooting device moves relative to the shooting scene, the cached images with VC IDs of 0-3 can be taken (i.e., the time difference with the image displayed on the current preview interface is relatively large, because the earlier the cached image is stored, the smaller its VC ID). When the shooting scene includes a moving object, the cached images with VC IDs of 4-7 can be taken (i.e., the time difference with the image displayed on the current preview interface is relatively small, because the later the cached image is stored, the larger its VC ID).
[0097] It should be noted that for the above two types of motion information, which frame to select can be selected according to user needs. It is also possible to perform simple feature matching on each cached image in the VC ID and the image displayed on the current shooting preview interface, and select a specific cached image based on the feature matching result. Specifically, under the first type of motion information, the one with the largest matching difference can be selected, because considering that the shooting scene is always changing, there is a difference between the shooting preview screen and the shooting scene you want to capture when clicking to take a photo, so the one with the largest matching difference can be selected, for example, the cached image with VC ID 0 can be selected. Under the second type of motion information, the one with the smallest matching difference can be selected, because the shooting scene is static, and you just want to capture the moment of a moving object, and the shooting preview screen is similar to the screen you want to capture, so the one with the smallest matching difference can be selected.
[0098] In some embodiments of the present application, when the shooting scene includes a moving object, at least one frame of target cache image is obtained from at least one frame of cache image, where the at least one frame of target cache image may have a matching degree with the current preview image greater than a preset threshold, and the current preview image may be an image displayed on the shooting preview interface when the first input is received, that is, when the shooting device moves relative to the shooting scene, the preview screen is similar to the screen to be captured, so the cache image with the best matching degree can be selected, that is, a cache image with an image content that is relatively small different from the current preview image can be obtained, so that a target cache image that better meets user needs can be obtained, and what you see is what you get can be better achieved, thereby improving user experience.
[0099] In some embodiments of the present application, in order to further improve the user experience, step 330 may specifically include:
[0100] Performing image enhancement processing on at least one frame of the acquired target cache image to obtain an enhanced target cache image;
[0101] Based on the enhanced target cache image, a target image is obtained.
[0102] In some embodiments of the present application, after acquiring at least one frame of the target cache image, certain processing may be performed on the at least one frame of the target cache image. For example, if it is detected that the shooting scene environment is relatively dark, certain pre-noise reduction processing may be performed on the at least one frame of the target cache image. If it is detected that the dynamic range of the shooting scene is very high, certain tone processing may be performed on the at least one frame of the target cache image.
[0103] It should be noted that when processing at least one frame of the target cache image, a certain shooting speed may be lost, that is, the shooting speed is affected. Therefore, when performing image enhancement processing, it is only necessary to perform it in some necessary cases (such as the above-mentioned dark environment and the case of a high dynamic range).
[0104] It should be noted that after obtaining at least one enhanced frame of the target cache image, the enhanced at least one frame of the target cache image can be sent to the photo stream for processing. Specifically, it can be a processing flow of sending the RAW format image of the photo to the YUV processing module to obtain data (i.e., the target image) in a preset format (for example, it can be jpeg format).
[0105] In an embodiment of the present application, image enhancement processing is performed on at least one frame of the acquired target cache image to improve the quality of the at least one frame of the target cache image, and then the at least one frame of the enhanced target cache image is obtained, and then based on the at least one frame of the enhanced target cache image, the target image can be obtained, so that a target image of good quality that satisfies the user can be obtained, thereby improving the user experience.
[0106] The shooting method provided in the embodiment of the present application can be executed by a shooting device. In the embodiment of the present application, the shooting method is executed by a shooting device as an example to illustrate the shooting device provided in the embodiment of the present application.
[0107] Figure 4 The figure is a schematic diagram showing the structure of a photographing device according to an exemplary embodiment.
[0108] like Figure 4 As shown, the photographing device 400 may include:
[0109] The first receiving module 410 is used to receive a first input from a user on the shooting preview interface;
[0110] The image signal processing module 420 is used to obtain at least one frame of target cache image in response to the first input; and obtain a target image based on the at least one frame of target cache image; wherein, when the first input is performed, the shooting device moves relative to the shooting scene, or the shooting scene includes a moving object; the target cache image is an image obtained by exposing according to a first exposure parameter before receiving the first input; the first exposure parameter is determined based on a second exposure parameter and motion information, the second exposure parameter is an exposure parameter corresponding to the target preview image displayed on the shooting preview interface, the target preview image is a preview image whose brightness value meets a preset condition, and the motion information is the motion information of the shooting device relative to the shooting scene corresponding to the shooting preview interface, or the motion information of the moving object.
[0111] In an embodiment of the present application, the image signal processing module responds to the first input of the user to the shooting preview interface received by the first receiving module, and can directly obtain at least one target image frame that is pre-exposed according to the first exposure parameters before receiving the first input, and then the target image can be obtained based on the at least one target image frame. Since the at least one target image frame is at least one image frame that is pre-exposed according to the first exposure parameters before receiving the first input, when shooting the shooting preview interface, the at least one target image frame that is pre-exposed can be directly obtained without re-exposure, thereby improving the speed of shooting.
[0112] In some embodiments of the present application, in order to further improve the speed of taking pictures, the above-mentioned shooting device may further include:
[0113] An automatic exposure control module, used to determine a second exposure parameter corresponding to the target preview image according to light intensity information in the shooting scene;
[0114] A second acquisition module, used to acquire motion information of the shooting device relative to the shooting scene, or motion information of a moving object in the shooting scene;
[0115] a motion module, configured to determine a first exposure parameter based on the second exposure parameter and the motion information;
[0116] The control module is used to control the image sensor of the shooting device to perform exposure based on the overlapping exposure mode and according to the first exposure parameter to obtain at least one frame of cache image, wherein the at least one frame of cache image includes the target cache image.
[0117] In some embodiments of the present application, in order to improve user experience, the first acquisition module may be specifically used to:
[0118] When the shooting device moves relative to the shooting scene, acquiring at least one frame of target cache image from the at least one frame of cache image;
[0119] The matching degree between the at least one frame of the target cache image and the current preview image is less than a preset threshold, and the current preview image is the image displayed on the shooting preview interface when the first input is received.
[0120] In some embodiments of the present application, in order to improve user experience, the first acquisition module may be specifically used to:
[0121] In a case where the shooting scene includes a moving object, acquiring at least one frame of target cache image from the at least one frame of cache image;
[0122] The matching degree between the at least one frame of the target cache image and the current preview image is greater than a preset threshold, and the current preview image is the image displayed on the shooting preview interface when the first input is received.
[0123] In some embodiments of the present application, in order to stabilize the effect of the displayed shooting preview screen, the sensor module may also be specifically used to: based on the overlapping exposure mode, control the image sensor of the shooting device to expose according to the second exposure parameter to obtain a target preview image;
[0124] Correspondingly, the device further includes: a display module, configured to display the target preview image in the shooting preview interface.
[0125] In some embodiments of the present application, the brightness value of the target cache image is equal to the brightness value of the target preview image.
[0126] In some embodiments of the present application, in order to further improve the user experience, the image signal processing module 420 may be specifically used for:
[0127] Performing image enhancement processing on the acquired at least one frame of the target cache image to obtain an enhanced target cache image;
[0128] Based on the enhanced target cache image, a target image is obtained.
[0129] The shooting device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0130] The shooting device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0131] The shooting device provided in the embodiment of the present application can achieve Figure 3 The various processes implemented in the method embodiment achieve the same technical effect and will not be described again here to avoid repetition.
[0132] Alternatively, if Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501 and a memory 502, wherein the memory 502 stores programs or instructions that can be executed on the processor 501, and when the program or instructions are executed by the processor 501, the various steps of the above-mentioned shooting method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0133] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0134] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0135] The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610.
[0136] Those skilled in the art will appreciate that the electronic device 600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 610 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0137] The user input unit 607 is used to receive a first input from a user on the shooting preview interface;
[0138] The processor 610 is configured to obtain at least one frame of target cache image in response to the first input; and obtain a target image based on the at least one frame of target cache image.
[0139] Wherein, when the first input is performed, the shooting device moves relative to the shooting scene, or the shooting scene includes a moving object; the target cache image is an image obtained by exposure according to the first exposure parameter before receiving the first input; the first exposure parameter is determined based on the second exposure parameter and the motion information, the second exposure parameter is the exposure parameter corresponding to the target preview image displayed on the shooting preview interface, the target preview image is a preview image whose brightness value meets the preset condition, and the motion information is the motion information of the shooting device relative to the shooting scene corresponding to the shooting preview interface, or the motion information of the moving object. In this way, by responding to the user's first input to the shooting preview interface, at least one target image frame pre-exposed according to the first exposure parameter before receiving the first input can be directly obtained, and then the target image can be obtained according to the at least one target image frame. Since the at least one target image frame is at least one image frame pre-exposed according to the first exposure parameter before receiving the first input, when shooting the shooting preview interface, at least one target image frame pre-exposed can be directly obtained without re-exposure, thereby improving the speed of shooting.
[0140] Optionally, the processor 610 is further used to determine a second exposure parameter corresponding to the target preview image based on the light intensity information in the shooting scene; obtain motion information of the shooting device relative to the shooting scene, or motion information of a moving object in the shooting scene; determine a first exposure parameter based on the second exposure parameter and the motion information; and control the image sensor of the shooting device to expose according to the first exposure parameter based on an overlapping exposure method to obtain at least one frame of cached image, wherein the at least one frame of cached image includes the target cached image.
[0141] In this way, the second exposure parameter corresponding to the target preview image can be determined according to the light intensity information in the shooting scene, and then based on the second exposure parameter and motion information (motion information of the shooting device relative to the shooting scene, or motion information of the moving object in the shooting scene), the first exposure parameter of motion exposure when shooting the shooting scene can be calculated. In this way, based on the overlapping exposure method, the image sensor of the shooting device can be controlled to expose according to the first exposure parameter to obtain at least one frame of cached image. In this way, when shooting the shooting preview interface, at least one frame of target cached image can be directly obtained from the at least one frame of cached image without re-exposure, thereby further improving the speed of shooting.
[0142] Optionally, the processor 610 is also used to obtain at least one frame of target cache image from the at least one frame of cache image when the shooting device moves relative to the shooting scene; wherein the matching degree between the at least one frame of target cache image and the current preview image is less than a preset threshold, and the current preview image is the image displayed on the shooting preview interface when the first input is received.
[0143] In this way, when the shooting device moves relative to the shooting scene, at least one frame of target cache image is obtained from at least one frame of cache image, where the at least one frame of target cache image may have a matching degree with the current preview image that is less than a preset threshold, and the current preview image may be an image displayed on the shooting preview interface when the first input is received. That is, when the shooting device moves relative to the shooting scene, the image with the largest matching difference with the current preview image may be selected. This is because considering that the shooting scene is constantly changing, when clicking to take a photo, there is a difference between the current preview image and the scene to be captured, so a cache image with a relatively large difference in image content from the current preview image may be obtained. In this way, a target cache frame that better meets user needs can be obtained, and what you see is what you get can be better achieved, thereby improving user experience.
[0144] Optionally, the processor 610 is also used to obtain at least one frame of target cache image from the at least one frame of cache image when the shooting scene includes a moving object; wherein the degree of match between the at least one frame of target cache image and the current preview image is greater than a preset threshold, and the current preview image is the image displayed on the shooting preview interface when the first input is received.
[0145] In this way, when the shooting scene includes a moving object, at least one frame of target cache image is obtained from at least one frame of cache image, where at least one frame of target cache image may have a matching degree with the current preview image greater than a preset threshold, and the current preview image may be an image displayed on the shooting preview interface when the first input is received, that is, when the shooting device moves relative to the shooting scene, the preview screen is similar to the screen to be captured, so the cache image with the best matching degree can be selected, that is, a cache image with an image content that is relatively small different from the current preview image can be obtained, so that a target cache frame that better meets user needs can be obtained, so that what you see is what you get can be better achieved, and the user experience is improved.
[0146] Optionally, the processor 610 is further configured to control the image sensor of the shooting device to perform exposure according to the second exposure parameter based on an overlapping exposure mode to obtain a target preview image; and display the target preview image in the shooting preview interface.
[0147] In this way, by controlling the image sensor of the shooting device to expose according to the second exposure parameter based on the overlapping exposure method, a target preview image is obtained, and then the target preview image is displayed in the shooting preview interface. The target preview image displayed in this way has a stable effect, no stripes will appear, and the color, noise and tone of the target preview image finally obtained do not jump.
[0148] Optionally, the processor 610 is further configured to perform image enhancement processing on the acquired at least one frame of the target cache image to obtain an enhanced target cache image; and obtain the target image based on the enhanced target cache image.
[0149] In this way, image enhancement processing is performed on at least one frame of the acquired target cache image to improve the quality of at least one frame of the target cache image, and then the enhanced at least one frame of the target cache image is obtained. Then, based on the enhanced at least one frame of the target cache image, the target image can be obtained. In this way, a target image of good quality that satisfies the user can be obtained, thereby improving the user experience.
[0150] It should be understood that in the embodiment of the present application, the input unit 604 may include a graphics processor (GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel 6071 and at least one of other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0151] The memory 609 can be used to store software programs and various data. The memory 609 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 609 may include a volatile memory or a non-volatile memory, or the memory 609 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 609 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0152] The processor 610 may include one or more processing units; optionally, the processor 610 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 610.
[0153] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned shooting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0154] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0155] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0156] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0157] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0158] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0160] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A shooting method, applied to a shooting device, characterized in that: The method comprises: Receive a first input from a user on the shooting preview interface; In response to the first input, acquiring at least one frame of target cache image; Based on the at least one frame of target cache image, obtaining a target image; Wherein, when the first input is performed, the shooting device moves relative to the shooting scene, or the shooting scene includes a moving object; the target cache image is an image obtained by exposure according to a first exposure parameter before receiving the first input; the first exposure parameter is determined based on a second exposure parameter and motion information, the second exposure parameter is an exposure parameter corresponding to a target preview image displayed on the shooting preview interface, the target preview image is a preview image whose brightness value meets a preset condition, and the motion information is motion information of the shooting device relative to the shooting scene corresponding to the shooting preview interface, or motion information of the moving object; The step of acquiring at least one frame of target cache image comprises: When the shooting device moves relative to the shooting scene, at least one frame of target cache image is acquired from at least one frame of cache image; wherein the degree of match between the at least one frame of target cache image and the current preview image is less than a preset threshold, and the current preview image is the image displayed on the shooting preview interface when the first input is received; In the case where the shooting scene includes a moving object, at least one frame of target cache image is obtained from at least one frame of cache image; wherein the degree of match between the at least one frame of target cache image and the current preview image is greater than a preset threshold, and the current preview image is the image displayed on the shooting preview interface when the first input is received.
2. The method according to claim 1, characterized in that Before receiving a first input from a user on the shooting preview interface, the method further includes: Determining a second exposure parameter corresponding to the target preview image according to the light intensity information in the shooting scene; Acquiring motion information of the shooting device relative to the shooting scene, or motion information of a moving object in the shooting scene; determining a first exposure parameter based on the second exposure parameter and the motion information; Based on the overlapping exposure mode, the image sensor of the shooting device is controlled to perform exposure according to the first exposure parameter to obtain at least one frame of cache image, and the at least one frame of cache image includes the target cache image.
3. The method according to claim 2, characterized in that After determining the first exposure parameter based on the second exposure parameter and the motion information, the method further includes: Based on the overlapping exposure mode, the image sensor of the shooting device is controlled to perform exposure according to the second exposure parameter to obtain a target preview image; The target preview image is displayed in the shooting preview interface.
4. The method according to claim 1, characterized in that: The brightness value of the target cache image is equal to the brightness value of the target preview image.
5. The method according to any one of claims 1 to 4, characterized in that: The step of obtaining a target image based on the at least one frame of the target cache image comprises: Performing image enhancement processing on the acquired at least one frame of the target cache image to obtain an enhanced target cache image; Based on the enhanced target cache image, a target image is obtained.
6. A photographing device, characterized in that: The device comprises: A first receiving module, used to receive a first input from a user on the shooting preview interface; An image signal processing module, configured to obtain at least one frame of a target cache image in response to the first input; and obtain a target image based on the at least one frame of the target cache image; wherein, when the first input is performed, the shooting device moves relative to the shooting scene, or the shooting scene includes a moving object; the target cache image is an image obtained by exposing according to a first exposure parameter before receiving the first input; the first exposure parameter is determined based on a second exposure parameter and motion information, the second exposure parameter is an exposure parameter corresponding to a target preview image displayed on the shooting preview interface, the target preview image is a preview image whose brightness value meets a preset condition, and the motion information is motion information of the shooting device relative to the shooting scene, or motion information of the moving object; The step of acquiring at least one frame of target cache image comprises: When the shooting device moves relative to the shooting scene, at least one frame of target cache image is acquired from at least one frame of cache image; wherein the degree of match between the at least one frame of target cache image and the current preview image is greater than a preset threshold, and the current preview image is the image displayed on the shooting preview interface when the first input is received; In the case where the shooting scene includes a moving object, at least one frame of target cache image is obtained from at least one frame of cache image; wherein the degree of match between the at least one frame of target cache image and the current preview image is less than a preset threshold, and the current preview image is the image displayed on the shooting preview interface when the first input is received.
7. The device according to claim 6, characterized in that The device also includes: An automatic exposure control module, used to determine a second exposure parameter corresponding to the target preview image according to light intensity information in the shooting scene; A second acquisition module, used to acquire motion information of the shooting device relative to the shooting scene, or motion information of a moving object in the shooting scene; a motion module, configured to determine a first exposure parameter based on the second exposure parameter and the motion information; The control module is used to control the image sensor of the shooting device to perform exposure based on the overlapping exposure mode and according to the first exposure parameter to obtain at least one frame of cache image, wherein the at least one frame of cache image includes the target cache image.
8. The device according to claim 7, characterized in that The control module is further used to: based on the overlapping exposure mode and according to the second exposure parameter, control the image sensor of the shooting device to perform exposure to obtain a target preview image; The device also includes: A display module is used to display the target preview image in the shooting preview interface.
9. The device according to claim 6, characterized in that The brightness value of the target cache image is equal to the brightness value of the target preview image.
10. The device according to any one of claims 6 to 9, characterized in that: The image signal processing module is specifically used for: Performing image enhancement processing on the acquired at least one frame of the target cache image to obtain an enhanced target cache image; Based on the enhanced target cache image, a target image is obtained.
11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the shooting method according to any one of claims 1 to 5 are implemented.
12. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the shooting method according to any one of claims 1 to 5 are implemented.
