WO2024017175A1 - Photographing preview method and apparatus, and electronic device and storage medium - Google Patents

Photographing preview method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2024017175A1
WO2024017175A1 PCT/CN2023/107625 CN2023107625W WO2024017175A1 WO 2024017175 A1 WO2024017175 A1 WO 2024017175A1 CN 2023107625 W CN2023107625 W CN 2023107625W WO 2024017175 A1 WO2024017175 A1 WO 2024017175A1
Authority
WO
WIPO (PCT)
Prior art keywords
displacement
zoom magnification
zoom
shooting preview
electronic device
Prior art date
Application number
PCT/CN2023/107625
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 WO2024017175A1 publication Critical patent/WO2024017175A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations

Definitions

  • This application belongs to the field of photography technology, and specifically relates to a photography preview method, device, electronic equipment and storage medium.
  • the shooting preview screen will become smaller due to the magnification of the shooting object. If the user's hand moves slightly, it will bring huge distortion to the shooting preview screen.
  • the movement of the electronic device causes the object the user wants to photograph to move out of the shooting preview screen. At this time, the user needs to manually adjust the movement range of the electronic device to ensure that the object he wants to photograph falls back into the shooting preview screen. The user's operation cost is high.
  • the purpose of the embodiments of the present application is to provide a shooting preview method, device, electronic equipment and storage medium, which can solve the problem of high user operation costs in related technologies in high zoom magnification shooting scenarios.
  • embodiments of the present application provide a shooting preview method, which is applied to electronic devices.
  • the method includes:
  • the first target amplitude has a correlation relationship with the first displacement and a second zoom magnification, and the first zoom magnification is greater than the second zoom magnification.
  • inventions of the present application provide a shooting preview device, which is applied to electronic equipment.
  • the device includes:
  • the first display module is used to display the shooting preview image of the first zoom ratio
  • a first update module configured to update the shooting preview screen according to the first target amplitude when the electronic device generates a first displacement
  • the first target amplitude has a correlation relationship with the first displacement and a second zoom magnification, and the first zoom magnification is greater than the second zoom magnification.
  • inventions of the present application provide an electronic device.
  • the electronic device includes a processor and a memory.
  • the memory stores programs or instructions that can be run on the processor.
  • the programs or instructions are processed by the processor.
  • the processor is executed, the steps of the method described in the first aspect are implemented.
  • embodiments of the present application provide a readable storage medium.
  • Programs or instructions are stored on the readable storage medium.
  • the steps of the method described in the first aspect are implemented. .
  • inventions of the present application provide a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the first aspect. the method described.
  • embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
  • the electronic device displays the shooting preview screen of the first zoom magnification.
  • the shooting preview screen is updated according to the first target amplitude; wherein the first target amplitude and the first There is a correlation between the displacement and the second zoom magnification, and the first zoom magnification is greater than the second zoom magnification.
  • the shooting preview screen of the high zoom magnification can be automatically adjusted based on the movement displacement and a lower zoom magnification to obtain the same results as the lower zoom magnification.
  • the movement of the high zoom magnification preview screen is the same as the movement of the low zoom magnification shooting preview screen. Therefore, it can solve the problem of small movements in high zoom magnification shooting scenes causing huge movements to the shooting preview screen. problem without the need for manual adjustment by the user, reducing the user's operating cost.
  • Figure 1 is an example diagram of the relationship between different zoom magnifications and the movement amplitude of the shooting preview screen when the electronic device moves according to an embodiment of the present application;
  • Figure 2 is a flow chart of a shooting preview method provided by an embodiment of the present application.
  • Figure 3 is an example diagram of the first zoom magnification and the second zoom magnification setting method provided by the embodiment of the present application;
  • Figure 4 is one of the example diagrams of the sensitivity setting method provided by the embodiment of the present application.
  • Figure 5 is the second example diagram of the sensitivity setting method provided by the embodiment of the present application.
  • Figure 6 is a structural block diagram of a shooting preview device provided by an embodiment of the present application.
  • Figure 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present application.
  • first, second, etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first,”"second,” etc. are distinguished Objects are usually of one type, The number of objects is not limited. For example, the first object may be one or multiple.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
  • Embodiments of the present application provide a shooting preview method, device, electronic equipment and storage medium.
  • High-magnification zoom The camera's zoom is divided into optical zoom and digital zoom. The difference is that optical zoom uses the movement of the lens to enlarge and shrink the object to be photographed, while digital zoom changes the size of the object in the picture by cropping the picture. .
  • optical zoom uses the movement of the lens to enlarge and shrink the object to be photographed
  • digital zoom changes the size of the object in the picture by cropping the picture. .
  • the zoom mentioned in the subsequent embodiments of this application all refers to digital zoom.
  • Non-center cropping Currently, digital zoom uses the center of the original image captured by the camera as the origin to zoom in or out, that is, the central area in the image is used as the shooting preview screen; non-center cropping uses the non-center area in the image As a shooting preview screen.
  • Field Of View The size of the shooting preview screen. The field of view is different at different zoom magnifications.
  • the two zoom fields of view are represented by thick black solid lines and thin black solid lines respectively.
  • the field of view of the thick black solid line is the field of view of the black thin solid line. Twice, for example, the thick black solid line field size is 10 units and the thin black solid line size is 5 units, field size refers to the field size.
  • the field of view change is expressed as the overall field of view moving upward by 1 unit, that is, the two zoom fields of view after the camera moves are represented by a thick black dotted line and a thin black dotted line.
  • the black thin solid line can be calculated
  • the movement amount of the line field of view is 1/5
  • the movement amount of the black thick solid line field of view is 1/10. It can be seen that in the moving shooting preview screen, the screen movement of high zoom magnification is obviously faster than that of low zoom magnification.
  • the amount of screen movement may also be referred to as the screen movement range.
  • the shooting preview method provided by the embodiment of the present application is suitable for electronic devices.
  • the electronic devices may include: smart phones, tablet computers or personal digital assistants. and other mobile terminals, which are not limited in the embodiments of this application.
  • Figure 2 is a flow chart of a shooting preview method provided by an embodiment of the present application. As shown in Figure 2, the method may include the following steps: step 201 and step 202.
  • step 201 a shooting preview screen of the first zoom ratio is displayed.
  • the first zoom ratio is the zoom ratio currently used by the camera of the electronic device.
  • the first zoom ratio is usually a higher zoom ratio, for example, the first zoom ratio is 3x magnification, 5x magnification or 10x magnification, etc. .
  • step 202 when the electronic device generates a first displacement, the shooting preview screen is updated according to the first target amplitude; wherein the first target amplitude is associated with the first displacement and the second zoom factor, and the first zoom factor Greater than the second zoom ratio.
  • the second zoom ratio is usually a lower zoom ratio.
  • the second zoom ratio may be 1x magnification or 2x magnification.
  • the second zoom magnification is used to adjust the movement range of the shooting preview screen of the first zoom magnification using the field of view of the second zoom magnification as the reference field of view when the electronic device moves, so that the movement of the shooting preview screen of the first zoom magnification
  • the amplitude is as small as the movement of the shooting preview screen at the second zoom ratio, improving the telephoto shooting experience and making it easier for users to use.
  • the second zoom magnification may also be called a reference magnification.
  • the second zoom ratio can be set by the user.
  • the user turns on the camera of the electronic device 301 and can first set the first zoom ratio, for example, set 10x as the first zoom ratio, and the electronic device 301 displays a shooting preview screen of the first zoom ratio.
  • the user turns on the camera of the electronic device, and a shooting preview interface with a default magnification is displayed on the electronic device.
  • the user can first set the second zoom ratio, for example, set the default magnification to the second zoom ratio, and then set the first zoom ratio.
  • Magnification for example, set 10x magnification as the first zoom magnification, Among them, the default magnification can be 1x magnification.
  • a second zoom magnification when shooting at a high zoom magnification, in addition to setting the first zoom magnification, a second zoom magnification can also be set, and the field of view of the second zoom magnification is used as the reference field of view.
  • the first displacement generated by the movement is used to match the movement amplitude of the shooting preview screen at the second zoom magnification, and the movement amplitude of the shooting preview screen at the first zoom magnification is reversely compensated to obtain the same field of view as the reference field of view.
  • the data detected by the gyroscope can be read in real time starting from the moment when the electronic device displays the shooting preview interface, and based on the data detected by the gyroscope, it is determined whether the electronic device has moved, wherein, the data detected by the gyroscope
  • the data may include: movement distance data and rotation angle data.
  • the movement type of the electronic device when it is determined that the electronic device has moved based on the data detected by the gyroscope, the movement type of the electronic device can be further determined based on the movement distance and rotation angle detected by the gyroscope, wherein the movement type can be Including: only horizontal movement, only rotational movement, and horizontal movement and rotational movement.
  • the first displacement may include: linear displacement, angular displacement, and linear displacement and angular displacement.
  • the corresponding relationship between the first zoom magnification, the second zoom magnification, the first displacement and the first target amplitude can be pre-stored in the electronic device.
  • the movement type of the electronic device is different, and the meaning represented by the first target amplitude is different.
  • the first target amplitude is the distance value, which can be the number of pixels.
  • the movement type of the electronic device is rotational movement, that is, when the first displacement is an angular displacement
  • the first target amplitude is divided into two situations: if there is an optical image stabilizer in the electronic device, the first target amplitude is an angular value; If there is no optical image stabilizer in the electronic device, the first target amplitude is the distance value.
  • the first target amplitude is also divided into two situations: If there is an optical image stabilizer in the electronic device, then the first target The amplitude includes a distance value and an angle value; if there is no optical image stabilizer in the electronic device, the first target amplitude is the distance value.
  • different first target amplitude determination methods can be provided for different movement types of the electronic device, which can ensure the display effect of the shooting preview screen of the electronic device under various movement conditions.
  • the first movement is the horizontal movement distance detected by the gyroscope.
  • the second zoom magnification and the distance detected by the gyroscope determines the first target amplitude.
  • the corresponding relationship between the first zoom magnification, the second zoom magnification, the horizontal movement distance detected by the gyroscope and the first target amplitude can be pre-stored in the electronic device.
  • the first movement is the rotation angle detected by the gyroscope.
  • the corresponding relationship between the first zoom magnification, the second zoom magnification, the rotation angle detected by the gyroscope and the first target amplitude can be pre-stored in the electronic device.
  • the first movement when the movement type of the electronic device includes horizontal movement and rotational movement, the first movement includes the horizontal movement distance and the rotation angle detected by the gyroscope.
  • the second zoom magnification at this time, according to the first zoom magnification, the second zoom magnification , horizontal movement distance and rotation angle to determine the first target amplitude.
  • the corresponding relationship between the first zoom magnification, the second zoom magnification, the horizontal movement distance detected by the gyroscope and the first target amplitude can be stored in advance.
  • the corresponding relationship between the first zoom magnification, the second zoom magnification and the rotation angle detected by the gyroscope and the first target amplitude can be stored in advance.
  • C is the first target amplitude
  • k is the first zoom magnification
  • n is the second zoom magnification
  • ⁇ gyro is the rotation angle detected by the gyroscope.
  • the electronic device has different movement types, different first movement types, different meanings represented by the first target amplitude, and different first target amplitudes with different meanings, corresponding to different updating methods of the shooting preview screen.
  • the shooting preview image of the first zoom magnification needs to reversely compensate the distance value for the center cropped image during the movement process, that is, for the horizontal movement of the electronic device,
  • the center-cropped image of a high zoom magnification only needs to be moved in the opposite direction to obtain the image by cropping, that is, using non-center cropping on the shooting preview image of a high zoom magnification, the same mobile experience as that of a low zoom magnification can be obtained.
  • the first target amplitude is an angle value
  • the shooting preview image with a high zoom magnification is reversely compensated for the distance value in the center cropping image during movement, and at the same time Turning the optical image stabilizer in the opposite direction to the above angle value will give you the same mobile experience as at low zoom magnifications.
  • the electronic device displays the shooting preview screen of the first zoom magnification.
  • the shooting preview screen is updated according to the first target amplitude; wherein, the first target The amplitude is related to the first displacement and the second zoom factor, and the first zoom factor is greater than the second zoom factor.
  • the high zoom magnification can be automatically adjusted based on the movement displacement and a lower zoom magnification.
  • the shooting preview screen of the zoom magnification can obtain the same mobile experience as the lower zoom magnification.
  • the movement feeling of the shooting preview screen of the high zoom magnification is the same as the movement feeling of the shooting preview screen of the low zoom magnification, so it can It solves the problem of small movements of the user's hand causing huge movements to the shooting preview screen in high zoom magnification shooting scenarios, without requiring the user to manually adjust, reducing the user's operating costs.
  • the provided shooting method may also add the following step: step 203 before step 202 in the embodiment shown in FIG. 2 .
  • step 203 calculate the first target amplitude according to the first displacement and the displacement compensation rate
  • the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification;
  • the first displacement includes at least one of the following: linear displacement and angular displacement.
  • the displacement compensation rate is
  • the displacement compensation rate is ⁇ gyro , k, the second zoom magnification is n, and the first target amplitude is C, then the displacement compensation rate is
  • step 202 includes the following steps: step 2021 and step 2022, wherein,
  • step 2021 the optical image stabilizer is controlled to generate a displacement of a first target amplitude along a first direction, where the first direction is opposite to the displacement direction of the first displacement.
  • step 2022 a shooting preview screen of the first zoom ratio is displayed.
  • the high zoom magnification shooting preview screen can be automatically adjusted with the help of the optical image stabilizer, and There is no need for manual adjustment by the user and the efficiency is high.
  • the first displacement generated by the electronic device is a linear displacement.
  • the provided shooting method can also be used in the embodiment shown in Figure 2 Before step 202, add the following steps: step 204, where,
  • the first target amplitude is calculated based on the first displacement and the displacement compensation rate; where the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the first zoom magnification to the second zoom magnification Difference.
  • the corresponding relationship between the first displacement, the first zoom magnification, the second zoom magnification and the first target amplitude is:
  • L gyro is the first displacement
  • k is the first zoom magnification
  • n is the second zoom magnification
  • C is the first target amplitude
  • the relative movement amount R1 of the shooting preview screen of the first zoom magnification is set to be equal to the relative movement amount R2 of the shooting preview screen of the second zoom magnification, and the above corresponding relationship is obtained, where R1 is the third of the shooting preview screen of the first zoom magnification.
  • R2 is the ratio of the first movement amount to the field of view size of the second zoom magnification.
  • the first displacement is the movement distance detected by the gyroscope.
  • the relative movement amount of the screen is defined as:
  • L gyro is the movement distance detected by the gyroscope
  • L field is the field of view size of the lens
  • ⁇ gyro is the rotation angle detected by the gyroscope
  • ⁇ field is the field of view angle of the camera lens.
  • the relative movement amount of the 10x magnification shooting preview screen is 5 times the relative movement amount of the 2x magnification shooting preview screen, which is recorded as 5R 2x , where R 2x is the 2x magnification shooting preview screen. relative movement amount.
  • nx can be 1x or 2x. Record the relative movement amount as R nx , then the relative movement amount of the shooting preview screen at kx magnification is k/n times of nx magnification, which is (k/n )*R nx .
  • nx magnification is used in some examples instead of the second zoom magnification, and kx magnification is used in place of the first zoom magnification for description.
  • the relative movement amount of the shooting preview screen of the second zoom ratio and the first zoom ratio should be equal, that is, the shooting preview of nx magnification and kx magnification
  • the relative movement amount of the preview screen should be equal, which is obtained according to formula (1):
  • nx-field is the field of view size of nx magnification
  • L kx-field is the field of view size of kx magnification
  • the movement type of the electronic device is rotational movement and the electronic device includes an optical image stabilizer
  • the first displacement, the first zoom magnification, and the second zoom magnification is:
  • ⁇ gyro is the first displacement
  • k is the first zoom magnification
  • n is the second zoom magnification
  • C is the first target amplitude
  • the relative movement amount R3 of the shooting preview screen of the first zoom magnification is set to be equal to the relative movement amount R4 of the shooting preview screen of the second zoom magnification, and the above corresponding relationship is obtained, where R3 is the third of the shooting preview screen of the first zoom magnification.
  • the ratio of the second movement amount to the field of view angle of the first zoom magnification, R4 is the ratio of the first displacement to the field of view angle of the second zoom magnification, and the first displacement is the rotation angle detected by the gyroscope.
  • the relative movement amount of the shooting preview screen of the second zoom magnification and the first zoom magnification should be equal, that is, the shooting of nx magnification and kx magnification
  • the relative movement amount of the preview screen should be equal, which is obtained according to formula (2):
  • ⁇ k is the second movement amount, which refers to the angle of rotation of ⁇ k to obtain the same movement experience as nx magnification
  • ⁇ nx-field is the field of view angle of nx magnification
  • ⁇ kx-field is the field of view angle of kx magnification .
  • ⁇ k is calculated:
  • the first target amplitude C is calculated:
  • the first displacement generated by the electronic device is angular displacement.
  • the provided shooting method can also be used in the embodiment shown in Figure 2 Before step 202, add the following steps: step 205 and step 206, where,
  • the third target amplitude is calculated based on the first displacement and the displacement compensation rate, where, the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the ratio of the first zoom magnification to the second zoom magnification. The difference in magnification.
  • step 206 trigonometric transformation is performed on the third target amplitude to obtain the first target amplitude.
  • the movement type of the electronic device is rotational movement, and the electronic device does not include an optical image stabilizer or does not rely on an optical image stabilizer, the first displacement, the first zoom magnification, and the second zoom magnification
  • the corresponding relationship with the first target amplitude is:
  • ⁇ gyro is the first displacement
  • k is the first zoom magnification
  • n is the second zoom magnification
  • C is the first target amplitude
  • ⁇ nx-field is the field of view angle of nx magnification
  • ⁇ kx-field is the kx magnification Field of view angle
  • L nx-field is the field of view size at nx magnification
  • L kx-field is the field of view size at kx magnification.
  • the relative movement amount R5 of the shooting preview screen of the first zoom magnification is set to be equal to the relative movement amount R6 of the shooting preview screen of the second zoom magnification, and the above corresponding relationship is obtained, where R5 is the third of the shooting preview screen of the first zoom magnification.
  • R6 is the ratio of the actual movement amount of the shooting preview screen at the second zoom magnification to the field of view size of the second zoom magnification.
  • A is the actual movement amount of the shooting preview screen at nx magnification
  • B is the third movement amount of the shooting preview screen at kx magnification.
  • step 202 when the first target amplitude is a distance value, the above step 202 includes the following steps: step 2023 and step 2024.
  • step 2023 when the electronic device generates a first displacement, the first image collected by the image sensor of the electronic device is cropped by the first target amplitude in the second direction to obtain a second image, where the second direction and The first displacement has the opposite direction of displacement.
  • step 2024 a preview displays the second image.
  • non-center cropping can be used to automatically adjust the image in the high zoom magnification shooting preview screen without the need for manual adjustment by the user, which is more efficient.
  • the compensation amplitude corresponding to the horizontal movement and the compensation amplitude corresponding to the rotational movement can be calculated respectively, and the compensation amplitude corresponding to the horizontal movement can be calculated.
  • the compensation amplitude superimposed with the compensation amplitude corresponding to the rotation movement constitutes a first target amplitude used for reverse compensation of the movement amplitude of the shooting preview image of the first zoom magnification.
  • the first target amplitude C includes: the compensation amplitude obtained by formula (5) and the compensation amplitude obtained by formula (8).
  • the first target amplitude C is: the sum of the compensation amplitude obtained by formula (5) and the compensation amplitude obtained by formula (14).
  • the above formula (5), formula (8) and formula (14) can be stored in the electronic device in advance, so that when the movement of the electronic device is detected, the above formula is directly called to calculate the first target amplitude, Based on the first target amplitude, the data zoom shooting preview screen is compensated to improve the shooting effect and efficiency.
  • step 201 includes the following steps: step 2011.
  • step 2011 the shooting preview image of the first zoom ratio and the preview compensation control are displayed; wherein the preview compensation control is used to indicate the update range of the shooting preview image of the second zoom ratio when the electronic device is displaced.
  • step 202 includes the following steps: step 2025 and step 2026.
  • step 2025 a first input to the preview compensation control is received; for example, the first input may be a click input.
  • step 2026 in response to the first input, when the electronic device generates a first displacement, the shooting preview screen is updated according to the first target amplitude.
  • a control for adjusting the second zoom magnification is also displayed.
  • the provided shooting preview method can also be used in the embodiment shown in Figure 2 Based on this, add the following steps: Step 207.
  • step 207 a zoom sensitivity curve of zoom magnification and preview screen update sensitivity is displayed, where the zoom sensitivity curve includes a first sensitivity corresponding to the first zoom magnification and a second sensitivity corresponding to the third zoom magnification.
  • the shooting preview screen 502 of the default magnification 503 and the control 504 for setting the second zoom magnification are displayed.
  • the user can click the control 504 at 1x magnification.
  • the default current magnification is the second zoom magnification.
  • a zoom sensitivity curve 506 for adjusting the sensitivity at each magnification will be displayed.
  • the default sensitivity at each magnification is 1, that is, the mobile experience of each high zoom magnification is lower than the baseline.
  • the zoom ratio is the same.
  • step 208 After the above step 202, the following step is also included: step 208.
  • step 208 when the electronic device generates the second displacement and receives the user's adjustment of the first zoom factor to the third zoom factor, the shooting preview screen is updated according to the second target amplitude; wherein the second target amplitude and the third zoom factor are updated. There is a correlation between the second displacement and the second sensitivity.
  • the user can set the sensitivity of the movement of the shooting preview screen at a certain high zoom magnification, the movement amplitude of the picture at which magnification is used as the benchmark, and the sensitivity change curve of different magnifications, which can not only increase the user's good shooting experience, and can also bring new creative ideas to users, as well as provide tools for users to shoot different creative zoom videos, enriching zoom usage scenarios.
  • the execution subject may be a shooting preview device.
  • the photographing preview device performing the photographing preview method is taken as an example to illustrate the photographing preview device provided by the embodiment of the present application.
  • FIG. 6 is a structural block diagram of a shooting preview device provided by an embodiment of the present application, which is applied to electronic equipment.
  • the shooting preview device 600 may include: a first display module 601 and a first update module 602, where ,
  • the first display module 601 is used to display the shooting preview screen of the first zoom magnification
  • the first update module 602 is configured to update the shooting preview screen according to the first target amplitude when the electronic device generates a first displacement
  • the first target amplitude has a correlation relationship with the first displacement and a second zoom magnification, and the first zoom magnification is greater than the second zoom magnification.
  • the electronic device displays the shooting preview screen of the first zoom magnification.
  • the shooting preview screen is updated according to the first target amplitude; wherein, the first target The amplitude is related to the first displacement and the second zoom factor, and the first zoom factor is greater than the second zoom factor.
  • the high zoom magnification can be automatically adjusted based on the movement displacement and a lower zoom magnification.
  • the shooting preview screen of the zoom magnification is used to obtain the same mobile experience as that of the lower zoom magnification.
  • the movement feeling of the high zoom magnification shooting preview screen is the same as the movement feeling of the low zoom magnification shooting preview screen. Therefore, it can solve the problem of small movements in high zoom magnification shooting scenes causing huge movements to the shooting preview screen, without the need for manual adjustment by the user, and reducing the user's operating costs.
  • the electronic device includes an optical image stabilizer
  • the shooting preview device 600 may also include:
  • a first calculation module configured to calculate a first target amplitude according to the first displacement and a displacement compensation rate; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification; the first displacement includes at least one of the following: linear displacement and angular displacement.
  • the first update module 602 may include:
  • a control submodule configured to control the optical image stabilizer to generate a displacement of a first target amplitude along a first direction; wherein the first direction is opposite to the displacement direction of the first displacement;
  • the first display sub-module is used to display the shooting preview image of the first zoom magnification.
  • the first displacement is a linear displacement
  • the shooting preview device 600 may also include:
  • the second calculation module is used to calculate the first target amplitude according to the first displacement and the displacement compensation rate; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification.
  • the first displacement is an angular displacement
  • the shooting preview device 600 may also include:
  • a third calculation module configured to calculate a third target amplitude according to the first displacement and a displacement compensation rate; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification;
  • the conversion module is used to perform trigonometric conversion on the third target amplitude to obtain the first target amplitude.
  • the first update module 602 may include:
  • a cropping submodule configured to crop the first target amplitude in a second direction from the first image collected by the image sensor of the electronic device to obtain a second image; wherein the second direction is the same as the first displacement.
  • the displacement direction is opposite;
  • the second display sub-module is used to preview and display the second image.
  • the first display module 601 may include:
  • the third display sub-module is used to display the shooting preview screen of the first zoom ratio and the preview compensation control; wherein the preview compensation control is used to instruct the second zoom ratio to shoot when the electronic device is displaced.
  • the first update module 602 may include:
  • a receiving sub-module configured to receive the first input to the preview compensation control
  • An update submodule configured to respond to the first input and update the shooting preview image according to a first target amplitude when the electronic device generates a first displacement.
  • the shooting preview device 600 may also include:
  • the second display module is used to display the zoom sensitivity curve of the zoom magnification and the preview screen update sensitivity, wherein the zoom sensitivity curve includes a first sensitivity corresponding to the first zoom magnification and a second sensitivity corresponding to the third zoom magnification;
  • a second update module configured to update the shooting preview according to the second target amplitude when the electronic device generates a second displacement and receives a user's adjustment of the first zoom factor to the third zoom factor. Picture; wherein the second target amplitude has a correlation relationship with the second displacement and the second sensitivity.
  • the shooting preview device in the embodiment of the present application may be an electronic device, or may be a component of the electronic device, such as an integrated circuit or chip.
  • the electronic device may be a terminal or other devices other than the terminal.
  • the electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), or an augmented reality (Augmented Reality, AR)/virtual reality (Virtual Reality, VR) ) equipment, robots, wearable devices, ultra-mobile personal computers (Ultra-Mobile Personal Computer, UMPC), netbooks or personal digital assistants (Personal Digital Assistant, PDA), etc., and can also be servers, network attached storage (Network Attached Storage, NAS), personal computer (Personal Computer, PC), television (Television, TV), teller machine or self-service machine, etc., the embodiments of this application are not specifically limited.
  • the shooting preview device in the embodiment of the present application may be a device with an operating system.
  • the operating system can be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
  • the shooting preview device provided by the embodiment of the present application can implement each process implemented by the method embodiment in Figure 2. To avoid repetition, details will not be described here.
  • this embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702.
  • the memory 702 stores programs or instructions that can be run on the processor 701.
  • each step of the above-mentioned shooting preview method embodiment is implemented, and the same technical effect can be achieved. To avoid duplication, the details will not be described here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • Figure 8 is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present application.
  • the electronic device 800 includes but is not limited to: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 807, interface unit 808, memory 809, processor 810, etc. part.
  • the electronic device 800 may also include a power supply (such as a battery) that supplies power to various components.
  • the power supply may be logically connected to the processor 810 through a power management system.
  • the power management system is used to manage functions such as charging, discharging, and power consumption management.
  • the structure of the electronic device shown in Figure 8 does not constitute a limitation on the electronic device.
  • the electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
  • the display unit 806 is used to display the shooting preview screen of the first zoom magnification; when the electronic device generates the first displacement, update the shooting preview screen according to the first target amplitude; wherein, The first target amplitude has a correlation relationship with the first displacement and a second zoom factor, and the first zoom factor is greater than the second zoom factor.
  • the electronic device displays the shooting preview screen of the first zoom magnification.
  • the shooting preview screen is updated according to the first target amplitude; wherein the first target amplitude and the first target amplitude are There is a correlation between one shift and the second zoom factor, and the first zoom factor is greater than the second zoom factor.
  • the high zoom magnification can be automatically adjusted based on the movement displacement and a lower zoom magnification.
  • the shooting preview screen of the zoom magnification is used to obtain the same mobile experience as that of the lower zoom magnification.
  • the movement feeling of the high zoom magnification shooting preview screen is the same as the movement feeling of the low zoom magnification shooting preview screen. Therefore, it can solve the problem of small movements in high zoom magnification shooting scenes causing huge movements to the shooting preview screen, without the need for manual adjustment by the user, reducing the user's operating costs.
  • the electronic device includes an optical image stabilizer
  • the processor 810 is configured to calculate a first target amplitude according to the first displacement and a displacement compensation rate; wherein the displacement compensation rate is The ratio of the zoom magnification difference to the first zoom magnification, the zoom magnification difference being the difference between the first zoom magnification and the second zoom magnification; the first displacement includes at least one of the following: linear displacement, angular displacement Displacement.
  • the processor 810 is further configured to control the optical image stabilizer to generate a displacement of a first target amplitude along a first direction, wherein the displacement in the first direction and the first displacement opposite direction;
  • the display unit 806 is also used to display the shooting preview image of the first zoom ratio.
  • the first displacement is a linear displacement
  • the processor 810 is also used to Calculate the first target amplitude according to the first displacement and the displacement compensation rate; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the first zoom magnification The difference from the second zoom magnification.
  • the first displacement is an angular displacement
  • the processor 810 is further configured to calculate a third target amplitude according to the first displacement and a displacement compensation rate; perform Triangular conversion is performed to obtain the first target amplitude; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the ratio of the first zoom magnification to the second zoom magnification. Difference.
  • the processor 810 is further configured to crop the first target amplitude in the second direction from the first image collected by the image sensor of the electronic device to obtain a second image, wherein: The second direction is opposite to the displacement direction of the first displacement;
  • the display unit 806 is also used to preview and display the second image.
  • the display unit 806 is also used to display a shooting preview screen of the first zoom ratio and a preview compensation control; wherein the preview compensation control is used to indicate that the second zoom ratio is in the electronic state.
  • the update range of the shooting preview screen When the device is displaced, the update range of the shooting preview screen;
  • User input unit 807 configured to receive a first input to the preview compensation control
  • the display unit 806 is also configured to respond to the first input and update the shooting preview screen according to the first target amplitude when the electronic device generates a first displacement.
  • the display unit 806 is also used to display a zoom sensitivity curve between the zoom magnification and the preview screen update sensitivity, wherein the zoom sensitivity curve includes a first sensitivity corresponding to the first zoom magnification and a third zoom the second sensitivity corresponding to the magnification; when the electronic device generates a second displacement and receives the user's adjustment of the first zoom magnification to the third zoom magnification, update the shooting preview according to the second target amplitude Picture; wherein the second target amplitude has a correlation relationship with the second displacement and the second sensitivity.
  • the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042.
  • the graphics processor 8041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Such as camera) obtained static Image data of pictures or videos is processed.
  • the display unit 806 may include a display panel 8061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 807 includes a touch panel 8071 and at least one of other input devices 8072 . Touch panel 8071, also known as touch screen.
  • the touch panel 8071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 8072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
  • Memory 809 can be used to store software programs as well as various data.
  • the memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc.
  • memory 809 may include volatile memory or non-volatile memory, or memory 809 may include both volatile and non-volatile memory.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
  • Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and Direct Rambus RAM (DRRAM).
  • RAM Random Access Memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • synchronous dynamic random access memory Synchronous DRAM, SDRAM
  • Double data rate synchronous dynamic random access memory Double Data Rate SDRAM, DDRSDRAM
  • Enhanced SDRAM, ESDRAM synchronous dynamic random access memory
  • Synchlink DRAM, SLDRAM Direct Rambus RAM
  • Memory 809 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
  • the processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 810.
  • An embodiment of the present application also provides a readable storage medium, the readable storage medium stores a program
  • the program or instruction when executed by the processor, implements each process of the above-mentioned shooting preview method embodiment, and can achieve the same technical effect. To avoid duplication, it will not be described again here.
  • the processor is the processor in the electronic device described in the above embodiment.
  • the readable storage medium includes computer readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
  • An embodiment of the present application further provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the above shooting preview method embodiment. Each process can achieve the same technical effect. To avoid repetition, it will not be described again here.
  • chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-a-chip.
  • Embodiments of the present application provide a computer program product.
  • the program product is stored in a storage medium.
  • the program product is executed by at least one processor to implement each process of the above shooting preview method embodiment, and can achieve the same technical effect. , to avoid repetition, will not be repeated here.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, they can also be implemented by over hardware, but in many cases the former is the better implementation.
  • the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology.
  • the computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.

Abstract

The present application belongs to the technical field of photographing. Disclosed are a photographing preview method and apparatus, and an electronic device and a storage medium. The method comprises: displaying a photographing preview picture of a first zoom ratio; and when an electronic device generates a first displacement, updating the photographing preview picture according to a first target amplitude, wherein the first target amplitude has an association relationship with the first displacement and a second zoom ratio, and the first zoom ratio is greater than the second zoom ratio.

Description

拍摄预览方法、装置、电子设备及存储介质Shooting preview method, device, electronic equipment and storage medium
相关申请的交叉引用Cross-references to related applications
本申请要求在2022年07月22日提交中国专利局、申请号为202210866643.9、名称为“拍摄预览方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on July 22, 2022, with application number 202210866643.9 and titled "Photography and Preview Method, Device, Electronic Equipment and Storage Medium", the entire content of which is incorporated by reference in in this application.
技术领域Technical field
本申请属于拍摄技术领域,具体涉及一种拍摄预览方法、装置、电子设备及存储介质。This application belongs to the field of photography technology, and specifically relates to a photography preview method, device, electronic equipment and storage medium.
背景技术Background technique
随着科学技术的发展,人们对智能手机、平板电脑以及智能手表等便携式电子设备的拍摄功能的要求越来越高,不仅要求电子设备所配置的摄像模组能够实现背景虚化、夜间拍摄清晰等功能,而且更要求电子设备所配置的摄像模组能够实现变焦功能。与此同时,随着镜头设计、器件高度集成化等技术的发展,具有数码变焦功能的长焦镜头的拍摄质量得到了很大的提升,重量也在不断降低,这都使得长焦镜头被广泛配置于电子设备中。With the development of science and technology, people have higher and higher requirements for the shooting functions of portable electronic devices such as smartphones, tablets, and smart watches. They not only require that the camera modules configured in the electronic devices can achieve background blur and clear night shots. and other functions, and it is also required that the camera module configured in the electronic device can realize the zoom function. At the same time, with the development of technologies such as lens design and highly integrated devices, the shooting quality of telephoto lenses with digital zoom functions has been greatly improved, and their weight has also been continuously reduced. This has made telephoto lenses widely used Configured in electronic equipment.
相关技术中,在用户手持电子设备进行高变焦倍率拍摄的过程中,拍摄预览画面会因拍摄对象被放大而视野变小,若用户的手有稍微的移动,则会给拍摄预览画面带来巨幅移动,导致用户想要拍摄的对象移出拍摄预览画面,此时用户需要手动调整电子设备的移动幅度,以保证想要拍摄的对象重新落入拍摄预览画面内,用户的操作成本较高。In related technologies, when a user holds an electronic device to shoot at a high zoom ratio, the shooting preview screen will become smaller due to the magnification of the shooting object. If the user's hand moves slightly, it will bring huge distortion to the shooting preview screen. The movement of the electronic device causes the object the user wants to photograph to move out of the shooting preview screen. At this time, the user needs to manually adjust the movement range of the electronic device to ensure that the object he wants to photograph falls back into the shooting preview screen. The user's operation cost is high.
发明内容Contents of the invention
本申请实施例的目的是提供一种拍摄预览方法、装置、电子设备及存储介质,能够解决在高变焦倍率拍摄场景下相关技术中存在的用户操作成本较高的问题。 The purpose of the embodiments of the present application is to provide a shooting preview method, device, electronic equipment and storage medium, which can solve the problem of high user operation costs in related technologies in high zoom magnification shooting scenarios.
第一方面,本申请实施例提供了一种拍摄预览方法,应用于电子设备,所述方法包括:In a first aspect, embodiments of the present application provide a shooting preview method, which is applied to electronic devices. The method includes:
显示第一变焦倍率的拍摄预览画面;Display the shooting preview screen of the first zoom ratio;
在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面;When the electronic device generates a first displacement, update the shooting preview screen according to the first target amplitude;
其中,所述第一目标幅度与所述第一位移和第二变焦倍率具有关联关系,所述第一变焦倍率大于所述第二变焦倍率。Wherein, the first target amplitude has a correlation relationship with the first displacement and a second zoom magnification, and the first zoom magnification is greater than the second zoom magnification.
第二方面,本申请实施例提供了一种拍摄预览装置,应用于电子设备,所述装置包括:In a second aspect, embodiments of the present application provide a shooting preview device, which is applied to electronic equipment. The device includes:
第一显示模块,用于显示第一变焦倍率的拍摄预览画面;The first display module is used to display the shooting preview image of the first zoom ratio;
第一更新模块,用于在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面;A first update module, configured to update the shooting preview screen according to the first target amplitude when the electronic device generates a first displacement;
其中,所述第一目标幅度与所述第一位移和第二变焦倍率具有关联关系,所述第一变焦倍率大于所述第二变焦倍率。Wherein, the first target amplitude has a correlation relationship with the first displacement and a second zoom magnification, and the first zoom magnification is greater than the second zoom magnification.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device. The electronic device includes a processor and a memory. The memory stores programs or instructions that can be run on the processor. The programs or instructions are processed by the processor. When the processor is executed, the steps of the method described in the first aspect are implemented.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, embodiments of the present application provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the steps of the method described in the first aspect are implemented. .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, embodiments of the present application provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the first aspect. the method described.
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a sixth aspect, embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
在本申请实施例中,电子设备显示第一变焦倍率的拍摄预览画面,在电子设备产生第一位移的情况下,根据第一目标幅度,更新拍摄预览画面;其中,第一目标幅度与第一位移和第二变焦倍率具有关联关系,第一变焦倍率大于第二变焦倍率。与相关技术相比,本申请实施例中,在用户手持电子设 备进行高变焦倍率拍摄的过程中,若电子设备发生了移动,则可以根据移动的位移和一个较低的变焦倍率,自动调整高变焦倍率的拍摄预览画面,以获得与较低变焦倍率一样的移动体验。即在电子设备发生产生位移时,高变焦倍率拍摄预览画面的移动感受与低变焦倍率拍摄预览画面的移动幅度相同,因此可以解决高变焦倍率拍摄场景下手微小移动给拍摄预览画面带来巨幅移动的问题,而无需用户手动调整,降低了用户的操作成本。In the embodiment of the present application, the electronic device displays the shooting preview screen of the first zoom magnification. When the electronic device generates the first displacement, the shooting preview screen is updated according to the first target amplitude; wherein the first target amplitude and the first There is a correlation between the displacement and the second zoom magnification, and the first zoom magnification is greater than the second zoom magnification. Compared with related technologies, in the embodiment of the present application, when the user holds the electronic device During the process of shooting with high zoom magnification, if the electronic device moves, the shooting preview screen of the high zoom magnification can be automatically adjusted based on the movement displacement and a lower zoom magnification to obtain the same results as the lower zoom magnification. Mobile experience. That is, when the electronic device is displaced, the movement of the high zoom magnification preview screen is the same as the movement of the low zoom magnification shooting preview screen. Therefore, it can solve the problem of small movements in high zoom magnification shooting scenes causing huge movements to the shooting preview screen. problem without the need for manual adjustment by the user, reducing the user's operating cost.
附图说明Description of drawings
图1是本申请实施例提供的电子设备发生移动时不同变焦倍率与拍摄预览画面的移动幅度之间关系的示例图;Figure 1 is an example diagram of the relationship between different zoom magnifications and the movement amplitude of the shooting preview screen when the electronic device moves according to an embodiment of the present application;
图2是本申请实施例提供的一种拍摄预览方法的流程图;Figure 2 is a flow chart of a shooting preview method provided by an embodiment of the present application;
图3是本申请实施例提供的第一变焦倍率和第二变焦倍率设定方式的示例图;Figure 3 is an example diagram of the first zoom magnification and the second zoom magnification setting method provided by the embodiment of the present application;
图4是本申请实施例提供的灵敏度设定方式的示例图之一;Figure 4 is one of the example diagrams of the sensitivity setting method provided by the embodiment of the present application;
图5是本申请实施例提供的灵敏度设定方式的示例图之二;Figure 5 is the second example diagram of the sensitivity setting method provided by the embodiment of the present application;
图6是本申请实施例提供的一种拍摄预览装置的结构框图;Figure 6 is a structural block diagram of a shooting preview device provided by an embodiment of the present application;
图7是本申请实施例提供的一种电子设备的结构示意图;Figure 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图8是实现本申请各个实施例的一种电子设备的硬件结构示意图。Figure 8 is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present application.
具体实施例Specific embodiments
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类, 并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first,""second," etc. are distinguished Objects are usually of one type, The number of objects is not limited. For example, the first object may be one or multiple. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the related objects are in an "or" relationship.
本申请实施例提供了一种拍摄预览方法、装置、电子设备及存储介质。Embodiments of the present application provide a shooting preview method, device, electronic equipment and storage medium.
为了便于理解,首先对本申请实施例中涉及到的一些概念进行介绍。To facilitate understanding, some concepts involved in the embodiments of this application are first introduced.
高倍率变焦:相机的变焦分为光学变焦和数码变焦,其区别是光学变焦通过镜片移动来放大与缩小需要拍摄的对象,而数码变焦则是通过画面裁切来改变拍摄对象在画面中的大小。后续本申请实施例中提到的变焦均指的是数码变焦。High-magnification zoom: The camera's zoom is divided into optical zoom and digital zoom. The difference is that optical zoom uses the movement of the lens to enlarge and shrink the object to be photographed, while digital zoom changes the size of the object in the picture by cropping the picture. . The zoom mentioned in the subsequent embodiments of this application all refers to digital zoom.
非中心裁切:目前数码变焦都是以相机采集到的原始图像的中心为原点进行放大或缩小,即将图像中的中心区域作为拍摄预览画面;非中心裁切则是使用图像中的非中心区域作为拍摄预览画面。Non-center cropping: Currently, digital zoom uses the center of the original image captured by the camera as the origin to zoom in or out, that is, the central area in the image is used as the shooting preview screen; non-center cropping uses the non-center area in the image As a shooting preview screen.
视场(Field Of View,FOV):拍摄预览画面大小,不同变焦倍率的视场是不同的。Field Of View (FOV): The size of the shooting preview screen. The field of view is different at different zoom magnifications.
相机移动所造成的拍摄预览画面移动:如图1所示,图中分别用黑色粗实线和黑色细实线表示两个变焦视场,其中,黑色粗实线视场是黑色细实线的两倍,例如,黑色粗实线视场大小为10个单位,黑色细实线大小为5个单位,视场大小指的是视场尺寸。The movement of the shooting preview screen caused by camera movement: As shown in Figure 1, the two zoom fields of view are represented by thick black solid lines and thin black solid lines respectively. Among them, the field of view of the thick black solid line is the field of view of the black thin solid line. Twice, for example, the thick black solid line field size is 10 units and the thin black solid line size is 5 units, field size refers to the field size.
当相机发生移动时,用视场变化表示为整体视场向上移动1个单位,即相机移动后的两个变焦视场用黑色粗虚线和黑色细虚线表示,此时,可以计算出黑色细实线视场移动量为1/5,黑色粗实线视场移动量为1/10。可见,在移动的拍摄预览画面中,高变焦倍率的画面移动量明显更快于低变焦倍率的画面移动量。其中,画面移动量也可以称为画面移动幅度。When the camera moves, the field of view change is expressed as the overall field of view moving upward by 1 unit, that is, the two zoom fields of view after the camera moves are represented by a thick black dotted line and a thin black dotted line. At this time, the black thin solid line can be calculated The movement amount of the line field of view is 1/5, and the movement amount of the black thick solid line field of view is 1/10. It can be seen that in the moving shooting preview screen, the screen movement of high zoom magnification is obviously faster than that of low zoom magnification. The amount of screen movement may also be referred to as the screen movement range.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的拍摄预览方法进行详细地说明。The shooting preview method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.
需要说明的是,本申请实施例提供的拍摄预览方法适用于电子设备,在实际应用中,该电子设备可以包括:智能手机、平板电脑或者个人数字助理 等移动终端,本申请实施例对此不作限定。It should be noted that the shooting preview method provided by the embodiment of the present application is suitable for electronic devices. In practical applications, the electronic devices may include: smart phones, tablet computers or personal digital assistants. and other mobile terminals, which are not limited in the embodiments of this application.
图2是本申请实施例提供的一种拍摄预览方法的流程图,如图2所示,该方法可以包括以下步骤:步骤201和步骤202。Figure 2 is a flow chart of a shooting preview method provided by an embodiment of the present application. As shown in Figure 2, the method may include the following steps: step 201 and step 202.
在步骤201中,显示第一变焦倍率的拍摄预览画面。In step 201, a shooting preview screen of the first zoom ratio is displayed.
本申请实施例中,第一变焦倍率为电子设备的相机当前所使用的变焦倍率,第一变焦倍率通常为较高的变焦倍率,例如,第一变焦倍率为3x倍率、5x倍率或者10x倍率等。In the embodiment of the present application, the first zoom ratio is the zoom ratio currently used by the camera of the electronic device. The first zoom ratio is usually a higher zoom ratio, for example, the first zoom ratio is 3x magnification, 5x magnification or 10x magnification, etc. .
在步骤202中,在电子设备产生第一位移的情况下,根据第一目标幅度,更新拍摄预览画面;其中,第一目标幅度与第一位移和第二变焦倍率具有关联关系,第一变焦倍率大于第二变焦倍率。In step 202, when the electronic device generates a first displacement, the shooting preview screen is updated according to the first target amplitude; wherein the first target amplitude is associated with the first displacement and the second zoom factor, and the first zoom factor Greater than the second zoom ratio.
本申请实施例中,第二变焦倍率通常为较低的变焦倍率,例如,第二变焦倍率可以为1x倍率或2x倍率等。第二变焦倍率用于在电子设备发生移动时,以第二变焦倍率的视场为基准视场,调整第一变焦倍率的拍摄预览画面的移动幅度,使得第一变焦倍率的拍摄预览画面的移动幅度与第二变焦倍率的拍摄预览画面的移动幅度一样小,提高长焦拍摄的体验,方便用户使用。其中,第二变焦倍率也可称为基准倍率。In the embodiment of the present application, the second zoom ratio is usually a lower zoom ratio. For example, the second zoom ratio may be 1x magnification or 2x magnification. The second zoom magnification is used to adjust the movement range of the shooting preview screen of the first zoom magnification using the field of view of the second zoom magnification as the reference field of view when the electronic device moves, so that the movement of the shooting preview screen of the first zoom magnification The amplitude is as small as the movement of the shooting preview screen at the second zoom ratio, improving the telephoto shooting experience and making it easier for users to use. The second zoom magnification may also be called a reference magnification.
本申请实施例中,可以由用户设置第二变焦倍率。In the embodiment of the present application, the second zoom ratio can be set by the user.
在一个例子中,如图3所示,用户打开电子设备301的相机,可以先设置第一变焦倍率,例如设置10x倍率为第一变焦倍率,电子设备301上显示第一变焦倍率的拍摄预览画面302、用于设置第一变焦倍率的控件303以及用于设置第二变焦倍率的控件304,之后点击控件304,弹出两个控件,分别为:用于选择2x倍率作为第二变焦倍率的控件3051和用于选择1x倍率作为第二变焦倍率的控件3052,点击控件3051或控件3052,来设置第二变焦倍率,例如设置2x倍率为第二变焦倍率。In one example, as shown in Figure 3, the user turns on the camera of the electronic device 301 and can first set the first zoom ratio, for example, set 10x as the first zoom ratio, and the electronic device 301 displays a shooting preview screen of the first zoom ratio. 302. Control 303 for setting the first zoom ratio and control 304 for setting the second zoom ratio. Then click the control 304, and two controls will pop up, namely: control 3051 for selecting 2x magnification as the second zoom ratio. and a control 3052 for selecting 1x magnification as the second zoom magnification. Click the control 3051 or the control 3052 to set the second zoom magnification, for example, set 2x magnification as the second zoom magnification.
在另一个例子中,用户打开电子设备的相机,电子设备上显示默认倍率的拍摄预览界面,用户可以先设置第二变焦倍率,例如将默认倍率设置为第二变焦倍率,之后再设置第一变焦倍率,例如设置10x倍率为第一变焦倍率, 其中,默认倍率可以为1x倍率。In another example, the user turns on the camera of the electronic device, and a shooting preview interface with a default magnification is displayed on the electronic device. The user can first set the second zoom ratio, for example, set the default magnification to the second zoom ratio, and then set the first zoom ratio. Magnification, for example, set 10x magnification as the first zoom magnification, Among them, the default magnification can be 1x magnification.
可见,本申请实施例中,在进行高变焦倍率拍摄时,除设置第一变焦倍率之外,还可以设置一个第二变焦倍率,将第二变焦倍率的视场作为基准视场,在电子设备发生移动时,利用移动所产生的第一位移,匹配第二变焦倍率的拍摄预览画面的移动幅度,对第一变焦倍率的拍摄预览画面的移动幅度进行反向补偿,获得与基准视场一样的移动体验。It can be seen that in the embodiment of the present application, when shooting at a high zoom magnification, in addition to setting the first zoom magnification, a second zoom magnification can also be set, and the field of view of the second zoom magnification is used as the reference field of view. In the electronic device When movement occurs, the first displacement generated by the movement is used to match the movement amplitude of the shooting preview screen at the second zoom magnification, and the movement amplitude of the shooting preview screen at the first zoom magnification is reversely compensated to obtain the same field of view as the reference field of view. Mobile experience.
本申请实施例中,可以在电子设备显示拍摄预览界面的时刻开始,实时读取陀螺仪检测到的数据,根据陀螺仪检测到的数据,确定电子设备是否发生移动,其中,陀螺仪检测到的数据可以包括:移动距离数据和旋转角度数据。In the embodiment of the present application, the data detected by the gyroscope can be read in real time starting from the moment when the electronic device displays the shooting preview interface, and based on the data detected by the gyroscope, it is determined whether the electronic device has moved, wherein, the data detected by the gyroscope The data may include: movement distance data and rotation angle data.
本申请实施例中,在根据陀螺仪检测到的数据确定电子设备发生移动的情况下,还可以进一步根据陀螺仪检测到的移动距离和旋转角度,确定电子设备的移动类型,其中,移动类型可以包括:仅水平移动、仅旋转移动,以及在水平移动的同时还旋转移动。相应地,第一位移可以包括:线位移、角位移,以及线位移和角位移。In the embodiment of the present application, when it is determined that the electronic device has moved based on the data detected by the gyroscope, the movement type of the electronic device can be further determined based on the movement distance and rotation angle detected by the gyroscope, wherein the movement type can be Including: only horizontal movement, only rotational movement, and horizontal movement and rotational movement. Accordingly, the first displacement may include: linear displacement, angular displacement, and linear displacement and angular displacement.
本申请实施例中,可以在电子设备中预先存储第一变焦倍率、第二变焦倍率和第一位移与第一目标幅度的对应关系,例如,对应关系可以为函数C=f(k,n,z),其中,C为第一目标幅度,k为第一变焦倍率,n为第二变焦倍率,z为第一位移。当电子设备发生移动时,获取发生移动时的第一变焦倍率、第二变焦倍率和第一位移,将获取到的数据代入到对应关系中,得到对应的第一目标幅度。In the embodiment of the present application, the corresponding relationship between the first zoom magnification, the second zoom magnification, the first displacement and the first target amplitude can be pre-stored in the electronic device. For example, the corresponding relationship can be the function C=f(k,n, z), where C is the first target amplitude, k is the first zoom magnification, n is the second zoom magnification, and z is the first displacement. When the electronic device moves, the first zoom magnification, the second zoom magnification and the first displacement when the movement occurs are obtained, and the obtained data are substituted into the corresponding relationship to obtain the corresponding first target amplitude.
本申请实施例中,电子设备的移动类型不同,第一目标幅度所表征的含义不同,其中,当电子设备的移动类型为水平移动时,即,第一位移为线位移时,第一目标幅度为距离值,具体可以为像素个数。当电子设备的移动类型为旋转移动时,即,第一位移为角位移时,第一目标幅度分为两种情况:若电子设备中存在光学图像稳定器,则第一目标幅度为角度值;若电子设备中不存在光学图像稳定器,则第一目标幅度为距离值。当电子设备的移动类 型为在水平移动的同时还旋转移动时,即,第一位移包括线位移和角位移时,第一目标幅度也分为两种情况:若电子设备中存在光学图像稳定器,则第一目标幅度包括距离值和角度值;若电子设备中不存在光学图像稳定器,则第一目标幅度为距离值。In the embodiment of the present application, the movement type of the electronic device is different, and the meaning represented by the first target amplitude is different. When the movement type of the electronic device is horizontal movement, that is, when the first displacement is a linear displacement, the first target amplitude is the distance value, which can be the number of pixels. When the movement type of the electronic device is rotational movement, that is, when the first displacement is an angular displacement, the first target amplitude is divided into two situations: if there is an optical image stabilizer in the electronic device, the first target amplitude is an angular value; If there is no optical image stabilizer in the electronic device, the first target amplitude is the distance value. When electronic devices are mobile When the type is moving horizontally and also rotationally, that is, when the first displacement includes linear displacement and angular displacement, the first target amplitude is also divided into two situations: If there is an optical image stabilizer in the electronic device, then the first target The amplitude includes a distance value and an angle value; if there is no optical image stabilizer in the electronic device, the first target amplitude is the distance value.
本申请实施例中,可以针对电子设备的不同移动类型,提供不同的第一目标幅度确定方式,能够保证电子设备在各种移动情况下的拍摄预览画面的显示效果。In the embodiments of the present application, different first target amplitude determination methods can be provided for different movement types of the electronic device, which can ensure the display effect of the shooting preview screen of the electronic device under various movement conditions.
在一些实施例中,在电子设备的移动类型为水平移动的情况下,第一位移为陀螺仪检测到的水平移动距离,此时根据第一变焦倍率、第二变焦倍率和陀螺仪检测到的xy轴水平移动距离,确定第一目标幅度。In some embodiments, when the movement type of the electronic device is horizontal movement, the first movement is the horizontal movement distance detected by the gyroscope. At this time, according to the first zoom magnification, the second zoom magnification and the distance detected by the gyroscope. The horizontal movement distance of the xy axis determines the first target amplitude.
本申请实施例中,可以在电子设备中预先存储第一变焦倍率、第二变焦倍率和陀螺仪检测到的水平移动距离与第一目标幅度的对应关系,例如,对应关系可以为函数C=f(k,n,Lgyro),其中,C为第一目标幅度,k为第一变焦倍率,n为第二变焦倍率,Lgyro为陀螺仪检测到的水平移动距离,即第一位移。当电子设备发生移动时,获取发生移动时的第一变焦倍率、第二变焦倍率和陀螺仪检测到的水平移动距离,将获取到的数据代入到对应关系中,得到对应的第一目标幅度。In the embodiment of the present application, the corresponding relationship between the first zoom magnification, the second zoom magnification, the horizontal movement distance detected by the gyroscope and the first target amplitude can be pre-stored in the electronic device. For example, the corresponding relationship can be the function C=f (k,n,L gyro ), where C is the first target amplitude, k is the first zoom magnification, n is the second zoom magnification, and L gyro is the horizontal movement distance detected by the gyroscope, that is, the first displacement. When the electronic device moves, the first zoom magnification, the second zoom magnification and the horizontal movement distance detected by the gyroscope are obtained when the movement occurs, and the obtained data are substituted into the corresponding relationship to obtain the corresponding first target amplitude.
在一些实施例中,在电子设备的移动类型为旋转移动的情况下,第一位移为陀螺仪检测到的旋转角度,此时根据第一变焦倍率、第二变焦倍率和陀螺仪检测到的旋转角度,确定第一目标幅度。In some embodiments, when the movement type of the electronic device is rotational movement, the first movement is the rotation angle detected by the gyroscope. At this time, according to the first zoom magnification, the second zoom magnification and the rotation detected by the gyroscope. angle to determine the first target amplitude.
本申请实施例中,可以在电子设备中预先存储第一变焦倍率、第二变焦倍率和陀螺仪检测到的旋转角度与第一目标幅度的对应关系,例如,对应关系可以为函数C=f(k,n,θgyro),其中,C为第一目标幅度,k为第一变焦倍率,n为第二变焦倍率,θgyro为陀螺仪检测到的旋转角度,即第一位移。当电子设备发生移动时,获取发生移动时的第一变焦倍率、第二变焦倍率和陀螺仪检测到的旋转角度,将获取到的数据代入到对应关系中,得到对应的第一目标幅度。 In the embodiment of the present application, the corresponding relationship between the first zoom magnification, the second zoom magnification, the rotation angle detected by the gyroscope and the first target amplitude can be pre-stored in the electronic device. For example, the corresponding relationship can be the function C=f ( k,n,θ gyro ), where C is the first target amplitude, k is the first zoom magnification, n is the second zoom magnification, and θ gyro is the rotation angle detected by the gyroscope, that is, the first displacement. When the electronic device moves, the first zoom magnification, the second zoom magnification and the rotation angle detected by the gyroscope are obtained when the movement occurs, and the obtained data are substituted into the corresponding relationship to obtain the corresponding first target amplitude.
在一些实施例中,在电子设备的移动类型包括水平移动和旋转移动的情况下,第一位移包括陀螺仪检测到的水平移动距离和旋转角度,此时根据第一变焦倍率、第二变焦倍率、水平移动距离和旋转角度,确定第一目标幅度。In some embodiments, when the movement type of the electronic device includes horizontal movement and rotational movement, the first movement includes the horizontal movement distance and the rotation angle detected by the gyroscope. At this time, according to the first zoom magnification, the second zoom magnification , horizontal movement distance and rotation angle to determine the first target amplitude.
本申请实施例中,可以预先存储第一变焦倍率、第二变焦倍率和陀螺仪检测到的水平移动距离与第一目标幅度的对应关系,例如,对应关系可以为函数C=f(k,n,Lgyro),其中,C为第一目标幅度,k为第一变焦倍率,n为第二变焦倍率,Lgyro为陀螺仪检测到的水平移动距离。以及可以预先存储第一变焦倍率、第二变焦倍率和陀螺仪检测到的旋转角度与第一目标幅度的对应关系,例如,对应关系可以为函数C=f(k,n,θgyro),其中,C为第一目标幅度,k为第一变焦倍率,n为第二变焦倍率,θgyro为陀螺仪检测到的旋转角度。当电子设备发生移动时,获取发生移动时的第一变焦倍率、第二变焦倍率和陀螺仪检测到的水平移动距离和旋转角度,将获取到的数据分别代入到上述两个对应关系函数中,得到两个补偿幅度,将两个补偿幅度进行叠加,得到第一目标幅度。In the embodiment of the present application, the corresponding relationship between the first zoom magnification, the second zoom magnification, the horizontal movement distance detected by the gyroscope and the first target amplitude can be stored in advance. For example, the corresponding relationship can be the function C=f(k,n ,L gyro ), where C is the first target amplitude, k is the first zoom magnification, n is the second zoom magnification, and L gyro is the horizontal movement distance detected by the gyroscope. And the corresponding relationship between the first zoom magnification, the second zoom magnification and the rotation angle detected by the gyroscope and the first target amplitude can be stored in advance. For example, the corresponding relationship can be the function C=f(k,n,θ gyro ), where , C is the first target amplitude, k is the first zoom magnification, n is the second zoom magnification, and θ gyro is the rotation angle detected by the gyroscope. When the electronic device moves, obtain the first zoom magnification, the second zoom magnification when the movement occurs, and the horizontal movement distance and rotation angle detected by the gyroscope, and substitute the obtained data into the above two corresponding relationship functions respectively. Two compensation amplitudes are obtained, and the two compensation amplitudes are superimposed to obtain the first target amplitude.
本申请实施例中,电子设备的移动类型不同,第一位移的类型不同,第一目标幅度所表征的含义不同,含义不同的第一目标幅度,所对应的拍摄预览画面的更新方式不同。In the embodiment of the present application, the electronic device has different movement types, different first movement types, different meanings represented by the first target amplitude, and different first target amplitudes with different meanings, corresponding to different updating methods of the shooting preview screen.
在一些实施例中,当第一目标幅度为距离值时,第一变焦倍率的拍摄预览画面在移动过程中需要对中心裁切画面反向补偿上述距离值,即,针对电子设备的水平移动,高变焦倍率的中心裁切画面只需要往反方向移动,做裁切获得画面,即对高变焦倍率的拍摄预览画面使用非中心裁切,可以获得与低变焦倍率相同的移动体验。In some embodiments, when the first target amplitude is a distance value, the shooting preview image of the first zoom magnification needs to reversely compensate the distance value for the center cropped image during the movement process, that is, for the horizontal movement of the electronic device, The center-cropped image of a high zoom magnification only needs to be moved in the opposite direction to obtain the image by cropping, that is, using non-center cropping on the shooting preview image of a high zoom magnification, the same mobile experience as that of a low zoom magnification can be obtained.
在一些实施例中,当第一目标幅度为角度值时,只需将电子设备中的光学图像稳定器反向转动上述角度值,来调整拍摄预览画面的移动幅度,可以获得与低变焦倍率相同的移动体验。In some embodiments, when the first target amplitude is an angle value, you only need to reversely rotate the optical image stabilizer in the electronic device to the above angle value to adjust the movement amplitude of the shooting preview screen, and the same as the low zoom magnification can be obtained mobile experience.
在一些实施例中,当第一目标幅度包括距离值和角度值时,将高变焦倍率的拍摄预览画面在移动过程中对中心裁切画面反向补偿上述距离值,同时 将光学图像稳定器反向转动上述角度值,可以获得与低变焦倍率相同的移动体验。In some embodiments, when the first target amplitude includes a distance value and an angle value, the shooting preview image with a high zoom magnification is reversely compensated for the distance value in the center cropping image during movement, and at the same time Turning the optical image stabilizer in the opposite direction to the above angle value will give you the same mobile experience as at low zoom magnifications.
由上述实施例可见,该实施例中,电子设备显示第一变焦倍率的拍摄预览画面,在电子设备产生第一位移的情况下,根据第一目标幅度,更新拍摄预览画面;其中,第一目标幅度与第一位移和第二变焦倍率具有关联关系,第一变焦倍率大于第二变焦倍率。与相关技术相比,本申请实施例中,在用户手持电子设备进行高变焦倍率拍摄的过程中,若电子设备发生了移动,则可以根据移动的位移和一个较低的变焦倍率,自动调整高变焦倍率的拍摄预览画面,以获得与较低变焦倍率一样的移动体验,即,电子设备发生移动时,高变焦倍率拍摄预览画面的移动感受与低变焦倍率拍摄预览画面的移动感受相同,因此可以解决高变焦倍率拍摄场景下用户手部微小移动给拍摄预览画面带来巨幅移动的问题,而无需用户手动调整,降低了用户的操作成本。It can be seen from the above embodiment that in this embodiment, the electronic device displays the shooting preview screen of the first zoom magnification. When the electronic device generates the first displacement, the shooting preview screen is updated according to the first target amplitude; wherein, the first target The amplitude is related to the first displacement and the second zoom factor, and the first zoom factor is greater than the second zoom factor. Compared with related technologies, in the embodiments of the present application, when the user is holding an electronic device for high zoom magnification shooting, if the electronic device moves, the high zoom magnification can be automatically adjusted based on the movement displacement and a lower zoom magnification. The shooting preview screen of the zoom magnification can obtain the same mobile experience as the lower zoom magnification. That is, when the electronic device moves, the movement feeling of the shooting preview screen of the high zoom magnification is the same as the movement feeling of the shooting preview screen of the low zoom magnification, so it can It solves the problem of small movements of the user's hand causing huge movements to the shooting preview screen in high zoom magnification shooting scenarios, without requiring the user to manually adjust, reducing the user's operating costs.
为了便于理解,下面对电子设备在各移动类型下,第一目标幅度的计算过程进行详细描述。For ease of understanding, the calculation process of the first target amplitude under each movement type of the electronic device is described in detail below.
在本申请提供的另一个实施例中,在电子设备包括光学图像稳定器的情况下,所提供的拍摄方法,还可以在图2所示实施例的步骤202之前,增加以下步骤:步骤203。In another embodiment provided by this application, in the case where the electronic device includes an optical image stabilizer, the provided shooting method may also add the following step: step 203 before step 202 in the embodiment shown in FIG. 2 .
在步骤203中,根据第一位移和位移补偿率,计算第一目标幅度;In step 203, calculate the first target amplitude according to the first displacement and the displacement compensation rate;
其中,位移补偿率为变焦倍率差与第一变焦倍率之比,变焦倍率差为第一变焦倍率与第二变焦倍率之差;第一位移包括以下至少一项:线位移、角位移。The displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification; the first displacement includes at least one of the following: linear displacement and angular displacement.
在一个例子中,当第一位移为线位移时,若第一位移为Lgyro,第一变焦倍率为k,第二变焦倍率为n,第一目标幅度为C,则位移补偿率为 In an example, when the first displacement is linear displacement, if the first displacement is L gyro , the first zoom magnification is k, the second zoom magnification is n, and the first target amplitude is C, then the displacement compensation rate is
在另一个例子中,当第一位移为角位移时,若第一位移为θgyro,第一变焦倍率为k,第二变焦倍率为n,第一目标幅度为C,则位移补偿率为 In another example, when the first displacement is an angular displacement, if the first displacement is θ gyro , the first zoom magnification is k, the second zoom magnification is n, and the first target amplitude is C, then the displacement compensation rate is
其中,以上两个公式的推导过程,在后续实施例中详细介绍。The derivation process of the above two formulas will be introduced in detail in subsequent embodiments.
相应地,上述步骤202包括以下步骤:步骤2021和步骤2022,其中,Correspondingly, the above step 202 includes the following steps: step 2021 and step 2022, wherein,
在步骤2021中,控制光学图像稳定器沿第一方向产生第一目标幅度的位移,其中,第一方向与第一位移的位移方向相反。In step 2021, the optical image stabilizer is controlled to generate a displacement of a first target amplitude along a first direction, where the first direction is opposite to the displacement direction of the first displacement.
在步骤2022中,显示第一变焦倍率的拍摄预览画面。In step 2022, a shooting preview screen of the first zoom ratio is displayed.
可见,本申请实施例中,在电子设备中包括光学图像稳定器的情况下,当电子设备发生移动时,可以借助于光学图像稳定器,自动地对高变焦倍率的拍摄预览画面进行调整,而无需用户手动调整,效率较高。It can be seen that in the embodiment of the present application, when the electronic device includes an optical image stabilizer, when the electronic device moves, the high zoom magnification shooting preview screen can be automatically adjusted with the help of the optical image stabilizer, and There is no need for manual adjustment by the user and the efficiency is high.
在本申请提供的另一个实施例中,在电子设备的移动类型为水平移动的情况下,电子设备产生的第一位移为线位移,所提供的拍摄方法,还可以在图2所示实施例的步骤202之前,增加以下步骤:步骤204,其中,In another embodiment provided by this application, when the movement type of the electronic device is horizontal movement, the first displacement generated by the electronic device is a linear displacement. The provided shooting method can also be used in the embodiment shown in Figure 2 Before step 202, add the following steps: step 204, where,
在步骤204中,根据第一位移和位移补偿率,计算第一目标幅度;其中,位移补偿率为变焦倍率差与第一变焦倍率之比,变焦倍率差为第一变焦倍率与第二变焦倍率之差。In step 204, the first target amplitude is calculated based on the first displacement and the displacement compensation rate; where the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the first zoom magnification to the second zoom magnification Difference.
本申请实施例中,第一位移、第一变焦倍率、第二变焦倍率与第一目标幅度的对应关系为:In the embodiment of the present application, the corresponding relationship between the first displacement, the first zoom magnification, the second zoom magnification and the first target amplitude is:
其中,Lgyro为第一位移,k为第一变焦倍率,n为第二变焦倍率,C为第一目标幅度,为位移补偿率。 Among them, L gyro is the first displacement, k is the first zoom magnification, n is the second zoom magnification, C is the first target amplitude, is the displacement compensation rate.
以上对应关系是通过以下过程推导得到的:The above corresponding relationships are derived through the following process:
设定第一变焦倍率的拍摄预览画面的相对移动量R1与第二变焦倍率的拍摄预览画面的相对移动量R2相等,得到以上对应关系,其中,R1为第一变焦倍率的拍摄预览画面的第一移动量与第一变焦倍率的视场尺寸的比值,R2为第一位移与第二变焦倍率的视场尺寸的比值,第一位移为陀螺仪检测到的移动距离。The relative movement amount R1 of the shooting preview screen of the first zoom magnification is set to be equal to the relative movement amount R2 of the shooting preview screen of the second zoom magnification, and the above corresponding relationship is obtained, where R1 is the third of the shooting preview screen of the first zoom magnification. The ratio of a movement amount to the field of view size of the first zoom magnification. R2 is the ratio of the first movement amount to the field of view size of the second zoom magnification. The first displacement is the movement distance detected by the gyroscope.
在一个例子中,针对水平移动,定义画面的相对移动量为:
In an example, for horizontal movement, the relative movement amount of the screen is defined as:
针对旋转移动,定义画面的相对移动量为:
For rotational movement, define the relative movement amount of the screen as:
其中,Lgyro为陀螺仪检测到的移动距离,Lfield为镜头的视场尺寸,θgyro为陀螺仪检测到的旋转角度,θfield为相机镜头的视场角度,以上参数在图1中均有示意。Among them, L gyro is the movement distance detected by the gyroscope, L field is the field of view size of the lens, θ gyro is the rotation angle detected by the gyroscope, and θ field is the field of view angle of the camera lens. The above parameters are all shown in Figure 1 There is a signal.
可以理解的是,基于以上定义,10x倍率的拍摄预览画面的相对移动量为2x倍率的拍摄预览画面的相对移动量的5倍,记为5R2x,其中,R2x为2x倍率的拍摄预览画面的相对移动量。进一步,以nx倍率作为移动体验基准,nx可以1x或2x,记此相对移动量为Rnx,则kx倍率的拍摄预览画面的相对移动量为nx倍率的k/n倍,为(k/n)*Rnx。为了便于理解,后续在一些例子中用nx倍率代替第二变焦倍率,用kx倍率代替第一变焦倍率进行描述。It can be understood that based on the above definition, the relative movement amount of the 10x magnification shooting preview screen is 5 times the relative movement amount of the 2x magnification shooting preview screen, which is recorded as 5R 2x , where R 2x is the 2x magnification shooting preview screen. relative movement amount. Furthermore, using nx magnification as the benchmark for mobile experience, nx can be 1x or 2x. Record the relative movement amount as R nx , then the relative movement amount of the shooting preview screen at kx magnification is k/n times of nx magnification, which is (k/n )*R nx . In order to facilitate understanding, nx magnification is used in some examples instead of the second zoom magnification, and kx magnification is used in place of the first zoom magnification for description.
在电子设备发生水平移动的情况下,为了实现与第二变焦倍率一致的移动体验,第二变焦倍率与第一变焦倍率的拍摄预览画面的相对移动量应相等,即nx倍率与kx倍率的拍摄预览画面的相对移动量应相等,根据公式(1)得到:
When the electronic device moves horizontally, in order to achieve a mobile experience consistent with the second zoom ratio, the relative movement amount of the shooting preview screen of the second zoom ratio and the first zoom ratio should be equal, that is, the shooting preview of nx magnification and kx magnification The relative movement amount of the preview screen should be equal, which is obtained according to formula (1):
其中,m为第一移动量,是指移动m个单位才能获得与nx倍率相同的移动体验,Lnx-field为nx倍率的视场尺寸,Lkx-field为kx倍率的视场尺寸。Among them, m is the first movement amount, which means that only by moving m units can the same movement experience as nx magnification be obtained, L nx-field is the field of view size of nx magnification, and L kx-field is the field of view size of kx magnification.
根据公式(3),计算得到m:
According to formula (3), m is calculated:
根据Lgyro和m,求得第一目标幅度C:
According to L gyro and m, find the first target amplitude C:
同理,本申请实施例中,在电子设备的移动类型为旋转移动、且电子设备包括光学图像稳定器的情况下,第一位移、第一变焦倍率、第二变焦倍率 与第一目标幅度的对应关系为:Similarly, in the embodiment of the present application, when the movement type of the electronic device is rotational movement and the electronic device includes an optical image stabilizer, the first displacement, the first zoom magnification, and the second zoom magnification The corresponding relationship with the first target amplitude is:
其中,θgyro为第一位移,k为第一变焦倍率,n为第二变焦倍率,C为第一目标幅度,为位移补偿率。 Among them, θ gyro is the first displacement, k is the first zoom magnification, n is the second zoom magnification, C is the first target amplitude, is the displacement compensation rate.
以上对应关系是通过以下过程推导得到的:The above corresponding relationships are derived through the following process:
设定第一变焦倍率的拍摄预览画面的相对移动量R3与第二变焦倍率的拍摄预览画面的相对移动量R4相等,得到以上对应关系,其中,R3为第一变焦倍率的拍摄预览画面的第二移动量与第一变焦倍率的视场角度的比值,R4为第一位移与第二变焦倍率的视场角度的比值,第一位移为陀螺仪检测到的旋转角度。The relative movement amount R3 of the shooting preview screen of the first zoom magnification is set to be equal to the relative movement amount R4 of the shooting preview screen of the second zoom magnification, and the above corresponding relationship is obtained, where R3 is the third of the shooting preview screen of the first zoom magnification. The ratio of the second movement amount to the field of view angle of the first zoom magnification, R4 is the ratio of the first displacement to the field of view angle of the second zoom magnification, and the first displacement is the rotation angle detected by the gyroscope.
在电子设备发生旋转移动的情况下,为了实现与第二变焦倍率一致的移动体验,第二变焦倍率与第一变焦倍率的拍摄预览画面的相对移动量应相等,即nx倍率与kx倍率的拍摄预览画面的相对移动量应相等,根据公式(2)得到:
When the electronic device rotates and moves, in order to achieve a mobile experience consistent with the second zoom magnification, the relative movement amount of the shooting preview screen of the second zoom magnification and the first zoom magnification should be equal, that is, the shooting of nx magnification and kx magnification The relative movement amount of the preview screen should be equal, which is obtained according to formula (2):
其中,θk为第二移动量,是指转动θk的角度才能获得与nx倍率相同的移动体验,θnx-field为nx倍率的视场角度,θkx-field为kx倍率的视场角度。Among them, θ k is the second movement amount, which refers to the angle of rotation of θ k to obtain the same movement experience as nx magnification, θ nx-field is the field of view angle of nx magnification, θ kx-field is the field of view angle of kx magnification .
根据公式(6),计算得到θk
According to formula (6), θ k is calculated:
根据θgyro和θk,计算得到第一目标幅度C:
According to θ gyro and θ k , the first target amplitude C is calculated:
在本申请提供的另一个实施例中,在电子设备的移动类型为旋转移动的情况下,电子设备产生的第一位移为角位移,所提供的拍摄方法,还可以在图2所示实施例的步骤202之前,增加以下步骤:步骤205和步骤206,其中,In another embodiment provided by this application, when the movement type of the electronic device is rotational movement, the first displacement generated by the electronic device is angular displacement. The provided shooting method can also be used in the embodiment shown in Figure 2 Before step 202, add the following steps: step 205 and step 206, where,
在步骤205中,根据第一位移和位移补偿率,计算第三目标幅度,其中,,位移补偿率为变焦倍率差与第一变焦倍率之比,变焦倍率差为第一变焦倍率与第二变焦倍率之差。 In step 205, the third target amplitude is calculated based on the first displacement and the displacement compensation rate, where, the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the ratio of the first zoom magnification to the second zoom magnification. The difference in magnification.
在步骤206中,对第三目标幅度进行三角转换,得到第一目标幅度。In step 206, trigonometric transformation is performed on the third target amplitude to obtain the first target amplitude.
本申请实施例中,在电子设备的移动类型为旋转移动、且电子设备不包括光学图像稳定器或不借助于光学图像稳定器的情况下,第一位移、第一变焦倍率、第二变焦倍率与第一目标幅度的对应关系为:
In the embodiment of the present application, when the movement type of the electronic device is rotational movement, and the electronic device does not include an optical image stabilizer or does not rely on an optical image stabilizer, the first displacement, the first zoom magnification, and the second zoom magnification The corresponding relationship with the first target amplitude is:
其中,θgyro为第一位移,k为第一变焦倍率,n为第二变焦倍率,C为第一目标幅度,θnx-field为nx倍率的视场角度,θkx-field为kx倍率的视场角度,Lnx-field为nx倍率的视场尺寸,Lkx-field为kx倍率的视场尺寸。Among them, θ gyro is the first displacement, k is the first zoom magnification, n is the second zoom magnification, C is the first target amplitude, θ nx-field is the field of view angle of nx magnification, θ kx-field is the kx magnification Field of view angle, L nx-field is the field of view size at nx magnification, and L kx-field is the field of view size at kx magnification.
以上对应关系是通过以下过程推导得到的:The above corresponding relationships are derived through the following process:
设定第一变焦倍率的拍摄预览画面的相对移动量R5与第二变焦倍率的拍摄预览画面的相对移动量R6相等,得到以上对应关系,其中,R5为第一变焦倍率的拍摄预览画面的第三移动量与第一变焦倍率的视场尺寸的比值,R6为第二变焦倍率的拍摄预览画面的实际移动量与第二变焦倍率的视场尺寸的比值。The relative movement amount R5 of the shooting preview screen of the first zoom magnification is set to be equal to the relative movement amount R6 of the shooting preview screen of the second zoom magnification, and the above corresponding relationship is obtained, where R5 is the third of the shooting preview screen of the first zoom magnification. R6 is the ratio of the actual movement amount of the shooting preview screen at the second zoom magnification to the field of view size of the second zoom magnification.
在一个例子中,在电子设备发生旋转移动的情况下,根据公式(1),两个变焦倍率的移动体验一致只需:
In an example, when the electronic device rotates and moves, according to formula (1), the mobile experience of the two zoom magnifications is consistent only:
其中,A为nx倍率的拍摄预览画面的实际移动量,B为kx倍率的拍摄预览画面的第三移动量。Among them, A is the actual movement amount of the shooting preview screen at nx magnification, and B is the third movement amount of the shooting preview screen at kx magnification.
根据公式(9),求到B:
According to formula (9), B is obtained:
根据图1中的几何关系,求得kx倍率的拍摄预览画面的实际移动量M:
According to the geometric relationship in Figure 1, the actual movement amount M of the shooting preview screen at kx magnification is obtained:
根据M和B,求得第一目标幅度C:
According to M and B, find the first target amplitude C:
根据公式(11),求得A:
According to formula (11), obtain A:
根据公式(12)和公式(13),求得C:
According to formula (12) and formula (13), find C:
在本申请提供的另一个实施例中,当第一目标幅度为距离值时,上述步骤202包括以下步骤:步骤2023和步骤2024。In another embodiment provided by this application, when the first target amplitude is a distance value, the above step 202 includes the following steps: step 2023 and step 2024.
在步骤2023中,在电子设备产生第一位移的情况下,对电子设备的图像传感器采集到的第一图像向第二方向裁切第一目标幅度,得到第二图像,其中,第二方向与第一位移的位移方向相反。In step 2023, when the electronic device generates a first displacement, the first image collected by the image sensor of the electronic device is cropped by the first target amplitude in the second direction to obtain a second image, where the second direction and The first displacement has the opposite direction of displacement.
在步骤2024中,预览显示第二图像。In step 2024, a preview displays the second image.
可见,本申请实施例中,当电子设备发生移动时,可以采用非中心裁剪的方式,自动地对高变焦倍率的拍摄预览画面中的图像进行调整,而无需用户手动调整,效率较高。It can be seen that in the embodiment of the present application, when the electronic device moves, non-center cropping can be used to automatically adjust the image in the high zoom magnification shooting preview screen without the need for manual adjustment by the user, which is more efficient.
在本申请提供的另一个实施例中,在电子设备的移动类型包括水平移动和旋转移动的情况下,可以分别计算水平移动对应的补偿幅度,以及计算旋转移动对应的补偿幅度,水平移动对应的补偿幅度叠加旋转移动对应的补偿幅度构成用于对第一变焦倍率的拍摄预览画面的移动幅度进行反向补偿的第一目标幅度。In another embodiment provided by this application, when the movement type of the electronic device includes horizontal movement and rotational movement, the compensation amplitude corresponding to the horizontal movement and the compensation amplitude corresponding to the rotational movement can be calculated respectively, and the compensation amplitude corresponding to the horizontal movement can be calculated. The compensation amplitude superimposed with the compensation amplitude corresponding to the rotation movement constitutes a first target amplitude used for reverse compensation of the movement amplitude of the shooting preview image of the first zoom magnification.
在一个例子中,在电子设备中存在光学图像稳定器的情况下,第一目标幅度C包括:公式(5)求得的补偿幅度和公式(8)求得的补偿幅度。In one example, when there is an optical image stabilizer in the electronic device, the first target amplitude C includes: the compensation amplitude obtained by formula (5) and the compensation amplitude obtained by formula (8).
在另一个例子中,在电子设备不存在光学图像稳定器的情况下,第一目标幅度C为:公式(5)求得的补偿幅度与公式(14)求得的补偿幅度的之和。In another example, when the electronic device does not have an optical image stabilizer, the first target amplitude C is: the sum of the compensation amplitude obtained by formula (5) and the compensation amplitude obtained by formula (14).
本申请实施例中,可以预先在电子设备中存储以上公式(5)、公式(8)和公式(14),以便当检测到电子设备发生移动时,直接调用以上公式,计算第一目标幅度,基于第一目标幅度进行数据变焦拍摄预览画面的补偿,提高拍摄效果和效率。 In the embodiment of the present application, the above formula (5), formula (8) and formula (14) can be stored in the electronic device in advance, so that when the movement of the electronic device is detected, the above formula is directly called to calculate the first target amplitude, Based on the first target amplitude, the data zoom shooting preview screen is compensated to improve the shooting effect and efficiency.
可见,本申请实施例中,可以针对电子设备的不同移动类型,提供不同的补偿幅度确定方式,能够保证电子设备的各种移动情况下数码变焦拍摄预览画面的展示显示效果。It can be seen that in the embodiments of the present application, different compensation amplitude determination methods can be provided for different types of movement of the electronic device, which can ensure the display effect of the digital zoom shooting preview screen under various movement conditions of the electronic device.
在本申请提供的另一个实施例中,可以由用户设置是否开启高变焦倍率的拍摄预览画面的自动调整功能,相应地,上述步骤201包括以下步骤:步骤2011。In another embodiment provided by this application, the user can set whether to turn on the automatic adjustment function of the high zoom magnification shooting preview screen. Accordingly, the above-mentioned step 201 includes the following steps: step 2011.
在步骤2011中,显示第一变焦倍率的拍摄预览画面和预览补偿控件;其中,预览补偿控件用于指示第二变焦倍率在电子设备产生位移的情况下,拍摄预览画面的更新幅度。In step 2011, the shooting preview image of the first zoom ratio and the preview compensation control are displayed; wherein the preview compensation control is used to indicate the update range of the shooting preview image of the second zoom ratio when the electronic device is displaced.
本申请实施例中,若用户想开启高变焦倍率的拍摄预览画面的自动调整功能,则可以点击预览补偿控件。In the embodiment of this application, if the user wants to turn on the automatic adjustment function of the shooting preview screen with high zoom magnification, he can click the preview compensation control.
上述步骤202包括以下步骤:步骤2025和步骤2026。The above step 202 includes the following steps: step 2025 and step 2026.
在步骤2025中,接收对预览补偿控件的第一输入;例如,第一输入可以为点击输入。In step 2025, a first input to the preview compensation control is received; for example, the first input may be a click input.
在步骤2026中,响应于第一输入,在电子设备产生第一位移的情况下,根据第一目标幅度,更新拍摄预览画面。In step 2026, in response to the first input, when the electronic device generates a first displacement, the shooting preview screen is updated according to the first target amplitude.
本申请实施例中,在用户手动开启高变焦倍率的拍摄预览画面的自动调整功能的情况下,若电子设备发生了移动,则自动地对高变焦倍率的拍摄预览画面中的图像进行调整,而无需用户手动调整,效率较高。In the embodiment of the present application, when the user manually turns on the automatic adjustment function of the high zoom magnification shooting preview screen, if the electronic device moves, the image in the high zoom magnification shooting preview screen is automatically adjusted, and There is no need for manual adjustment by the user and the efficiency is high.
在本申请提供的另一个实施例中,可以定义灵敏度s,来调整对拍摄预览画面的补偿幅度的大小,记为s*C,其中,C为步骤202中的第一目标幅度,s=1为默认,即与第二变焦倍率的移动体验一致,s=0为不补偿。In another embodiment provided by this application, the sensitivity s can be defined to adjust the size of the compensation amplitude for shooting the preview image, recorded as s*C, where C is the first target amplitude in step 202, s=1 It is the default, that is, it is consistent with the mobile experience of the second zoom ratio, and s=0 means no compensation.
在一些实施例中,如图4所示,用户打开电子设备401的相机之后,除显示10x倍率403的拍摄预览画面402和用于设置第二变焦倍率的控件404之外,还显示用于调节灵敏度的控件405,其中,用户可以通过滑动控件405,来调节灵敏度。In some embodiments, as shown in Figure 4, after the user turns on the camera of the electronic device 401, in addition to displaying the shooting preview screen 402 of 10x magnification 403 and the control 404 for setting the second zoom magnification, a control for adjusting the second zoom magnification is also displayed. Sensitivity control 405, wherein the user can adjust the sensitivity by sliding the control 405.
在一些实施例中,所提供的拍摄预览方法,还可以在图2所示实施例的 基础上,增加以下步骤:步骤207。In some embodiments, the provided shooting preview method can also be used in the embodiment shown in Figure 2 Based on this, add the following steps: Step 207.
在步骤207中,显示变焦倍率与预览画面更新灵敏度的变焦灵敏度曲线,其中,变焦灵敏度曲线包括第一变焦倍率对应的第一灵敏度和第三变焦倍率对应的第二灵敏度。In step 207, a zoom sensitivity curve of zoom magnification and preview screen update sensitivity is displayed, where the zoom sensitivity curve includes a first sensitivity corresponding to the first zoom magnification and a second sensitivity corresponding to the third zoom magnification.
在一个例子中,如图5所示,用户打开电子设备501的相机后,显示默认倍率503的拍摄预览画面502和用于设置第二变焦倍率的控件504,用户可以在1x倍率下点击控件504,此时默认当前倍率为第二变焦倍率。在设定第二变焦倍率之后,会显示用于调整各倍率下的灵敏度的一个变焦灵敏度曲线506,默认每个倍率下的灵敏度都为1,也即每个高变焦倍率移动体验与基准的低变焦倍率一致。In one example, as shown in Figure 5, after the user turns on the camera of the electronic device 501, the shooting preview screen 502 of the default magnification 503 and the control 504 for setting the second zoom magnification are displayed. The user can click the control 504 at 1x magnification. , at this time the default current magnification is the second zoom magnification. After setting the second zoom magnification, a zoom sensitivity curve 506 for adjusting the sensitivity at each magnification will be displayed. The default sensitivity at each magnification is 1, that is, the mobile experience of each high zoom magnification is lower than the baseline. The zoom ratio is the same.
在上述步骤202之后还包括以下步骤:步骤208。After the above step 202, the following step is also included: step 208.
在步骤208中,在电子设备产生第二位移且接收到用户将第一变焦倍率调节为第三变焦倍率的情况下,根据第二目标幅度,更新拍摄预览画面;其中,第二目标幅度与第二位移和第二灵敏度具有关联关系。In step 208, when the electronic device generates the second displacement and receives the user's adjustment of the first zoom factor to the third zoom factor, the shooting preview screen is updated according to the second target amplitude; wherein the second target amplitude and the third zoom factor are updated. There is a correlation between the second displacement and the second sensitivity.
可见,本申请实施例中,用户可以自行设定某个高变焦倍率的拍摄预览画面移动的灵敏度、以哪个倍率画面移动幅度为基准,以及不同倍率灵敏度变化曲线,不但可以为用户增加良好的拍摄体验,而且还可以为用户带来新创作思路,以及为用户拍摄不同创意变焦视频提供工具,丰富变焦使用场景。It can be seen that in the embodiment of the present application, the user can set the sensitivity of the movement of the shooting preview screen at a certain high zoom magnification, the movement amplitude of the picture at which magnification is used as the benchmark, and the sensitivity change curve of different magnifications, which can not only increase the user's good shooting experience, and can also bring new creative ideas to users, as well as provide tools for users to shoot different creative zoom videos, enriching zoom usage scenarios.
本申请实施例提供的拍摄预览方法,执行主体可以为拍摄预览装置。本申请实施例中以拍摄预览装置执行拍摄预览方法为例,说明本申请实施例提供的拍摄预览装置。For the shooting preview method provided by the embodiment of the present application, the execution subject may be a shooting preview device. In the embodiment of the present application, the photographing preview device performing the photographing preview method is taken as an example to illustrate the photographing preview device provided by the embodiment of the present application.
图6是本申请实施例提供的一种拍摄预览装置的结构框图,应用于电子设备,如图6所示,拍摄预览装置600,可以包括:第一显示模块601和第一更新模块602,其中,Figure 6 is a structural block diagram of a shooting preview device provided by an embodiment of the present application, which is applied to electronic equipment. As shown in Figure 6, the shooting preview device 600 may include: a first display module 601 and a first update module 602, where ,
第一显示模块601,用于显示第一变焦倍率的拍摄预览画面;The first display module 601 is used to display the shooting preview screen of the first zoom magnification;
第一更新模块602,用于在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面; The first update module 602 is configured to update the shooting preview screen according to the first target amplitude when the electronic device generates a first displacement;
其中,所述第一目标幅度与所述第一位移和第二变焦倍率具有关联关系,所述第一变焦倍率大于所述第二变焦倍率。Wherein, the first target amplitude has a correlation relationship with the first displacement and a second zoom magnification, and the first zoom magnification is greater than the second zoom magnification.
由上述实施例可见,该实施例中,电子设备显示第一变焦倍率的拍摄预览画面,在电子设备产生第一位移的情况下,根据第一目标幅度,更新拍摄预览画面;其中,第一目标幅度与第一位移和第二变焦倍率具有关联关系,第一变焦倍率大于第二变焦倍率。与相关技术相比,本申请实施例中,在用户手持电子设备进行高变焦倍率拍摄的过程中,若电子设备发生了移动,则可以根据移动的位移和一个较低的变焦倍率,自动调整高变焦倍率的拍摄预览画面,以获得与较低变焦倍率一样的移动体验,即,电子设备发生移动时,高变焦倍率拍摄预览画面的移动感受与低变焦倍率拍摄预览画面的移动感受是一样的,因此可以解决高变焦倍率拍摄场景下手微小移动给拍摄预览画面带来巨幅移动的问题,而无需用户手动调整,降低了用户的操作成本。It can be seen from the above embodiment that in this embodiment, the electronic device displays the shooting preview screen of the first zoom magnification. When the electronic device generates the first displacement, the shooting preview screen is updated according to the first target amplitude; wherein, the first target The amplitude is related to the first displacement and the second zoom factor, and the first zoom factor is greater than the second zoom factor. Compared with related technologies, in the embodiments of the present application, when the user is holding an electronic device for high zoom magnification shooting, if the electronic device moves, the high zoom magnification can be automatically adjusted based on the movement displacement and a lower zoom magnification. The shooting preview screen of the zoom magnification is used to obtain the same mobile experience as that of the lower zoom magnification. That is, when the electronic device moves, the movement feeling of the high zoom magnification shooting preview screen is the same as the movement feeling of the low zoom magnification shooting preview screen. Therefore, it can solve the problem of small movements in high zoom magnification shooting scenes causing huge movements to the shooting preview screen, without the need for manual adjustment by the user, and reducing the user's operating costs.
可选地,作为一个实施例,所述电子设备包括光学图像稳定器,所述拍摄预览装置600,还可以包括:Optionally, as an embodiment, the electronic device includes an optical image stabilizer, and the shooting preview device 600 may also include:
第一计算模块,用于根据所述第一位移和位移补偿率,计算第一目标幅度;其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差;所述第一位移包括以下至少一项:线位移、角位移。A first calculation module configured to calculate a first target amplitude according to the first displacement and a displacement compensation rate; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification; the first displacement includes at least one of the following: linear displacement and angular displacement.
可选地,作为一个实施例,所述第一更新模块602,可以包括:Optionally, as an embodiment, the first update module 602 may include:
控制子模块,用于控制所述光学图像稳定器沿第一方向产生第一目标幅度的位移;其中,所述第一方向与所述第一位移的位移方向相反;A control submodule configured to control the optical image stabilizer to generate a displacement of a first target amplitude along a first direction; wherein the first direction is opposite to the displacement direction of the first displacement;
第一显示子模块,用于显示所述第一变焦倍率的拍摄预览画面。The first display sub-module is used to display the shooting preview image of the first zoom magnification.
可选地,作为一个实施例,所述第一位移为线位移,所述拍摄预览装置600,还可以包括:Optionally, as an embodiment, the first displacement is a linear displacement, and the shooting preview device 600 may also include:
第二计算模块,用于根据所述第一位移和位移补偿率,计算第一目标幅度;其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差。 The second calculation module is used to calculate the first target amplitude according to the first displacement and the displacement compensation rate; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification.
可选地,作为一个实施例,所述第一位移为角位移,所述拍摄预览装置600,还可以包括:Optionally, as an embodiment, the first displacement is an angular displacement, and the shooting preview device 600 may also include:
第三计算模块,用于根据所述第一位移和位移补偿率,计算第三目标幅度;其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差;A third calculation module configured to calculate a third target amplitude according to the first displacement and a displacement compensation rate; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification;
转换模块,用于对所述第三目标幅度进行三角转换,得到第一目标幅度。The conversion module is used to perform trigonometric conversion on the third target amplitude to obtain the first target amplitude.
可选地,作为一个实施例,所述第一更新模块602,可以包括:Optionally, as an embodiment, the first update module 602 may include:
裁剪子模块,用于对所述电子设备的图像传感器采集到的第一图像向第二方向裁切第一目标幅度,得到第二图像;其中,所述第二方向与所述第一位移的位移方向相反;A cropping submodule, configured to crop the first target amplitude in a second direction from the first image collected by the image sensor of the electronic device to obtain a second image; wherein the second direction is the same as the first displacement. The displacement direction is opposite;
第二显示子模块,用于预览显示所述第二图像。The second display sub-module is used to preview and display the second image.
可选地,作为一个实施例,所述第一显示模块601,可以包括:Optionally, as an embodiment, the first display module 601 may include:
第三显示子模块,用于显示第一变焦倍率的拍摄预览画面和预览补偿控件;其中,所述预览补偿控件用于指示所述第二变焦倍率在所述电子设备产生位移的情况下,拍摄预览画面的更新幅度;The third display sub-module is used to display the shooting preview screen of the first zoom ratio and the preview compensation control; wherein the preview compensation control is used to instruct the second zoom ratio to shoot when the electronic device is displaced. The update range of the preview screen;
所述第一更新模块602,可以包括:The first update module 602 may include:
接收子模块,用于接收对所述预览补偿控件的第一输入;A receiving sub-module, configured to receive the first input to the preview compensation control;
更新子模块,用于响应于所述第一输入,在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面。An update submodule, configured to respond to the first input and update the shooting preview image according to a first target amplitude when the electronic device generates a first displacement.
可选地,作为一个实施例,所述拍摄预览装置600,还可以包括:Optionally, as an embodiment, the shooting preview device 600 may also include:
第二显示模块,用于显示变焦倍率与预览画面更新灵敏度的变焦灵敏度曲线,其中,所述变焦灵敏度曲线包括第一变焦倍率对应的第一灵敏度和第三变焦倍率对应的第二灵敏度;The second display module is used to display the zoom sensitivity curve of the zoom magnification and the preview screen update sensitivity, wherein the zoom sensitivity curve includes a first sensitivity corresponding to the first zoom magnification and a second sensitivity corresponding to the third zoom magnification;
第二更新模块,用于在所述电子设备产生第二位移且接收到用户将所述第一变焦倍率调节为所述第三变焦倍率的情况下,根据第二目标幅度,更新所述拍摄预览画面;其中,所述第二目标幅度与所述第二位移和所述第二灵敏度具有关联关系。 A second update module configured to update the shooting preview according to the second target amplitude when the electronic device generates a second displacement and receives a user's adjustment of the first zoom factor to the third zoom factor. Picture; wherein the second target amplitude has a correlation relationship with the second displacement and the second sensitivity.
本申请实施例中的拍摄预览装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(Augmented Reality,AR)/虚拟现实(Virtual Reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(Ultra-Mobile Personal Computer,UMPC)、上网本或者个人数字助理(Personal Digital Assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(Personal Computer,PC)、电视机(Television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The shooting preview device in the embodiment of the present application may be an electronic device, or may be a component of the electronic device, such as an integrated circuit or chip. The electronic device may be a terminal or other devices other than the terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), or an augmented reality (Augmented Reality, AR)/virtual reality (Virtual Reality, VR) ) equipment, robots, wearable devices, ultra-mobile personal computers (Ultra-Mobile Personal Computer, UMPC), netbooks or personal digital assistants (Personal Digital Assistant, PDA), etc., and can also be servers, network attached storage (Network Attached Storage, NAS), personal computer (Personal Computer, PC), television (Television, TV), teller machine or self-service machine, etc., the embodiments of this application are not specifically limited.
本申请实施例中的拍摄预览装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The shooting preview device in the embodiment of the present application may be a device with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
本申请实施例提供的拍摄预览装置能够实现图2方法实施例实现的各个过程,为避免重复,这里不再赘述。The shooting preview device provided by the embodiment of the present application can implement each process implemented by the method embodiment in Figure 2. To avoid repetition, details will not be described here.
可选地,如图7所示,本申请实施例还提供一种电子设备700,包括处理器701和存储器702,存储器702上存储有可在所述处理器701上运行的程序或指令,该程序或指令被处理器701执行时实现上述拍摄预览方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in Figure 7, this embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702. The memory 702 stores programs or instructions that can be run on the processor 701. When the program or instruction is executed by the processor 701, each step of the above-mentioned shooting preview method embodiment is implemented, and the same technical effect can be achieved. To avoid duplication, the details will not be described here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图8是实现本申请各个实施例的一种电子设备的硬件结构示意图。Figure 8 is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present application.
该电子设备800包括但不限于:射频单元801、网络模块802、音频输出单元803、输入单元804、传感器805、显示单元806、用户输入单元807、接口单元808、存储器809、以及处理器810等部件。The electronic device 800 includes but is not limited to: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 807, interface unit 808, memory 809, processor 810, etc. part.
本领域技术人员可以理解,电子设备800还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器810逻辑相连,从 而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图8中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 800 may also include a power supply (such as a battery) that supplies power to various components. The power supply may be logically connected to the processor 810 through a power management system. The power management system is used to manage functions such as charging, discharging, and power consumption management. The structure of the electronic device shown in Figure 8 does not constitute a limitation on the electronic device. The electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
在一个实施例中,显示单元806,用于显示第一变焦倍率的拍摄预览画面;在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面;其中,所述第一目标幅度与所述第一位移和第二变焦倍率具有关联关系,所述第一变焦倍率大于所述第二变焦倍率。In one embodiment, the display unit 806 is used to display the shooting preview screen of the first zoom magnification; when the electronic device generates the first displacement, update the shooting preview screen according to the first target amplitude; wherein, The first target amplitude has a correlation relationship with the first displacement and a second zoom factor, and the first zoom factor is greater than the second zoom factor.
可见,本申请实施例中,电子设备显示第一变焦倍率的拍摄预览画面,在电子设备产生第一位移的情况下,根据第一目标幅度,更新拍摄预览画面;其中,第一目标幅度与第一位移和第二变焦倍率具有关联关系,第一变焦倍率大于第二变焦倍率。与相关技术相比,本申请实施例中,在用户手持电子设备进行高变焦倍率拍摄的过程中,若电子设备发生了移动,则可以根据移动的位移和一个较低的变焦倍率,自动调整高变焦倍率的拍摄预览画面,以获得与较低变焦倍率一样的移动体验,即,电子设备发生移动时,高变焦倍率拍摄预览画面的移动感受与低变焦倍率拍摄预览画面的移动感受是一样的,因此可以解决高变焦倍率拍摄场景下手微小移动给拍摄预览画面带来巨幅移动的问题,而无需用户手动调整,降低了用户的操作成本。It can be seen that in the embodiment of the present application, the electronic device displays the shooting preview screen of the first zoom magnification. When the electronic device generates the first displacement, the shooting preview screen is updated according to the first target amplitude; wherein the first target amplitude and the first target amplitude are There is a correlation between one shift and the second zoom factor, and the first zoom factor is greater than the second zoom factor. Compared with related technologies, in the embodiments of the present application, when the user is holding an electronic device for high zoom magnification shooting, if the electronic device moves, the high zoom magnification can be automatically adjusted based on the movement displacement and a lower zoom magnification. The shooting preview screen of the zoom magnification is used to obtain the same mobile experience as that of the lower zoom magnification. That is, when the electronic device moves, the movement feeling of the high zoom magnification shooting preview screen is the same as the movement feeling of the low zoom magnification shooting preview screen. Therefore, it can solve the problem of small movements in high zoom magnification shooting scenes causing huge movements to the shooting preview screen, without the need for manual adjustment by the user, reducing the user's operating costs.
可选地,作为一个实施例,所述电子设备包括光学图像稳定器,处理器810,用于根据所述第一位移和位移补偿率,计算第一目标幅度;其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差;所述第一位移包括以下至少一项:线位移、角位移。Optionally, as an embodiment, the electronic device includes an optical image stabilizer, and the processor 810 is configured to calculate a first target amplitude according to the first displacement and a displacement compensation rate; wherein the displacement compensation rate is The ratio of the zoom magnification difference to the first zoom magnification, the zoom magnification difference being the difference between the first zoom magnification and the second zoom magnification; the first displacement includes at least one of the following: linear displacement, angular displacement Displacement.
可选地,作为一个实施例,处理器810,还用于控制所述光学图像稳定器沿第一方向产生第一目标幅度的位移,其中,所述第一方向与所述第一位移的位移方向相反;Optionally, as an embodiment, the processor 810 is further configured to control the optical image stabilizer to generate a displacement of a first target amplitude along a first direction, wherein the displacement in the first direction and the first displacement opposite direction;
显示单元806,还用于显示所述第一变焦倍率的拍摄预览画面。The display unit 806 is also used to display the shooting preview image of the first zoom ratio.
可选地,作为一个实施例,所述第一位移为线位移,处理器810,还用于 根据所述第一位移和位移补偿率,计算第一目标幅度;其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差。Optionally, as an embodiment, the first displacement is a linear displacement, and the processor 810 is also used to Calculate the first target amplitude according to the first displacement and the displacement compensation rate; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the first zoom magnification The difference from the second zoom magnification.
可选地,作为一个实施例,所述第一位移为角位移,处理器810,还用于根据所述第一位移和位移补偿率,计算第三目标幅度;对所述第三目标幅度进行三角转换,得到第一目标幅度;其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差。Optionally, as an embodiment, the first displacement is an angular displacement, and the processor 810 is further configured to calculate a third target amplitude according to the first displacement and a displacement compensation rate; perform Triangular conversion is performed to obtain the first target amplitude; wherein the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the ratio of the first zoom magnification to the second zoom magnification. Difference.
可选地,作为一个实施例,处理器810,还用于对所述电子设备的图像传感器采集到的第一图像向第二方向裁切第一目标幅度,得到第二图像,其中,所述第二方向与所述第一位移的位移方向相反;Optionally, as an embodiment, the processor 810 is further configured to crop the first target amplitude in the second direction from the first image collected by the image sensor of the electronic device to obtain a second image, wherein: The second direction is opposite to the displacement direction of the first displacement;
显示单元806,还用于预览显示所述第二图像。The display unit 806 is also used to preview and display the second image.
可选地,作为一个实施例,显示单元806,还用于显示第一变焦倍率的拍摄预览画面和预览补偿控件;其中,所述预览补偿控件用于指示所述第二变焦倍率在所述电子设备产生位移的情况下,拍摄预览画面的更新幅度;Optionally, as an embodiment, the display unit 806 is also used to display a shooting preview screen of the first zoom ratio and a preview compensation control; wherein the preview compensation control is used to indicate that the second zoom ratio is in the electronic state. When the device is displaced, the update range of the shooting preview screen;
用户输入单元807,用于接收对所述预览补偿控件的第一输入;User input unit 807, configured to receive a first input to the preview compensation control;
显示单元806,还用于响应于所述第一输入,在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面。The display unit 806 is also configured to respond to the first input and update the shooting preview screen according to the first target amplitude when the electronic device generates a first displacement.
可选地,作为一个实施例,显示单元806,还用于显示变焦倍率与预览画面更新灵敏度的变焦灵敏度曲线,其中,所述变焦灵敏度曲线包括第一变焦倍率对应的第一灵敏度和第三变焦倍率对应的第二灵敏度;在所述电子设备产生第二位移且接收到用户将所述第一变焦倍率调节为所述第三变焦倍率的情况下,根据第二目标幅度,更新所述拍摄预览画面;其中,所述第二目标幅度与所述第二位移和所述第二灵敏度具有关联关系。Optionally, as an embodiment, the display unit 806 is also used to display a zoom sensitivity curve between the zoom magnification and the preview screen update sensitivity, wherein the zoom sensitivity curve includes a first sensitivity corresponding to the first zoom magnification and a third zoom the second sensitivity corresponding to the magnification; when the electronic device generates a second displacement and receives the user's adjustment of the first zoom magnification to the third zoom magnification, update the shooting preview according to the second target amplitude Picture; wherein the second target amplitude has a correlation relationship with the second displacement and the second sensitivity.
应理解的是,本申请实施例中,输入单元804可以包括图形处理器(Graphics Processing Unit,GPU)8041和麦克风8042,图形处理器8041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态 图片或视频的图像数据进行处理。显示单元806可包括显示面板8061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板8061。用户输入单元807包括触控面板8071以及其他输入设备8072中的至少一种。触控面板8071,也称为触摸屏。触控面板8071可包括触摸检测装置和触摸控制器两个部分。其他输入设备8072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042. The graphics processor 8041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Such as camera) obtained static Image data of pictures or videos is processed. The display unit 806 may include a display panel 8061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes a touch panel 8071 and at least one of other input devices 8072 . Touch panel 8071, also known as touch screen. The touch panel 8071 may include two parts: a touch detection device and a touch controller. Other input devices 8072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
存储器809可用于存储软件程序以及各种数据。存储器809可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器809可以包括易失性存储器或非易失性存储器,或者,存储器809可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器809包括但不限于这些和任意其它适合类型的存储器。Memory 809 can be used to store software programs as well as various data. The memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc. Additionally, memory 809 may include volatile memory or non-volatile memory, or memory 809 may include both volatile and non-volatile memory. Among them, non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and Direct Rambus RAM (DRRAM). Memory 809 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
处理器810可包括一个或多个处理单元;可选地,处理器810集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器810中。The processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 810.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程 序或指令,该程序或指令被处理器执行时实现上述拍摄预览方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a readable storage medium, the readable storage medium stores a program The program or instruction, when executed by the processor, implements each process of the above-mentioned shooting preview method embodiment, and can achieve the same technical effect. To avoid duplication, it will not be described again here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述拍摄预览方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the above shooting preview method embodiment. Each process can achieve the same technical effect. To avoid repetition, it will not be described again here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-a-chip.
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述拍摄预览方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application provide a computer program product. The program product is stored in a storage medium. The program product is executed by at least one processor to implement each process of the above shooting preview method embodiment, and can achieve the same technical effect. , to avoid repetition, will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通 过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, they can also be implemented by over hardware, but in many cases the former is the better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.

Claims (16)

  1. 一种拍摄预览方法,其中,应用于电子设备,所述方法包括:A shooting preview method, which is applied to electronic equipment, and the method includes:
    显示第一变焦倍率的拍摄预览画面;Display the shooting preview screen of the first zoom ratio;
    在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面;When the electronic device generates a first displacement, update the shooting preview screen according to the first target amplitude;
    其中,所述第一目标幅度与所述第一位移和第二变焦倍率具有关联关系,所述第一变焦倍率大于所述第二变焦倍率。Wherein, the first target amplitude has a correlation relationship with the first displacement and a second zoom magnification, and the first zoom magnification is greater than the second zoom magnification.
  2. 根据权利要求1所述的方法,其中,所述电子设备包括光学图像稳定器,所述根据第一目标幅度,更新所述拍摄预览画面之前还包括:The method of claim 1, wherein the electronic device includes an optical image stabilizer, and before updating the shooting preview screen according to the first target amplitude, the method further includes:
    根据所述第一位移和位移补偿率,计算第一目标幅度;Calculate the first target amplitude according to the first displacement and the displacement compensation rate;
    其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差;Wherein, the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification;
    所述第一位移包括以下至少一项:线位移、角位移。The first displacement includes at least one of the following: linear displacement and angular displacement.
  3. 根据权利要求2所述的方法,其中,所述根据第一目标幅度,更新所述拍摄预览画面包括:The method of claim 2, wherein updating the shooting preview screen according to the first target amplitude includes:
    控制所述光学图像稳定器沿第一方向产生第一目标幅度的位移;Controlling the optical image stabilizer to generate a displacement of a first target amplitude along a first direction;
    显示所述第一变焦倍率的拍摄预览画面;Display the shooting preview screen of the first zoom ratio;
    其中,所述第一方向与所述第一位移的位移方向相反。Wherein, the first direction is opposite to the displacement direction of the first displacement.
  4. 根据权利要求1所述的方法,其中,所述第一位移为线位移,所述根据第一目标幅度,更新所述拍摄预览画面之前还包括:The method according to claim 1, wherein the first displacement is a linear displacement, and before updating the shooting preview screen according to the first target amplitude, the method further includes:
    根据所述第一位移和位移补偿率,计算第一目标幅度;Calculate the first target amplitude according to the first displacement and the displacement compensation rate;
    其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差。Wherein, the displacement compensation rate is a ratio of a zoom magnification difference to the first zoom magnification, and the zoom magnification difference is a difference between the first zoom magnification and the second zoom magnification.
  5. 根据权利要求1所述的方法,其中,所述第一位移为角位移,所述根据第一目标幅度,更新所述拍摄预览画面之前还包括:The method according to claim 1, wherein the first displacement is an angular displacement, and before updating the shooting preview screen according to the first target amplitude, the method further includes:
    根据所述第一位移和位移补偿率,计算第三目标幅度;Calculate the third target amplitude according to the first displacement and the displacement compensation rate;
    对所述第三目标幅度进行三角转换,得到第一目标幅度;Perform trigonometric conversion on the third target amplitude to obtain the first target amplitude;
    其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差。Wherein, the displacement compensation rate is a ratio of a zoom magnification difference to the first zoom magnification, and the zoom magnification difference is a difference between the first zoom magnification and the second zoom magnification.
  6. 根据权利要求4或5所述的方法,其中,所述根据第一目标幅度,更 新所述拍摄预览画面包括:The method according to claim 4 or 5, wherein according to the first target amplitude, more The new shot preview screen includes:
    对所述电子设备的图像传感器采集到的第一图像向第二方向裁切第一目标幅度,得到第二图像;Crop the first target width in the second direction from the first image collected by the image sensor of the electronic device to obtain a second image;
    预览显示所述第二图像;Preview and display the second image;
    其中,所述第二方向与所述第一位移的位移方向相反。Wherein, the second direction is opposite to the displacement direction of the first displacement.
  7. 根据权利要求1所述的方法,其中,所述显示第一变焦倍率的拍摄预览画面包括:The method according to claim 1, wherein the displaying the shooting preview screen of the first zoom ratio includes:
    显示第一变焦倍率的拍摄预览画面和预览补偿控件;Display the shooting preview screen and preview compensation control of the first zoom ratio;
    所述在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面包括:When the electronic device generates a first displacement, updating the shooting preview screen according to the first target amplitude includes:
    接收对所述预览补偿控件的第一输入;receiving a first input to the preview compensation control;
    响应于所述第一输入,在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面;In response to the first input, when the electronic device generates a first displacement, update the shooting preview screen according to the first target amplitude;
    其中,所述预览补偿控件用于指示所述第二变焦倍率在所述电子设备产生位移的情况下,拍摄预览画面的更新幅度。Wherein, the preview compensation control is used to instruct the second zoom magnification to update the amplitude of the preview image when the electronic device is displaced.
  8. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, further comprising:
    显示变焦倍率与预览画面更新灵敏度的变焦灵敏度曲线,其中,所述变焦灵敏度曲线包括第一变焦倍率对应的第一灵敏度和第三变焦倍率对应的第二灵敏度;Display a zoom sensitivity curve of zoom magnification and preview screen update sensitivity, wherein the zoom sensitivity curve includes a first sensitivity corresponding to the first zoom magnification and a second sensitivity corresponding to the third zoom magnification;
    所述根据第一目标幅度,更新所述拍摄预览画面之后还包括:After updating the shooting preview screen according to the first target amplitude, the method further includes:
    在所述电子设备产生第二位移且接收到用户将所述第一变焦倍率调节为所述第三变焦倍率的情况下,根据第二目标幅度,更新所述拍摄预览画面;When the electronic device generates a second displacement and receives a user's adjustment of the first zoom factor to the third zoom factor, update the shooting preview screen according to the second target amplitude;
    其中,所述第二目标幅度与所述第二位移和所述第二灵敏度具有关联关系。Wherein, the second target amplitude has a correlation relationship with the second displacement and the second sensitivity.
  9. 一种拍摄预览装置,其中,应用于电子设备,所述装置包括:A shooting preview device, which is applied to electronic equipment, and the device includes:
    第一显示模块,用于显示第一变焦倍率的拍摄预览画面;The first display module is used to display the shooting preview image of the first zoom ratio;
    第一更新模块,用于在所述电子设备产生第一位移的情况下,根据第一目标幅度,更新所述拍摄预览画面;A first update module, configured to update the shooting preview screen according to the first target amplitude when the electronic device generates a first displacement;
    其中,所述第一目标幅度与所述第一位移和第二变焦倍率具有关联关系,所述第一变焦倍率大于所述第二变焦倍率。 Wherein, the first target amplitude has a correlation relationship with the first displacement and a second zoom magnification, and the first zoom magnification is greater than the second zoom magnification.
  10. 根据权利要求9所述的装置,其中,所述电子设备包括光学图像稳定器,所述装置还包括:The apparatus of claim 9, wherein the electronic device includes an optical image stabilizer, the apparatus further comprising:
    第一计算模块,用于根据所述第一位移和位移补偿率,计算第一目标幅度;A first calculation module configured to calculate the first target amplitude according to the first displacement and the displacement compensation rate;
    其中,所述位移补偿率为变焦倍率差与所述第一变焦倍率之比,所述变焦倍率差为所述第一变焦倍率与所述第二变焦倍率之差;Wherein, the displacement compensation rate is the ratio of the zoom magnification difference to the first zoom magnification, and the zoom magnification difference is the difference between the first zoom magnification and the second zoom magnification;
    所述第一位移包括以下至少一项:线位移、角位移。The first displacement includes at least one of the following: linear displacement and angular displacement.
  11. 根据权利要求10所述的装置,其中,所述第一更新模块包括:The device of claim 10, wherein the first update module includes:
    控制子模块,用于控制所述光学图像稳定器沿第一方向产生第一目标幅度的位移;A control submodule configured to control the optical image stabilizer to generate a displacement of a first target amplitude along the first direction;
    第一显示子模块,用于显示所述第一变焦倍率的拍摄预览画面;The first display sub-module is used to display the shooting preview screen of the first zoom magnification;
    其中,所述第一方向与所述第一位移的位移方向相反。Wherein, the first direction is opposite to the displacement direction of the first displacement.
  12. 一种电子设备,其中,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至8任一项所述的拍摄预览方法的步骤。An electronic device, which includes a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the program or instructions are executed by the processor, any of claims 1 to 8 is implemented. The steps of the shooting preview method described in one item.
  13. 一种可读存储介质,其中,所述可读存储介质上存储程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至8任一项所述的拍摄预览方法的步骤。A readable storage medium, wherein a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, the shooting preview method according to any one of claims 1 to 8 is implemented. step.
  14. 一种芯片,其中,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至8中任一项所述的拍摄预览方法的步骤。A chip, wherein the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement as described in any one of claims 1 to 8 Steps of shooting preview method.
  15. 一种计算机程序产品,其中,所述程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1至7中任一项所述的拍摄预览方法的步骤。A computer program product, wherein the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement the shooting preview according to any one of claims 1 to 7 Method steps.
  16. 一种电子设备,其中,所述电子设备被配置为实现如权利要求1至7中任一项所述的拍摄预览方法的步骤。 An electronic device, wherein the electronic device is configured to implement the steps of the shooting preview method according to any one of claims 1 to 7.
PCT/CN2023/107625 2022-07-22 2023-07-17 Photographing preview method and apparatus, and electronic device and storage medium WO2024017175A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210866643.9 2022-07-22
CN202210866643.9A CN115103126A (en) 2022-07-22 2022-07-22 Shooting preview method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2024017175A1 true WO2024017175A1 (en) 2024-01-25

Family

ID=83297842

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/107625 WO2024017175A1 (en) 2022-07-22 2023-07-17 Photographing preview method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN115103126A (en)
WO (1) WO2024017175A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115103126A (en) * 2022-07-22 2022-09-23 维沃移动通信有限公司 Shooting preview method and device, electronic equipment and storage medium
CN115514895B (en) * 2022-10-18 2024-04-12 Oppo广东移动通信有限公司 Image anti-shake method, apparatus, electronic device, and computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017111430A (en) * 2015-12-08 2017-06-22 キヤノン株式会社 Control device and imaging device
CN111147741A (en) * 2019-12-27 2020-05-12 Oppo广东移动通信有限公司 Focusing processing-based anti-shake method and device, electronic equipment and storage medium
CN112738397A (en) * 2020-12-29 2021-04-30 维沃移动通信(杭州)有限公司 Shooting method, shooting device, electronic equipment and readable storage medium
CN113438410A (en) * 2021-05-19 2021-09-24 荣耀终端有限公司 High-magnification shooting method and electronic equipment
CN113497881A (en) * 2020-03-20 2021-10-12 华为技术有限公司 Image processing method and device
WO2022104181A1 (en) * 2020-11-16 2022-05-19 Google Llc Systems, apparatus, and methods for improving composition of images
CN115103126A (en) * 2022-07-22 2022-09-23 维沃移动通信有限公司 Shooting preview method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011085660A (en) * 2009-10-13 2011-04-28 Canon Inc Projection device, projection method, and program
JP6429454B2 (en) * 2013-11-28 2018-11-28 キヤノン株式会社 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND IMAGING DEVICE CONTROL PROGRAM
CN113489894B (en) * 2019-12-25 2022-06-28 华为技术有限公司 Shooting method and terminal in long-focus scene

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017111430A (en) * 2015-12-08 2017-06-22 キヤノン株式会社 Control device and imaging device
CN111147741A (en) * 2019-12-27 2020-05-12 Oppo广东移动通信有限公司 Focusing processing-based anti-shake method and device, electronic equipment and storage medium
CN113497881A (en) * 2020-03-20 2021-10-12 华为技术有限公司 Image processing method and device
WO2022104181A1 (en) * 2020-11-16 2022-05-19 Google Llc Systems, apparatus, and methods for improving composition of images
CN112738397A (en) * 2020-12-29 2021-04-30 维沃移动通信(杭州)有限公司 Shooting method, shooting device, electronic equipment and readable storage medium
CN113438410A (en) * 2021-05-19 2021-09-24 荣耀终端有限公司 High-magnification shooting method and electronic equipment
CN115103126A (en) * 2022-07-22 2022-09-23 维沃移动通信有限公司 Shooting preview method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115103126A (en) 2022-09-23

Similar Documents

Publication Publication Date Title
WO2024017175A1 (en) Photographing preview method and apparatus, and electronic device and storage medium
WO2018166069A1 (en) Photographing preview method, graphical user interface, and terminal
WO2022262720A1 (en) Photographing method and device
CA2815458C (en) Method and digital camera having improved autofocus
WO2022161240A1 (en) Photographing method and apparatus, electronic device, and medium
CN112714255A (en) Shooting method, shooting device, electronic equipment and readable storage medium
WO2023072088A1 (en) Focusing method and apparatus
US20230086416A1 (en) Anti-shake method, anti-shake apparatus, and electronic device
WO2023174223A1 (en) Video recording method and apparatus, and electronic device
WO2023103953A1 (en) Photographing method and device
CN112738397A (en) Shooting method, shooting device, electronic equipment and readable storage medium
WO2022156672A1 (en) Photographing method and apparatus, electronic device and readable storage medium
WO2023231869A1 (en) Photographing method and apparatus
CN112784081A (en) Image display method and device and electronic equipment
WO2023125669A1 (en) Image processing circuit, image processing method, electronic device, and readable storage medium
WO2023093669A1 (en) Video filming method and apparatus, and electronic device and storage medium
CN115379118B (en) Camera switching method and device, electronic equipment and readable storage medium
WO2022095878A1 (en) Photographing method and apparatus, and electronic device and readable storage medium
CN113891018A (en) Shooting method and device and electronic equipment
CN114785957A (en) Shooting method and device thereof
CN112399092A (en) Shooting method and device and electronic equipment
WO2023225910A1 (en) Video display method and apparatus, terminal device, and computer storage medium
CN115514895B (en) Image anti-shake method, apparatus, electronic device, and computer-readable storage medium
CN116546324A (en) Video anti-shake method and device
CN116980759A (en) Shooting method, terminal, electronic device and readable storage medium

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: 23842238

Country of ref document: EP

Kind code of ref document: A1