CN112291472B - Preview image processing method and device, storage medium and electronic equipment - Google Patents

Preview image processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112291472B
CN112291472B CN202011171774.2A CN202011171774A CN112291472B CN 112291472 B CN112291472 B CN 112291472B CN 202011171774 A CN202011171774 A CN 202011171774A CN 112291472 B CN112291472 B CN 112291472B
Authority
CN
China
Prior art keywords
preview
preview image
tele
range
zoom
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
CN202011171774.2A
Other languages
Chinese (zh)
Other versions
CN112291472A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011171774.2A priority Critical patent/CN112291472B/en
Publication of CN112291472A publication Critical patent/CN112291472A/en
Application granted granted Critical
Publication of CN112291472B publication Critical patent/CN112291472B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters

Landscapes

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

Abstract

The disclosure provides a preview image processing method, a preview image processing device, a preview image processing medium and electronic equipment, and relates to the technical field of image processing. The method comprises the following steps: dividing the zoom multiple of the telephoto camera into a first zoom multiple and a second zoom multiple, and acquiring a preview range according to a preview image of the first zoom multiple and a preview image of the second zoom multiple; determining a reference preview image in a preview range, determining a movable range of the reference preview image according to the preview range, and displaying a tele preview image of a tele camera in a main preview window; acquiring a main preview image of a main camera, determining the position of a tele preview range and a movable range corresponding to the tele camera in the main preview image, and displaying the position in an auxiliary preview window; and if the touch operation in the tele preview range of the movable range in the auxiliary preview window is detected, adjusting the tele preview image according to the touch operation. The embodiment of the disclosure can realize accurate adjustment.

Description

Preview image processing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a preview image processing method, a preview image processing apparatus, a computer-readable storage medium, and an electronic device.
Background
With the development of intelligent terminals, the photographing function is more and more perfect. Zooming operations are required in some scenarios to meet the scenario requirements.
In the related art, the preview area of the telephoto camera is locked at the center position of the preview area of the main camera, and thus if it is necessary to change the telephoto screen, it is necessary to move the camera or add additional hardware. In the above manner, there is a limitation in adjusting the tele image, and the tele preview image cannot be adjusted conveniently, which is inefficient in adjustment and difficult to adjust accurately.
Disclosure of Invention
The present disclosure provides a preview image processing method, a preview image processing apparatus, a computer-readable storage medium, and an electronic device, thereby overcoming, at least to a certain extent, a problem that a telephoto preview image cannot be adjusted conveniently.
According to an aspect of the present disclosure, there is provided a preview image processing method including: dividing the zoom multiple of the telephoto camera into a first zoom multiple and a second zoom multiple, and acquiring a preview range according to the preview image of the first zoom multiple and the preview image of the second zoom multiple; determining a reference preview image in the preview range, determining a movable range of the reference preview image according to the preview range, and displaying a tele preview image of the tele camera in a main preview window; acquiring a main preview image of a main camera, determining a tele preview range and the movable range corresponding to the tele camera in the main preview image, and displaying the tele preview range and the movable range in an auxiliary preview window; and if the touch operation in the tele preview range in the movable range is detected, adjusting the tele preview image according to the touch operation.
According to an aspect of the present disclosure, there is provided a preview image processing apparatus including: the preview range acquisition module is used for dividing the zoom multiple of the telephoto camera into a first zoom multiple and a second zoom multiple and acquiring a preview range according to a preview image of the first zoom multiple and a preview image of the second zoom multiple; the movable range determining module is used for determining a reference preview image in the preview range, determining the movable range of the reference preview image according to the preview range, and displaying a tele preview image of the tele camera in a main preview window; the position determining module is used for acquiring a main preview image of a main camera, determining a tele preview range and a position of the movable range corresponding to the tele camera in the main preview image, and displaying the tele preview range and the position of the movable range in an auxiliary preview window; and the preview image adjusting module is used for adjusting the tele preview image according to the touch operation if the touch operation in the tele preview range of the movable range is detected to act on the auxiliary preview window.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a preview image processing method as described in any one of the above.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any one of the preview image processing methods described above via execution of the executable instructions.
In some embodiments of the present disclosure, in the preview image processing method and apparatus, the computer-readable storage medium and the electronic device, on one hand, the zoom multiple of the telephoto camera is divided into the first zoom multiple and the second zoom multiple, and then an expanded preview range is obtained according to the preview image of the first zoom multiple and the preview image of the second zoom multiple, and further a movable range of the reference preview image is determined according to the preview range, and the telephoto preview range is moved according to the touch operation within the movable range to adjust the telephoto preview image. The adjustment of the tele preview image can be realized through touch operation without additional hardware or moving a camera, so that the limitation in the related technology is avoided, and the convenience and operability of the operation can be improved. On the other hand, the movable range and the tele preview range are provided, and the tele preview image can be directly adjusted through user operation, so that the adjustment efficiency of the tele preview image is improved, meanwhile, the tele preview image can be accurately adjusted in the movable range, the adjustment accuracy of the tele preview image is improved, and the adjustment effect is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
fig. 1 shows a schematic diagram of an application scenario to which the preview image processing method of the embodiment of the present disclosure may be applied.
FIG. 2 shows a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Fig. 3 shows a flowchart of a preview image processing method in an embodiment of the present disclosure.
FIG. 4 shows a schematic diagram of a preview interface in an embodiment of the present disclosure.
Fig. 5 illustrates a flow chart for determining a long focus preview range and a movable range according to an embodiment of the present disclosure.
Fig. 6 illustrates an interface diagram for determining a long focus preview range and a movable range according to an embodiment of the present disclosure.
Fig. 7 illustrates a schematic diagram of determining a long focus preview image according to an embodiment of the present disclosure.
Fig. 8 illustrates a flow chart for adjusting a tele preview image according to an embodiment of the disclosure.
Fig. 9 shows a block diagram of a preview image processing apparatus in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the steps. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation. In addition, all of the following terms "first" and "second" are used for distinguishing purposes only and should not be construed as limiting the present disclosure.
In the related art, a main camera preview cache and an f-time telephoto camera preview cache are acquired, and a 1-time preview range is obtained through f-time optical zooming and displayed in a main preview window. And drawing the position corresponding to the f-time long-focus camera preview cache by using a white frame in the main camera preview cache so as to identify the long-focus camera preview range, and displaying the long-focus camera preview range in the auxiliary preview window. The two viewing frames are displayed simultaneously, the viewing frame after the magnification of a user is adjusted is displayed in the image preview area, the original viewing frame when the magnification of the user is not adjusted is displayed in the auxiliary viewing window, preview frames with two different view angles are provided for the user, and the user can find a main body of a shooting target more easily according to the original viewing frame when the magnification of the user is not adjusted in the telephoto shooting process, so that the telephoto shooting experience is improved. However, in the above-described method, there is a limitation in adjusting the tele image, and the tele preview image cannot be adjusted easily, which results in low adjustment efficiency and difficulty in accurate adjustment.
In order to solve the above technical problem, fig. 1 illustrates a schematic diagram of an application scenario to which the preview image processing method or the preview image processing apparatus of the embodiments of the present disclosure may be applied.
The preview image processing method can be applied to a photographing scene. Referring to fig. 1, the method can be applied to a scene in which a photographed image is obtained by photographing a target object 102 using a terminal 101. The terminal 101 may be various clients capable of being used for shooting and implementing a zoom function, for example, various smartphones, tablet computers, desktop computers, vehicle-mounted devices, wearable devices, and the like, which are capable of capturing images or videos and displaying the images or videos. The target object 102 may be any type of object to be photographed in various scenes, such as a person, an animal, or a landscape, etc. The target object may be an object that is farther away from the user or closer to the user. The target object may be in a stationary state or in a moving state. Specifically, the camera on the terminal 101 or the shooting camera application may be used to capture an image of the target. The terminal can include a main camera and one or more auxiliary cameras, wherein the one or more auxiliary cameras at least comprise a long-focus camera.
Specifically, when a user clicks the photographing control to perform photographing operation, the user can enter a preview interface of the terminal in response to the photographing operation, and if the zooming operation is detected, the zoom-multiple tele camera and the main camera corresponding to the zooming operation can be adopted to perform image acquisition on the target object, so that a main preview image corresponding to the main camera and a tele preview image corresponding to the tele camera are respectively displayed on the preview interface of the terminal, and then corresponding photographing images are generated.
It should be noted that the preview image processing method provided by the embodiment of the present disclosure may be completely executed by the terminal. Accordingly, the preview image processing apparatus may be provided in the terminal.
FIG. 2 shows a schematic diagram of an electronic device suitable for use in implementing exemplary embodiments of the present disclosure. It should be noted that the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device of the present disclosure includes at least a processor and a memory for storing one or more programs, which when executed by the processor, cause the processor to implement the preview image processing method of the exemplary embodiments of the present disclosure.
Specifically, as shown in fig. 2, the electronic device 200 may include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management Module 240, a power management Module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication Module 250, a wireless communication Module 260, an audio Module 270, a speaker 271, a microphone 272, a microphone 273, an earphone interface 274, a sensor Module 280, a display 290, a camera Module 291, a pointer 292, a motor 293, a button 294, and a Subscriber Identity Module (SIM) card interface 295. The sensor module 280 may include a depth sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 210 may include one or more processing units, such as: the Processor 210 may include an Application Processor (AP), a modem Processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband Processor, and/or a Neural Network Processor (NPU), and the like. The different processing units may be separate devices or may be integrated into one or more processors. Additionally, a memory may be provided in processor 210 for storing instructions and data.
The USB interface 230 is an interface conforming to the USB standard specification, and may specifically be a MiniUSB interface, a microsusb interface, a USB type c interface, or the like. The USB interface 230 may be used to connect a charger to charge the electronic device 200, and may also be used to transmit data between the electronic device 200 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface can also be used for connecting other electronic equipment and the like.
The charge management module 240 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. The power management module 241 is used for connecting the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives the input of the battery 242 and/or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the display screen 290, the camera module 291, the wireless communication module 260, and the like.
The wireless communication function of the electronic device 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like.
The mobile communication module 250 may provide a solution including 2G/3G/4G/5G wireless communication applied on the electronic device 200.
The Wireless Communication module 260 may provide a solution for Wireless Communication applied to the electronic device 200, including Wireless Local Area Networks (WLANs) (e.g., Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like.
The electronic device 200 implements a display function through the GPU, the display screen 290, the application processor, and the like. The GPU is an image-blurring microprocessor, connected to the display screen 290 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or alter display information.
The electronic device 200 may implement a shooting function through the ISP, the camera module 291, the video codec, the GPU, the display screen 290, the application processor, and the like. In some embodiments, the electronic device 200 may include 1 or N camera modules 291, where N is a positive integer greater than 1, and if the electronic device 200 includes N cameras, one of the N cameras is a main camera, and the others may be sub cameras, such as a telephoto camera.
Internal memory 221 may be used to store computer-executable program code, including instructions. The internal memory 221 may include a program storage area and a data storage area. The external memory interface 222 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 200.
The electronic device 200 may implement an audio function through the audio module 270, the speaker 271, the receiver 272, the microphone 273, the headphone interface 274, the application processor, and the like. Such as music playing, recording, etc.
Audio module 270 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. Audio module 270 may also be used to encode and decode audio signals. In some embodiments, the audio module 270 may be disposed in the processor 210, or some functional modules of the audio module 270 may be disposed in the processor 210.
The speaker 271 is used for converting the audio electric signal into a sound signal. The electronic apparatus 200 can listen to music through the speaker 271 or listen to a handsfree phone call. The receiver 272, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic device 200 receives a call or voice information, it can receive the voice by placing the receiver 272 close to the ear of the person. The microphone 273, also known as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 273 by sounding a voice signal near the microphone 273 through the mouth. The electronic device 200 may be provided with at least one microphone 273. The earphone interface 274 is used to connect wired earphones.
For sensors included with the electronic device 200, a depth sensor is used to obtain depth information of the scene. The pressure sensor is used for sensing a pressure signal and converting the pressure signal into an electric signal. The gyro sensor may be used to determine the motion pose of the electronic device 200. The air pressure sensor is used for measuring air pressure. The magnetic sensor includes a hall sensor. The electronic device 200 may detect the opening and closing of the flip holster using a magnetic sensor. The acceleration sensor may detect the magnitude of acceleration of the electronic device 200 in various directions (typically three axes). The distance sensor is used for measuring distance. The proximity light sensor may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The fingerprint sensor is used for collecting fingerprints. The temperature sensor is used for detecting temperature. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through the display screen 290. The ambient light sensor is used for sensing the ambient light brightness. The bone conduction sensor may acquire a vibration signal.
The keys 294 include a power-on key, a volume key, and the like. The keys 294 may be mechanical keys. Or may be touch keys. The motor 293 may generate a vibration indication. The motor 293 may be used for both electrical vibration prompting and touch vibration feedback. Indicator 292 may be an indicator light that may be used to indicate a state of charge, a change in charge, or may be used to indicate a message, missed call, notification, etc. The SIM card interface 295 is used to connect a SIM card. The electronic device 200 interacts with the network through the SIM card to implement functions such as communication and data communication.
The present application also provides a computer-readable storage medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device.
A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable storage medium may transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The computer-readable storage medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method as described in the embodiments below.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
In the embodiment of the disclosure, a preview image processing method is first provided. A flow diagram of the preview image processing method is schematically shown in fig. 3. A preview image processing method in the embodiment of the present disclosure is explained in detail with reference to fig. 3.
In step S310, the zoom multiple of the telephoto camera is divided into a first zoom multiple and a second zoom multiple, and a preview range is obtained according to the preview image of the first zoom multiple and the preview image of the second zoom multiple.
In the embodiment of the disclosure, the terminal may be an intelligent terminal capable of acquiring images, and the terminal may include a main camera and one or more auxiliary cameras, where the number of the cameras is not particularly limited. It should be noted that the auxiliary camera may include a telephoto camera. In the embodiments of the present disclosure, an example is described in which the camera includes a main camera and a telephoto camera.
The camera of the terminal can be called to photograph the target object in response to the triggering operation of the photographing control. After the camera is opened, a preview interface can be displayed, and the preview interface can be a main preview interface. If a zoom operation is detected, a secondary preview window may be provided at a preset position of the main preview window in response to the zoom operation to display the main preview image through the secondary preview window. The zoom operation may be a sliding operation or a clicking operation on a zoom control, or may also be a sliding operation on a preview interface, or the like. The preset position may be any position of the main preview interface, such as an upper left corner, an upper right corner, and the like, and may be determined according to actual requirements.
A schematic diagram of a preview interface is schematically shown in fig. 4, and referring to the diagram shown in fig. 4, upon detection of a zoom operation, a secondary preview window 402 may be provided in the upper right corner of the main preview interface 401 of the terminal 400. After providing the secondary preview window, a primary preview image of the primary camera may be displayed in the secondary preview window, while a tele preview image of the tele camera is displayed in the primary preview window. Of course, the main preview image may be displayed in the main preview window, and the tele preview image may be displayed in the auxiliary preview window, which is not limited herein.
A telephoto camera refers to a lens having a long focal length and is generally used to photograph a subject having a long distance. The tele camera has a corresponding zoom factor. For example, when the focal length f is 40, the zoom factor of the telephoto camera may be considered to be 40 times, and so on. Since the zoom factor of the telephoto camera is large, the zoom factor of the telephoto camera may be divided into a first zoom factor and a second zoom factor for convenience of calculation. The first zooming multiple and the second zooming multiple are both smaller than the zooming multiple of the long-focus camera, and the product of the first zooming multiple and the second zooming multiple is equal to the zooming multiple of the long-focus camera. Specifically, the zoom multiple f can be divided into a first zoom multiple f/n and a second zoom multiple n, where n can be any number, for example, n is 2 or n is 3, and so on. For example, when the zoom factor is 40 times, if n is 2, the zoom factor of 40 times can be split into a first zoom factor of 20 times and a second zoom factor of 2 times. Note that the zoom modes of the first zoom factor and the second zoom factor may be different. The zoom mode of the first zoom multiple may be the same as the zoom mode of the telephoto camera itself, for example, optical zoom may be used; the second zoom factor is different from the zoom mode of the telephoto camera itself, and the zoom mode of the second zoom factor may be digital zoom. The optical zooming refers to zooming by means of an optical lens structure, namely zooming and zooming of a scene to be shot are achieved through lens movement, and the larger the optical zooming multiple is, the farther the scene can be shot is. The digital zooming refers to judging the color around the existing pixel by using software and inserting the pixel added by a special algorithm according to the color situation of the periphery.
It is to be added that when zooming is performed by the first zoom factor and the second zoom factor, the zoom sequence is fixed, that is, optical zooming is performed by the first zoom factor, and then digital zooming is performed by the second zoom factor to obtain a zoom preview image, so as to achieve a zoom effect that is the same as the zoom factor of the telephoto camera.
On the basis of the zoom magnification, a preview image of the first zoom magnification and a preview image of the second zoom magnification can be acquired. The preview image with the first zoom multiple refers to f/n times of telephoto camera preview cache, and the preview image with the second zoom multiple refers to an n times of enlarged preview image. Further, a preview range can be obtained according to the preview image with the first zoom multiple and the preview image with the second zoom multiple. Specifically, the preview image at the first zoom multiple may be digitally zoomed at the second zoom multiple to obtain the preview range. Performing a digital zoom of the second zoom factor may be understood as: and performing interpolation operation of a second zoom multiple on the preview image of the first zoom multiple in the first direction and the second direction. The first direction may be a horizontal direction, and the second direction may be a vertical direction. Based on this, if f is 4 and n is 2 in the first zoom factor f/n, the optical zoom factor f/n is 2 and the f-fold optical zoom factor is 4, the size of the preview image taken by both is the same, and the field angle of the image at the first zoom factor f/n is 2 times that of the image at the zoom factor f. If the image of the first zoom factor f/n is zoomed in 2 times, it means that interpolation is performed in 2 times in both the x direction and the y direction, the size of the obtained image is 4 times of the image of the zoom factor f, and the angle of view is equal to the image of the zoom factor f. By dividing the zoom multiple into the first zoom multiple and the second zoom multiple, the preview range can be increased on the basis of the original preview range, and the preview range of n × n times can be obtained specifically. For example, when n is 2, a preview range of 2 × 2, i.e., 4 times, may be obtained. Therefore, by dividing one zoom factor into a plurality of sub zoom factors and performing combined zooming between the plurality of sub zoom factors, the preview range corresponding to the zoom factor can be expanded to n × n times of the zoom factor.
In the embodiment of the disclosure, the preview range can be enlarged by splitting and dividing the zoom multiples and combining the divided zoom multiples in a fixed sequence.
In step S320, a reference preview image is determined in the preview range, a movable range of the reference preview image is determined according to the preview range, and a telephoto preview image of the telephoto camera is displayed in a main preview window.
In the embodiment of the present disclosure, the reference preview image refers to a partial image for presentation to the user in the preview range. For convenience of processing, a reference preview image may be determined from the preview range by a cropping operation. Specifically, the cropping operation may be performed at a center point of the preview range by a preset multiple to obtain the reference preview image. The preset multiple may be set according to actual requirements, for example, the preset multiple may be 1 time or 2 times, and the preset multiple is described as 1 time in the embodiment of the present disclosure. In other words, within the preview range of n × n, a 1-fold cropping operation is performed with the center point of the preview range as the center point, and a 1-fold preview image is obtained as a reference preview image so as to be presented to the user through the reference preview image. The reference preview image may be understood as an unexpanded preview range.
After determining the reference preview image, a movable range of the reference preview image may be determined within the preview range. Because the reference preview image is not fixed and can move according to the user operation, each part in the preview range can be processed, and the comprehensiveness and the integrity are improved.
The movable range refers to a range in which the reference preview image determined by the clipping operation can move, and the movable range may be determined according to the size of the preview range. Specifically, the movable range may be the same as the preview range. For example, if the preview range is n × n times, the movable range is n × n times.
In the embodiment of the present disclosure, although the zoom magnification is divided into the first zoom magnification and the second zoom magnification, the preview image of the first zoom magnification and the preview image of the second zoom magnification are equivalent to the telephoto preview image of the zoom magnification of the telephoto camera. And the tele preview image can be displayed in a main preview window of the terminal, so that the tele preview image of the tele camera can be clearly and completely displayed, and image processing is facilitated.
Next, in step S330, a main preview image of the main camera is acquired, a tele preview range and a position of the movable range corresponding to the tele camera are determined in the main preview image, and displayed in the auxiliary preview window.
In the disclosed embodiment, the primary preview image may be displayed within the secondary preview window. Meanwhile, the tele preview range and the movable range may be determined in the main preview image displayed in the auxiliary preview window. For ease of recognition, the tele preview range and the movable range may be displayed in an identifying manner, e.g., the movable range may be represented by a first identifier and the tele preview range may be represented by a second identifier. The display form of the first mark and the second mark can be different. The display form may be one or more of a logo shape, a logo color, and a logo thickness. In the embodiment of the present disclosure, the first identifier and the second identifier are illustrated as rectangular frames.
A flowchart for determining the tele preview range and the movable range is schematically shown in fig. 5, and with reference to fig. 5, mainly includes the following steps:
in step S510, determining a position of a preview image of a first zoom multiple with a center of the main preview image as a center point in the main preview image to determine a position of the movable range;
in step S520, the position of the tele preview image of the tele camera is determined within the movable range with the center of the main preview image as a center point, so as to determine the position of the tele preview range.
In the embodiment of the present disclosure, for the main preview image displayed in the auxiliary preview window, the position of the preview range may be determined with the center of the main preview image as a central point. Specifically, the position corresponding to the preview image of the first zoom multiple, that is, the position corresponding to the preview cache of the f/n-times telephoto camera, may be determined in the bitmap of the main preview image of the main camera. A bitmap refers to an image represented using an array of pixels.
A schematic diagram for determining the tele preview range and the movable range is schematically shown in fig. 6, and referring to fig. 6, a secondary preview window 602 may be provided in the upper right corner of a main preview interface 601 of a terminal 600. On the basis of the main preview image 603 displayed in the auxiliary preview window 602, the center (i.e., the position center a) of the main preview image 603 is taken as a center point, and a position corresponding to the preview image with the first zoom multiple is determined, which may specifically be represented by a first identifier, for example, a movable range 604 for a telephoto camera preview.
After the movable range is determined, the position of the tele preview image of the tele camera may be determined within the limit condition of the movable range in the main preview image of the main camera, and the position of the tele preview image may be determined as the position of the tele preview range. Specifically, the position corresponding to the zoom multiple telephoto preview image, that is, the position corresponding to the f-times telephoto-camera preview cache, may be determined in the bitmap of the main preview image of the main camera. Referring to fig. 6, the center (i.e., the position center a) of the main preview image 603 may be used as a central point, and a position corresponding to the telephoto preview image with the zoom multiple f may be determined, and may be specifically represented by a second identifier, for example, a telephoto preview range 605 of the telephoto camera. The tele preview range refers to the preview range that ultimately needs to be presented to the user. The first mark and the second mark may be bar frames, but display parameters of the first mark and the second mark are different, and the display parameters may be, for example, thicknesses of the bar frames or other parameters.
Based on the technical solution in fig. 6, the movable range represented by the first indicator is equal to n × n times the tele preview range represented by the second indicator, and the tele preview range 605 effectively moves within the movable range 604 but cannot move outside the movable range. In the embodiment of the present disclosure, the moving range and the moving area of the telephoto preview range can be determined by dividing the zoom multiple, and the position of the moving range and the moving area can be displayed in the main preview image, so that the preview range of the telephoto camera is adjusted in combination with the entire main preview image.
In step S340, if a touch operation acting on the tele preview range of the movable range in the auxiliary preview window is detected, the tele preview image is adjusted according to the touch operation.
In the embodiment of the present disclosure, the touch operation may be an operation of the user on the tele preview range, specifically, the operation may be a drag operation, a slide operation, or a press operation, and the slide operation is taken as an example to be described herein. Specifically, after determining the tele preview range and the movable range, it may be detected whether a click operation on the movable range in the auxiliary preview window is received, and if a click operation on the movable range is detected, it is further determined whether a slide operation on the tele preview range is received. And then the tele preview image of the tele camera can be determined according to whether the sliding operation is received.
A flow chart for determining a tele preview image is schematically illustrated in fig. 7, and with reference to the illustration in fig. 7, mainly comprises the following steps:
in step S710, it is determined whether a touch operation applied to the tele preview range is received. If yes, go to step S720; if not, go to step S730.
In step S720, the position of the tele preview range is adjusted according to the position of the touch point of the touch operation, and the tele preview image is adjusted according to the position of the tele preview range.
In step S730, the position of the tele preview range is kept unchanged.
In the embodiment of the present disclosure, if a sliding operation acting on the tele preview range is detected, the position of the touch point of the sliding operation may be acquired, and the position of the tele preview range may be adjusted according to a change in the position of the touch point when the position of the touch point is within the movable range. For example, if the position of the touch point is point B and the position of the touch point is within the movable range, the tele preview range is adjusted from the initial preview range to the tele preview range corresponding to the position B. Since the tele preview range is changed and adjusted, the tele preview image corresponding to the tele camera is also changed, i.e., the tele preview image displayed in the main preview window is adjusted. And if the touch operation is not received, keeping the position of the tele preview range unchanged, and keeping a tele preview image of the tele camera displayed in the main preview window unchanged.
In the technical scheme in fig. 7, the movable range and the tele preview range are displayed in the auxiliary preview window, and the tele preview range is controlled to move in the movable range according to the touch operation applied to the tele preview range, so that the tele view frame can be changed by user operations such as clicking and sliding in the auxiliary preview window, thereby increasing the field angle of the tele camera and further realizing the function of changing the tele preview image in a small range.
After the tele preview image is adjusted, a camera of the terminal can be called to acquire the image of the target object in response to the photographing operation of the user. The photographing operation refers to an operation of turning on a camera of the terminal or photographing a camera application and calling a camera of the terminal to photograph the target object. The photographing operation may be various types of triggering operations, for example, one or a combination of multiple types of triggering operations, such as clicking a photographing control, clicking a photographing button, photographing in voice, photographing in expression, and photographing in body action manner, where the triggering operation is not particularly limited, as long as the terminal can be triggered to photograph.
A detailed flowchart for adjusting the tele preview image is schematically shown in fig. 8, and referring to fig. 8, mainly comprises the following steps:
in step S801, a main-camera preview image is acquired.
In step S802, a preview image of a first zoom factor telephoto camera is acquired.
In step S803, a preview image enlarged by the second zoom factor is acquired.
In step S804, a preview range of n × n times is obtained from the preview image of the first zoom multiple and the preview image of the second zoom multiple.
In step S805, a preset multiple is clipped at the center of the preview range.
In step S806, a preset multiple of the reference preview image and n × n times of the movable range are obtained.
In step S807, display is performed in the main preview window.
In step S808, the position of the tele preview image of the tele camera is indicated by the second mark in the main preview image of the main camera, that is, the second mark represents the tele preview range.
In step S809, the position of the preview image of the telephoto camera of the first zoom multiple is represented by a first mark in the main preview image of the main camera, that is, the first mark represents the movable range.
In step S810, the main preview image is displayed in the auxiliary preview window.
In step S811, it is determined whether or not the tele preview range is clicked and moved within the movable range of the auxiliary preview window. If yes, go to step S812; if not, the process is ended.
In step S812, the tele preview image in the main preview window changes with the movement of the tele preview range.
According to the technical scheme, under the condition that the camera is static, the tele view frame is changed by clicking and moving the second identifier for identifying the tele preview range in the small range of the auxiliary preview window, and then the tele preview image is adjusted. The method increases the field angle of the telephoto camera by adopting a digital zooming mode, so that a user can change the telephoto preview image by clicking and moving in a small range in the auxiliary preview window, and the method is suitable for a scene in which a distant target object is tracked in a small range under the condition that a camera is static. The condition that the tele preview image is fixed and unchanged is avoided, the limitation of hardware is also avoided, the tele preview range and the tele preview image can be conveniently adjusted, the adjustment efficiency is improved, the tele preview range and the tele preview image can be accurately adjusted according to the position of touch operation, the flexibility and the comprehensiveness of the tele preview image are improved, and the accuracy is also improved.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Fig. 9 schematically shows a block diagram of a preview image processing apparatus of an exemplary embodiment of the present disclosure. Referring to fig. 9, a preview image processing apparatus 900 according to an exemplary embodiment of the present disclosure may include the following modules:
a preview range obtaining module 901, configured to divide a zoom multiple of the telephoto camera into a first zoom multiple and a second zoom multiple, and obtain a preview range according to a preview image of the first zoom multiple and a preview image of the second zoom multiple;
a movable range determining module 902, configured to determine a reference preview image in the preview range, determine a movable range of the reference preview image according to the preview range, and display a tele preview image of the tele camera in a main preview window;
a position determining module 903, configured to obtain a main preview image of a main camera, determine a telephoto preview range and a position of the movable range corresponding to the telephoto camera in the main preview image, and display the telephoto preview range and the position of the movable range on an auxiliary preview window;
a preview image adjusting module 904, configured to, if a touch operation is detected that is applied to the auxiliary preview window and is located in the tele preview range of the movable range, adjust the tele preview image according to the touch operation.
In an exemplary embodiment of the present disclosure, the obtaining a preview range according to the preview image of the first zoom multiple and the preview image of the second zoom multiple includes:
and performing digital zooming operation of the second zooming multiple on the preview image of the first zooming multiple to obtain the preview range.
In an exemplary embodiment of the present disclosure, a product of the first zoom factor and the second zoom factor is equal to the zoom factor of the telephoto camera.
In an exemplary embodiment of the present disclosure, the determining a reference preview image in the preview range includes:
and performing cutting operation on the center point of the preview range according to a preset multiple to obtain the reference preview image.
In an exemplary embodiment of the present disclosure, determining a tele preview range and the movable range corresponding to a tele camera in the main preview image includes:
determining the position of a preview image of a first zoom multiple by taking the center of the main preview image as a central point in the main preview image so as to determine the position of the movable range;
and determining the position of the tele preview image of the tele camera in the movable range by taking the center of the main preview image as a central point so as to determine the position of the tele preview range.
In an exemplary embodiment of the present disclosure, adjusting the tele preview image according to the touch operation includes:
and adjusting the position of the tele preview range according to the position of the touch point of the touch operation, and adjusting the tele preview image according to the position of the tele preview range.
In an exemplary embodiment of the present disclosure, the method further comprises:
providing the secondary preview window at a preset position of the primary preview window in response to a zoom operation to display the primary preview image through the secondary preview window.
It should be noted that, since the functional modules of the preview image processing apparatus according to the embodiment of the present disclosure are the same as those in the embodiment of the preview image processing method, they are not described again here.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Furthermore, the above-described figures are merely schematic illustrations of processes included in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (8)

1. A preview image processing method, comprising:
dividing the zoom multiple of the telephoto camera into a first zoom multiple and a second zoom multiple, and performing digital zoom of the second zoom multiple on a preview image of the first zoom multiple of the telephoto camera to obtain a preview range; wherein the first zoom factor is an optical zoom, and a product of the first zoom factor and the second zoom factor is equal to the zoom factor of the telephoto camera;
determining a reference preview image in the preview range, determining the preview range as a movable range of the reference preview image, and displaying a tele preview image of the tele camera in a main preview window; wherein the tele preview image is the reference preview image;
acquiring a main preview image of a main camera, determining the position of a tele preview range and the position of the movable range corresponding to the tele camera in the main preview image, and displaying the position of the tele preview range and the position of the movable range in an auxiliary preview window;
and if the touch operation in the tele preview range in the movable range is detected, adjusting the tele preview image according to the touch operation.
2. The preview image processing method of claim 1, wherein the determining a reference preview image in the preview range comprises:
and performing cutting operation on the center point of the preview range according to a preset multiple to obtain the reference preview image.
3. The preview image processing method according to claim 1, wherein the determining the position of the tele preview range and the movable range corresponding to the tele camera in the main preview image includes:
determining the position of a preview image of a first zoom multiple by taking the center of the main preview image as a central point in the main preview image so as to determine the position of the movable range;
and in the movable range, determining the position of the tele preview image of the tele camera by taking the center of the main preview image as a central point so as to determine the position of the tele preview range.
4. The preview image processing method of claim 1, wherein adjusting the tele preview image according to the touch operation comprises:
and adjusting the position of the tele preview range according to the position of the touch point of the touch operation, and adjusting the tele preview image according to the position of the tele preview range.
5. The preview image processing method of claim 1, wherein the method further comprises:
providing the secondary preview window at a preset position of the primary preview window in response to a zoom operation to display the primary preview image through the secondary preview window.
6. A preview image processing apparatus characterized by comprising:
the preview range acquisition module is used for dividing the zoom multiple of the telephoto camera into a first zoom multiple and a second zoom multiple, and performing digital zoom of the second zoom multiple on a preview image of the first zoom multiple of the telephoto camera to acquire a preview range; wherein the first zoom factor is an optical zoom, and a product of the first zoom factor and the second zoom factor is equal to the zoom factor of the telephoto camera;
the movable range determining module is used for determining a reference preview image in the preview range, determining the preview range as the movable range of the reference preview image, and displaying a tele preview image of the tele camera in a main preview window; wherein the tele preview image is the reference preview image;
the position determining module is used for acquiring a main preview image of a main camera, determining the position of a tele preview range and the position of the movable range corresponding to the tele camera in the main preview image, and displaying the position of the tele preview range and the position of the movable range on an auxiliary preview window;
and the preview image adjusting module is used for adjusting the tele preview image according to the touch operation if the touch operation in the tele preview range of the movable range is detected to act on the auxiliary preview window.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the preview image processing method according to any one of claims 1 to 5.
8. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the preview image processing method of any of claims 1-5 via execution of the executable instructions.
CN202011171774.2A 2020-10-28 2020-10-28 Preview image processing method and device, storage medium and electronic equipment Active CN112291472B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011171774.2A CN112291472B (en) 2020-10-28 2020-10-28 Preview image processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011171774.2A CN112291472B (en) 2020-10-28 2020-10-28 Preview image processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112291472A CN112291472A (en) 2021-01-29
CN112291472B true CN112291472B (en) 2021-09-28

Family

ID=74373578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011171774.2A Active CN112291472B (en) 2020-10-28 2020-10-28 Preview image processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112291472B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107277359A (en) * 2017-07-13 2017-10-20 深圳市魔眼科技有限公司 Method, device, mobile terminal and the storage medium of adaptive zoom in 3D scannings
CN111212235A (en) * 2020-01-23 2020-05-29 华为技术有限公司 Long-focus shooting method and electronic equipment
CN111669493A (en) * 2018-03-26 2020-09-15 华为技术有限公司 Shooting method, device and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006050019A (en) * 2004-07-30 2006-02-16 Canon Inc Controller of photographing system
EP3291533A1 (en) * 2016-09-06 2018-03-07 LG Electronics Inc. Terminal and controlling method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107277359A (en) * 2017-07-13 2017-10-20 深圳市魔眼科技有限公司 Method, device, mobile terminal and the storage medium of adaptive zoom in 3D scannings
CN111669493A (en) * 2018-03-26 2020-09-15 华为技术有限公司 Shooting method, device and equipment
CN111212235A (en) * 2020-01-23 2020-05-29 华为技术有限公司 Long-focus shooting method and electronic equipment

Also Published As

Publication number Publication date
CN112291472A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
CN111885305B (en) Preview picture processing method and device, storage medium and electronic equipment
CN110502954B (en) Video analysis method and device
US11368632B2 (en) Method and apparatus for processing video, and storage medium
CN111917980B (en) Photographing control method and device, storage medium and electronic equipment
CN108616776B (en) Live broadcast analysis data acquisition method and device
CN111161176B (en) Image processing method and device, storage medium and electronic equipment
CN111815666B (en) Image processing method and device, computer readable storage medium and electronic equipment
CN111641829B (en) Video processing method, device and system, storage medium and electronic equipment
CN111741303B (en) Deep video processing method and device, storage medium and electronic equipment
CN112165575B (en) Image blurring processing method and device, storage medium and electronic equipment
CN112954251A (en) Video processing method, video processing device, storage medium and electronic equipment
CN114009003A (en) Image acquisition method, device, equipment and storage medium
CN111835973A (en) Shooting method, shooting device, storage medium and mobile terminal
CN110807769B (en) Image display control method and device
CN114020387A (en) Terminal screen capturing method and device, storage medium and electronic equipment
CN114531539B (en) Shooting method and electronic equipment
CN113573120A (en) Audio processing method and electronic equipment
US11265529B2 (en) Method and apparatus for controlling image display
CN112291472B (en) Preview image processing method and device, storage medium and electronic equipment
CN114430457B (en) Shooting method, shooting device, electronic equipment and storage medium
CN113709353B (en) Image acquisition method and device
EP3916683A1 (en) Method and apparatus for displaying an image, electronic device and computer-readable storage medium
CN114302063B (en) Shooting method and equipment
CN111127539B (en) Parallax determination method and device, computer equipment and storage medium
CN111757005A (en) Shooting control method and device, computer readable medium and electronic equipment

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