WO2018161640A1 - Long-exposure photographing method and device - Google Patents

Long-exposure photographing method and device Download PDF

Info

Publication number
WO2018161640A1
WO2018161640A1 PCT/CN2017/112433 CN2017112433W WO2018161640A1 WO 2018161640 A1 WO2018161640 A1 WO 2018161640A1 CN 2017112433 W CN2017112433 W CN 2017112433W WO 2018161640 A1 WO2018161640 A1 WO 2018161640A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame data
picture
exposure
exposure time
compared
Prior art date
Application number
PCT/CN2017/112433
Other languages
French (fr)
Chinese (zh)
Inventor
罗义军
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018161640A1 publication Critical patent/WO2018161640A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene

Definitions

  • the present application relates to the field of communications, for example, to a long exposure photographing method and apparatus.
  • the mobile phone camera is limited by the sensitivity sensor, and the problem of low-light scenes such as night scenes is generally poor.
  • the most effective way to improve this problem is to increase the exposure time, but the exposure time is too long to be blurred, you must use a tripod to shoot.
  • Embodiments of the present disclosure provide a long exposure photographing method and apparatus to at least solve the problem of blurring a picture taken in a long exposure situation in the related art.
  • a long exposure photographing method including:
  • performing multiple exposures in the preset first exposure time comprises: periodically performing exposure according to the second exposure time within a preset first exposure time, wherein the first exposure time is greater than the Second exposure time.
  • the adjusting the plurality of frame data according to the preset rule includes: selecting frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value as reference frame data; and adjusting according to the reference frame data The plurality of frame data.
  • adjusting the plurality of frame data according to the reference frame data including: selecting a specified object area in a picture corresponding to the reference frame data, and adjusting the plurality of frame data according to the specified object area The corresponding picture.
  • selecting the specified object area in the picture corresponding to the reference frame data includes: selecting the specified object area within a predetermined range around the focus frame data of the reference frame data.
  • selecting the specified object area in the picture corresponding to the reference frame data includes: dividing the picture corresponding to the reference frame data into M*N pixel groups, and the color values of the first pixel group and surrounding If the difference between the color values of the pixel group is greater than a preset value, determining that the first pixel group is a clear pixel group, or that the difference between the brightness value of the first pixel group and the brightness value of the surrounding pixel group is greater than a pre- In the case of setting a value, determining that the first pixel group is a clear pixel group, wherein the M and N are natural numbers; and in a case where the picture has a specified area including a plurality of consecutive clear pixel groups, It is determined that the designated area is the specified object area.
  • adjusting the picture corresponding to the multiple frame data according to the specified target area including: selecting four the specified objects in a predetermined range around four corners of the picture corresponding to the reference frame a region, the center of the four specified object regions is connected to form a reference pattern, and a plurality of graphics to be compared corresponding to the reference graphics are acquired in the plurality of frame data according to the reference graphics; and the graphics to be compared are adjusted.
  • the graphics to be compared corresponding to the plurality of frames are coincident with the reference graphics.
  • the picture corresponding to the frame data of the graphic to be compared is moved synchronously with the graphic to be compared.
  • adjusting the graphic to be compared includes: comparing four boundary lengths or four corner angles of the graphic to be compared and the reference graphic, wherein, in the four boundaries or the four corners In a case where the at least one boundary length difference is greater than the first preset value or the corner angle difference is greater than the second preset value, the shape to be compared is adjusted according to the reference pattern.
  • the method further includes: comparing the four boundary length differences in the comparison to be smaller than the first preset If the value, or the difference of the four corner angles is smaller than the second preset value, determining that the picture corresponding to the frame data of the graphic to be compared does not need to be adjusted.
  • the adjusting the graphics to be compared includes: rotating a specified boundary of the graphics to be compared to be parallel to a boundary corresponding to the specified boundary in the reference graphics, where the multiple frame data corresponds to The picture is rotated in synchronization with the graphic to be compared.
  • the adjusting the graphic to be compared includes: moving a geometric center of the graphic to be compared to a same position as a geometric center of the reference graphic, wherein a picture and a corresponding image of the frame data of the graphic to be compared Tells the comparison graph to move synchronously.
  • the display effect of the picture corresponding to the composite target frame is adjusted.
  • a long exposure photographing apparatus which is applied to a photographing apparatus, including: an acquisition module configured to perform multiple exposures in a preset first exposure time, and acquire the plurality of a plurality of frame data corresponding to the second exposure, wherein the data corresponding to each exposure is used as one frame data of the plurality of frame data; and the adjusting module is configured to adjust the plurality of frame data according to a preset rule, The picture of the adjusted plurality of frame data is combined with the picture corresponding to the target frame, and the picture is output.
  • the obtaining module is further configured to periodically perform exposure according to a second exposure time within a preset first exposure time, wherein the first exposure time is greater than the second exposure time.
  • determining that the sum of the second exposure times is less than the preset first exposure time is less than the preset first exposure time.
  • the adjusting module is further configured to: select, as the reference frame data, the first frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value; and adjust the multiple according to the reference frame data.
  • Frame data is further configured to: select, as the reference frame data, the first frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value; and adjust the multiple according to the reference frame data.
  • Frame data is further configured to: select, as the reference frame data, the first frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value.
  • the adjusting module is further configured to: select a specified object area in a picture corresponding to the reference frame data, and adjust the designation of the picture corresponding to the multiple frame data according to the specified target area The object area.
  • Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions arranged to perform the above method.
  • An embodiment of the present disclosure further provides an electronic device, including:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
  • multiple exposures are performed during a long exposure time to obtain a plurality of frame data, and all or part of the available frame data of the plurality of frame data are adjusted, and the adjusted plurality of frame data is combined into one.
  • Picture take this picture as a photo of this long exposure photo.
  • a plurality of frame data are adjusted and then combined into one picture, which effectively solves the problem that the long exposure photography in the related art directly obtains a blurred photo, that is, the picture taken in the case of long exposure is blurred, so that the long exposure shooting is performed.
  • the photo is clearer.
  • FIG. 1 is a block diagram showing the hardware structure of a mobile terminal of a long exposure photographing method according to an embodiment of the present disclosure
  • FIG. 2 is a flow chart of a long exposure photographing method in accordance with an embodiment of the present disclosure
  • FIG. 3 is a flow chart of long exposure photographing in accordance with an embodiment of the present disclosure.
  • FIG. 4 is a flow diagram of selecting a reference frame and a reference point in accordance with an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of a reference point selection of a reference frame in accordance with an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of selection of reference points in other frame data in accordance with an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram 1 of a connection of reference points of a reference frame according to an embodiment of the present disclosure
  • FIG. 8 is a second schematic diagram of a connection of reference points of a reference frame in accordance with an embodiment of the present disclosure
  • FIG. 9 is a flow chart of a method of performing another method of long exposure photographing according to an embodiment of the present disclosure.
  • FIG. 10 is a block diagram showing the structure of a long exposure photographing apparatus according to an embodiment of the present disclosure.
  • Embodiment 1 of the present application can be executed in a device such as a camera or a mobile terminal.
  • the device may include:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
  • FIG. 1 is a hardware structural block diagram of a mobile terminal of a long exposure photographing method according to an embodiment of the present disclosure.
  • the mobile terminal 10 may include one or more (only one shown) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA).
  • a memory 104 configured to store data
  • a transmission device 106 configured as a communication function.
  • the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the above electronic device.
  • the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the memory 104 can be configured as a software program and a module for storing application software, such as a program instruction/module corresponding to a long exposure photographing method in the embodiment of the present disclosure, and the processor 102 is stored by running
  • the software program and modules within the memory 104 perform various functional applications and data processing, i.e., implement the methods described above.
  • Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 can include memory remotely located relative to processor 102, which can be connected to mobile terminal 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Transmission device 106 is configured to receive or transmit data via a network.
  • the network instance described above may include a wireless network provided by a communication provider of the mobile terminal 10.
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a Radio Frequency (RF) module configured to communicate with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • FIG. 2 is a flowchart of a long exposure photographing method according to an embodiment of the present disclosure. As shown in FIG. 2, the flow includes the following steps. :
  • Step S202 performing multiple exposures in a preset first exposure time, and acquiring a plurality of frame data corresponding to the multiple exposures, wherein the data corresponding to each exposure is used as one frame data of the plurality of frame data.
  • the first exposure time of the place is the long exposure photo set in the camera. During this time period, multiple exposures may also be called performing multiple ordinary photographs.
  • step S204 the plurality of frame data is adjusted according to the preset rule, and the adjusted picture of the plurality of frame data is combined with the picture corresponding to the target frame, and the picture is output.
  • the sequence of the above steps does not limit the execution order of the technical solution, that is, in the process of acquiring multiple frame data, the frame data that has been acquired can be adjusted at the same time, the new frame data is continuously acquired, and the new frame data is continuously adjusted. It saves the processing time of the process. Finally, when the new frame data is no longer acquired, all the frame data may be adjusted accordingly, and then the composition is unified, or the adjustment of one piece can be adjusted. Zhang, in the synthesis of a new one.
  • the exposure is periodically performed according to the second exposure time within a preset first exposure time, wherein the first exposure time is greater than the second exposure time.
  • determining that the sum of the second exposure time is less than the preset first exposure time is less than the preset first exposure time.
  • adjusting the multiple frame data according to the preset rule including: selecting frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value as the reference frame data; and adjusting the multiple according to the reference frame data.
  • Frame data There may be multiple ways to select a reference frame. You can select the Nth frame data that can be used in the frame data as the reference frame. You can specify the frame corresponding to the frame data by using some preset image related parameters. of. It is also possible to select a photo with a good position of the photographing object in the plurality of frame data as a reference frame, that is, a photograph in which a person or an object is in an intermediate position in the photograph can be used as a reference frame. Generally, the selection of the reference frame provides a good basis for synthesizing a plurality of frame data. A good reference is not limited to the content in the above embodiment.
  • the specified object area is selected in the picture corresponding to the reference frame data, and the picture corresponding to the plurality of frame data is adjusted according to the specified object area.
  • an area within a predetermined range around the focus area of the picture corresponding to the reference frame data is selected within the predetermined range around the focus area of the reference frame data as the designated object area;
  • the pixel group is a clear pixel group, or, in a case where a difference between a luminance value of the first pixel group and a luminance value of the surrounding pixel group is greater than a preset value, determining that the first pixel group is a clear pixel group, wherein the M and N are natural numbers; in the case where there are a plurality of consecutive designated areas of the clear pixel group in the designated area of the picture, it is determined that the designated area is the designated object area.
  • the method of selecting a specified object area is the same as the concept of selecting a reference frame in a plurality of frame data, and an area with a clear photographing effect can be selected as the designated object area.
  • the designated object area is connected to the center of the four specified object areas to form a reference pattern; and the plurality of to-be-compared patterns corresponding to the reference pattern are acquired in the plurality of frame data according to the reference pattern;
  • the graphics to be compared are adjusted until the graphics to be compared corresponding to the plurality of frames overlap with the reference graphics, and the image corresponding to the frame data of the graphics to be compared is moved synchronously with the graphics to be compared.
  • the two figures cannot be completely coincident and there can be a margin of error.
  • the shape of the pattern to be compared is adjusted according to the reference pattern.
  • the adjustment of the shape of the picture corresponding to the frame data In the process of adjusting the shape of the picture to be compared, the picture of the picture to be compared will undergo some deformation correspondingly, some parts of the picture will be compressed, and some parts will be Stretching.
  • the comparison of the four boundary length differences is less than a first preset value, or the four corner angles.
  • the difference is smaller than the second preset value, determining the picture corresponding to the frame data of the to-be-compared graphic does not need to be adjusted in shape.
  • the specified boundary of the graphic to be compared is rotated to be parallel with a boundary corresponding to the specified boundary in the reference graphic, wherein a picture corresponding to the plurality of frame data is rotated synchronously with the graphic to be compared. It is described in the embodiment that the sides or corners of the two figures are the same, but the pattern to be compared may be somewhat inclined, and the pattern to be compared may be rotated at this moment, so that the two figures can be coincident by parallel movement.
  • the geometric center of the graphic to be compared is moved to the same position as the geometric center of the reference graphic, and the image corresponding to the frame data of the graphic to be compared is moved synchronously with the graphic to be compared.
  • the technical solution described in the present embodiment is the simplest adjustment and movement adjustment after the above-described deformation adjustment and rotation adjustment. Applies to the fact that the two graphics are almost identical, but the position of the graphic to be compared is somewhat deviated, and the offset photo can be pulled back to the position of the reference graphic.
  • the above three adjustment methods can be used in combination or in a single use, and the order of use is not limited.
  • the exposure photo ends here.
  • the display effect of the picture corresponding to the compositing target frame is adjusted.
  • the picture by performing the comparison adjustment method in the shooting target area, the picture can be more accurately adjusted to make the taken picture clearer.
  • the exposure is performed multiple times according to the normal exposure time; each exposure data is used as the picture corresponding to one frame of data; comparing the data information of each frame, the picture corresponding to the multi-frame data is selected for adjustment, and after adjustment, the multi-frame is adjusted.
  • the picture corresponding to the data is combined into a long exposure picture of one frame.
  • a frame in which the data difference between the other frame data is in the middle may be selected as the reference frame, and the picture corresponding to the other frame data is adjusted according to the reference frame.
  • the technical solution in this embodiment is that the selected reference frame satisfies the following conditions, and other frames can be adjusted to the position of the reference frame by performing small adjustment.
  • the first one of the plurality of frame data may be selected to have high definition, and the frame data of the reference frame may be used as the reference frame.
  • one or more object areas in the frame data may be selected for comparison.
  • the object area when the object area is selected, the object area may refer to the size of the photographing object; if the portrait is large, the corresponding set object area may include a portrait, or the object area may be set to any size.
  • the selected object area, the area near the focus area, or the area with sharp edges in the photo may be set as the designated object area.
  • the adjustment may be completed by partially or integrally shifting or scaling or enlarging or stretching or squeezing. That is, it corresponds to the technical solution of the deformation adjustment in the subsequent embodiment.
  • the priority when the picture corresponding to the frame data is adjusted, the priority may be adjusted according to different weights, and the picture area with a large weight is adjusted.
  • the brightness or contrast of the picture may be increased to facilitate selection of the object area and adjustment of the frame data, and the previous data needs to be restored after the adjustment.
  • frame data adjustments can be made simultaneously during long exposures.
  • the frame data whose data difference is too large or unclear may be discarded, and only part of the frame data of the plurality of frame data captured is selected as the adjustment object.
  • the picture edge information may be cropped due to the missing picture edge information caused by the frame data adjustment.
  • the state of the mobile phone can be detected according to a sensor such as a gyroscope or an acceleration, and the adjusted picture can refer to the detected mobile phone movement state. That is, during the shooting process, if the camera moves laterally, the corresponding shooting object is more and more rightward in the position of the photo. Later, when adjusting the frame data, the camera moving state can be referred to, and the image corresponding to the frame data to be adjusted is directed to Move some left to close to the reference frame.
  • a sensor such as a gyroscope or an acceleration
  • the adjusted picture can refer to the detected mobile phone movement state. That is, during the shooting process, if the camera moves laterally, the corresponding shooting object is more and more rightward in the position of the photo. Later, when adjusting the frame data, the camera moving state can be referred to, and the image corresponding to the frame data to be adjusted is directed to Move some left to close to the reference frame.
  • the frame data may be processed by an image to synthesize a long exposure image, or the frame data may be used to synthesize the original long exposure data, and then image processing is performed.
  • image processing refers to Image Signal Processor (ISP) or platform processing.
  • the platform processing means that the processor manufacturer such as Qualcomm performs some display effect processing on the picture corresponding to the acquired frame data, for example, definition, white balance, and the like.
  • FIG. 3 is a flow chart of a long exposure photographing according to an embodiment of the present disclosure. As shown in FIG. 3, the flow includes the following steps:
  • Step S301 starting a long exposure function
  • Step S302 setting a long exposure time
  • Step S303 exposing according to a normal exposure time
  • Step S304 reading frame data
  • Step S305 determining whether the total exposure time is greater than a set long exposure time
  • Step S306 after determining that the total exposure time is greater than the set long exposure time, completing the exposure data synthesis;
  • Step S307 picture effect processing
  • Step S308 long exposure picture output.
  • the steps of adjusting the frame data and synthesizing the target frame are performed correspondingly in performing the above steps.
  • Step S302 setting an exposure time
  • the long exposure time (corresponding to the first exposure time in the above embodiment) is first set. Since the long exposure time is the sum of all exposure times (corresponding to the sum of the second exposure times in the above embodiment), there is an intermittent time between frame exposures, and in addition, frame synthesis and picture processing take time. So the shooting process will be slightly larger than the set long exposure time.
  • the exposure gain value can be calculated according to the set long exposure time.
  • the longer the long exposure time the lower the gain value, the smaller the noise, and the better the picture quality.
  • the user sets the long exposure time range to 1/4 s-4s.
  • Step S303 according to the normal exposure time exposure (corresponding to the multiple exposure in the above embodiment, or the second exposure time), the current low-light scene exposure time of the mobile phone is generally set between 1/10s-1/20s, when the exposure time At 1/10s, the picture is easily blurred.
  • the frame exposure time is set to 1/20 s, and the image blur caused by hand shake is minimized.
  • Step S304 reading frame data
  • Read a plurality of frame data save separately for subsequent adjustment and synthesis, determine whether the total exposure time is greater than the set long exposure time, and determine the mode, multiply the frame exposure by the current total number of frames as the total exposure time, and set the length Exposure time comparison, if the total exposure time is less than the set long exposure time, the frame exposure is continued; if the total exposure time is greater than or equal to the set long exposure time, the exposure is completed. Carry out the next steps.
  • Step S307 picture effect processing
  • the effect of the synthesized long exposure image processing such as ISP processing, platform processing.
  • the frame adjustment may cause the edge of the frame data portion to be missing, the affected edge is cropped.
  • the area corresponding to the reference point in the middle is used as the adjustment reference area, and the frame data is translated, Stretch, scale, deform, twist, etc., so that the adjustment reference area is aligned with the reference point.
  • FIG. 4 is a flow chart of selecting a reference frame and a reference point in accordance with an embodiment of the present disclosure, as described in FIG. 4, including the following steps:
  • Step S401 sequentially detecting frame image image sharpness
  • Step S402 whether the frame data sharpness is greater than a set threshold
  • Step S403 in the case that it is determined that the frame data sharpness is greater than a set threshold, the frame is selected as a reference frame for other frame adjustment;
  • Step S404 detecting an object area with a clear boundary in the reference frame
  • Step S405 the object area is selected as an adjustment base point.
  • Step S401 sequentially detecting frame image image clarity:
  • Step S404 detecting an object area with a clear boundary in the reference frame:
  • Step S405 selecting the object area as an adjustment base point
  • FIG. 5 is a schematic diagram of a reference point selection of a reference frame according to an embodiment of the present disclosure. As shown in FIG. 5, ABCDE is a selected five boundary clear objects. (Boundary objects are represented by geometry).
  • FIG. 6 is a schematic diagram of selection of reference points in other frame data according to an embodiment of the present disclosure. As shown in FIG. 6, the dotted rectangular areas Za, Zb, Zc, Zd, and Ze are respectively corresponding reference point areas.
  • reference point regions Za, Zb, Zc, Zd, and Ze in the other frame data correspond to the reference points in the reference frame as Ca, Cb, Cc, Cd, and Ce, respectively.
  • the coordinate system is established by the horizontal direction of the frame image as the X axis and the vertical direction being the Y axis, and the lower left fixed point being the far point O.
  • FIG. 7 is a first schematic diagram of the connection of reference points of a reference frame according to an embodiment of the present disclosure. As shown in FIG. 7, K1, K2, K3, and K4 are shown.
  • FIG. 8 is a schematic diagram 2 of connection of reference points of a reference frame according to an embodiment of the present disclosure. As shown in FIG. 8 , the angles of four line segments of CbCc, CcCd, CdCe, and CeCb are respectively shown as ⁇ 1, ⁇ 2, ⁇ 3, and ⁇ 4.
  • the CbCc and Cb'Cc', CcCd and Cc'Cd' and Cd'Ce', CdCe, CeCb and CeCb', CbCd and Cb'Cd', CcCe and Cc'Ce are compared in length, If the length difference is less than a certain threshold, and the difference between ⁇ 1 and ⁇ 1', ⁇ 2, and ⁇ 2' is less than a certain threshold, it indicates that the adjustment frame is substantially free from deformation compared with the reference frame, and deformation adjustment is not required.
  • a certain threshold is preset, which is equivalent to the first preset value and the second preset value in the foregoing embodiment.
  • Cb, Cd, and Ce are fixed points
  • Cc is the adjustment point
  • the frame image is adjusted by using the deformation adjustment
  • K1 is kept unchanged, so that CbCc and Cb'Cc' are equal.
  • the image deformation algorithm can adopt an algorithm such as a deformation algorithm in photoshop.
  • Cb, Cc, and Cd are fixed points
  • Ce is an adjustment point
  • the frame image is adjusted by using the deformation adjustment so that CbCe and Cb'Ce' are equal and ⁇ 1 and ⁇ 1' are equal.
  • Cb, Cc, and Ce are fixed points
  • Cd is the adjustment point
  • the frame image is adjusted by using the deformation adjustment so that CcCd and Cc'Cd' are equal and ⁇ 2 and ⁇ 2' are equal.
  • the reference point region center Cb' in which the center of the frame reference point region and the center of the reference frame reference point region are minimized in the reference frame reference point near the four corners of the above-mentioned deformation adjustment is the picture rotation adjustment center, and the entire frame image is adjusted by rotation.
  • K1 K1'.
  • the frame image needs to be adjusted so that the center point Ca' of the reference point area near the center in the adjustment frame and Ca' in the reference frame are in the above coordinate system.
  • the target frame is used to store the composite picture, the target frame is the initial value of the reference frame, and the adjusted frame data is added according to the corresponding pixel data.
  • the user selects the long exposure mode to take a photo, sets the long exposure time, performs shooting, and the shooting is completed and automatically Store long exposure images.
  • FIG. 9 is a flowchart of another method for performing long exposure photographing according to an embodiment of the present disclosure. As shown in FIG. 9 , the method flow is similar to the method flow in FIG. 3 , and the flow includes the following steps:
  • Step S901 starting a long exposure function
  • Step S902 setting a long exposure time
  • Step S903 exposing according to a normal exposure time
  • Step S904 reading frame data
  • Step S905 determining whether the total exposure time is greater than the set long exposure time
  • Step S906 after determining that the total exposure time is greater than the set long exposure time, completing the exposure data synthesis;
  • step S907 the long exposure picture is output.
  • the technical solution in the embodiments of the present disclosure can greatly improve the photographing quality of the mobile phone in low-light scenes such as night scenes, and improve the competitiveness of the mobile phone.
  • the method according to the foregoing embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware.
  • the technical solution of the present disclosure which is essential or contributes to the related art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM).
  • the instructions include a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present disclosure.
  • a long-exposure photographing device is also provided, which can be applied to a photographing device, and the device is configured to implement the above-mentioned embodiments and implementation manners, and the detailed description thereof has been omitted.
  • the term "module" can implement a combination of software and/or hardware for a predetermined function.
  • FIG. 10 is a structural block diagram of a long exposure photographing apparatus according to an embodiment of the present disclosure. As shown in FIG. 10, the apparatus includes:
  • the obtaining module 1002 is configured to perform multiple exposures in a preset first exposure time to acquire a plurality of frame data corresponding to the multiple exposures, wherein data corresponding to each exposure is used as the multiple frames One frame of data in the data;
  • the adjustment module 1004 is connected to the acquisition module 1002 and configured to adjust the plurality of frame data according to a preset rule, and synthesize the adjusted image of the plurality of frame data into a picture corresponding to the target frame, and output the picture.
  • the obtaining module 1002 is further configured to periodically perform exposure according to a second exposure time within a preset first exposure time, wherein the first exposure time is greater than the second exposure time.
  • the adjusting module 1004 is further configured to: select, as the reference frame data, the first frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value; and adjust the according to the reference frame data. Multiple frame data.
  • the adjusting module 1004 is further configured to: select a specified object area in a picture corresponding to the reference frame data, and adjust the picture of the picture corresponding to the multiple frame data according to the specified object area. Specify the object area.
  • the adjustment module 1004 is further configured as one of the following situations:
  • the designated area is the designated object area.
  • the adjusting module 1004 is further configured to select four the specified object areas respectively within a predetermined range around four corners of the picture corresponding to the reference frame, and connect the centers of the four specified object areas Forming a reference pattern, wherein a picture center of the reference frame is a center of the reference pattern; and a plurality of to-be-compared patterns corresponding to the reference pattern are acquired in the plurality of frame data according to the reference pattern;
  • the adjustment module 1004 is further configured to adjust the graphic to be compared until the graphic to be compared coincides with the reference graphic.
  • the adjusting module 1004 is further configured to compare four boundary lengths and four corner angles of the graphic to be compared and the reference graphic, wherein in the four boundaries and the four corners In a case where the at least one boundary length difference is greater than the first preset value or the corner angle difference is greater than the second preset value, the shape to be compared is adjusted according to the reference pattern.
  • the adjustment module 1004 is further configured to rotate a specified boundary of the graphic to be compared to be parallel to a boundary corresponding to the specified boundary in the reference graphic, wherein the plurality of frame data correspond to The picture is rotated in synchronization with the graphic to be compared.
  • the adjusting module 1004 is further configured to move a geometric center of the graphic to be compared to a same position as a geometric center of the reference graphic, wherein a picture and a corresponding image of the frame data of the graphic to be compared Tells the comparison graph to move synchronously.
  • the acquiring module 1002 is further configured to: before adjusting the plurality of frame data according to the preset rule, adjust a display effect of the picture corresponding to each frame data of the multiple frame data;
  • the adjustment module 1004 is further configured to adjust a display effect of the picture corresponding to the compositing target frame after synthesizing the pictures of the adjusted plurality of frame data into the picture corresponding to the target frame.
  • the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the above modules are all located in the same processor; or, the above modules are respectively located in different combinations. In the processor.
  • Embodiments of the present disclosure also provide a storage medium.
  • a computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
  • the computer readable storage medium may be a transitory computer readable storage medium, or A non-transitory computer readable storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • S1 performing multiple exposures in a preset first exposure time, acquiring a plurality of frame data corresponding to the multiple exposures, wherein data corresponding to each exposure is used as one frame of the plurality of frame data data;
  • the plurality of frame data is adjusted according to a preset rule, and the adjusted picture of the plurality of frame data is combined with the picture corresponding to the target frame, and the picture is output.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs the method steps in the foregoing embodiments according to the stored program code in the storage medium.
  • modules or steps of the present disclosure described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. As such, the disclosure is not limited to any specific combination of hardware and software.
  • the long exposure photographing method and device provided by the application effectively solve the problem that the long exposure photograph in the related art directly obtains a blurred photograph, that is, the blur of the photograph taken under the long exposure, so that the long exposure
  • the photos taken are clearer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

Provided are a long-exposure photographing method and device. The method comprises: performing, within a long-exposure period, multiple exposures to obtain multiple frame data items; and performing adjustment of all or some available frame data items of the multiple frame data items, combining the multiple adjusted frame data items to form an image, and taking the image as a resulting image of a current long-exposure photographing operation. In the above technical solution, multiple frame data items are adjusted and then combined to form an image, thereby effectively solving a problem in the prior art of a direct output of a blurry long-exposure image, namely a blurry image resulting from a long-exposure photographing operation, and providing a clearer long-exposure image.

Description

长曝光拍照方法及装置Long exposure photographing method and device 技术领域Technical field
本申请涉及通信领域,例如涉及一种长曝光拍照方法及装置。The present application relates to the field of communications, for example, to a long exposure photographing method and apparatus.
背景技术Background technique
在相关技术中,手机相机由于灵敏度sensor所限,普遍存在夜景等低光场景效果差的问题。改善这个问题最有效的方法是,增大曝光时间,但是曝光时间过长容易模糊,必须使用三脚架拍摄。In the related art, the mobile phone camera is limited by the sensitivity sensor, and the problem of low-light scenes such as night scenes is generally poor. The most effective way to improve this problem is to increase the exposure time, but the exposure time is too long to be blurred, you must use a tripod to shoot.
相关技术中很多手机都有长曝光功能,但是用户很难用手持方式拍摄,而且基本上用户不会使用三脚架给手机拍照。所以,手机上长曝光功能对用户来说基本没意义。Many mobile phones in the related art have a long exposure function, but it is difficult for a user to shoot in a handheld manner, and basically the user does not use a tripod to take a photo of the mobile phone. Therefore, the long exposure function on the mobile phone is basically meaningless to the user.
针对相关技术中,长曝光情况下拍摄的图片模糊的问题,目前还没有有效地解决方案。In view of the related art, the problem of blurring pictures taken under long exposure conditions has not been effectively solved.
发明内容Summary of the invention
本公开实施例提供了一种长曝光拍照方法及装置,以至少解决相关技术中长曝光情况下拍摄的图片模糊的问题。Embodiments of the present disclosure provide a long exposure photographing method and apparatus to at least solve the problem of blurring a picture taken in a long exposure situation in the related art.
根据本公开的一个实施例,提供了一种长曝光拍照方法,包括:According to an embodiment of the present disclosure, a long exposure photographing method is provided, including:
在预设的第一曝光时间内进行多次曝光,获取与所述多次曝光对应的多个帧数据,其中,每次曝光所对应的数据作为所述多个帧数据中的一帧数据;依据预设规则调整所述多个帧数据,将调整后的多个帧数据的图片合成目标帧对应的图片,输出所述图片。And performing multiple exposures in a preset first exposure time to obtain a plurality of frame data corresponding to the multiple exposures, wherein data corresponding to each exposure is used as one frame data of the plurality of frame data; The plurality of frame data is adjusted according to a preset rule, and the adjusted picture of the plurality of frame data is combined with the picture corresponding to the target frame, and the picture is output.
可选地,在预设的第一曝光时间内进行多次曝光,包括:在预设的第一曝光时间内按照第二曝光时间周期性进行曝光,其中,所述第一曝光时间大于所述第二曝光时间。Optionally, performing multiple exposures in the preset first exposure time comprises: periodically performing exposure according to the second exposure time within a preset first exposure time, wherein the first exposure time is greater than the Second exposure time.
可选地,在预设的第一曝光时间内按照第二曝光时间周期性进行曝光之前, 确定所述第二曝光时间的和值小于所述预设的第一曝光时间。Optionally, before the exposure is periodically performed according to the second exposure time within the preset first exposure time, Determining that the sum of the second exposure times is less than the preset first exposure time.
可选地,依据预设规则调整所述多个帧数据,包括:选取所述多个帧数据中的集中值FV值大于预设值的帧数据作为基准帧数据;依据所述基准帧数据调整所述多个帧数据。Optionally, the adjusting the plurality of frame data according to the preset rule includes: selecting frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value as reference frame data; and adjusting according to the reference frame data The plurality of frame data.
可选地,依据所述基准帧数据调整所述多个帧数据,包括:在所述基准帧数据所对应的图片中选取指定对象区域,依据所述的指定对象区域调整所述多个帧数据所对应的图片。Optionally, adjusting the plurality of frame data according to the reference frame data, including: selecting a specified object area in a picture corresponding to the reference frame data, and adjusting the plurality of frame data according to the specified object area The corresponding picture.
可选地,在所述基准帧数据所对应的图片中选取指定对象区域,包括:在所述基准帧数据对焦区域周围预定范围内选取所述指定对象区域。Optionally, selecting the specified object area in the picture corresponding to the reference frame data includes: selecting the specified object area within a predetermined range around the focus frame data of the reference frame data.
可选地,在所述基准帧数据所对应的图片中选取指定对象区域,包括:将所述基准帧数据对应的图片划分为M*N个像素组,在第一像素组的颜色值与周围像素组的颜色值的差值大于预设值的情况下,确定所述第一像素组为清晰像素组,或者,在第一像素组的亮度值与周围像素组的亮度值的差值大于预设值的情况下,确定所述第一像素组为清晰像素组,其中,所述M和N为自然数;在所述图片存在包括多个连续的所述清晰像素组的的指定区域情况下,确定所述指定区域为所述指定对象区域。Optionally, selecting the specified object area in the picture corresponding to the reference frame data includes: dividing the picture corresponding to the reference frame data into M*N pixel groups, and the color values of the first pixel group and surrounding If the difference between the color values of the pixel group is greater than a preset value, determining that the first pixel group is a clear pixel group, or that the difference between the brightness value of the first pixel group and the brightness value of the surrounding pixel group is greater than a pre- In the case of setting a value, determining that the first pixel group is a clear pixel group, wherein the M and N are natural numbers; and in a case where the picture has a specified area including a plurality of consecutive clear pixel groups, It is determined that the designated area is the specified object area.
可选地,依据所述的指定对象区域调整所述多个帧数据所对应的图片,包括:在所述基准帧对应的图片的四个边角周围预定范围内分别选择四个所述指定对象区域,连接所述四个指定对象区域的中心形成基准图形,依据所述基准图形在所述多个帧数据中获取与所述基准图形对应的多个待比较图形;调整所述待比较图形,直至所述多个帧对应的所述待比较图形与基准图形重合。Optionally, adjusting the picture corresponding to the multiple frame data according to the specified target area, including: selecting four the specified objects in a predetermined range around four corners of the picture corresponding to the reference frame a region, the center of the four specified object regions is connected to form a reference pattern, and a plurality of graphics to be compared corresponding to the reference graphics are acquired in the plurality of frame data according to the reference graphics; and the graphics to be compared are adjusted. The graphics to be compared corresponding to the plurality of frames are coincident with the reference graphics.
其中,所述待比较图形所在帧数据对应的图片与所述待比较图形同步移动。The picture corresponding to the frame data of the graphic to be compared is moved synchronously with the graphic to be compared.
可选地,调整所述待比较图形,包括:比较所述待比较图形与所述基准图形的四条边界长度或四个边角角度,其中,在所述四条边界或所述四个边角中至少一个边界长度差值大于第一预设值或者边角角度差值大于第二预设值的情况下,依据所述基准图形对所述待比较图形进行形状的调整。Optionally, adjusting the graphic to be compared includes: comparing four boundary lengths or four corner angles of the graphic to be compared and the reference graphic, wherein, in the four boundaries or the four corners In a case where the at least one boundary length difference is greater than the first preset value or the corner angle difference is greater than the second preset value, the shape to be compared is adjusted according to the reference pattern.
可选地,比较所述待比较图形与所述基准图形的四条边界长度或四个边角角度之后,所述方法还包括:在比较出的所述四个边界长度差值小于第一预设 值,或所述四个边角角度差值小于第二预设值的情况下,确定所述待比较图形所在帧数据对应的图片不需要进行形状的调整。Optionally, after comparing the four boundary lengths or the four corner angles of the to-be-compared graphic and the reference graphic, the method further includes: comparing the four boundary length differences in the comparison to be smaller than the first preset If the value, or the difference of the four corner angles is smaller than the second preset value, determining that the picture corresponding to the frame data of the graphic to be compared does not need to be adjusted.
可选地,调整所述待比较图形,包括:将所述待比较图形的指定边界旋转至与所述基准图形中与所述指定边界对应的边界平行,其中,所述多个帧数据对应的图片与所述待比较图形同步旋转。Optionally, the adjusting the graphics to be compared includes: rotating a specified boundary of the graphics to be compared to be parallel to a boundary corresponding to the specified boundary in the reference graphics, where the multiple frame data corresponds to The picture is rotated in synchronization with the graphic to be compared.
可选地,调整所述待比较图形,包括:移动所述待比较图形的几何中心至与所述基准图形的几何中心相同的位置,其中,所述待比较图形所在帧数据对应的图片与所述待比较图形同步移动。Optionally, the adjusting the graphic to be compared includes: moving a geometric center of the graphic to be compared to a same position as a geometric center of the reference graphic, wherein a picture and a corresponding image of the frame data of the graphic to be compared Tells the comparison graph to move synchronously.
可选地,在依据预设规则调整所述多个帧数据之前,调整所述多个帧数据中的每个帧数据对应图片的显示效果;或者,在将调整后的多个帧数据的图片合成目标帧对应的图片之后,调整所述合成目标帧对应的图片的显示效果。Optionally, before the adjusting the plurality of frame data according to the preset rule, adjusting a display effect of the picture corresponding to each frame data of the plurality of frame data; or, in the picture of the plurality of frame data to be adjusted After the picture corresponding to the target frame is synthesized, the display effect of the picture corresponding to the composite target frame is adjusted.
根据本公开的另一个实施例,提供了一种长曝光拍照装置,应用于拍照设备,包括:获取模块,被配置为在预设的第一曝光时间内进行多次曝光,获取与所述多次曝光对应的多个帧数据,其中,每次曝光所对应的数据作为所述多个帧数据中的一帧数据;调整模块,被配置为依据预设规则调整所述多个帧数据,将调整后的多个帧数据的图片合成目标帧对应的图片,输出所述图片。According to another embodiment of the present disclosure, a long exposure photographing apparatus is provided, which is applied to a photographing apparatus, including: an acquisition module configured to perform multiple exposures in a preset first exposure time, and acquire the plurality of a plurality of frame data corresponding to the second exposure, wherein the data corresponding to each exposure is used as one frame data of the plurality of frame data; and the adjusting module is configured to adjust the plurality of frame data according to a preset rule, The picture of the adjusted plurality of frame data is combined with the picture corresponding to the target frame, and the picture is output.
可选地,所述获取模块还被配置为在预设的第一曝光时间内按照第二曝光时间周期性进行曝光,其中,所述第一曝光时间大于所述第二曝光时间。Optionally, the obtaining module is further configured to periodically perform exposure according to a second exposure time within a preset first exposure time, wherein the first exposure time is greater than the second exposure time.
可选地,在预设的第一曝光时间内按照第二曝光时间周期性进行曝光之前,确定所述第二曝光时间的和值小于所述预设的第一曝光时间。Optionally, before the exposure is periodically performed according to the second exposure time in the preset first exposure time, determining that the sum of the second exposure times is less than the preset first exposure time.
可选地,所述调整模块还被配置为选取所述多个帧数据中的集中值FV值大于预设值的第一个帧数据作为基准帧数据;依据所述基准帧数据调整所述多个帧数据。Optionally, the adjusting module is further configured to: select, as the reference frame data, the first frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value; and adjust the multiple according to the reference frame data. Frame data.
可选地,所述调整模块还被配置为在所述基准帧数据所对应的图片中选取指定对象区域,依据所述的指定对象区域调整所述多个帧数据所对应的图片的所述指定对象区域。Optionally, the adjusting module is further configured to: select a specified object area in a picture corresponding to the reference frame data, and adjust the designation of the picture corresponding to the multiple frame data according to the specified target area The object area.
本公开实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述方法。 Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions arranged to perform the above method.
本公开实施例还提供了一种电子设备,包括:An embodiment of the present disclosure further provides an electronic device, including:
至少一个处理器;以及At least one processor;
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述的方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
通过本公开,在长曝光时间内,执行多次曝光,得到多个帧数据,将该多个帧数据中的全部或者部分可用的帧数据进行调整,将调整后的多个帧数据合成一张图片,将这张图片作为本次长曝光拍照的照片。采用上述技术方案,多个帧数据经过调整之后再合成一张图片,有效解决了相关技术中长曝光拍照直接得到一张模糊照片,即长曝光情况下拍摄的图片模糊的问题,使得长曝光拍摄的照片更加清晰。Through the disclosure, multiple exposures are performed during a long exposure time to obtain a plurality of frame data, and all or part of the available frame data of the plurality of frame data are adjusted, and the adjusted plurality of frame data is combined into one. Picture, take this picture as a photo of this long exposure photo. By adopting the above technical solution, a plurality of frame data are adjusted and then combined into one picture, which effectively solves the problem that the long exposure photography in the related art directly obtains a blurred photo, that is, the picture taken in the case of long exposure is blurred, so that the long exposure shooting is performed. The photo is clearer.
附图概述BRIEF abstract
此处所说明的附图用来提供对本公开的理解,构成本申请的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:The drawings described herein are intended to provide an understanding of the present disclosure, and are intended to be a part of the present disclosure. In the drawing:
图1是本公开实施例的一种长曝光拍照方法的移动终端的硬件结构框图;1 is a block diagram showing the hardware structure of a mobile terminal of a long exposure photographing method according to an embodiment of the present disclosure;
图2是根据本公开实施例的一种长曝光拍照方法的流程图;2 is a flow chart of a long exposure photographing method in accordance with an embodiment of the present disclosure;
图3是根据本公开实施例的长曝光拍照的流程图;3 is a flow chart of long exposure photographing in accordance with an embodiment of the present disclosure;
图4是根据本公开实施例中选取基准帧和基准点的流程图;4 is a flow diagram of selecting a reference frame and a reference point in accordance with an embodiment of the present disclosure;
图5是根据本公开实施例中基准帧的基准点选取示意图;5 is a schematic diagram of a reference point selection of a reference frame in accordance with an embodiment of the present disclosure;
图6是根据本公开实施例中的其他帧数据中的基准点选取示意图;6 is a schematic diagram of selection of reference points in other frame data in accordance with an embodiment of the present disclosure;
图7是根据本公开实施例中基准帧的基准点的连接示意图一;7 is a schematic diagram 1 of a connection of reference points of a reference frame according to an embodiment of the present disclosure;
图8是根据本公开实施例中基准帧的基准点的连接示意图二; 8 is a second schematic diagram of a connection of reference points of a reference frame in accordance with an embodiment of the present disclosure;
图9是根据本公开实施例记载的长曝光拍照的另一种执行方式的方法流程图;9 is a flow chart of a method of performing another method of long exposure photographing according to an embodiment of the present disclosure;
图10是根据本公开实施例的长曝光拍照装置的结构框图。FIG. 10 is a block diagram showing the structure of a long exposure photographing apparatus according to an embodiment of the present disclosure.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本公开。在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The present disclosure will be described in detail below with reference to the drawings in conjunction with the embodiments. The embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。The terms "first", "second" and the like in the specification and claims of the present disclosure and the above-mentioned figures are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
实施例1Example 1
本申请实施例一所提供的方法实施例可以在照相机、移动终端等装置中执行。The method embodiment provided in Embodiment 1 of the present application can be executed in a device such as a camera or a mobile terminal.
其中,所述装置可以包括:Wherein, the device may include:
至少一个处理器;以及At least one processor;
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述的方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
以运行在移动终端上为例,图1是本公开实施例的一种长曝光拍照方法的移动终端的硬件结构框图。如图1所示,移动终端10可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、被配置为存储数据的存储器104、以及被配置为通信功能的传输装置106。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,移动终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。Taking a mobile terminal as an example, FIG. 1 is a hardware structural block diagram of a mobile terminal of a long exposure photographing method according to an embodiment of the present disclosure. As shown in FIG. 1, the mobile terminal 10 may include one or more (only one shown) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA). A memory 104 configured to store data, and a transmission device 106 configured as a communication function. It will be understood by those skilled in the art that the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the above electronic device. For example, the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
存储器104可被配置为存储应用软件的软件程序以及模块,如本公开实施例中的一种长曝光拍照方法对应的程序指令/模块,处理器102通过运行存储在 存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be configured as a software program and a module for storing application software, such as a program instruction/module corresponding to a long exposure photographing method in the embodiment of the present disclosure, and the processor 102 is stored by running The software program and modules within the memory 104 perform various functional applications and data processing, i.e., implement the methods described above. Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, memory 104 can include memory remotely located relative to processor 102, which can be connected to mobile terminal 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106被配置为经由一个网络接收或者发送数据。上述的网络实例可包括移动终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,其被配置为通过无线方式与互联网进行通讯。 Transmission device 106 is configured to receive or transmit data via a network. The network instance described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module configured to communicate with the Internet wirelessly.
在本实施例中提供了一种运行于上述移动终端的长曝光拍照方法,图2是根据本公开实施例的一种长曝光拍照方法的流程图,如图2所示,该流程包括如下步骤:In the embodiment, a long exposure photographing method running on the mobile terminal is provided. FIG. 2 is a flowchart of a long exposure photographing method according to an embodiment of the present disclosure. As shown in FIG. 2, the flow includes the following steps. :
步骤S202,在预设的第一曝光时间内进行多次曝光,获取与该多次曝光对应的多个帧数据,其中,每次曝光所对应的数据作为该多个帧数据中的一帧数据;该处的第一曝光时间即相机中设置的长曝光拍照,在这个时间段内,多次曝光,也可以叫做进行多次普通拍照。Step S202, performing multiple exposures in a preset first exposure time, and acquiring a plurality of frame data corresponding to the multiple exposures, wherein the data corresponding to each exposure is used as one frame data of the plurality of frame data. The first exposure time of the place is the long exposure photo set in the camera. During this time period, multiple exposures may also be called performing multiple ordinary photographs.
步骤S204,依据预设规则调整该多个帧数据,将调整后的多个帧数据的图片合成目标帧对应的图片,输出该图片。上述步骤顺序不对技术方案的执行顺序形成限定,即在获取多个帧数据的过程中,可以同时调整已经获取的帧数据,不停的获取新的帧数据,不停地调整新的帧数据,节省了流程处理的时间,最后,在不再获取新帧数据时,所有的帧数据可能也相应的调整完毕,再统一进行合成,或者,调整完一张合成一张也可以,调整完下一张,在合成新的一张。In step S204, the plurality of frame data is adjusted according to the preset rule, and the adjusted picture of the plurality of frame data is combined with the picture corresponding to the target frame, and the picture is output. The sequence of the above steps does not limit the execution order of the technical solution, that is, in the process of acquiring multiple frame data, the frame data that has been acquired can be adjusted at the same time, the new frame data is continuously acquired, and the new frame data is continuously adjusted. It saves the processing time of the process. Finally, when the new frame data is no longer acquired, all the frame data may be adjusted accordingly, and then the composition is unified, or the adjustment of one piece can be adjusted. Zhang, in the synthesis of a new one.
通过上述步骤,在长曝光时间内,执行多次曝光,得到多个帧数据,将该多个帧数据中的全部或者部分可用的帧数据进行调整,将调整后的多个帧数据合成一张图片,将这张图片作为本次长曝光拍照的照片。采用上述技术方案,多个帧数据经过调整之后再合成一张图片,有效解决了相关技术中长曝光拍照 直接得到一张模糊照片,即长曝光情况下拍摄的图片模糊的问题,使得长曝光拍摄的照片更加清晰。Through the above steps, multiple exposures are performed during a long exposure time to obtain a plurality of frame data, and all or part of the available frame data of the plurality of frame data are adjusted, and the adjusted plurality of frame data is combined into one. Picture, take this picture as a photo of this long exposure photo. By adopting the above technical solution, a plurality of frame data are adjusted and then combined into one picture, which effectively solves the long exposure photography in the related art. Directly get a blurred photo, that is, the problem of blurring the picture taken under long exposure, making the photos taken by long exposure more clear.
可选地,在预设的第一曝光时间内按照第二曝光时间周期性进行曝光,其中,该第一曝光时间大于该第二曝光时间。Optionally, the exposure is periodically performed according to the second exposure time within a preset first exposure time, wherein the first exposure time is greater than the second exposure time.
可选地,在预设的第一曝光时间内按照第二曝光时间周期性进行曝光之前,确定该第二曝光时间的和值小于该预设的第一曝光时间。Optionally, before the exposure is periodically performed according to the second exposure time in the preset first exposure time, determining that the sum of the second exposure time is less than the preset first exposure time.
可选地,依据预设规则调整该多个帧数据,包括:选取该多个帧数据中的集中值FV值大于预设值的帧数据作为基准帧数据;依据该基准帧数据调整该多个帧数据。选定基准帧的方式可以有多种,可以选择多个帧数据中第N个可以使用的帧数据作为基准帧,可以通过一些预设图片相关参数,来规定什么帧数据对应的图片是可以使用的。还可以,选择多个帧数据中拍照对象位置好的照片为基准帧,即照片中人或物处于中间位置的照片可以作为基准帧。通常,选取基准帧是为了合成多个帧数据提供了一个好的基础,好的参考,选取方式不限于上述实施例中的内容。Optionally, adjusting the multiple frame data according to the preset rule, including: selecting frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value as the reference frame data; and adjusting the multiple according to the reference frame data. Frame data. There may be multiple ways to select a reference frame. You can select the Nth frame data that can be used in the frame data as the reference frame. You can specify the frame corresponding to the frame data by using some preset image related parameters. of. It is also possible to select a photo with a good position of the photographing object in the plurality of frame data as a reference frame, that is, a photograph in which a person or an object is in an intermediate position in the photograph can be used as a reference frame. Generally, the selection of the reference frame provides a good basis for synthesizing a plurality of frame data. A good reference is not limited to the content in the above embodiment.
可选地,在该基准帧数据所对应的图片中选取指定对象区域,依据该的指定对象区域调整该多个帧数据所对应的图片。在选出基准帧后,为了更精确的调整,可以选取一些指定对象区域,即照片中的重点区域,比如,拍人像,人像及人像周围就可以是指定对象区域,至于其他照片位置的重要性相对的低一些,如此实施,方可更加精确,更加突出人像效果。Optionally, the specified object area is selected in the picture corresponding to the reference frame data, and the picture corresponding to the plurality of frame data is adjusted according to the specified object area. After selecting the reference frame, for more precise adjustment, you can select some specified object areas, that is, the key areas in the photo, for example, portraits, portraits and portraits around can be the specified object area, as for the importance of other photo positions. Relatively low, this can be more precise and more prominent.
可选地,在该基准帧数据对焦区域附近周围预定范围内选取该基准帧数据所对应的图片的对焦区周围预定范围内区域为该指定对象对象区域;Optionally, an area within a predetermined range around the focus area of the picture corresponding to the reference frame data is selected within the predetermined range around the focus area of the reference frame data as the designated object area;
或者,将该基准帧数据所对应的图片划分为M*N个像素组,在第一像素组的颜色值与周围像素组的颜色值的差值大于预设值的情况下,确定该第一像素组为清晰像素组,或者,在第一像素组的亮度值与周围像素组的亮度值的差值大于预设值的情况下,确定该第一像素组为清晰像素组,其中,所述M和N为自然数;在该图片的指定区域存在多个连续的该清晰像素组的指定区域情况下,确定该指定区域为该指定对象区域。选取指定对象区域的方式与在多个帧数据选取基准帧的理念是一样的,可以选取拍照效果清晰的区域作为指定对象区域。Or dividing the picture corresponding to the reference frame data into M*N pixel groups, and determining the first when the difference between the color value of the first pixel group and the color value of the surrounding pixel group is greater than a preset value. The pixel group is a clear pixel group, or, in a case where a difference between a luminance value of the first pixel group and a luminance value of the surrounding pixel group is greater than a preset value, determining that the first pixel group is a clear pixel group, wherein the M and N are natural numbers; in the case where there are a plurality of consecutive designated areas of the clear pixel group in the designated area of the picture, it is determined that the designated area is the designated object area. The method of selecting a specified object area is the same as the concept of selecting a reference frame in a plurality of frame data, and an area with a clear photographing effect can be selected as the designated object area.
可选地,在该基准帧对应的图片的四个边角周围预定范围内分别选择四个 该指定对象区域,连接该四个指定对象区域的中心形成基准图形;依据该基准图形在该多个帧数据中获取与该基准图形对应的多个待比较图形;Optionally, four are selected within a predetermined range around the four corners of the picture corresponding to the reference frame. The designated object area is connected to the center of the four specified object areas to form a reference pattern; and the plurality of to-be-compared patterns corresponding to the reference pattern are acquired in the plurality of frame data according to the reference pattern;
调整该待比较图形,直至该多个帧对应的该待比较图形与基准图形重合其中,该待比较图形所在帧数据对应的图片与该待比较图形同步移动。两个图形不可能完全重合,可以存在一个误差范围。The graphics to be compared are adjusted until the graphics to be compared corresponding to the plurality of frames overlap with the reference graphics, and the image corresponding to the frame data of the graphics to be compared is moved synchronously with the graphics to be compared. The two figures cannot be completely coincident and there can be a margin of error.
可选地,比较该待比较图形与该基准图形的四条边界长度及四个边角角度,其中,在该四条边界或该四个边角中至少一个边界长度差值大于第一预设值或者边角角度差值大于第二预设值的情况下,依据该基准图形对该待比较图形进行形状的调整。该实施例中记载的是对帧数据对应图片的形状的调整,待比较图形形状调整的过程中,待比较图形所在的图片会相应的发生一些形变,有些图片部分会被压缩,有些部位会被拉伸。Optionally, comparing four boundary lengths and four corner angles of the to-be-compared pattern and the reference pattern, wherein at least one of the four boundaries or the four corners has a difference in length of the boundary greater than a first preset value or When the corner angle difference is greater than the second preset value, the shape of the pattern to be compared is adjusted according to the reference pattern. What is described in this embodiment is the adjustment of the shape of the picture corresponding to the frame data. In the process of adjusting the shape of the picture to be compared, the picture of the picture to be compared will undergo some deformation correspondingly, some parts of the picture will be compressed, and some parts will be Stretching.
可选地,比较该待比较图形与该基准图形的四条边界长度及四个边角角度之后,在比较出的该四个边界长度差值小于第一预设值,或该四个边角角度差值小于第二预设值的情况下,确定该待比较图形所在帧数据对应的图片不需要进行形状的调整。Optionally, after comparing the four boundary lengths and the four corner angles of the to-be-compared pattern and the reference pattern, the comparison of the four boundary length differences is less than a first preset value, or the four corner angles. When the difference is smaller than the second preset value, determining the picture corresponding to the frame data of the to-be-compared graphic does not need to be adjusted in shape.
可选地,将该待比较图形的指定边界旋转至与该基准图形中与该指定边界对应的边界平行,其中,该多个帧数据对应的图片与该待比较图形同步旋转。本实施例中记载的是,两个图形的边或者角是相同的,但是,可能待比较图形有些倾斜,此刻可以将待比较图形进行旋转,使得两张图形的可以通过平行移动重合。Optionally, the specified boundary of the graphic to be compared is rotated to be parallel with a boundary corresponding to the specified boundary in the reference graphic, wherein a picture corresponding to the plurality of frame data is rotated synchronously with the graphic to be compared. It is described in the embodiment that the sides or corners of the two figures are the same, but the pattern to be compared may be somewhat inclined, and the pattern to be compared may be rotated at this moment, so that the two figures can be coincident by parallel movement.
可选地,移动该待比较图形的几何中心至与该基准图形的几何中心相同的位置,其中,该待比较图形所在帧数据对应的图片与该待比较图形同步移动。本实施例中记载的技术方案,是在上述变形调整,旋转调整之后最简单的调整,移动调整。应用于在两个图形几乎相同,但是待比较图形的位置有些偏离,可以将偏离的照片拉回基准图形的位置。上述三种调整方式,可以结合使用,也可以单一使用,使用的先后顺序也没有限定。Optionally, the geometric center of the graphic to be compared is moved to the same position as the geometric center of the reference graphic, and the image corresponding to the frame data of the graphic to be compared is moved synchronously with the graphic to be compared. The technical solution described in the present embodiment is the simplest adjustment and movement adjustment after the above-described deformation adjustment and rotation adjustment. Applies to the fact that the two graphics are almost identical, but the position of the graphic to be compared is somewhat deviated, and the offset photo can be pulled back to the position of the reference graphic. The above three adjustment methods can be used in combination or in a single use, and the order of use is not limited.
可选地,在预设的第一曝光时间内按照第二曝光时间周期性进行曝光之前,确定该第二曝光时间的和值小于该预设的第一曝光时间。如果执行了多次第二曝光,时间超过了第一曝光时间,则不再拍照,不再获取新的帧数据,本次长 曝光拍照到此为止。Optionally, before the exposure is periodically performed according to the second exposure time in the preset first exposure time, determining that the sum of the second exposure time is less than the preset first exposure time. If the second exposure is performed multiple times and the time exceeds the first exposure time, the photo is no longer taken, and the new frame data is no longer acquired. The exposure photo ends here.
可选地,在依据预设规则调整该多个帧数据之前,调整该多个帧数据中的每个帧数据对应图片的显示效果;Optionally, before the adjusting the plurality of frame data according to the preset rule, adjusting a display effect of the picture corresponding to each frame data of the plurality of frame data;
或者,在将调整后的多个帧数据的图片合成目标帧对应的图片之后,调整该合成目标帧对应的图片的显示效果。Alternatively, after the pictures of the adjusted plurality of frame data are combined into a picture corresponding to the target frame, the display effect of the picture corresponding to the compositing target frame is adjusted.
以下结合本公开实施例进行详细说明。The following is a detailed description in conjunction with the embodiments of the present disclosure.
在本公开实施例中,通过在拍摄对象区域进行比对调整的方法,可以更准确调整图片,使拍摄的图片更清晰In the embodiment of the present disclosure, by performing the comparison adjustment method in the shooting target area, the picture can be more accurately adjusted to make the taken picture clearer.
在本公开实施例中,可以采用以下技术方案:In the embodiment of the present disclosure, the following technical solutions may be adopted:
设置长曝光拍照时,按正常曝光时间多次进行曝光;每次曝光数据作为一帧数据对应的图片;比较每帧数据信息,选取其中多帧数据对应的图片进行调整,调整后,将多帧数据对应的图片合成一帧长曝光图片。When setting the long exposure photo, the exposure is performed multiple times according to the normal exposure time; each exposure data is used as the picture corresponding to one frame of data; comparing the data information of each frame, the picture corresponding to the multi-frame data is selected for adjustment, and after adjustment, the multi-frame is adjusted. The picture corresponding to the data is combined into a long exposure picture of one frame.
可选地,调整帧数据对应的图片时,可选取跟其他多个帧数据的数据差异处于中间的帧作为基准帧,其它帧数据对应的图片参照该基准帧调整。本实施例中的技术方案就是,选取的基准帧满足以下条件,其他多个帧进行小幅度的调整就可以调整到该基准帧的位置。Optionally, when the picture corresponding to the frame data is adjusted, a frame in which the data difference between the other frame data is in the middle may be selected as the reference frame, and the picture corresponding to the other frame data is adjusted according to the reference frame. The technical solution in this embodiment is that the selected reference frame satisfies the following conditions, and other frames can be adjusted to the position of the reference frame by performing small adjustment.
可选地,调整帧数据对应的图片时,可选多个帧数据中第一个清晰度高,可以作为基准帧的帧数据作为基准帧。Optionally, when the picture corresponding to the frame data is adjusted, the first one of the plurality of frame data may be selected to have high definition, and the frame data of the reference frame may be used as the reference frame.
可选地,比较每帧图片信息时,可选取帧数据中一个或多个对象区域作比较。可选地,选取对象区域时,对象区域可参照拍照对象大小设置;人像有多大,相应的设置的对象区域可以包括人像,或者,对象区域可设置任意大小。Optionally, when comparing picture information of each frame, one or more object areas in the frame data may be selected for comparison. Optionally, when the object area is selected, the object area may refer to the size of the photographing object; if the portrait is large, the corresponding set object area may include a portrait, or the object area may be set to any size.
可选地,选取对象区域,对焦区附近区域或照片中边缘清晰的区域可以设置为指定对象区域。Alternatively, the selected object area, the area near the focus area, or the area with sharp edges in the photo may be set as the designated object area.
可选地,调整帧数据对应的图片时,可通过局部或整体平移或缩放或放大或拉伸或挤压等,以完成调整。即相当于后续实施例中变形调整的技术方案。Alternatively, when the picture corresponding to the frame data is adjusted, the adjustment may be completed by partially or integrally shifting or scaling or enlarging or stretching or squeezing. That is, it corresponds to the technical solution of the deformation adjustment in the subsequent embodiment.
可选地,调整帧数据对应的图片时,可按照不同的权重分优先级调整,权重大的图片区域,调整时重点调整。 Optionally, when the picture corresponding to the frame data is adjusted, the priority may be adjusted according to different weights, and the picture area with a large weight is adjusted.
可选地,选取对象区域和调整帧数据时,可以增加图片亮度或对比度,以方便选择对象区域和调整帧数据,调整完后需恢复以前数据。Optionally, when the object area is selected and the frame data is adjusted, the brightness or contrast of the picture may be increased to facilitate selection of the object area and adjustment of the frame data, and the previous data needs to be restored after the adjustment.
可选地,帧数据调整可在长曝光期间同时进行。Alternatively, frame data adjustments can be made simultaneously during long exposures.
可选地,数据差异过大或不清晰的帧数据可以丢弃,只选择拍摄的多个帧数据中部分的帧数据作为调整对象。Alternatively, the frame data whose data difference is too large or unclear may be discarded, and only part of the frame data of the plurality of frame data captured is selected as the adjustment object.
可选地,将多个帧数据对应的图片合成一帧长曝光图片时,由于帧数据调整造成的图片边缘信息缺失,可裁剪掉图片边缘。Optionally, when combining the pictures corresponding to the multiple frame data into one frame long exposure picture, the picture edge information may be cropped due to the missing picture edge information caused by the frame data adjustment.
可选地,可根据陀螺仪或加速度等传感器检测手机状态,调整图片可参照检测的手机移动状态。即在拍摄过程中,如果相机有横向移动,相应的拍摄物体在照片的位置是越来越靠右的,后续在调整帧数据时可以参考相机移动状态,将待调整的帧数据对应的图片向左移动一些,以靠近基准帧。Optionally, the state of the mobile phone can be detected according to a sensor such as a gyroscope or an acceleration, and the adjusted picture can refer to the detected mobile phone movement state. That is, during the shooting process, if the camera moves laterally, the corresponding shooting object is more and more rightward in the position of the photo. Later, when adjusting the frame data, the camera moving state can be referred to, and the image corresponding to the frame data to be adjusted is directed to Move some left to close to the reference frame.
可选地,帧数据可以图像处理后再合成长曝光图片,也可用帧数据合成原始的长曝光数据,再进行图像处理。Optionally, the frame data may be processed by an image to synthesize a long exposure image, or the frame data may be used to synthesize the original long exposure data, and then image processing is performed.
可选地,图像处理指图像信号处理(Image Signal Processor,简称为ISP)或平台处理。平台处理是指,高通等处理器厂商会对获取的帧数据对应的图片进行一些显示效果处理,例如,清晰度,白平衡等。Optionally, image processing refers to Image Signal Processor (ISP) or platform processing. The platform processing means that the processor manufacturer such as Qualcomm performs some display effect processing on the picture corresponding to the acquired frame data, for example, definition, white balance, and the like.
图3是根据本公开实施例的长曝光拍照的流程图,如图3所示,该流程包括以下步骤:3 is a flow chart of a long exposure photographing according to an embodiment of the present disclosure. As shown in FIG. 3, the flow includes the following steps:
步骤S301,启动长曝光功能;Step S301, starting a long exposure function;
步骤S302,设定长曝光时间;Step S302, setting a long exposure time;
步骤S303,按普通曝光时间曝光;Step S303, exposing according to a normal exposure time;
步骤S304,读取帧数据;Step S304, reading frame data;
步骤S305,判断总曝光时间是否大于设定的长曝光时间;Step S305, determining whether the total exposure time is greater than a set long exposure time;
步骤S306,在判断总曝光时间大于设定的长曝光时间之后,完成曝光数据合成;Step S306, after determining that the total exposure time is greater than the set long exposure time, completing the exposure data synthesis;
步骤S307,图片效果处理Step S307, picture effect processing
步骤S308,长曝光图片输出。 Step S308, long exposure picture output.
在执行上述步骤中相应的进行调整帧数据和合成目标帧的步骤。The steps of adjusting the frame data and synthesizing the target frame are performed correspondingly in performing the above steps.
图3中的各步骤对应的流程如下:The process corresponding to each step in Figure 3 is as follows:
步骤S302,设定曝光时间Step S302, setting an exposure time
用户在进行长曝光拍摄时,先设置长曝光时间(相当于上述实施例中的第一曝光时间)。由于所述长曝光时间是所有曝光时间的总和(相当于上述实施例中第二曝光时间的总和),帧曝光之间有间歇时间,另外,帧合成和图片处理也会占用时间。所以拍摄过程会略大于设置的长曝光时间。When the user performs long exposure shooting, the long exposure time (corresponding to the first exposure time in the above embodiment) is first set. Since the long exposure time is the sum of all exposure times (corresponding to the sum of the second exposure times in the above embodiment), there is an intermittent time between frame exposures, and in addition, frame synthesis and picture processing take time. So the shooting process will be slightly larger than the set long exposure time.
为使最后长曝光图片亮度合理,曝光gain值可按照设置的长曝光时间计算得出。在相关技术中,长曝光时间越长,gain值越低,噪点越小,图片质量越好。基于图片效果和用户体验考虑,本实施例用户设定长曝光时间范围定为1/4s-4s。In order to make the brightness of the last long exposure picture reasonable, the exposure gain value can be calculated according to the set long exposure time. In the related art, the longer the long exposure time, the lower the gain value, the smaller the noise, and the better the picture quality. Based on the picture effect and user experience, the user sets the long exposure time range to 1/4 s-4s.
步骤S303,按普通曝光时间曝光(相当于上述实施例中的多次曝光,或者第二曝光时间),目前手机低光场景曝光时间一般设置在1/10s-1/20s之间,当曝光时间在1/10s时,拍照很容易模糊。本实施例中帧曝光时间设置为1/20s,尽量减少手抖引起图片模糊。Step S303, according to the normal exposure time exposure (corresponding to the multiple exposure in the above embodiment, or the second exposure time), the current low-light scene exposure time of the mobile phone is generally set between 1/10s-1/20s, when the exposure time At 1/10s, the picture is easily blurred. In this embodiment, the frame exposure time is set to 1/20 s, and the image blur caused by hand shake is minimized.
步骤S304,读取帧数据Step S304, reading frame data
读取多个帧数据,分别保存,以便后续调整和合成,判断总曝光时间是否大于设定的长曝光时间,判断方式,帧曝光乘以当前总共帧数即为总曝光时间,与设置的长曝光时间比较,如果总曝光时间小于于设置的长曝光时间,继续进行帧曝光;如果总曝光时间大于或等于设置的长曝光时间,完成曝光。进行后续步骤。Read a plurality of frame data, save separately for subsequent adjustment and synthesis, determine whether the total exposure time is greater than the set long exposure time, and determine the mode, multiply the frame exposure by the current total number of frames as the total exposure time, and set the length Exposure time comparison, if the total exposure time is less than the set long exposure time, the frame exposure is continued; if the total exposure time is greater than or equal to the set long exposure time, the exposure is completed. Carry out the next steps.
步骤S307,图片效果处理Step S307, picture effect processing
对合成的长曝光图片进行效果处理,如ISP处理,平台处理。另外,由于帧调整可能会造成帧数据部分边缘缺失,所以要对影响的边缘进行裁剪。The effect of the synthesized long exposure image processing, such as ISP processing, platform processing. In addition, since the frame adjustment may cause the edge of the frame data portion to be missing, the affected edge is cropped.
下面记载如何对帧数据进行调整。The following describes how to adjust the frame data.
选取基准帧,并选取一个或多个基准帧中边界清晰的对象区域作为调整的基准点(相当于上述实施例中指定对象区域);在调整其他帧数据时,选取其他帧数据中与基准帧中基准点对应的区域作为调整参考区域,通过帧数据平移、 拉伸、缩放、变形、扭曲等方式,使调整参区域与基准点对准。Selecting a reference frame and selecting an object area with a clear boundary in one or more reference frames as an adjusted reference point (corresponding to the specified target area in the above embodiment); when adjusting other frame data, selecting other frame data and the reference frame The area corresponding to the reference point in the middle is used as the adjustment reference area, and the frame data is translated, Stretch, scale, deform, twist, etc., so that the adjustment reference area is aligned with the reference point.
图4是根据本公开实施例中选取基准帧和基准点的流程图,如图4所述,包括以下步骤:4 is a flow chart of selecting a reference frame and a reference point in accordance with an embodiment of the present disclosure, as described in FIG. 4, including the following steps:
步骤S401,依次检测帧数据图像清晰度;Step S401, sequentially detecting frame image image sharpness;
步骤S402,帧数据清晰度是否大于设定阈值;Step S402, whether the frame data sharpness is greater than a set threshold;
步骤S403,在判断帧数据清晰度大于设定阈值的情况下,选取该帧作为其他帧调整的基准帧;Step S403, in the case that it is determined that the frame data sharpness is greater than a set threshold, the frame is selected as a reference frame for other frame adjustment;
步骤S404,检测基准帧中边界清晰的对象区域;Step S404, detecting an object area with a clear boundary in the reference frame;
步骤S405,选取该对象区域作为调整基点。Step S405, the object area is selected as an adjustment base point.
以下图4中的各步骤进行详细说明。Each step in FIG. 4 will be described in detail below.
步骤S401,依次检测帧数据图像清晰度:Step S401, sequentially detecting frame image image clarity:
判断图片清晰度可用公知的方式,检查集中值(Focus Value,简称为FV)值。从第一帧开始检测,如果FV值小于设定的阈值,则丢弃该帧,继续检查下一帧;如果FV值大于或等于设定的阈值,则把该帧作为基准帧,Judging the picture sharpness in a well-known manner, checking the value of the Focus Value (FV). Starting from the first frame, if the FV value is less than the set threshold, the frame is discarded, and the next frame is continuously checked; if the FV value is greater than or equal to the set threshold, the frame is used as the reference frame.
步骤S404,检测基准帧中边界清晰的对象区域:Step S404, detecting an object area with a clear boundary in the reference frame:
把帧数据分成m*n像素组,对比像素组颜色值(RGB)或亮度(Y)值,相邻或相近像素组颜色值(RGB)或亮度(Y)值有较大差异的即为边界清晰,这样连续的像素组大于某设定数量时即认为边界清晰区域。Divide the frame data into m*n pixel groups, compare the pixel group color value (RGB) or brightness (Y) value, and the boundary between the adjacent or similar pixel group color value (RGB) or brightness (Y) value is the boundary. Clear, such that a continuous group of pixels is considered to be a clear boundary area when it is larger than a certain number of sets.
步骤S405,选取该对象区域作为调整基点Step S405, selecting the object area as an adjustment base point
选取调整基点时,可以是边缘越清晰的优先级越高。本实施实例采用选取5个基准点区域调整,选取一个图片中心附近和4个图片边角附件的边界清晰的区域作为基准点区域。图5是根据本公开实施例中基准帧的基准点选取示意图,如图5所示,ABCDE为选取的5个边界清晰对象。(边界清晰对象用几何图形代表)。When you choose to adjust the base point, the clearer the edge, the higher the priority. In this embodiment, five reference point area adjustments are selected, and a clear boundary area of the vicinity of one picture center and four picture corner attachments is selected as the reference point area. FIG. 5 is a schematic diagram of a reference point selection of a reference frame according to an embodiment of the present disclosure. As shown in FIG. 5, ABCDE is a selected five boundary clear objects. (Boundary objects are represented by geometry).
图6是根据本公开实施例中的其他帧数据中的基准点选取示意图,如图6所示,虚线矩形区域Za、Zb、Zc、Zd、Ze分别为对应的基准点区域。6 is a schematic diagram of selection of reference points in other frame data according to an embodiment of the present disclosure. As shown in FIG. 6, the dotted rectangular areas Za, Zb, Zc, Zd, and Ze are respectively corresponding reference point areas.
在选取好上述基准帧和其他帧数据中基准点之后,相应的调整方法如下, 有变形调整,旋转调整,移动调整:After selecting the reference points in the above reference frame and other frame data, the corresponding adjustment method is as follows. There are deformation adjustment, rotation adjustment, movement adjustment:
设其他帧数据中基准点区域Za、Zb、Zc、Zd、Ze中心分别对应基准帧中基准点为Ca、Cb、Cc、Cd、Ce。It is assumed that the reference point regions Za, Zb, Zc, Zd, and Ze in the other frame data correspond to the reference points in the reference frame as Ca, Cb, Cc, Cd, and Ce, respectively.
1.变形调整Deformation adjustment
以帧图像横向为X轴、竖向为Y轴,左下定点为远点O建立坐标系。The coordinate system is established by the horizontal direction of the frame image as the X axis and the vertical direction being the Y axis, and the lower left fixed point being the far point O.
计算出基准帧图像中CbCc、CcCd、CdCe、CeCb四条线段的图像中的长度以及在上述坐标系中的斜率K1、K2、K3、K4。图7是根据本公开实施例中基准帧的基准点的连接示意图一,如图7所示,显示了K1、K2、K3、K4。The lengths in the images of the four line segments CbCc, CcCd, CdCe, and CeCb in the reference frame image and the slopes K1, K2, K3, and K4 in the above coordinate system are calculated. FIG. 7 is a first schematic diagram of the connection of reference points of a reference frame according to an embodiment of the present disclosure. As shown in FIG. 7, K1, K2, K3, and K4 are shown.
图8是根据本公开实施例中基准帧的基准点的连接示意图二,如图8所示,显示了CbCc、CcCd、CdCe、CeCb四条线段夹角分别为θ1、θ2、θ3、θ4。FIG. 8 is a schematic diagram 2 of connection of reference points of a reference frame according to an embodiment of the present disclosure. As shown in FIG. 8 , the angles of four line segments of CbCc, CcCd, CdCe, and CeCb are respectively shown as θ1, θ2, θ3, and θ4.
图8中的四条线段夹角计算:The angle between the four segments in Figure 8 is calculated:
θ1=180°-arctgK1+arctgK4;Θ1=180°-arctgK1+arctgK4;
θ2=arctgK1-arctgK2;Θ2=arctgK1-arctgK2;
θ3=180°-arctgK3+arctgK2;Θ3=180°-arctgK3+arctgK2;
θ4=arctgK3-arctgK4。Θ4=arctgK3-arctgK4.
同理,计算出需调整帧图像中对应基准点区域中心Cb′Cc′、Cc′Cd′、Cd′Ce′、CeCb′四条线段的图像中的长度以及在上述坐标系中的斜率K1′、K2′、K3′、K4′。以及Cb′Cc′、Cc′Cd′、Cd′Ce′、CeCb′四条线段夹角θ1′、θ2′、θ3′、θ4′。Similarly, the length in the image of the four line segments Cb'Cc', Cc'Cd', Cd'Ce', CeCb' of the corresponding reference point region in the frame image and the slope K1' in the above coordinate system are calculated. K2', K3', K4'. And four corner segments θ1', θ2', θ3', θ4' of Cb'Cc', Cc'Cd', Cd'Ce', and CeCb'.
在获得上述边界及角度之后,比较CbCc和Cb′Cc′、CcCd和Cc′Cd′和Cd′Ce′、CdCe、CeCb和CeCb′、CbCd和Cb′Cd′、CcCe和Cc′Ce长度差,如果长度差都小于某阈值,且θ1和θ1′、θ2和θ2′相差都小于某一阈值,说明调整帧和基准帧相比基本没有变形,不需要变形调整。After obtaining the above boundaries and angles, the CbCc and Cb'Cc', CcCd and Cc'Cd' and Cd'Ce', CdCe, CeCb and CeCb', CbCd and Cb'Cd', CcCe and Cc'Ce are compared in length, If the length difference is less than a certain threshold, and the difference between θ1 and θ1', θ2, and θ2' is less than a certain threshold, it indicates that the adjustment frame is substantially free from deformation compared with the reference frame, and deformation adjustment is not required.
如某一边界对应的长度差大于某阈值或θ1和θ1′、θ2和θ2′相差大于某阈值,则进行变形调整。某阈值是预先设定的,相当于上述实施例中的第一预设值,第二预设值。If the length difference corresponding to a certain boundary is greater than a certain threshold or θ1 and θ1', θ2, and θ2' differ by more than a certain threshold, the deformation adjustment is performed. A certain threshold is preset, which is equivalent to the first preset value and the second preset value in the foregoing embodiment.
在确定要进行调整的情况下,检测需调整帧基准点区域中心Ca′、Cb′、Cc′、Cd′、Ce′在上述坐标系中的位置和基准帧基准点区域中心Ca、Cb、Cc、Cd、Ce 上述坐标系中的位置;在四个角附近的基准帧基准点中找出调整帧(即其他帧)基准点区域中心和基准帧基准点区域中心偏离最小的基准点区域中心;假定为Cb′。In the case where it is determined that adjustment is to be made, it is detected that the positions of the frame reference point region centers Ca', Cb', Cc', Cd', Ce' in the above coordinate system and the reference frame reference point region centers Ca, Cb, Cc are adjusted. , Cd, Ce Position in the above coordinate system; find the center of the reference point area where the adjustment frame (ie other frame) reference point area center and the reference frame reference point area center deviation are the smallest in the reference frame reference point near the four corners; assumed to be Cb' .
然后,以Cb、Cd、Ce为定点,Cc为调整点,使用变形调整需调整帧图像,保持K1不变,使CbCc和Cb′Cc′相等。Then, Cb, Cd, and Ce are fixed points, Cc is the adjustment point, and the frame image is adjusted by using the deformation adjustment, and K1 is kept unchanged, so that CbCc and Cb'Cc' are equal.
图像变形算法可以采用photoshop中变形算法等算法。The image deformation algorithm can adopt an algorithm such as a deformation algorithm in photoshop.
接着,以Cb、Cc、Cd为定点,Ce为调整点,使用变形调整需调整帧图像,使CbCe和Cb′Ce′相等且θ1和θ1′相等。Next, Cb, Cc, and Cd are fixed points, Ce is an adjustment point, and the frame image is adjusted by using the deformation adjustment so that CbCe and Cb'Ce' are equal and θ1 and θ1' are equal.
最后,以Cb、Cc、Ce为定点,Cd为调整点,使用变形调整需调整帧图像,使CcCd和Cc′Cd′相等且θ2和θ2′相等。Finally, Cb, Cc, and Ce are fixed points, Cd is the adjustment point, and the frame image is adjusted by using the deformation adjustment so that CcCd and Cc'Cd' are equal and θ2 and θ2' are equal.
如果在四角附近的基准帧基准点中调整帧基准点区域中心和基准帧基准点区域中心偏离最小的基准点区域中心为Cc′、Cd′、Ce′,也类似以上调整方法。If the center of the reference point region where the center deviation of the frame reference point region and the center of the reference frame reference point region are minimized in the reference frame reference point near the four corners is Cc', Cd', and Ce', the above adjustment method is similar.
2.旋转调整2. Rotate adjustment
以上述变形调整中四角附近的基准帧基准点中调整帧基准点区域中心和基准帧基准点区域中心偏离最小的基准点区域中心Cb′为图片旋转调整中心,旋转需调整帧整帧图像,使K1=K1′。The reference point region center Cb' in which the center of the frame reference point region and the center of the reference frame reference point region are minimized in the reference frame reference point near the four corners of the above-mentioned deformation adjustment is the picture rotation adjustment center, and the entire frame image is adjusted by rotation. K1=K1'.
如果在四角附近的基准帧基准点中调整帧基准点区域中心和基准帧基准点区域中心偏离最小的基准点区域中心为Cc′、Cd′、Ce′,则对应以Cc′或Cd′、Ce′为图片旋转调整中心,使K2=K2′或K3=K3′、K4=K4′。If the center of the reference point region where the center deviation of the center of the frame reference point region and the center of the reference frame reference point is minimized in the reference frame reference point near the four corners is Cc', Cd', and Ce', the corresponding Cc' or Cd', Ce 'Turn the adjustment center for the picture so that K2=K2' or K3=K3', K4=K4'.
3.移动调整3. Mobile adjustment
左右或上下移动需调整帧图像,使调整帧中中心附近基准点区域中心Ca′和基准帧中Ca′在上述坐标系中位置一致。To move left and right or up and down, the frame image needs to be adjusted so that the center point Ca' of the reference point area near the center in the adjustment frame and Ca' in the reference frame are in the above coordinate system.
最后,记载将多个帧数据合成到目标帧Finally, documenting the synthesis of multiple frame data into the target frame
目标帧用以存储合成图片,目标帧以基准帧为初始值,经过调整的帧数据按对应的像素数据进行相加。The target frame is used to store the composite picture, the target frame is the initial value of the reference frame, and the adjusted frame data is added according to the corresponding pixel data.
上述实施例中的方法步骤可应用于以下场景The method steps in the above embodiments can be applied to the following scenarios
用户选择长曝光模式拍照,设定长曝光时间,进行拍摄,拍摄完成并自动 存储长曝光图片。The user selects the long exposure mode to take a photo, sets the long exposure time, performs shooting, and the shooting is completed and automatically Store long exposure images.
图9是根据本公开实施例记载的长曝光拍照的另一种执行方式的方法流程图,如图9所示,该方法流程和图3中的方法流程是相似的,该流程包括以下步骤:FIG. 9 is a flowchart of another method for performing long exposure photographing according to an embodiment of the present disclosure. As shown in FIG. 9 , the method flow is similar to the method flow in FIG. 3 , and the flow includes the following steps:
步骤S901,启动长曝光功能;Step S901, starting a long exposure function;
步骤S902,设定长曝光时间;Step S902, setting a long exposure time;
步骤S903,按普通曝光时间曝光;Step S903, exposing according to a normal exposure time;
步骤S904,读取帧数据;Step S904, reading frame data;
步骤S905,判断总曝光时间是否大于设定的长曝光时间;Step S905, determining whether the total exposure time is greater than the set long exposure time;
步骤S906,在判断总曝光时间大于设定的长曝光时间之后,完成曝光数据合成;Step S906, after determining that the total exposure time is greater than the set long exposure time, completing the exposure data synthesis;
步骤S907,长曝光图片输出。In step S907, the long exposure picture is output.
与图3中的流程相比,区别在于:图9中是先将帧数据(图片)进行部分或全部效果处理,再将数据调整和合成。采用上述方案,与图3中的流程相比,要耗费更长时间,但在清晰度和边界清晰区域判别上会更准确。Compared with the flow in FIG. 3, the difference is that in FIG. 9, the frame data (picture) is processed partially or completely, and then the data is adjusted and synthesized. With the above scheme, it takes a longer time than the flow in Fig. 3, but it is more accurate in distinguishing between sharpness and clear boundary.
采用本公开实施例中的技术方案,可极大地提高手机在夜景等低光场景的拍照质量,提升手机竞争力。The technical solution in the embodiments of the present disclosure can greatly improve the photographing quality of the mobile phone in low-light scenes such as night scenes, and improve the competitiveness of the mobile phone.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件实现。基于这样的理解,本公开的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the foregoing embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on such understanding, the technical solution of the present disclosure, which is essential or contributes to the related art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM). The instructions include a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present disclosure.
实施例2Example 2
在本实施例中还提供了一种长曝光拍照装置,可以应用于拍照设备,该装置被配置为实现上述实施例及实施方式,已经进行过说明的不再赘述。如以下 所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置可以由软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a long-exposure photographing device is also provided, which can be applied to a photographing device, and the device is configured to implement the above-mentioned embodiments and implementation manners, and the detailed description thereof has been omitted. As below As used, the term "module" can implement a combination of software and/or hardware for a predetermined function. Although the devices described in the following embodiments may be implemented by software, hardware, or a combination of software and hardware, is also possible and conceivable.
图10是根据本公开实施例的长曝光拍照装置的结构框图,如图10所示,该装置包括:FIG. 10 is a structural block diagram of a long exposure photographing apparatus according to an embodiment of the present disclosure. As shown in FIG. 10, the apparatus includes:
获取模块1002,被配置为在预设的第一曝光时间内进行多次曝光,获取与所述多次曝光对应的多个帧数据,其中,每次曝光所对应的数据作为所述多个帧数据中的一帧数据;The obtaining module 1002 is configured to perform multiple exposures in a preset first exposure time to acquire a plurality of frame data corresponding to the multiple exposures, wherein data corresponding to each exposure is used as the multiple frames One frame of data in the data;
调整模块1004,与所述获取模块1002连接,被配置为依据预设规则调整所述多个帧数据,将调整后的多个帧数据的图片合成目标帧对应的图片,输出所述图片。The adjustment module 1004 is connected to the acquisition module 1002 and configured to adjust the plurality of frame data according to a preset rule, and synthesize the adjusted image of the plurality of frame data into a picture corresponding to the target frame, and output the picture.
可选地,所述获取模块1002还被配置为在预设的第一曝光时间内按照第二曝光时间周期性进行曝光,其中,所述第一曝光时间大于所述第二曝光时间。Optionally, the obtaining module 1002 is further configured to periodically perform exposure according to a second exposure time within a preset first exposure time, wherein the first exposure time is greater than the second exposure time.
可选地,所述调整模块1004还被配置为选取所述多个帧数据中的集中值FV值大于预设值的第一个帧数据作为基准帧数据;依据所述基准帧数据调整所述多个帧数据。Optionally, the adjusting module 1004 is further configured to: select, as the reference frame data, the first frame data in which the centralized value FV value of the plurality of frame data is greater than a preset value; and adjust the according to the reference frame data. Multiple frame data.
可选地,所述调整模块1004还被配置为在所述基准帧数据所对应的图片中选取指定对象区域,依据所述的指定对象区域调整所述多个帧数据所对应的图片的所述指定对象区域。Optionally, the adjusting module 1004 is further configured to: select a specified object area in a picture corresponding to the reference frame data, and adjust the picture of the picture corresponding to the multiple frame data according to the specified object area. Specify the object area.
可选地,所述调整模块1004还被配置为以下情形之一:Optionally, the adjustment module 1004 is further configured as one of the following situations:
选取所述基准帧数据所对应的图片的对焦区周围预定范围内区域为所述指定对象区域;And selecting an area within a predetermined range around the focus area of the picture corresponding to the reference frame data as the designated object area;
将所述基准帧数据所对应的图片划分为M*N个像素组,在第一像素组的颜色值与周围像素组的颜色值的差值大于预设值的情况下,确定所述第一像素组为清晰像素组,或者,在第一像素组的亮度值与周围像素组的亮度值的差值大于预设值的情况下,确定所述第一像素组为清晰像素组,And dividing the picture corresponding to the reference frame data into M*N pixel groups, and determining, in a case where a difference between a color value of the first pixel group and a color value of the surrounding pixel group is greater than a preset value, determining the first The pixel group is a clear pixel group, or, in a case where a difference between a luminance value of the first pixel group and a luminance value of the surrounding pixel group is greater than a preset value, determining that the first pixel group is a clear pixel group,
在所述图片的指定区域存在多个所述清晰像素组的情况下,确定所述指定区域为所述指定对象区域。 In a case where a plurality of the clear pixel groups exist in a designated area of the picture, it is determined that the designated area is the designated object area.
可选地,所述调整模块1004还被配置为在所述基准帧对应的图片的四个边角周围预定范围内分别选择四个所述指定对象区域,连接所述四个指定对象区域的中心形成基准图形,其中,所述基准帧的图片中心为所述基准图形的中心;依据所述基准图形在所述多个帧数据中获取与所述基准图形对应的多个待比较图形;Optionally, the adjusting module 1004 is further configured to select four the specified object areas respectively within a predetermined range around four corners of the picture corresponding to the reference frame, and connect the centers of the four specified object areas Forming a reference pattern, wherein a picture center of the reference frame is a center of the reference pattern; and a plurality of to-be-compared patterns corresponding to the reference pattern are acquired in the plurality of frame data according to the reference pattern;
所述调整模块1004还被配置为调整所述待比较图形,直至所述待比较图形与基准图形重合。The adjustment module 1004 is further configured to adjust the graphic to be compared until the graphic to be compared coincides with the reference graphic.
可选地,所述调整模块1004还被配置为比较所述待比较图形与所述基准图形的四条边界长度及四个边角角度,其中,在所述四条边界和所述四个边角中至少一个边界长度差值大于第一预设值或者边角角度差值大于第二预设值的情况下,依据所述基准图形对所述待比较图形进行形状的调整。Optionally, the adjusting module 1004 is further configured to compare four boundary lengths and four corner angles of the graphic to be compared and the reference graphic, wherein in the four boundaries and the four corners In a case where the at least one boundary length difference is greater than the first preset value or the corner angle difference is greater than the second preset value, the shape to be compared is adjusted according to the reference pattern.
可选地,所述调整模块1004还被配置为将所述待比较图形的指定边界旋转至与所述基准图形中与所述指定边界对应的边界平行,其中,所述多个帧数据对应的图片与所述待比较图形同步旋转。Optionally, the adjustment module 1004 is further configured to rotate a specified boundary of the graphic to be compared to be parallel to a boundary corresponding to the specified boundary in the reference graphic, wherein the plurality of frame data correspond to The picture is rotated in synchronization with the graphic to be compared.
可选地,所述调整模块1004还被配置为移动所述待比较图形的几何中心至与所述基准图形的几何中心相同的位置,其中,所述待比较图形所在帧数据对应的图片与所述待比较图形同步移动。Optionally, the adjusting module 1004 is further configured to move a geometric center of the graphic to be compared to a same position as a geometric center of the reference graphic, wherein a picture and a corresponding image of the frame data of the graphic to be compared Tells the comparison graph to move synchronously.
可选地,所述获取模块1002还被配置为在依据预设规则调整所述多个帧数据之前,调整所述多个帧数据中的每个帧数据对应图片的显示效果;Optionally, the acquiring module 1002 is further configured to: before adjusting the plurality of frame data according to the preset rule, adjust a display effect of the picture corresponding to each frame data of the multiple frame data;
或者,所述调整模块1004还被配置为在将调整后的多个帧数据的图片合成目标帧对应的图片之后,调整所述合成目标帧对应的图片的显示效果。Alternatively, the adjustment module 1004 is further configured to adjust a display effect of the picture corresponding to the compositing target frame after synthesizing the pictures of the adjusted plurality of frame data into the picture corresponding to the target frame.
上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。The above modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the above modules are all located in the same processor; or, the above modules are respectively located in different combinations. In the processor.
实施例3Example 3
本公开的实施例还提供了一种存储介质。例如,一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的方法。所述计算机可读存储介质可以是暂态计算机可读存储介质,也可以 是非暂态计算机可读存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present disclosure also provide a storage medium. For example, a computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments. The computer readable storage medium may be a transitory computer readable storage medium, or A non-transitory computer readable storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
S1,在预设的第一曝光时间内进行多次曝光,获取与所述多次曝光对应的多个帧数据,其中,每次曝光所对应的数据作为所述多个帧数据中的一帧数据;S1, performing multiple exposures in a preset first exposure time, acquiring a plurality of frame data corresponding to the multiple exposures, wherein data corresponding to each exposure is used as one frame of the plurality of frame data data;
S2,依据预设规则调整所述多个帧数据,将调整后的多个帧数据的图片合成目标帧对应的图片,输出所述图片。S2: The plurality of frame data is adjusted according to a preset rule, and the adjusted picture of the plurality of frame data is combined with the picture corresponding to the target frame, and the picture is output.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例中方法步骤。Optionally, in this embodiment, the processor performs the method steps in the foregoing embodiments according to the stored program code in the storage medium.
可选地,本实施例中的示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present disclosure described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. As such, the disclosure is not limited to any specific combination of hardware and software.
以上所述仅为本公开的实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开实施例的范围之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above description is only for the embodiments of the present disclosure, and is not intended to limit the disclosure, and various changes and modifications may be made to the present disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the scope of the present disclosure are intended to be included within the scope of the present disclosure.
工业实用性Industrial applicability
本申请提供的长曝光拍照方法及装置,有效解决了相关技术中长曝光拍照直接得到一张模糊照片,即长曝光情况下拍摄的图片模糊的问题,使得长曝光 拍摄的照片更加清晰。 The long exposure photographing method and device provided by the application effectively solve the problem that the long exposure photograph in the related art directly obtains a blurred photograph, that is, the blur of the photograph taken under the long exposure, so that the long exposure The photos taken are clearer.

Claims (19)

  1. 一种长曝光拍照方法,包括:A long exposure photographing method comprising:
    在预设的第一曝光时间内进行多次曝光,获取与所述多次曝光对应的多个帧数据,其中,每次曝光所对应的数据作为所述多个帧数据中的一帧数据;And performing multiple exposures in a preset first exposure time to obtain a plurality of frame data corresponding to the multiple exposures, wherein data corresponding to each exposure is used as one frame data of the plurality of frame data;
    依据预设规则调整所述多个帧数据,将调整后的多个帧数据的图片合成目标帧对应的图片,输出所述图片。The plurality of frame data is adjusted according to a preset rule, and the adjusted picture of the plurality of frame data is combined with the picture corresponding to the target frame, and the picture is output.
  2. 根据权利要求1所述的方法,其中,在预设的第一曝光时间内进行多次曝光,包括:The method of claim 1 wherein performing multiple exposures within a predetermined first exposure time comprises:
    在预设的第一曝光时间内按照第二曝光时间周期性进行曝光,其中,所述第一曝光时间大于所述第二曝光时间。The exposure is periodically performed according to the second exposure time within a preset first exposure time, wherein the first exposure time is greater than the second exposure time.
  3. 根据权利要求2中所述的方法,其中,在预设的第一曝光时间内按照第二曝光时间周期性进行曝光之前,确定所述第二曝光时间的和值小于所述预设的第一曝光时间。The method according to claim 2, wherein, before the exposure is periodically performed according to the second exposure time within the preset first exposure time, determining that the sum of the second exposure times is smaller than the preset first Exposure time.
  4. 根据权利要求1所述的方法,其中,依据预设规则调整所述多个帧数据,包括:The method of claim 1, wherein the adjusting the plurality of frame data according to a preset rule comprises:
    选取所述多个帧数据中的集中值FV值大于预设值的帧数据作为基准帧数据;And selecting, as the reference frame data, frame data in which the concentrated value FV value of the plurality of frame data is greater than a preset value;
    依据所述基准帧数据调整所述多个帧数据。Adjusting the plurality of frame data according to the reference frame data.
  5. 根据权利要求4所述的方法,其中,依据所述基准帧数据调整所述多个帧数据,包括:The method of claim 4, wherein the adjusting the plurality of frame data according to the reference frame data comprises:
    在所述基准帧数据所对应的图片中选取指定对象区域,依据所述的指定对象区域调整所述多个帧数据所对应的图片。 Selecting a specified object area in the picture corresponding to the reference frame data, and adjusting a picture corresponding to the plurality of frame data according to the specified object area.
  6. 根据权利要求5所述的方法,其中,在所述基准帧数据所对应的图片中选取指定对象区域,包括:The method according to claim 5, wherein the selecting the specified object area in the picture corresponding to the reference frame data comprises:
    在所述基准帧数据对焦区域周围预定范围内选取所述指定对象区域。The specified object area is selected within a predetermined range around the focus frame area of the reference frame data.
  7. 根据权利要求5所述的方法,其中,在所述基准帧数据所对应的图片中选取指定对象区域,包括:The method according to claim 5, wherein the selecting the specified object area in the picture corresponding to the reference frame data comprises:
    将所述基准帧数据对应的图片划分为M*N个像素组,在第一像素组的颜色值与周围像素组的颜色值的差值大于预设值的情况下,确定所述第一像素组为清晰像素组,或者,在第一像素组的亮度值与周围像素组的亮度值的差值大于预设值的情况下,确定所述第一像素组为清晰像素组,其中,所述M和N为自然数;And dividing the picture corresponding to the reference frame data into M*N pixel groups, and determining, in a case where a difference between a color value of the first pixel group and a color value of the surrounding pixel group is greater than a preset value, determining the first pixel The group is a clear pixel group, or, in a case where a difference between a luminance value of the first pixel group and a luminance value of the surrounding pixel group is greater than a preset value, determining that the first pixel group is a clear pixel group, wherein the M and N are natural numbers;
    在所述图片存在包括多个连续的所述清晰像素组的的指定区域情况下,确定所述指定区域为所述指定对象区域。In a case where the picture has a designated area including a plurality of consecutive clear pixel groups, the designated area is determined to be the specified object area.
  8. 根据权利要求7所述的方法,其中,依据所述的指定对象区域调整所述多个帧数据所对应的图片,包括:The method according to claim 7, wherein the adjusting the picture corresponding to the plurality of frame data according to the specified object area comprises:
    在所述基准帧对应的图片的四个边角周围预定范围内分别选择四个所述指定对象区域,连接所述四个指定对象区域的中心形成基准图形,依据所述基准图形在所述多个帧数据中获取与所述基准图形对应的多个待比较图形;Selecting four specified object areas in a predetermined range around four corners of the picture corresponding to the reference frame, and connecting the centers of the four specified object areas to form a reference pattern, according to the reference pattern Obtaining a plurality of graphics to be compared corresponding to the reference graphics in the frame data;
    调整所述待比较图形,直至所述多个帧对应的所述待比较图形与基准图形重合,其中,所述待比较图形所在帧数据对应的图片与所述待比较图形同步移动。The graphics to be compared are adjusted until the graphics to be compared corresponding to the plurality of frames overlap with the reference graphics, wherein the image corresponding to the frame data of the graphics to be compared moves synchronously with the graphics to be compared.
  9. 根据权利要求8所述的方法,其中,调整所述待比较图形,包括:The method of claim 8 wherein adjusting the graphics to be compared comprises:
    比较所述待比较图形与所述基准图形的四条边界长度或四个边角角度,其 中,在所述四条边界或所述四个边角中至少一个边界长度差值大于第一预设值或者边角角度差值大于第二预设值的情况下,依据所述基准图形对所述待比较图形进行形状的调整。Comparing the four boundary lengths or four corner angles of the graphic to be compared with the reference graphic, And in the case that the at least one boundary length difference of the four boundaries or the four corners is greater than a first preset value or the corner angle difference is greater than a second preset value, according to the reference pattern The comparison graph is described to adjust the shape.
  10. 根据权利要求9所述的方法,其中,比较所述待比较图形与所述基准图形的四条边界长度或四个边角角度之后,所述方法还包括:The method according to claim 9, wherein after comparing the four boundary lengths or the four corner angles of the graphic to be compared with the reference graphic, the method further comprises:
    在比较出的所述四个边界长度差值小于第一预设值,或所述四个边角角度差值小于第二预设值的情况下,确定所述待比较图形所在帧数据对应的图片不需要进行形状的调整。Determining, corresponding to the frame data of the graphic to be compared, in the case that the compared four boundary length differences are smaller than the first preset value, or the four corner angle differences are smaller than the second preset value The image does not need to be adjusted in shape.
  11. 根据权利要求8所述的方法,其中,调整所述待比较图形,包括:The method of claim 8 wherein adjusting the graphics to be compared comprises:
    将所述待比较图形的指定边界旋转至与所述基准图形中与所述指定边界对应的边界平行,其中,所述多个帧数据对应的图片与所述待比较图形同步旋转。Rotating a specified boundary of the graphic to be compared to a boundary corresponding to the specified boundary in the reference graphic, wherein a picture corresponding to the plurality of frame data is rotated synchronously with the graphic to be compared.
  12. 根据权利要求8所述的方法,其中,调整所述待比较图形,包括:The method of claim 8 wherein adjusting the graphics to be compared comprises:
    移动所述待比较图形的几何中心至与所述基准图形的几何中心相同的位置,其中,所述待比较图形所在帧数据对应的图片与所述待比较图形同步移动。Moving the geometric center of the graphic to be compared to the same position as the geometric center of the reference graphic, wherein the picture corresponding to the frame data of the graphic to be compared moves synchronously with the graphic to be compared.
  13. 根据权利要求1所述的方法,其中,在依据预设规则调整所述多个帧数据之前,调整所述多个帧数据中的每个帧数据对应图片的显示效果;The method according to claim 1, wherein the display effect of the corresponding picture of each of the plurality of frame data is adjusted before the plurality of frame data is adjusted according to the preset rule;
    或者,在将调整后的多个帧数据的图片合成目标帧对应的图片之后,调整所述合成目标帧对应的图片的显示效果。Alternatively, after the pictures of the adjusted plurality of frame data are combined into a picture corresponding to the target frame, the display effect of the picture corresponding to the compositing target frame is adjusted.
  14. 一种长曝光拍照装置,应用于拍照设备,包括:A long exposure photographing device applied to a photographing device, comprising:
    获取模块,被配置为在预设的第一曝光时间内进行多次曝光,获取与所述多次曝光对应的多个帧数据,其中,每次曝光所对应的数据作为所述多个帧数据中的一帧数据; The acquiring module is configured to perform multiple exposures in a preset first exposure time to acquire a plurality of frame data corresponding to the multiple exposures, wherein data corresponding to each exposure is used as the plurality of frame data One frame of data;
    调整模块,被配置为依据预设规则调整所述多个帧数据,将调整后的多个帧数据的图片合成目标帧对应的图片,输出所述图片。The adjustment module is configured to adjust the plurality of frame data according to a preset rule, and synthesize the image of the adjusted plurality of frame data into a picture corresponding to the target frame, and output the picture.
  15. 根据权利要求14所述的装置,其中,所述获取模块还被配置为在预设的第一曝光时间内按照第二曝光时间周期性进行曝光,其中,所述第一曝光时间大于所述第二曝光时间。The apparatus according to claim 14, wherein the acquisition module is further configured to periodically perform exposure according to a second exposure time within a preset first exposure time, wherein the first exposure time is greater than the first Two exposure times.
  16. 根据权利要求14中所述的装置,其中,在预设的第一曝光时间内按照第二曝光时间周期性进行曝光之前,确定所述第二曝光时间的和值小于所述预设的第一曝光时间。The apparatus according to claim 14, wherein the sum of the second exposure times is determined to be smaller than the preset first before the exposure is periodically performed according to the second exposure time within the preset first exposure time Exposure time.
  17. 根据权利要求14所述的装置,其中,所述调整模块还被配置为选取所述多个帧数据中的集中值FV值大于预设值的第一个帧数据作为基准帧数据;依据所述基准帧数据调整所述多个帧数据。The apparatus according to claim 14, wherein the adjustment module is further configured to select, as the reference frame data, the first frame data of the plurality of frame data whose concentration value FV value is greater than a preset value; The reference frame data adjusts the plurality of frame data.
  18. 根据权利要求17所述的装置,其中,所述调整模块还被配置为在所述基准帧数据所对应的图片中选取指定对象区域,依据所述的指定对象区域调整所述多个帧数据所对应的图片的所述指定对象区域。The apparatus according to claim 17, wherein the adjustment module is further configured to select a specified object area in a picture corresponding to the reference frame data, and adjust the plurality of frame data according to the specified object area. The specified object area of the corresponding picture.
  19. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-13中任一项的方法。 A computer readable storage medium storing computer executable instructions arranged to perform the method of any of claims 1-13.
PCT/CN2017/112433 2017-03-06 2017-11-22 Long-exposure photographing method and device WO2018161640A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710129212.3A CN108540728A (en) 2017-03-06 2017-03-06 Long exposure photographic method and device
CN201710129212.3 2017-03-06

Publications (1)

Publication Number Publication Date
WO2018161640A1 true WO2018161640A1 (en) 2018-09-13

Family

ID=63447268

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/112433 WO2018161640A1 (en) 2017-03-06 2017-11-22 Long-exposure photographing method and device

Country Status (2)

Country Link
CN (1) CN108540728A (en)
WO (1) WO2018161640A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151323A (en) * 2018-10-18 2019-01-04 Oppo广东移动通信有限公司 A kind of photographic method and device, terminal, storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH057336A (en) * 1991-06-21 1993-01-14 Canon Inc Method and device for image pickup
CN1452386A (en) * 2002-04-18 2003-10-29 奥林巴斯光学工业株式会社 Camera unit
CN1574899A (en) * 2003-05-29 2005-02-02 佳能株式会社 Image processing apparatus, image taking apparatus and program
CN101764959A (en) * 2008-12-25 2010-06-30 昆山锐芯微电子有限公司 Image pickup system and image processing method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4181923B2 (en) * 2003-05-29 2008-11-19 キヤノン株式会社 IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2004357202A (en) * 2003-05-30 2004-12-16 Canon Inc Photographing apparatus
JP5050256B1 (en) * 2011-06-21 2012-10-17 オリンパス株式会社 Imaging apparatus and imaging method
CN104065854B (en) * 2014-06-18 2018-08-10 联想(北京)有限公司 A kind of image processing method and a kind of electronic equipment
US10235745B2 (en) * 2014-08-27 2019-03-19 Huawei Technologies Co., Ltd Image processing method, computer storage medium, apparatus and terminal
CN105491358B (en) * 2015-11-26 2018-11-16 努比亚技术有限公司 A kind of image processing method and device, terminal
CN106254772B (en) * 2016-07-29 2017-11-07 广东欧珀移动通信有限公司 Multiple image synthetic method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH057336A (en) * 1991-06-21 1993-01-14 Canon Inc Method and device for image pickup
CN1452386A (en) * 2002-04-18 2003-10-29 奥林巴斯光学工业株式会社 Camera unit
CN1574899A (en) * 2003-05-29 2005-02-02 佳能株式会社 Image processing apparatus, image taking apparatus and program
CN101764959A (en) * 2008-12-25 2010-06-30 昆山锐芯微电子有限公司 Image pickup system and image processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151323A (en) * 2018-10-18 2019-01-04 Oppo广东移动通信有限公司 A kind of photographic method and device, terminal, storage medium
CN109151323B (en) * 2018-10-18 2021-06-04 Oppo广东移动通信有限公司 Photographing method and device, terminal and storage medium

Also Published As

Publication number Publication date
CN108540728A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
US9749551B2 (en) Noise models for image processing
US9591237B2 (en) Automated generation of panning shots
US20180227478A1 (en) Image preview method, apparatus and terminal
US9451173B2 (en) Electronic device and control method of the same
US9100589B1 (en) Interleaved capture for high dynamic range image acquisition and synthesis
CN107071272B (en) Method and device for controlling brightness of camera fill-in light and terminal
US9077913B2 (en) Simulating high dynamic range imaging with virtual long-exposure images
US9117134B1 (en) Image merging with blending
US9600741B1 (en) Enhanced image generation based on multiple images
US20160300337A1 (en) Image fusion method and image processing apparatus
WO2016165488A1 (en) Photo processing method and device
JP2019500762A (en) System and method for multiscopic noise reduction and high dynamic range
CN110958401B (en) Super night scene image color correction method and device and electronic equipment
CN105072350B (en) A kind of photographic method and device
WO2008075159A2 (en) Image stabilization using multi-exposure pattern
US20170094155A1 (en) Mobile terminal and photographing method therefor
WO2018018927A1 (en) Method and device for synthesizing multiple frames of images
CN106060412A (en) Photographic processing method and device
CN107613190A (en) A kind of photographic method and terminal
JP6909317B2 (en) Image processing model training methods, equipment and media
US20160292842A1 (en) Method and Apparatus for Enhanced Digital Imaging
US11523056B2 (en) Panoramic photographing method and device, camera and mobile terminal
CN103945116A (en) Apparatus and method for processing image in mobile terminal having camera
US20230033956A1 (en) Estimating depth based on iris size
WO2018161640A1 (en) Long-exposure photographing method and device

Legal Events

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

Ref document number: 17899655

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17899655

Country of ref document: EP

Kind code of ref document: A1