Hand-shake prevention method, hand-shake prevention device, and electronic device

The electronic device's ability to dynamically adjust trimming parameters based on real-time camera shake parameters addresses the low flexibility of existing camera shake prevention methods, resulting in improved image stability and quality.

JP7650897B2Active Publication Date: 2025-03-25VIVO MOBILE COMM CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2022570186
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-05-27
Filing Date
2021-05-25
Publication Date
2025-03-25
Estimated Expiration
2041-05-25

AI Technical Summary

Technical Problem

Existing methods for preventing camera shake in electronic devices have low flexibility, as they can only crop images based on fixed cropping parameters, limiting their ability to adapt to varying camera shake levels.

Method used

The method involves an electronic device that acquires camera shake parameters in real-time, uses corresponding trimming parameters to trim specific areas of the image, and displays the trimmed image, allowing for flexible adjustment based on the camera's shake level.

Benefits of technology

This approach enhances the flexibility of camera shake prevention by allowing the electronic device to dynamically adjust trimming parameters based on camera shake levels, thereby improving image stability and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007650897000001
    Figure 0007650897000001
  • Figure 0007650897000002
    Figure 0007650897000002
  • Figure 0007650897000003
    Figure 0007650897000003
Patent Text Reader

Abstract

The present application provides a camera shake prevention method, a camera shake prevention device, and an electronic device, the method including the steps of: acquiring camera shake parameters of the electronic device when a camera of the electronic device collects a first screen in real time; and cropping a first area in the first screen based on a first cropping parameter corresponding to the camera shake parameters, and displaying the cropped first screen, wherein the first screen includes a first area and a second area, the second area being a common area between the first screen and an Nth frame of screen, and the Nth frame of screen being a screen collected before collecting the first screen, and N is an integer greater than or equal to 1.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] (CROSS REFERENCE TO RELATED APPLICATIONS) This application claims priority to a Chinese patent application entitled “Method and device for preventing camera shake, and electronic device for preventing camera shake,” application number 202010463762.0, filed with the State Intellectual Property Office of the People's Republic of China on May 27, 2020, the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the technical field of communication devices, and more particularly to a camera shake prevention method, a camera shake prevention device, and electronic equipment. [Background technology]

[0003] With the development of electronic devices, users are increasingly using the photography function of electronic devices. image Users' demands for stability are also becoming higher and higher.

[0004] Currently, shooting with electronic devices is difficult due to camera shake. image In order to avoid the problem of blurring, electronic anti-shake methods are generally used to achieve the anti-shake effect. Specifically, in the process of collecting images, electronic equipment will crop the collected images according to certain cropping parameters to achieve the anti-shake effect.

[0005] However, in the above-mentioned camera shake prevention method, the electronic device can only crop the image based on certain cropping parameters, so the flexibility of the camera shake prevention of the electronic device is low. Summary of the Invention [Problem to be solved by the invention]

[0006] An object of the embodiments of the present application is to provide a camera shake prevention method, a camera shake prevention device, and an electronic device that can solve the problem of low flexibility that exists in camera shake prevention of electronic devices. [Means for solving the problem]

[0007] In order to solve the above technical problems, the present application is realized as follows.

[0008] In a first aspect, the present embodiment provides an electronic device No. 1 Camera first image In the case where the image is collected in real time, a step of acquiring a camera shake parameter of the electronic device and a first trimming parameter corresponding to the camera shake parameter are acquired. image The first area in the image is cropped, and the first area after cropping is image and displaying the first image includes a first region and a second region, the second region being a first image and N frame image and the common area of ​​the Nth frame. image is the first image collected before collecting image where N is an integer equal to or greater than 1.

[0009] In a second aspect, an embodiment of the present application includes an acquisition module, a trimming module and a display module, the acquisition module being an No. 1 Camera first image The camera shake parameter of the electronic device is acquired when the camera shake parameter is collected in real time, and the trimming module is configured to perform a first trimming process based on a first trimming parameter corresponding to the camera shake parameter determined by the acquisition module. image the display module is used to crop a first region in the image, and the display module displays the first region after the cropping module has cropped the first region in the image. image Used to display the first image includes a first region and a second region, the second region being a first image and N frame image and the common area of ​​the Nth frame. image is the first image collected before collecting image where N is an integer equal to or greater than 1.

[0010] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory and a program or instructions stored in the memory and executable on the processor, the program or instructions being operable when executed by the processor to implement steps of the method of the first aspect.

[0011] In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implements the steps of the method according to the first aspect.

[0012] In a fifth aspect, an embodiment of the present application provides a chip including a processor and a communication interface, the communication interface and the processor being coupled together, the processor executing a program or instructions and used to implement the method of the first aspect. Effect of the Invention

[0013] In the embodiment of the present application, first, No. 1 Camera first image When collecting the camera shake parameters in real time, the electronic device can obtain the camera shake parameters of the electronic device. Then, the electronic device calculates a first trimming parameter according to the first trimming parameter corresponding to the camera shake parameters. image The first area in the image is cropped, and the first area after cropping is image It is possible to display the first image includes a first region and a second region, the second region being a first image and N frame image and the common area of ​​the Nth frame. image is the first image collected before collecting image With a certain trimming parameter, image Compared with the conventional solution of trimming the first image, the above solution allows the electronic device to flexibly obtain different trimming parameters according to the degree of camera shake, and then trim the first image according to the different trimming parameters. imageThe area excluding the common area therebetween can be trimmed, thereby realizing the purpose of anti-shake of the electronic device and improving the flexibility of anti-shake of the electronic device. [Brief description of the drawings]

[0014] [Figure 1] FIG. 2 is a schematic diagram of the procedure of the camera shake prevention method provided in the embodiment of the present application. [Diagram 2] 1 is a schematic diagram of an interface to which the image stabilization method provided in the embodiment of the present application is applied; [Diagram 3] 2 is a schematic diagram 2 of an interface to which the image stabilization method provided in the embodiment of the present application is applied; [Figure 4] 3 is a schematic diagram 3 of an interface to which the image stabilization method provided in the embodiment of the present application is applied; [Diagram 5] FIG. 2 is a structural schematic diagram of the camera shake prevention device provided in the embodiment of the present application. [Figure 6] FIG. 2 is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0015] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Of course, the described embodiments are only a part of the embodiments of the present application, and are not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without any creative effort shall fall within the scope of protection of the present application.

[0016] The terms "first," "second," etc. in the specification and claims of this application are not intended to describe a particular order or sequence, but are intended to distinguish between similar objects. It should be understood that the terms used in this manner may be substituted for one another where appropriate, such that the embodiments of this application may be practiced in an order other than that shown or described herein. Also, in the specification and claims, "and / or" means at least one of the objects connected, and the " / " symbol generally means that the related objects before and after are in an "or" relationship.

[0017] Hereinafter, the camera shake prevention method provided in the embodiment of the present application will be described in detail with reference to the drawings according to specific embodiments and application scenarios.

[0018] FIG. 1 is a schematic diagram of the procedure of the camera shake prevention method provided in the embodiment of the present application, which includes step 201 and step 202.

[0019] In step 201, the electronic device No. 1 Camera first image In the case where the electronic device collects the hand-shake parameters in real time, the electronic device obtains the hand-shake parameters of the electronic device.

[0020] The camera shake parameter is intended to indicate the degree of camera shake of the electronic device.

[0021] In the embodiment of the present application, the camera may be a main camera, a wide-angle camera, or a long-focus camera, and the embodiment of the present application is not limited thereto.

[0022] In the embodiment of the present application, image was collected by the front camera of an electronic device. image may be collected by a rear camera of an electronic device. image may be collected by an external camera of an electronic device. image However, the embodiments of the present application are not limited thereto.

[0023] In the embodiment of the present application, image may include a target object, which may include at least one of a person and a landscape.

[0024] In the embodiment of the present application, the camera shake parameters and the camera shake degree of the electronic device may have a positive correlation or a negative correlation, and the embodiment of the present application is not limited thereto.

[0025] Optionally, in an embodiment of the present application, the hand shaking parameters include at least one of a rotation angle of the electronic device, a rotation angular velocity of the electronic device, a rotation direction of the electronic device, a movement speed of the electronic device, a movement acceleration of the electronic device, and a movement direction of the electronic device.

[0026] For example, the rotation angle of the electronic device may be any angle, the rotation angular velocity of the electronic device may be any angular velocity, and the rotation direction of the electronic device may be any direction.

[0027] It should be noted that the hand shake parameters include, but are not limited to, the above six types of parameters. For example, the hand shake parameters may be the rotation arc length of the electronic device calculated from the rotation angular velocity of the electronic device, or the displacement obtained by the electronic device from the moving speed.

[0028] In one example, when the shaking parameter is a rotation angle, the rotation angle and the shaking degree of the electronic device may have a positive correlation, i.e., the larger the rotation angle, the more severe the shaking degree of the electronic device, and the smaller the rotation angle, the less severe the shaking degree of the electronic device.

[0029] It should be mentioned that the rotation angle of the electronic device, the rotation angular velocity of the electronic device and the rotation direction of the electronic device can be obtained by a gyroscope.

[0030] In step 202, the electronic device calculates a first trimming parameter based on a first trimming parameter corresponding to the camera shake parameter. image The first area in the image is cropped, and the first area after cropping is image Display.

[0031] No. 1 image includes a first region and a second region, the second region being a first image and N frame image and the common area of ​​the Nth frame. image is the first image collected before collecting image where N is an integer equal to or greater than 1.

[0032] The first region is a first image It is understood that the other regions are those excluding the second region therein.

[0033] In the embodiment of the present application, the trimming parameters in the embodiment of the present application may be a trimming percentage, or a trimming dimension (eg, a trimming length and width, etc.), and the embodiment of the present application is not limited thereto.

[0034] In one example, the first trimming parameter is a trimming percentage, and the trimming percentage is a first image The area to be cropped and the first image It may be a percentage of the whole, and the first part after trimming image and No. 1 image It may be a percentage of the whole, and the examples of this application are not limited thereto.

[0035] In another example, the first cropping parameter is a cropping dimension, and the cropping dimension is a first image may be the dimensions of the area to be trimmed, and the first image However, the embodiment of the present application is not limited thereto.

[0036] For example, the electronic device may determine the camera shake parameters and then determine the first trimming parameters based on the correspondence between the camera shake parameters and the trimming parameters.

[0037] The correspondence between the camera shake parameters and the trimming parameters may be set by a system default value or may be preset by a user, and the embodiment of the present application is not limited thereto.

[0038] In one example, when the hand shake parameter is a rotation angle of an electronic device, the section value of the rotation angle of the electronic device may correspond to one trimming parameter. For example, when the rotation angle of the electronic device is a section value of 1 degree to 10 degrees, the corresponding trimming parameter may be 20%, and when the rotation angle of the electronic device is a section value of 11 degrees to 20 degrees, the corresponding trimming parameter may be 25%.

[0039] Exemplarily, the electronic device includes a first image and previous image The first one is to get the common area with image And electronic devices are number one image of N frames collected before collecting image It is also possible to compare the above.

[0040] Exemplarily, the first image Previous image Electronics are number one image At least one frame collected before image For example, the first image Previous image Electronics are number one image One frame collected before collecting image The electronic device may be a first image Five frames collected before collecting image may be also possible.

[0041] Exemplarily, the electronic device is a first image The step of trimming the first region may include the step of the electronic device trimming all or a portion of the first region.

[0042] It should be noted that the electronics performs the first trimming based on the first trimming parameter. image When trimming, first imageIf the second region in the second region is to be trimmed, the electronics may trim the second region.

[0043] It should be noted that in practice, the first frame collected by the electronics image The electronics does not need to do any processing and simply calculates the first frame's image However, the embodiment of the present application is not limited to this.

[0044] For example, if a user uses an electronic device to take a video, the electronic device may capture the first frame of image When the image was acquired, the electronics used the default cropping parameters of 20% to crop the first frame. image Trim the image and crop it. image After that, the user may continue to use the electronic device to take a second frame. image (That is, the above No. 1 image When the electronic device determines that the electronic device has rotated 10 degrees (i.e., detects the occurrence of a slight camera shake in the electronic device), the electronic device may determine the trimming parameter to be 20% based on the camera shake parameter. Next, the electronic device may set the trimming parameter to 20% and the first frame image Based on the second frame image In this case, as shown in FIG. 2, the electronic device may trim the second frame. image 31 may be displayed. After that, the user continues to take pictures using the electronic device and displays the third frame. image (That is, the above No. 1 image ) is collected, if the electronic device determines that the electronic device has rotated 30 degrees (i.e., detects the occurrence of strong camera shake in the electronic device), the electronic device may determine the trimming parameter to be 30% based on the camera shake parameter. Next, the electronic device may set the trimming parameter to 30% and the image Based on the third frame, image In this case, as shown in FIG. 3, the electronic device may trim the third frame. imageYou may also display 32.

[0045] In the method for preventing camera shake provided in the embodiment of the present application, first, No. 1 Camera first image When collecting the camera shake parameters in real time, the electronic device can obtain the camera shake parameters of the electronic device. Then, the electronic device calculates a first trimming parameter according to the first trimming parameter corresponding to the camera shake parameters. image The first area in the image is cropped, and the first area after cropping is image It is possible to display the first image includes a first region and a second region, the second region being a first image and N frame image and the common area of ​​the Nth frame. image is the first image collected before collecting image With a certain trimming parameter, image Compared with the conventional solution of trimming the first image, the above solution allows the electronic device to flexibly obtain different trimming parameters according to the degree of camera shake, and then trim the first image according to the different trimming parameters. image The area excluding the common area therebetween can be trimmed, thereby realizing the purpose of anti-shake of the electronic device and improving the flexibility of anti-shake of the electronic device.

[0046] Optionally, in the present embodiment, if the trimming parameters become too large, the trimmed image The visible range of the electronic equipment may be affected, making it impossible to meet the requirements for photography. image Based on preset cropping parameters to ensure a visible range of image may be trimmed.

[0047] For example, in step 202, a first trimming parameter is calculated based on the first trimming parameter corresponding to the camera shake parameter. image The step of trimming the first region in may specifically include the following step 202a.

[0048] In step 202a, the electronic device adjusts the first trimming parameter based on the first preset trimming parameter when the first trimming parameter is greater than the first preset trimming parameter. image Crop the first region in.

[0049] Exemplarily, the first preset trimming parameters may be configured by the system as defaults, or may be preset by a user, and the embodiment of the present application is not limited thereto.

[0050] Exemplarily, the first preset trimming parameter may be called a maximum trimming parameter.

[0051] It should be noted that for different cameras, the first preset cropping parameters may be the same or different, and the embodiment of the present application is not limited thereto.

[0052] For example, if the camera is a long focus camera, the first preset cropping parameter may be 25%, if the camera is a main camera, the first preset cropping parameter may be 40%, and if the camera is a wide angle camera, the first preset cropping parameter may be 50%.

[0053] It should be noted that if the trimming parameters are too large, the trimmed image Valid in image By having too little content, image The point is that the visible range of the light is affected.

[0054] The method for preventing camera shake provided in this application is image The electronic device may be applied to a scene in which a first preset trimming parameter is set, and a first image trimmed based on the first preset trimming parameter is output. imagecan be in the normal visible range, so if the first trimming parameter is greater than the first preset trimming parameter, the electronic device image The first preset trimming parameter is used to ensure a visible range of image may be trimmed.

[0055] Optionally, in an embodiment of the present application, when the electronic device has at least two cameras, the electronic device may further include: image The images were collected by a single camera to ensure a wide viewing range and further improve the anti-shake effect of electronic devices. image Another camera image may be replaced.

[0056] For example, when the electronic device includes a first camera and a second camera, the first trimming parameter is determined based on the first trimming parameter corresponding to the camera shake parameter in step 202. image The step of trimming the first region in may specifically include the following step 202b.

[0057] In step 202b, the electronic device is collected by a second camera. image and when the second trimming parameter is greater than the second preset trimming parameter, the electronic device determines a first trimming parameter based on the first trimming parameter. image Crop the first region in.

[0058] The first camera and the second camera are for collecting images of the same object, and the first image collected by the first camera is image The corresponding viewing angle is the second one collected by the second camera. image the second trimming parameter is a trimming parameter determined based on the camera shake parameter and corresponding to the second camera, and the first trimming parameter is a trimming parameter corresponding to the first camera.

[0059] The first image collected by the first camera imageThe corresponding viewing angle is the second one collected by the second camera. image The viewing angle is larger than the viewing angle corresponding to the first image of image The contents are the second image of image It is understood that there is more to it than content.

[0060] For example, when the second camera is a long-focus camera, the first camera may be a main camera or a wide-angle camera, and when the second camera is a main camera, the first camera may be a wide-angle camera, which can be specifically set according to actual requirements, and the embodiments of the present application are not limited thereto.

[0061] Exemplarily, the first cropping parameter being a cropping parameter corresponding to the first camera may include the first cropping parameter being a cropping parameter corresponding to the first camera determined based on the second cropping parameter, or the first cropping parameter being a cropping parameter corresponding to the first camera determined based on a camera shake parameter.

[0062] It should be noted that the first cropping parameter determined based on the second cropping parameter and the first cropping parameter determined based on the camera shake parameter may be the same or different, and the embodiment of the present application is not limited thereto.

[0063] In one example, the preset cropping parameters corresponding to the first camera and the preset cropping parameters corresponding to the second camera (ie, the second preset cropping parameters) may be different.

[0064] For example, the electronic device has a main camera and a wide-angle camera, and the electronic device uses the main camera and the wide-angle camera to image The video captured by the main camera can be simultaneously collected on the screen of the electronic device. image If you see this, your electronic device has a main camera. imageIf the camera shake becomes severe when the image is collected by the main camera, the electronic device can determine that the rotation angle of the electronic device is 40 degrees, and determine the second cropping percentage as 45% based on the rotation angle. In this case, the determined second cropping percentage of 45% is greater than the second preset cropping parameter of 40%, so that the image collected by the main camera can be cropped. image is over-trimmed image Since the visibility of the wide-angle camera is affected, the electronics may determine a first cropping parameter corresponding to the wide-angle camera as 50% based on the determined second cropping percentage of 45% corresponding to the main camera. Then, the electronics may calculate the first cropping parameter corresponding to the wide-angle camera based on the first cropping parameter of 50%. image Finally, the electronic device can crop the first image captured by the cropped wide-angle camera. image can be displayed.

[0065] What needs to be explained is that the wide-angle camera is better than the main camera. image If you use the same crop percentage, and therefore a crop percentage that is larger than the crop percentage corresponding to the main camera, because there is more content, the amount of video that can be retained is image The content is more. Therefore, the electronic device has a larger crop percentage and the images captured by the wide-angle camera are image Cropped and collected by the main camera image of image Close to the content image can be obtained, thereby achieving the effect of smooth replacement; and image This ensures a high visibility range and further improves the effectiveness of preventing camera shake.

[0066] It should be noted that the second preset trimming parameter and the first preset trimming parameter may be the same parameter or different parameters, and the embodiment of the present application is not limited thereto.

[0067] The image stabilization method provided in the present application can be applied to scenes where multiple cameras are used to improve the effect of image stabilization, and the electronic device is image The camera with the most content was used to take the picture. image Trim and shoot image The camera with the least amount of content was used to take the picture. image can be replaced with image This can ensure a visible range and further improve the effect of preventing camera shake.

[0068] Optionally, in an embodiment of the present application, the cropping parameters may be pre-set by a user.

[0069] Exemplarily, before the above step 201, the method may further include the following steps A1 and A2.

[0070] In step A1, the electronic device receives a first input from a user.

[0071] For example, the first input may include a tap input by a user on a screen, or a voice command input by a user, or a specific gesture input by a user, and the specific input may be determined according to practical requirements, and the embodiments of the present application are not limited thereto.

[0072] The specific gesture in the embodiment of the present application may be any one of a single tap gesture, a slide gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double press gesture, and a double tap gesture. The tap input in the embodiment of the present application may be a single tap input, a double tap input, or an arbitrary number of tap inputs, and may be a long press input or a short press input.

[0073] In step A2, in response to the first input, the electronic device displays a trimming parameter setting interface.

[0074] The cropping parameter setting interface includes at least one parameter setting box, and each parameter setting box is for setting one cropping parameter.

[0075] For example, as shown in (a) of FIG. 4, when the electronic device displays the preview interface 33 of the main camera, if the user wants to set the default cropping parameters and maximum cropping parameters of the main camera, the user may long press the "Set" button 34. At this time, as shown in (b) of FIG. 4, the electronic device displays a cropping parameter setting interface 35, in which two parameter setting boxes are displayed, which are the default cropping parameters and the maximum cropping parameters, respectively. The cropping parameter setting box 35 also displays the original drawing surrounded by a black frame, which indicates the initial display content of the original drawing. If the user inputs 20% in the default cropping parameter setting box, the electronic device will prompt the user to enter the 20% cropping parameter. image View estimates after trimming image A dotted frame 36a is displayed to indicate the content. If the user enters 35% in the maximum cropping parameter setting box, the electronic device will display a 35% cropping value to the user. image View estimates after trimming image One dotted frame 36b is displayed to indicate the contents, so that the user can set the cropping parameters as required.

[0076] Exemplarily, when the electronic device has at least two cameras, the cropping parameter setting interface may include at least two areas, and different areas are for setting cropping parameters of different cameras.

[0077] The anti-shake method provided in the present application is applicable to the scene of setting cropping parameters, in which a user can trigger an electronic device to display a cropping parameter setting interface, and then the user can input cropping parameters into the cropping parameter setting box displayed in the cropping parameter setting interface as needed, so that the cropping parameters can be set more flexibly.

[0078] It should be noted that the anti-shake method provided in the embodiment of the present application may be executed by an anti-shake device, or a control module for executing and implementing the anti-shake method in the anti-shake device. In the embodiment of the present application, the anti-shake device executes and implements the anti-shake method as an example, and the anti-shake device provided in the embodiment of the present application will be described.

[0079] FIG. 5 is a schematic diagram of a possible structure of an anti-shake device provided in an embodiment of the present application. As shown in FIG. 5, the anti-shake device 400 includes an acquisition module 401, a cropping module 402 and a display module 403. The acquisition module 401 is a No. 1 Camera first image The camera can be used to obtain camera shake parameters of an electronic device when collecting the camera shake parameters in real time. The trimming module 402 performs a first trimming process according to a first trimming parameter corresponding to the camera shake parameter determined by the acquisition module 401. image The display module 403 may be used to crop a first region in the image after cropping by the cropping module 402. image The first image includes a first region and a second region, the second region being a first image and N frame image This is the common area of ​​the N frame. image is the first image collected before collecting image where N is an integer equal to or greater than 1.

[0080] Optionally, the hand shake parameters may include at least one of a rotation angle of the electronic device, a rotation angular velocity of the electronic device, a rotation direction of the electronic device, a movement speed of the electronic device, a movement acceleration of the electronic device, and a movement direction of the electronic device.

[0081] Optionally, the trimming module 402 specifically adjusts the first trimming parameter based on the first preset trimming parameter when the first trimming parameter is greater than the first preset trimming parameter. image It can be used to trim the first region in.

[0082] Optionally, the electronic device includes a first camera and a second camera, the first camera and the second camera for collecting images of the same object, and the first image collected by the first camera is image The second view angle corresponds to the second view angle collected by the second camera. image If the viewing angle is larger than the viewing angle corresponding to the second camera, the trimming module 402 specifically trims the electronic device to the viewing angle corresponding to the second camera. image and when the second trimming parameter is greater than a second preset trimming parameter, a first trimming parameter is displayed based on the first trimming parameter. image The second cropping parameters can be used to crop a first region in the image, the second cropping parameters being cropping parameters determined based on the camera shake parameters and corresponding to the second camera, and the first cropping parameters being cropping parameters corresponding to the first camera.

[0083] Optionally, the preset cropping parameters corresponding to the first camera and the preset cropping parameters corresponding to the second camera are different.

[0084] The image stabilization device in the embodiment of the present application may be a device, or may be a component, integrated circuit, or chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), and the non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), an automated teller machine, or a kiosk, and the embodiments of the present application are not specifically limited.

[0085] The anti-shake device in the embodiment of the present application may be a device having an operating system, which may be the Android operating system, the IOS operating system, or other possible operating systems, and is not specifically limited in the embodiment of the present application.

[0086] The image stabilization device provided in the embodiments of the present application can realize each process realized by the electronic device in the method embodiments of Figures 1 to 4, and in order to avoid duplication, the description will be omitted here.

[0087] In the image stabilization device provided in the embodiment of the present application, first, No. 1 Camera first image When collecting the camera shake parameters in real time, the camera shake prevention device can obtain the camera shake parameters of the electronic device. Then, the camera shake prevention device calculates the first trimming parameter according to the first trimming parameter corresponding to the camera shake parameter. image The first area in the image is cropped, and the first area after cropping is image It is possible to display the first image includes a first region and a second region, the second region being a first image and N frame image and the common area of ​​the Nth frame. image is the first image collected before collecting image With a certain trimming parameter, image Compared with the conventional solution of trimming the first image, the above solution allows the image stabilization device to flexibly obtain different trimming parameters according to the degree of camera shake of the electronic device, and then perform the first trimming process according to the different trimming parameters. image The area other than the common area in the middle can be trimmed, so as to achieve the purpose of anti-shake of the electronic device and improve the flexibility of anti-shake of the electronic device.

[0088] Optionally, the embodiments of the present application further provide an electronic device including a processor 110, a memory 109, and a program or instruction stored in the memory 109 and executable on the processor 110, which, when executed by the processor 110, realizes each process of the embodiments of the anti-shake method, and can achieve the same technical effect, and in order to avoid duplication, the description will be omitted here.

[0089] It should be noted that the electronic devices in the embodiments of the present application include the mobile and non-mobile electronic devices mentioned above.

[0090] FIG. 6 is a schematic diagram of the hardware structure of an electronic device for implementing an embodiment of the present application.

[0091] The electronic device 100 includes components such as, but not limited to, a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110. The input unit 104 may include a graphics processing unit and a microphone, the display unit 106 may include a display panel, the user input unit 107 may include a touch panel and other input devices, and the memory 109 may include applications and an operating system.

[0092] It can be understood by those skilled in the art that the electronic device 100 may further include a power source (e.g., a battery) for supplying power to each component, and the power source may be logically connected to the processor 110 by a power management system, which may further realize functions such as charge / discharge management and power consumption management. The structure of the electronic device shown in Fig. 6 does not limit the electronic device, and the electronic device may include more or fewer components than those shown, or a combination of some components, or a different component arrangement, and the description thereof will be omitted here.

[0093] The processor 110 is No. 1 Camera first image When the camera shake parameters are collected in real time, the camera shake parameters of the electronic device are obtained, and a first trimming parameter corresponding to the camera shake parameters is calculated based on the first trimming parameter. image The display unit 106 displays the first region after the cropping by the processor 110. image Used to display the first image includes a first region and a second region, and the second region is a first image and N frame image and the common area of ​​the Nth frame. image is the first image collected before collecting image where N is an integer equal to or greater than 1.

[0094] Optionally, the hand shake parameters may include at least one of a rotation angle of the electronic device, a rotation angular velocity of the electronic device, a rotation direction of the electronic device, a movement speed of the electronic device, a movement acceleration of the electronic device, and a movement direction of the electronic device.

[0095] Optionally, the processor 110 specifically adjusts the first trimming parameter based on the first preset trimming parameter when the first trimming parameter is greater than the first preset trimming parameter. image It can be used to trim the first region in.

[0096] Optionally, the electronic device includes a first camera and a second camera, the first camera and the second camera for collecting images of the same object, and the first image collected by the first camera is image The second view angle corresponds to the second view angle collected by the second camera. image Specifically, when the viewing angle of the electronic device is larger than the viewing angle corresponding to the second camera, the processor 110 image and when the second trimming parameter is greater than a second preset trimming parameter, a first trimming parameter is displayed based on the first trimming parameter. image The second cropping parameters can be used to crop a first region in the image, the second cropping parameters being cropping parameters determined based on the camera shake parameters and corresponding to the second camera, and the first cropping parameters being cropping parameters corresponding to the first camera.

[0097] Optionally, the preset cropping parameters corresponding to the first camera and the preset cropping parameters corresponding to the second camera are different.

[0098] In the electronic device provided in the embodiment of the present application, first, No. 1 Camera first image When collecting the camera shake parameters in real time, the electronic device can obtain the camera shake parameters of the electronic device. Then, the electronic device calculates a first trimming parameter according to the first trimming parameter corresponding to the camera shake parameters. imageThe first area in the image is cropped, and the first area after cropping is image It is possible to display the first image includes a first region and a second region, the second region being a first image and N frame image and the common area of ​​the Nth frame. image is the first image collected before collecting image With a certain trimming parameter, image Compared with the conventional solution of trimming the first image, the above solution allows the electronic device to flexibly obtain different trimming parameters according to the degree of camera shake, and then trim the first image according to the different trimming parameters. image The area excluding the common area therebetween can be trimmed, thereby realizing the purpose of anti-shake of the electronic device and improving the flexibility of anti-shake of the electronic device.

[0099] An embodiment of the present application further provides a readable storage medium storing a program or instruction that, when executed by a processor, realizes each process of the embodiment of the above-mentioned anti-shake method, and can achieve the same technical effect, and in order to avoid duplication, the description will be omitted here.

[0100] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0101] The embodiment of the present application further provides a chip that includes a processor and a communication interface, the communication interface and the processor are coupled to each other, and the processor executes a program or instruction, and is used to realize each process of the embodiment of the anti-shake method described above, and can achieve the same technical effect, and in order to avoid duplication, the description will be omitted here.

[0102] It should be understood that the chips referred to in the embodiments of the present application may be referred to as system level chips, system chips, chip systems, or systems on chips.

[0103] It should be noted that in this specification, the terms "comprise", "consist of" or any other variations are intended to include a non-exclusive inclusion, whereby a process, method, article, or apparatus that includes a set of elements includes not only those elements, but also other elements not expressly stated or inherent to such process, method, article, or apparatus. Unless otherwise specified, an element limited by the phrase "comprises a" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element. It should also be noted that the scope of the method and apparatus in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may include performing functions substantially simultaneously or in the reverse order depending on such functions, for example, the described method may be performed in a different order than described, and various steps may be added, omitted, or combined. Also, features described with reference to any example may be combined in other examples.

[0104] From the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be realized in the form of a combination of software and a necessary common hardware platform, and of course, they can be realized by hardware, but in many cases the former is a more preferred embodiment. Based on this view, the technical solution of the present application can be substantially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (e.g., ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions that cause a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0105] Although the examples of the present application have been described above with reference to the drawings, the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative and not limiting. Based on the suggestions of the present application, many forms that a person skilled in the art can make without departing from the spirit of the present application and the scope of protection of the claims are all within the scope of protection of the present application.

Claims

1. acquiring hand shake parameters of the electronic device when a first camera of the electronic device collects a first image in real time; cropping a first region in the first image based on a first cropping parameter corresponding to the camera shake parameter, and displaying the cropped first image; A method for preventing camera shake, wherein the first image includes the first region and the second region, the first region being an area other than the second region in the first image, the second region being a common area between the first image and an image of an Nth frame, the image of the Nth frame being an image collected before collecting the first image, and N being an integer greater than or equal to 1.

2. The camera shake prevention method according to claim 1 , wherein the camera shake parameters include at least one of a rotation angle of the electronic device, a rotation angular velocity of the electronic device, a rotation direction of the electronic device, a movement speed of the electronic device, a movement acceleration of the electronic device, and a movement direction of the electronic device.

3. The step of cropping a first region in the first image based on a first cropping parameter corresponding to the camera shake parameter includes:

3. The method for preventing camera shake according to claim 1, further comprising the step of cropping a first region in the first image based on the first preset cropping parameter when the first cropping parameter is greater than a first preset cropping parameter.

4. the electronic device includes the first camera and a second camera, the first camera and the second camera are for collecting images of a same object, and a viewing angle corresponding to a first image collected by the first camera is larger than a viewing angle corresponding to a second image collected by the second camera; The step of cropping a first region in the first image based on the first cropping parameter corresponding to the camera shake parameter includes: the electronic device displays an image captured by the second camera, and if a second cropping parameter is greater than a second preset cropping parameter, cropping a first region in the first image based on the first cropping parameter; 3. The camera shake prevention method according to claim 1, wherein the second trimming parameter is a trimming parameter corresponding to the second camera determined based on the camera shake parameter, and the first trimming parameter is a trimming parameter corresponding to the first camera.

5. The method for preventing camera shake according to claim 4 , wherein the preset cropping parameters corresponding to the first camera and the preset cropping parameters corresponding to the second camera are different.

6. Including an acquisition module, a cropping module and a display module; The acquisition module is used to acquire hand shake parameters of the electronic device when a first camera of the electronic device collects a first image in real time; the cropping module is used to crop a first region in the first image based on a first cropping parameter corresponding to the camera shake parameter determined by the acquisition module; the display module is used to display the first image after the cropping module has been cropped; An image stabilization device, wherein the first image includes the first area and the second area, the first area being an area other than the second area in the first image, the second area being a common area between the first image and an Nth frame image, and the Nth frame image being an image collected before collecting the first image, where N is an integer greater than or equal to 1.

7. The camera shake prevention device according to claim 6 , wherein the camera shake parameters include at least one of a rotation angle of the electronic device, a rotation angular velocity of the electronic device, a rotation direction of the electronic device, a movement speed of the electronic device, a movement acceleration of the electronic device, and a movement direction of the electronic device.

8. The image stabilization device according to claim 6 or 7, wherein the cropping module is specifically used for cropping a first area in the first image based on the first preset cropping parameter when the first cropping parameter is greater than a first preset cropping parameter.

9. the electronic device includes the first camera and the second camera, the first camera and the second camera are for collecting images of a same object, and a viewing angle of a first image collected by the first camera is larger than a viewing angle of a second image collected by the second camera; The cropping module is specifically used for cropping a first region in the first image based on the first cropping parameter when the electronic device displays an image collected by the second camera, and the second cropping parameter is greater than a second preset cropping parameter; 8. The image stabilization device according to claim 6, wherein the second trimming parameter is a trimming parameter corresponding to the second camera determined based on the image stabilization parameter, and the first trimming parameter is a trimming parameter corresponding to the first camera.

10. The image stabilization device according to claim 9 , wherein the preset cropping parameters corresponding to the first camera and the preset cropping parameters corresponding to the second camera are different.

11. An electronic device comprising a processor, a memory, and a program or instructions stored in the memory and executable on the processor, the program or instructions implementing the steps of the camera shake prevention method according to any one of claims 1 to 5 when executed by the processor.

12. A computer-readable storage medium having stored thereon a program or instructions which, when executed by a processor, implements the steps of the camera shake prevention method according to any one of claims 1 to 5.

13. A computer software product which, when executed by at least one processor, implements the method for preventing camera shake according to any one of claims 1 to 5.

14. An electronic device configured to carry out the method for preventing camera shake according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Video shooting anti-shake method and device

    CN110213479A

  • Picture reproducing device and control method therefor

    JP2012044418A

  • Imaging apparatus and imaging method

    JP2014204342A

  • Image tremor correction device, tilt correction device, image tremor correction device control method, tilt correction device control method

    JP2017058660A

  • Image processing device, image processing method, computer program, and electronic device

    WO2017149964A1