CN109873950B - Image correction method, terminal and computer readable storage medium - Google Patents

Image correction method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN109873950B
CN109873950B CN201910101771.2A CN201910101771A CN109873950B CN 109873950 B CN109873950 B CN 109873950B CN 201910101771 A CN201910101771 A CN 201910101771A CN 109873950 B CN109873950 B CN 109873950B
Authority
CN
China
Prior art keywords
camera
shooting
image
self
shot object
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910101771.2A
Other languages
Chinese (zh)
Other versions
CN109873950A (en
Inventor
王雅依
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910101771.2A priority Critical patent/CN109873950B/en
Publication of CN109873950A publication Critical patent/CN109873950A/en
Application granted granted Critical
Publication of CN109873950B publication Critical patent/CN109873950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an image correction method, which is applied to a terminal provided with a camera and comprises the following steps: when the camera is used for self-shooting, based on the position of the camera at the terminal and the distance between the camera and a shot object, the shot object image obtained by self-shooting is corrected, so that the shot object is centered and presented in the shot object image. By implementing the scheme, the user can automatically adjust the angle of the shot object in the shot image in the self-shooting process under the condition that the camera is arranged at the position deviated from the central axis, so that the collected shot object is centrally displayed in the shot image, the self-shooting efficiency of the user is effectively improved, and the user experience of self-shooting of the user is improved.

Description

Image correction method, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of computer devices, and in particular, to an image correction method, a terminal, and a computer-readable storage medium.
Background
With the rapid development of computer devices (e.g., mobile terminals), image acquisition by computer devices provided with cameras has been rapidly popularized. However, since the computer device is affected by factors such as circuit layout, the camera is usually disposed at a position deviated from the central axis to minimize the volume of the computer device. Because the camera sets up in the position that deviates the axis, the user is at the auto heterodyne in-process, in order to be shown in the middle of shooing the image by the object of shooing, need the user through constantly adjusting computer equipment shooting angle, can make the object of shooing of gathering show in the middle of shooing the image, shoot or self-heterodyne to the user and brought very big inconvenience.
Disclosure of Invention
The invention mainly aims to provide an image correction method, a terminal and a computer readable storage medium, aiming at solving the defect that in the prior art, under the condition that a camera is arranged at a position deviated from a central axis, a user needs to continuously adjust a shooting angle in a self-shooting process so as to enable an acquired shot object to be presented at the middle position of a shot image.
In order to achieve the above object, the present invention provides an image correction method applied to a terminal provided with a camera, the method including:
when the camera is used for self-shooting, based on the position of the camera at the terminal and the distance between the camera and a shot object, the shot object image obtained by self-shooting is corrected, so that the shot object is centered and presented in the shot object image.
Optionally, the modifying the image of the object to be shot obtained by self-shooting based on the position of the camera at the terminal and the distance between the camera and the object to be shot includes:
and correcting a shot object image obtained by self-shooting based on the distance between the camera and the current vertical middle axis and/or the current horizontal middle axis of the terminal and the distance between the camera and the shot object.
Optionally, in a case that the number of the photographic objects is multiple, the correcting the photographic object image obtained by self-photographing based on the position of the camera at the terminal and the distance between the camera and the photographic object includes:
and correcting a shot object image obtained by self-shooting based on the position of the camera at the terminal and the distance between the camera and one or more shot objects selected by the user.
Optionally, the modifying the image of the object obtained by self-timer shooting to make the object appear in the image of the object centrally includes:
and respectively carrying out scale adjustment and/or scale scaling on each area in the shot object image obtained by self-shooting so as to adjust the shooting angle of the shot object and enable the shot object to be centered and presented in the shot object image.
Optionally, in a case of performing video self-timer shooting through the camera, the correcting a shot object image obtained by self-timer shooting based on the position of the camera at the terminal and the distance between the camera and the shot object includes:
in the process of video self-shooting through the camera, the video image of the shot object obtained by self-shooting is corrected in real time based on the position of the camera at the terminal and the real-time distance between the camera and the shot object.
Optionally, when the number of the shot objects is multiple, the real-time correcting the video image of the shot object obtained by self-shooting based on the position of the camera at the terminal and the real-time distance between the camera and the shot object includes:
and based on the position of the camera at the terminal and the real-time average distance between the camera and all the shot objects, real-time correction is carried out on the video image of the shot object obtained by self-shooting.
Optionally, when the number of the shot objects is multiple, the real-time correcting the video image of the shot object obtained by self-shooting based on the position of the camera at the terminal and the real-time distance between the camera and the shot object includes:
and based on the position of the camera at the terminal and the real-time distance between the camera and one or more shooting objects selected by the user, real-time correction is carried out on the video image of the shooting object obtained by self shooting.
Optionally, the modifying, in real time, a video image of a photographic object obtained by self-photographing so that the photographic object is centrally presented in the image of the photographic object in real time includes:
and respectively carrying out real-time scale adjustment and/or real-time scale scaling on each area in the shot object image obtained by self-shooting so as to adjust the real-time shooting angle of the shot object, so that the shot object is centrally presented in the shot object image in real time.
In addition, in order to achieve the above object, the present invention further provides a terminal, including a processor, a memory and a camera;
the processor is used for executing the image correction program stored in the memory so as to realize the steps of the image correction method.
Further, to achieve the above object, the present invention also proposes a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the image correction method described above.
According to the image correction method, the terminal and the computer-readable storage medium, provided by the invention, under the condition that the camera is arranged at the position deviated from the central axis, the user can automatically adjust the angle of the shot object in the shot image in the self-shooting process, so that the collected shot object is centrally displayed in the shot image, the self-shooting efficiency of the user is effectively improved, and the user experience of self-shooting of the user is improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention;
fig. 2 is a schematic diagram illustrating a correction of a self-captured image of a photographic subject based on a position of a camera at a terminal and a distance between the camera and the photographic subject according to a first embodiment of the present invention;
FIG. 3 is a diagram illustrating a second embodiment of the present invention for correcting a self-captured image of a photographic subject based on the distance D10 between the camera and the current perpendicular center axis of the terminal and the ratio D10/D20 of the distance D20 between the camera and the photographic subject;
FIG. 4 is a diagram illustrating a second embodiment of correcting a self-captured image of a photographed object based on a distance D11 between a camera and a current horizontal central axis of a terminal and a ratio D11/D21 of the distance D21 between the camera and the photographed object;
fig. 5 is a schematic structural diagram of a terminal according to a ninth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
Based on the hardware structure of the mobile terminal, the invention provides various embodiments of the method.
A first embodiment of the present invention, an image correction method, as shown in fig. 2, is applied to a terminal provided with a camera, and the method includes the following specific steps:
and S101, when the camera is used for self-shooting, correcting a shot object image obtained by self-shooting based on the position of the camera at the terminal and the distance between the camera and the shot object so as to enable the shot object to be centrally presented in the shot object image.
In this embodiment, the position of the camera at the terminal is not particularly limited, and may be a distance between the camera and a set reference point of the terminal. For example, the distance of the camera from the center of gravity of the terminal.
In this embodiment, the captured image of the object obtained by self-timer shooting is corrected based on the position of the camera at the terminal and the distance between the camera and the object, including but not limited to the following ways: and correcting the shot object image obtained by self-shooting based on the distance between the camera and the set reference point of the terminal and the proportional value of the distance between the camera and the shot object. For example, the photographed object image obtained by self-timer shooting is corrected based on the distance D1 between the camera and the set reference point of the terminal and the proportional value D1/D2 between the camera and the distance D2 between the camera and the photographed object.
In the present embodiment, the manner of correcting the image of the object obtained by self-timer shooting to make the object appear in the image of the object in the middle includes, but is not limited to, one of the following manners:
the method comprises the steps that firstly, a shot object image obtained by self shooting is divided into a set number of areas based on a preset image division rule, and each area in the shot object image obtained by self shooting is subjected to scale adjustment and/or scaling respectively so as to adjust the shooting angle of the shot object and enable the shot object to be centered and presented in the shot object image;
and secondly, dynamically dividing the self-shot object image into a plurality of areas according to the position of the shot object in the shot object image based on a preset image division rule, and respectively carrying out scale adjustment and/or scaling on each area in the self-shot object image so as to adjust the shooting angle of the shot object and enable the shot object to be centrally displayed in the shot object image.
For example, step S101 specifically includes: when the camera is used for self-shooting, correcting a shot object image obtained by self-shooting based on the distance D1 between the camera and a set reference point of the terminal and the proportional value D1/D2 of the distance D2 between the camera and the shot object so that the shot object is centered and presented in the shot object image; wherein, revise the shooting object image that the autodyne obtained to make the shooting object present in shooting the object image in the middle of, specifically include: based on a preset image segmentation rule, according to the position of each shot object in the shot object image, dynamically segmenting the shot object image obtained by self-shooting into a plurality of areas, and respectively carrying out scale adjustment and/or scale scaling on each area in the shot object image obtained by self-shooting so as to adjust the shooting angle of the shot object and enable the shot object to be centered and presented in the shot object image.
When the camera is used for self-shooting, the shot object image obtained by self-shooting is corrected based on the position of the camera at the terminal and the distance between the camera and the shot object, so that the shot object is centrally presented in the shot object image, the angle of the shot object in the shot image is automatically adjusted, the collected shot object is centrally presented in the shot image, the self-shooting efficiency of a user is effectively improved, and the user experience of self-shooting of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the in-process of autodyning, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
A second embodiment of the present invention, an image correction method, as shown in fig. 3 to 4, is applied to a terminal provided with a camera, and the method includes the following specific steps:
step S201, when the camera is used for self-shooting, the shot object image obtained by self-shooting is corrected based on the position of the camera at the terminal and the distance between the camera and the shot object, so that the shot object is centered and presented in the shot object image.
Wherein, based on the position that the camera is located the terminal to and the camera and the distance of shooing the object, carry out the mode of revising to the shooting object image that obtains of autodyne, include:
and correcting the shot object image obtained by self-shooting based on the distance between the camera and the current vertical central axis and/or the current horizontal central axis of the terminal and the distance between the camera and the shot object.
For example, as shown in fig. 3, step S201 specifically includes: when the self-timer shooting is carried out through the camera, the shot object image obtained by the self-timer shooting is corrected based on the distance D10 between the camera and the current vertical middle axis of the terminal and the ratio D10/D20 of the distance D20 between the camera and the shot object, so that the shot object is centrally presented in the shot object image.
As another example, as shown in fig. 4, step S201 specifically includes: when the self-shooting is carried out through the camera, the shot object image obtained by the self-shooting is corrected based on the distance D11 between the camera and the current horizontal central axis of the terminal and the ratio D11/D21 of the distance D21 between the camera and the shot object, so that the shot object is centrally presented in the shot object image.
In the present embodiment, the manner of correcting the image of the object obtained by self-timer shooting to make the object appear in the image of the object in the middle includes, but is not limited to, one of the following manners:
the method comprises the steps that firstly, a shot object image obtained by self shooting is divided into a set number of areas based on a preset image division rule, and each area in the shot object image obtained by self shooting is subjected to scale adjustment and/or scaling respectively so as to adjust the shooting angle of the shot object and enable the shot object to be centered and presented in the shot object image;
and secondly, dynamically dividing the self-shot object image into a plurality of areas according to the position of the shot object in the shot object image based on a preset image division rule, and respectively carrying out scale adjustment and/or scaling on each area in the self-shot object image so as to adjust the shooting angle of the shot object and enable the shot object to be centrally displayed in the shot object image.
When the camera is used for self-shooting, based on the distance between the camera and the current vertical central axis and/or the current horizontal central axis of the terminal and the distance between the camera and a shot object, the shot object image obtained by self-shooting is corrected, so that the shot object is centrally presented in the shot object image, the shot object angle in the shot image is automatically adjusted, the collected shot object is centrally presented in the shot image, the self-shooting efficiency of a user is effectively improved, and the user experience of self-shooting of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the in-process of autodyning, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
In a third embodiment of the present invention, an image correction method is applied to a terminal provided with a camera, and the method includes the following specific steps:
step S301, when the camera is used for self-shooting, the shot object image obtained by self-shooting is corrected based on the position of the camera at the terminal and the distance between the camera and the shot object, so that the shot object is centrally presented in the shot object image.
Wherein, under the condition that the number of the shot objects is a plurality of, based on the position that the camera is located at the terminal and the distance between the camera and the shot objects, the mode of correcting the shot object image obtained by self-shooting comprises the following steps:
and correcting the shot object image obtained by self-shooting based on the position of the camera at the terminal and the distance between the camera and one or more shot objects selected by the user.
Under the condition that the number of the shot objects is multiple, when the distance between the camera and the shot objects is measured, the accurate distance cannot be obtained generally, so that the distance between the camera and the shot objects can be accurately measured according to one or more shot objects selected by a user, and the shot object image obtained by self-shooting is accurately corrected.
In the present embodiment, the manner of correcting the image of the object obtained by self-timer shooting to make the object appear in the image of the object in the middle includes, but is not limited to, one of the following manners:
the method comprises the steps that firstly, a shot object image obtained by self shooting is divided into a set number of areas based on a preset image division rule, and each area in the shot object image obtained by self shooting is subjected to scale adjustment and/or scaling respectively so as to adjust the shooting angle of the shot object and enable the shot object to be centered and presented in the shot object image;
and secondly, dynamically dividing the self-shot object image into a plurality of areas according to the position of the shot object in the shot object image based on a preset image division rule, and respectively carrying out scale adjustment and/or scaling on each area in the self-shot object image so as to adjust the shooting angle of the shot object and enable the shot object to be centrally displayed in the shot object image.
For example, step S301 specifically includes: when the camera is used for self-shooting, the shot object image obtained by self-shooting is corrected based on the position of the camera at the terminal and the distance between the camera and two self-shooting users selected by the users.
When the camera is used for self-shooting, based on the distance between the camera and the current vertical central axis and/or the current horizontal central axis of the terminal and the distance between the camera and a shot object, the shot object image obtained by self-shooting is corrected, so that the shot object is centrally presented in the shot object image, the shot object angle in the shot image is automatically adjusted, the collected shot object is centrally presented in the shot image, the self-shooting efficiency of a user is effectively improved, and the user experience of self-shooting of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the in-process of autodyning, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
In a fourth embodiment of the present invention, an image correction method is applied to a terminal provided with a camera, and the method includes the following specific steps:
step S401, when the camera is used for self-shooting, the shot object image obtained by self-shooting is corrected based on the position of the camera at the terminal and the distance between the camera and the shot object, so that the shot object is centered and presented in the shot object image.
In the present embodiment, the manner of correcting the image of the object obtained by self-timer shooting to make the object appear in the image of the object in the middle includes, but is not limited to, the following manners:
respectively carrying out scale adjustment and/or scale scaling on each area in a shot object image obtained by self-shooting so as to adjust the shooting angle of the shot object and enable the shot object to be centered and presented in the shot object image; the area dividing method in the photographed object image is not specifically limited, and may be to divide the photographed object image obtained by self-photographing into a set number of areas based on a preset image division rule, or dynamically divide the photographed object image obtained by self-photographing into a plurality of areas according to the position of the photographed object in the photographed object image based on a preset image division rule.
When the camera is used for self-shooting, based on the distance between the camera and the current vertical central axis and/or the current horizontal central axis of the terminal and the distance between the camera and a shot object, the shot object image obtained by self-shooting is corrected, so that the shot object is centrally presented in the shot object image, the shot object angle in the shot image is automatically adjusted, the collected shot object is centrally presented in the shot image, the self-shooting efficiency of a user is effectively improved, and the user experience of self-shooting of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the in-process of autodyning, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
In a fifth embodiment of the present invention, an image correction method is applied to a terminal provided with a camera, and the method includes the following specific steps:
step S501, when the camera is used for self-shooting, the shot object image obtained by self-shooting is corrected based on the position of the camera at the terminal and the distance between the camera and the shot object, so that the shot object is centered and presented in the shot object image.
In this embodiment, in the case of performing video self-timer shooting through a camera, based on the position of the camera at the terminal and the distance between the camera and the shooting object, the modes of correcting the image of the shooting object obtained by self-timer shooting include, but are not limited to, the following modes:
in the process of video self-shooting through the camera, the video image of the shot object obtained by self-shooting is corrected in real time based on the position of the camera at the terminal and the real-time distance between the camera and the shot object.
In the process of video self-shooting through the camera, the video image of the shot object obtained by self-shooting is corrected in real time based on the position of the camera at the terminal and the real-time distance between the camera and the shot object, so that the video shooting process is realized, the position of the shot object in the shot object image is dynamically adjusted, the angle of the shot object in the video shot image is automatically adjusted, the collected shot object is centrally presented in the shot image, the self-shooting video efficiency of a user is effectively improved, and the user experience of the self-shooting video of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the auto heterodyne video in-process, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
In a sixth embodiment of the present invention, an image correction method is applied to a terminal provided with a camera, and the method includes the following specific steps:
step S601, when performing self-photographing through the camera, correcting the image of the object obtained by self-photographing based on the position of the camera at the terminal and the distance between the camera and the object to be photographed, so that the object to be photographed is centrally presented in the image of the object to be photographed.
In this embodiment, in the case of performing video self-timer shooting through a camera, based on the position of the camera at the terminal and the distance between the camera and the shooting object, the modes of correcting the image of the shooting object obtained by self-timer shooting include, but are not limited to, the following modes:
in the process of video self-shooting through a camera, real-time correction is carried out on a video image of a shot object obtained by self-shooting based on the position of the camera at a terminal and the real-time distance between the camera and the shot object;
wherein, under the condition that the quantity of shooing the object is a plurality of, based on the position that the camera is located the terminal to and the camera with shoot the real-time distance of object, carry out the mode of revising in real time to the shooting object video image that obtains autodyne, include:
and correcting the video image of the shot object obtained by self-shooting in real time based on the position of the camera at the terminal and the real-time average distance between the camera and all the shot objects.
The real-time average distance between the camera and all shot objects is determined, so that the real-time distance between the camera and each shot object can be accurately determined, each shot object video image obtained by self-shooting is accurately corrected in real time according to the real-time distance between the camera and each shot object, and the real-time correction efficiency and the real-time correction precision of each shot object video image obtained by self-shooting are effectively improved.
In the process of video self-shooting through the camera, the video image of the shot object obtained by self-shooting is corrected in real time based on the position of the camera at the terminal and the real-time distance between the camera and the shot object, so that the video shooting process is realized, the position of the shot object in the shot object image is dynamically adjusted, the angle of the shot object in the video shot image is automatically adjusted, the collected shot object is centrally presented in the shot image, the self-shooting video efficiency of a user is effectively improved, and the user experience of the self-shooting video of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the auto heterodyne video in-process, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
The seventh embodiment of the present invention provides an image correction method, which is applied to a terminal provided with a camera, and the method includes the following specific steps:
and step S701, when the camera is used for self-shooting, correcting a shot object image obtained by self-shooting based on the position of the camera at the terminal and the distance between the camera and the shot object so as to enable the shot object to be centered and displayed in the shot object image.
In this embodiment, in the case of performing video self-timer shooting through a camera, based on the position of the camera at the terminal and the distance between the camera and the shooting object, the modes of correcting the image of the shooting object obtained by self-timer shooting include, but are not limited to, the following modes:
in the process of video self-shooting through a camera, real-time correction is carried out on a video image of a shot object obtained by self-shooting based on the position of the camera at a terminal and the real-time distance between the camera and the shot object;
wherein, under the condition that the quantity of shooing the object is a plurality of, based on the position that the camera is located the terminal to and the camera with shoot the real-time distance of object, carry out the mode of revising in real time to the shooting object video image that obtains autodyne, include:
and correcting the video image of the shot object obtained by self shooting in real time based on the position of the camera at the terminal and the real-time distance between the camera and one or more shot objects selected by the user.
The real-time distance between the camera and one or more shooting objects selected by the user can be accurately determined by determining the real-time distance between the camera and the shooting object selected by the user, so that the video image of the shooting object selected by the user, which is obtained by self-shooting, can be accurately corrected in real time according to the real-time distance between the camera and the shooting object selected by the user, and the real-time correction efficiency and the real-time correction precision of the video image of the shooting object selected by the user, which is obtained by self-shooting, are effectively improved.
In this embodiment, the real-time correction method for the video image of the object obtained by self-timer shooting includes, but is not limited to, one of the following methods:
the method comprises the steps that firstly, a shot object image obtained by real-time self-shooting is divided into a set number of areas based on a preset image division rule, and real-time scale adjustment and/or real-time scale scaling are/is respectively carried out on each area in the shot object image obtained by real-time self-shooting so as to adjust the shooting angle of the shot object in real time and enable the shot object to be centrally displayed in the shot object image in real time;
and secondly, dynamically dividing the self-shot object image into a plurality of areas in real time according to the real-time position of the shot object in the shot object image based on a preset image division rule, and respectively carrying out real-time proportional adjustment and/or real-time proportional scaling on each area in the real-time self-shot object image so as to adjust the shooting angle of the shot object in real time and enable the shot object to be centrally presented in the shot object image in real time.
In the process of video self-shooting through the camera, the video image of the shot object obtained by self-shooting is corrected in real time based on the position of the camera at the terminal and the real-time distance between the camera and the shot object, so that the video shooting process is realized, the position of the shot object in the shot object image is dynamically adjusted, the angle of the shot object in the video shot image is automatically adjusted, the collected shot object is centrally presented in the shot image, the self-shooting video efficiency of a user is effectively improved, and the user experience of the self-shooting video of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the auto heterodyne video in-process, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
An eighth embodiment of the present invention provides an image correction method, which is applied to a terminal provided with a camera, and includes the following specific steps:
step S801, when performing self-photographing through the camera, correcting a self-photographing object image based on the position of the camera at the terminal and the distance between the camera and the photographing object, so that the photographing object is centered in the photographing object image.
In this embodiment, in the case of performing video self-timer shooting through a camera, based on the position of the camera at the terminal and the distance between the camera and the shooting object, the modes of correcting the image of the shooting object obtained by self-timer shooting include, but are not limited to, the following modes:
in the process of video self-shooting through a camera, real-time correction is carried out on a video image of a shot object obtained by self-shooting based on the position of the camera at a terminal and the real-time distance between the camera and the shot object;
wherein, under the condition that the quantity of shooing the object is a plurality of, based on the position that the camera is located the terminal to and the camera with shoot the real-time distance of object, carry out the mode of revising in real time to the shooting object video image that obtains autodyne, include:
and correcting the video image of the shot object obtained by self shooting in real time based on the position of the camera at the terminal and the real-time distance between the camera and one or more shot objects selected by the user.
The real-time distance between the camera and one or more shooting objects selected by the user can be accurately determined by determining the real-time distance between the camera and the shooting object selected by the user, so that the video image of the shooting object selected by the user, which is obtained by self-shooting, can be accurately corrected in real time according to the real-time distance between the camera and the shooting object selected by the user, and the real-time correction efficiency and the real-time correction precision of the video image of the shooting object selected by the user, which is obtained by self-shooting, are effectively improved.
In this embodiment, a method for correcting a video image of a photographic subject obtained by self-photographing in real time so that the photographic subject appears in the image of the photographic subject centrally in real time includes:
and respectively carrying out real-time scale adjustment and/or real-time scale scaling on each area in the shot object image obtained by self-shooting so as to adjust the real-time shooting angle of the shot object, so that the shot object is centrally presented in the shot object image in real time.
In the process of video self-shooting through the camera, the video image of the shot object obtained by self-shooting is corrected in real time based on the position of the camera at the terminal and the real-time distance between the camera and the shot object, so that the video shooting process is realized, the position of the shot object in the shot object image is dynamically adjusted, the angle of the shot object in the video shot image is automatically adjusted, the collected shot object is centrally presented in the shot image, the self-shooting video efficiency of a user is effectively improved, and the user experience of the self-shooting video of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the auto heterodyne video in-process, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
A ninth embodiment of the present invention, a terminal, as shown in fig. 5, includes the following components:
a processor 501, a memory 502, and a camera 503. In some embodiments of the invention, the processor 501, the memory 502, and the camera 503 may be connected by a bus or other means.
Processor 501 may be a general-purpose Processor such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention. Wherein, the memory 502 is used for storing executable instructions of the processor 501;
a memory 502 for storing program code and transferring the program code to the processor 501. Memory 502 may include Volatile Memory (Volatile Memory), such as Random Access Memory (RAM); the Memory 502 may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 502 may also comprise a combination of memories of the kind described above.
The processor 501 is configured to call the program code management code stored in the memory 502 to implement some or all of the steps in any of the first embodiment to the eighth embodiment of the present invention.
When the camera is used for self-shooting, the shot object image obtained by self-shooting is corrected based on the position of the camera at the terminal and the distance between the camera and the shot object, so that the shot object is centrally presented in the shot object image, the angle of the shot object in the shot image is automatically adjusted, the collected shot object is centrally presented in the shot image, the self-shooting efficiency of a user is effectively improved, and the user experience of self-shooting of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the in-process of autodyning, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
The terminal according to the ninth embodiment of the invention can correct the image of the photographed object obtained by self-photographing based on the position of the camera at the terminal and the distance between the camera and the photographed object when self-photographing is performed through the camera, so that the photographed object is centrally presented in the image of the photographed object, the angle of the photographed object in the photographed image is automatically adjusted, the collected photographed object is centrally presented in the photographed image, the self-photographing efficiency of a user is effectively improved, and the user experience of self-photographing of the user is improved; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the in-process of autodyning, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
A tenth embodiment of the present invention is a computer-readable storage medium.
The computer storage media may be RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art.
The computer readable storage medium stores one or more programs which are executable by one or more processors to implement some or all of the steps in any of the first through fifth embodiments of the present invention.
A computer-readable storage medium according to a tenth embodiment of the present invention stores one or more programs, where the one or more programs are executable by one or more processors, and are capable of modifying a captured image obtained by self-photographing to centrally present the captured object in the captured image based on a position of a camera at a terminal and a distance between the camera and the captured object when the self-photographing is performed by the camera, so as to automatically adjust an angle of the captured object in the captured image to centrally present the captured object in the captured image, thereby effectively improving efficiency of self-photographing for a user and improving user experience of self-photographing for the user; effectively avoided setting up in the condition of the position of deviating the axis at the camera, the user need constantly adjust the angle of shooting at the in-process of autodyning, just can make the defect that the object of being shot of gathering appears in shooting image intermediate position.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. An image correction method is applied to a terminal provided with a camera, and the method comprises the following steps:
when the camera is used for self-shooting, correcting a shot object image obtained by self-shooting based on the position of the camera at the terminal and the distance between the camera and the shot object so as to enable the shot object to be centrally presented in the shot object image;
the method for correcting the image of the shooting object obtained by self-shooting so as to enable the shooting object to be centered and appear in the image of the shooting object comprises the following steps:
based on a preset image segmentation rule, a shot object image obtained by self-shooting is segmented into a set number of areas, and each area in the shot object image obtained by self-shooting is subjected to scale adjustment and/or scaling respectively so as to adjust the shooting angle of the shot object and enable the shot object to be centered and displayed in the shot object image.
2. The method of claim 1, wherein the correcting the image of the object obtained by self-photographing based on the position of the camera at the terminal and the distance between the camera and the object comprises:
and correcting a shot object image obtained by self-shooting based on the distance between the camera and the current vertical middle axis and/or the current horizontal middle axis of the terminal and the distance between the camera and the shot object.
3. The method according to claim 1, wherein in a case where the number of the photographic objects is plural, the correcting the photographic object image obtained by self-timer shooting based on the position of the camera at the terminal and the distance between the camera and the photographic object comprises:
and correcting a shot object image obtained by self-shooting based on the position of the camera at the terminal and the distance between the camera and one or more shot objects selected by the user.
4. The method according to any one of claims 1 to 3, wherein the correcting the self-timer photographic subject image so that the photographic subject is centrally presented in the photographic subject image comprises:
and respectively carrying out scale adjustment and/or scale scaling on each area in the shot object image obtained by self-shooting so as to adjust the shooting angle of the shot object and enable the shot object to be centered and presented in the shot object image.
5. The method according to claim 1, wherein in the case of performing video self-timer shooting through the camera, the correcting the self-shot object image based on the position of the camera at the terminal and the distance between the camera and the object comprises:
in the process of video self-shooting through the camera, based on the position of the camera at the terminal and the real-time distance between the camera and a shot object, the video image of the shot object obtained by self-shooting is corrected in real time, so that the shot object is centrally presented in the shot object image in real time.
6. The method according to claim 5, wherein in the case that the number of the photographic objects is plural, the real-time correction of the video image of the photographic object obtained by self-timer shooting based on the position of the camera at the terminal and the real-time distance between the camera and the photographic object comprises:
and based on the position of the camera at the terminal and the real-time average distance between the camera and all the shot objects, real-time correction is carried out on the video image of the shot object obtained by self-shooting.
7. The method according to claim 5, wherein in the case that the number of the photographic objects is plural, the real-time correction of the video image of the photographic object obtained by self-timer shooting based on the position of the camera at the terminal and the real-time distance between the camera and the photographic object comprises:
and based on the position of the camera at the terminal and the real-time distance between the camera and one or more shooting objects selected by the user, real-time correction is carried out on the video image of the shooting object obtained by self shooting.
8. The method of claim 5, wherein the modifying the video image of the photographic subject obtained by self-timer shooting in real time to make the photographic subject centrally appear in the image of the photographic subject in real time comprises:
and respectively carrying out real-time scale adjustment and/or real-time scale scaling on each area in the shot object image obtained by self-shooting so as to adjust the real-time shooting angle of the shot object, so that the shot object is centrally presented in the shot object image in real time.
9. A terminal, characterized in that the terminal comprises a processor, a memory and a camera;
the processor is used for executing an image correction program stored in the memory to realize the steps of the image correction method according to any one of claims 1 to 8.
10. A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the image correction method according to any one of claims 1 to 8.
CN201910101771.2A 2019-01-30 2019-01-30 Image correction method, terminal and computer readable storage medium Active CN109873950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910101771.2A CN109873950B (en) 2019-01-30 2019-01-30 Image correction method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910101771.2A CN109873950B (en) 2019-01-30 2019-01-30 Image correction method, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109873950A CN109873950A (en) 2019-06-11
CN109873950B true CN109873950B (en) 2021-03-23

Family

ID=66918499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910101771.2A Active CN109873950B (en) 2019-01-30 2019-01-30 Image correction method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109873950B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4403483B2 (en) * 2001-02-13 2010-01-27 フジノン株式会社 Automatic tracking device
JP5109803B2 (en) * 2007-06-06 2012-12-26 ソニー株式会社 Image processing apparatus, image processing method, and image processing program
CN104021571B (en) * 2014-06-03 2017-07-28 浙江宇视科技有限公司 It is a kind of to strengthen the moving target automatic tracking method and device of Consumer's Experience
KR20170017401A (en) * 2015-08-06 2017-02-15 엘지이노텍 주식회사 Apparatus for processing Images
CN107124560A (en) * 2017-06-19 2017-09-01 上海爱优威软件开发有限公司 A kind of self-heterodyne system, medium and method
CN108462770B (en) * 2018-03-21 2020-05-19 北京松果电子有限公司 Rear camera self-shooting method and device and electronic equipment

Also Published As

Publication number Publication date
CN109873950A (en) 2019-06-11

Similar Documents

Publication Publication Date Title
CN107248137B (en) Method for realizing image processing and mobile terminal
CN110300267B (en) Photographing method and terminal equipment
CN107846583B (en) Image shadow compensation method and mobile terminal
CN110602389B (en) Display method and electronic equipment
CN111147752B (en) Zoom factor adjusting method, electronic device, and medium
CN107730460B (en) Image processing method and mobile terminal
CN111031234B (en) Image processing method and electronic equipment
CN109819166B (en) Image processing method and electronic equipment
CN108881721B (en) Display method and terminal
CN108307123B (en) Exposure adjusting method and mobile terminal
CN110363729B (en) Image processing method, terminal equipment and computer readable storage medium
CN116033269A (en) Linkage auxiliary anti-shake shooting method, equipment and computer readable storage medium
CN110189368B (en) Image registration method, mobile terminal and computer readable storage medium
CN110099434B (en) Power adjustment method, terminal equipment and computer readable storage medium
CN110312070B (en) Image processing method and terminal
CN109462732B (en) Image processing method, device and computer readable storage medium
CN109005337B (en) Photographing method and terminal
CN108879856B (en) Charging method and terminal
CN108536513B (en) Picture display direction adjusting method and mobile terminal
CN111182206B (en) Image processing method and device
CN110018772B (en) Wallpaper setting method, terminal and computer-readable storage medium
CN110060617B (en) Screen light spot compensation method and device, terminal and readable storage medium
CN109450508B (en) Antenna determination method and device and mobile terminal
CN109683778B (en) Flexible screen control method and device and computer readable storage medium
CN108391050B (en) Image processing method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant