Zoom method, zoom device and storage medium
By directly performing zoom processing and smooth transition technology on the unprocessed first frame image in the image acquisition device, the delay problem in the digital zoom process is solved and the user experience and zoom fluency are improved.
Patent Information
- Application Number
- CN202310390667.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2024-10-18
AI Technical Summary
In existing digital zoom technology, after the user issues a zoom command, there is a delay between the initial image data generated by the optical sensor and the data processed by the zoom processing module, which causes the zoom process to be prolonged and affects the user experience.
The zoom request is sent to the core processor through the hardware abstraction layer of the image acquisition device, and the first frame of the image that has not been zoomed is directly zoomed, eliminating the delay between the user's instruction and the zoom processing module starting processing, and smoothing the transition. Realize frame-by-frame adjustment of zoom magnification.
It shortens the delay in obtaining the zoom image after the user issues a zoom command, improves the user experience, and optimizes the smoothness of the zoom process through inter-process communication and smooth transition technology.
Smart Images

Figure CN118803416A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of photographing, and in particular to a zoom method, a zoom device and a storage medium. Background Art
[0002] The zoom processing solutions for camera devices mainly include digital zoom and optical zoom. Optical zoom is a zoom solution for cameras that is implemented through hardware. It relies on the optical lens structure and the movement of the lens inside the lens to achieve zoom. Digital zoom is a pseudo-zoom solution that is implemented through algorithms. It relies on the camera device processor to perform zoom processing to achieve digital zoom.
[0003] In the related art, when performing digital zoom, the user issues a zoom command through the camera application. After the camera receives the command, it generates initial image data through the optical sensor, and then processes the initial image data through the zoom processing module to generate the zoomed image. There is a certain delay between the software issuing the command and the initial image data at the beginning of the zoom processing module, that is, the time for the initial image data to be generated by the optical sensor, and the zoom processing module also needs a certain interval time to process the initial image data. As a result, the delay from the user issuing the command to the generation of the zoom image is relatively high, affecting the user experience. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a zoom method, a zoom device and a storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a zoom method, which is applied to an image acquisition device, and the method comprises: in response to an image zoom application of the image acquisition device being triggered to perform zooming based on a zoom instruction, controlling the image zoom application to send a zoom request to a core processor of the image acquisition device through a hardware abstraction layer of the image acquisition device; determining a first frame image that has not been zoomed when the core processor receives the zoom request; starting zooming at a time corresponding to the first frame image that has not been zoomed, and performing zoom processing to obtain a zoomed image.
[0006] In one embodiment, controlling the image zoom application to send a zoom request to the core processor of the image acquisition device through the hardware abstraction layer of the image acquisition device includes: controlling the image zoom application to initiate inter-process communication to the hardware abstraction layer, using the hardware abstraction layer as a client to call the zoom service created in advance by the core processor in the hardware abstraction layer; calling the thread of the core processor of the image acquisition device through the zoom service to send the zoom request to the core processor of the image acquisition device.
[0007] In one embodiment, the zoom service provides a function of modifying the zoom ratio, and the zoom request includes the zoom ratio after zooming; the zoom is started at a corresponding moment of the first frame image that has not been zoomed, and the zoom processing is performed to obtain the zoomed image, including: determining the current zoom ratio of the first frame image that has not been zoomed; based on the current zoom ratio and the zoom ratio after zooming, smoothly transitioning from the current zoom ratio to the zoom ratio after zooming.
[0008] In one embodiment, the method of smoothly transitioning from the current zoom ratio to the zoom ratio after zooming based on the current zoom ratio and the zoom ratio after zooming includes: determining the number of smoothing frames based on the current zoom ratio and the zoom ratio after zooming; and smoothly transitioning from the current zoom ratio to the zoom ratio after zooming based on the zoom ratio and the number of smoothing frames using the first frame image that has not been zoomed.
[0009] In one implementation, the image zoom application of the image acquisition device is a camera application.
[0010] According to a second aspect of an embodiment of the present disclosure, there is provided a zoom device, which is applied to an image acquisition device, and the device comprises: a control unit, for controlling an image zoom application of the image acquisition device to send a zoom request to a core processor of the image acquisition device through a hardware abstraction layer of the image acquisition device in response to an image zoom application of the image acquisition device being triggered to perform zooming based on a zoom instruction; a determination unit, for determining a first frame image that has not been zoomed when the core processor receives the zoom request; and a processing unit, for starting zooming at a time corresponding to the first frame image that has not been zoomed, and performing zoom processing to obtain a zoomed image.
[0011] In one embodiment, the control unit controls the image zoom application to send a zoom request to the core processor of the image acquisition device through the hardware abstraction layer of the image acquisition device in the following manner: controls the image zoom application to initiate inter-process communication to the hardware abstraction layer, and uses the hardware abstraction layer as a client to call the zoom service created in advance by the core processor in the hardware abstraction layer; calls the thread of the core processor of the image acquisition device through the zoom service to send the zoom request to the core processor of the image acquisition device.
[0012] In one embodiment, the zoom service provides a function of modifying the zoom ratio, and the zoom request includes the zoom ratio after zooming; the processing unit starts zooming at a corresponding moment of the first frame image that has not been zoomed, and performs zoom processing to obtain the zoomed image in the following manner: determining the current zoom ratio of the first frame image that has not been zoomed; based on the current zoom ratio and the zoom ratio after zooming, smoothly transitioning from the current zoom ratio to the zoom ratio after zooming.
[0013] In one embodiment, the processing unit smoothly transitions from the current zoom ratio to the zoom ratio after zooming based on the current zoom ratio and the zoom ratio after zooming in the following manner: determining the number of smoothing frames based on the current zoom ratio and the zoom ratio after zooming; and using the first frame image that has not been zoomed, smoothly transitioning the current zoom ratio to the zoom ratio after zooming according to the zoom ratio and the number of smoothing frames.
[0014] In one implementation, the image zoom application of the image acquisition device is a camera application.
[0015] According to a third aspect of an embodiment of the present disclosure, a zoom device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to: execute the zoom method described in any one of the first aspects.
[0016] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the zoom method described in any one of the first aspects.
[0017] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the image zoom application of the image acquisition device is triggered to perform zooming based on the zoom instruction. The hardware abstraction layer of the image acquisition device sends a zoom request to the core processor, and the first frame image that has not been zoomed is zoomed to obtain a zoomed image. Through the present disclosure, the first frame image that has not been zoomed when the zoom instruction is issued is zoomed, which can shorten the delay in obtaining the zoomed image after the user issues the zoom instruction, thereby improving the user experience.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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 present disclosure.
[0020] Figure 1 It is a block diagram showing a zoom method according to an exemplary embodiment of the present disclosure.
[0021] Figure 2 is a schematic diagram showing a zooming method according to an exemplary embodiment of the present disclosure.
[0022] Figure 3 The figure is a flow chart of a zooming method according to an exemplary embodiment.
[0023] Figure 4 It is a block diagram showing a zoom method according to an exemplary embodiment of the present disclosure.
[0024] Figure 5 is a schematic diagram showing a zooming method according to an exemplary embodiment of the present disclosure.
[0025] Figure 6 The figure is a flowchart of a method for sending a zoom request according to an exemplary embodiment.
[0026] Figure 7 The invention is a block diagram showing a method for calling a zoom service according to an exemplary embodiment of the present disclosure.
[0027] Figure 8 It is a block diagram showing a method for registering a zoom service according to an exemplary embodiment of the present disclosure.
[0028] Fig. 9 The figure is a flowchart of a method for performing zoom processing according to an exemplary embodiment.
[0029] Fig.10 The invention is a flowchart showing a method for transitioning to a zoom magnification after zooming according to an exemplary embodiment.
[0030] Fig.11 The invention is a block diagram of a zoom device according to an exemplary embodiment.
[0031] Fig.12 The invention is a block diagram of a zoom device according to an exemplary embodiment. DETAILED DESCRIPTION
[0032] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0033] The zoom method provided in the embodiments of the present disclosure is applied to determine a scenario in which a terminal, a monitoring device, or other device using a camera zooms a captured image.
[0034] The zoom processing methods of camera devices mainly include digital zoom and optical zoom. Optical zoom is a zoom solution for cameras implemented through hardware. It relies on the optical lens structure and the movement of the lens inside the lens to change the focal length of the camera, change the relative positions of the lens, object and focus, and realize the zooming in and out of the image based on the principles of physics. Digital zoom is a solution that implements pseudo-zoom through algorithms. It relies on the camera device processor to perform zoom processing to achieve digital zoom. After the camera device captures the initial image, the zoom processing module in the processor captures a part of the image from the initial image, expands the area of each pixel in the image, and displays the captured image on the preview screen of the camera device. Among them, optical zoom is mainly used for cameras with complex optical lens structures that support lens movement inside the lens, such as the main camera of the terminal device; digital zoom is mainly used for cameras with simple optical lens structures that do not support lens movement inside the lens, such as the front camera of the terminal. The two zoom methods can also be mixed.
[0035] In the related art, when performing digital zoom, after the user issues a zoom command in the camera application, the image collected when the zoom command is issued needs to be processed by the optical sensor (SENSOR), and the optical signal is converted into a digital signal to generate an initial image before the image processing module (Image Signal Processor, ISP) can perform zoom processing on the generated initial image. That is, after the user issues the command, the image light signal collected at the time of issuing the command needs to be processed by the optical sensor to generate the initial image before the image processing module can perform zoom processing on the initial image, resulting in a long delay from the user issuing the zoom command to the camera device displaying the zoomed picture. In addition, the process of the optical sensor generating the initial image is affected by the external environment. In the case of insufficient light, the time it takes for the optical sensor to generate the initial image is prolonged, resulting in a further delay in the camera device responding to the zoom command to complete the zoom.
[0036] Figure 1 and Figure 2 1 is a block diagram and a schematic diagram showing a zoom method according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the user issues a zoom command to zoom the image to 1.2 times through the camera application at the 104th frame, and obtains the zoomed image through the camera application. Figure 2As shown, the color blocks of different grayscales corresponding to the photo application part represent image frames in different stages, where the 104th, 105th and 106th frames with lighter grayscales are image frames to be collected and image frames not processed by the optical sensor; the 100th to 103rd frames with darker grayscales are image frames that have been processed by the optical sensor but not yet processed by the zoom processing module, i.e. delayed frames. The color blocks of different grayscales in the zoom processing module represent image frames with different zoom magnifications, where the grayscales from light to dark represent zoom magnifications of 1.2, 1.12, 1.06 and 1.0 respectively. The specific steps of the above zoom process are as follows: the user issues a zoom command through the camera application at the 104th frame, requesting to zoom the image with a zoom ratio of 1.2; the camera application requests the optical sensor to obtain the 104th frame image, and the camera device collects the light signal of the 104th frame image and transmits it to the optical sensor for conversion from the light signal to the electrical signal. At this time, due to the delay in the optical sensor processing the light signal, the optical sensor has just completed the processing of the light signal of the 100th frame image. Therefore, the photoelectric sensor needs to process the light signal of the 101st frame, the 102nd frame and the 103rd frame after a delay of 3 frames before processing the light signal of the 104th frame image to generate the initial Image; The optical sensor transmits the generated 104th frame of image to the zoom processing module for image processing. The optical sensor determines two intermediate zoom ratios of 1.12 and 1.06 based on the 1.2x target zoom ratio. According to the target zoom ratio and the intermediate zoom ratio, the initial image is optically zoomed. After 3 frames of frame-by-frame zoom processing, the image display ratio is smoothly zoomed to 1.2x to complete the image zoom. A total of 7 frames of delay are experienced from the user issuing the zoom command to the completion of the zoom. The process of zooming the image takes 3 frames of time, and the optical signal of the image collected when the user issues the command needs to start the zoom processing process after 4 frames of delay. In summary, when zooming an image in the related art, the optical sensor needs to process the image light signal to generate the initial image between the user issuing the zoom command through the camera application and obtaining the current image light signal and the zoom processing module performing zoom processing on the corresponding initial image. This results in a long delay from the user issuing the zoom command to the camera device displaying the zoomed picture, which affects the user experience.
[0037] In view of this, the present disclosure proposes a zoom method, which, when a user issues a zoom command, notifies the zoom processing module to perform zoom processing on the image that has been generated by the photoelectric sensor at the same moment but has not yet been processed by the zoom processing module, thereby shortening the delay from the user issuing the zoom command to the camera displaying the zoomed image.
[0038] Figure 3 FIG. 1 is a flow chart of a zoom method according to an exemplary embodiment. Figure 3 As shown, the method includes steps S101 to S103.
[0039] In step S101 , in response to an image zoom application of an image acquisition device being triggered to perform zooming based on a zoom instruction, the image zoom application is controlled to send a zoom request to a core processor of the image acquisition device through a hardware abstraction layer of the image acquisition device.
[0040] In step S102, the first frame of the image that has not been zoomed when the core processor receives the zoom request is determined.
[0041] In the disclosed embodiment, the core processor includes a zoom processing module for image zoom processing, namely, ISP: CropModule, which can be directly translated as an image cropping processing module. Since the digital zoom of an image is essentially to crop a portion of the image from the initial image and perform pixel enlargement processing to generate a preview image, the ISP: CropModule is identified as a zoom processing module.
[0042] In the embodiment of the present disclosure, the basic process of the image acquisition device obtaining the preview image after zooming is that the camera acquires the light signal of the image, the optical sensor performs photoelectric conversion processing on the acquired light signal to generate an initial image, and the zoom processing module performs zoom processing on the initial image to generate a preview image. Since the present disclosure mainly involves image zoom processing, other image processing processes such as noise reduction and white balance are ignored. The first frame of the image that has not been zoomed in the present disclosure is an image frame that has been processed by the optical sensor but has not been processed by the zoom processing module at the same time when the user issues a zoom command.
[0043] In an exemplary embodiment of the present disclosure, Figure 4 and Figure 5 As shown in the flowchart and schematic diagram of the zoom method in , the user issues a zoom instruction to zoom the image to 1.2 times through the zoom application at the 104th frame, and obtains a preview image of the zoom completion through the zoom application. Figure 4 The color blocks of different grayscales corresponding to the optical sensor part represent image frames in different stages, among which the 104th image frame with a lighter grayscale is the image frame to be collected at the same time when the zoom command is issued, and is not processed by the optical sensor; the 100th to 103rd image frames with a darker grayscale are image frames that have been processed by the optical sensor but have not been processed by the zoom processing module, that is, delayed frames. Figure 5 The color blocks of different grayscales corresponding to the photo application part represent image frames in different stages, among which the 104th, 105th and 106th frames with lighter grayscales are image frames to be collected and have not been processed by the optical sensor; the 100th to 103rd frames with darker grayscales are image frames that have been processed by the optical sensor but have not been processed by the zoom processing module, that is, delayed frames. Figure 5The process corresponding to the application part includes the processing process of the image optical sensor. In combination with the above embodiment, the user issues a zoom command at the 104th frame, and at the same time, the image frame that has been processed by the optical sensor but not processed by the zoom processing module is the 100th frame image, and the 100th frame image is the first frame image that has not been zoomed.
[0044] In step S103, zooming is started at a corresponding moment of the first frame image that has not been zoomed, and zooming is performed to obtain a zoomed image.
[0045] In the disclosed embodiment, the image frames that have been processed by the optical sensor but not processed by the zoom processing module at the same moment when the zoom command is issued are processed, thereby eliminating the delay from the time when the user issues the zoom command to the time when the zoom processing module starts the zoom processing, so that the zoom delay only includes the delay of the zoom processing module performing the zoom processing, shortening the delay from the time when the user issues the zoom command to the time when the image acquisition device displays the zoomed picture.
[0046] In the disclosed embodiment, based on the conventional image zoom processing process, after the user issues a zoom command, the process of the optical sensor processing the collected image light signal to generate the initial image is inevitable. Therefore, it is necessary to send a zoom request through inter-process communication so that the zoom processing module directly starts zoom processing for the first frame image that has not been zoomed.
[0047] The following embodiments of the present disclosure illustrate the method for sending a zoom request of the present disclosure.
[0048] Figure 6 FIG. 1 is a flow chart showing a method for sending a zoom request according to an exemplary embodiment. Figure 6 As shown, the method includes step S201 to step S202.
[0049] In step S201, the image zoom application is controlled to initiate inter-process communication to the hardware abstraction layer, and the hardware abstraction layer is used as a client to call the zoom service pre-created in the hardware abstraction layer by the kernel processor.
[0050] In the present disclosure, Figure 7 As shown in the block diagram of calling the zoom service, the hardware abstraction layer (HAL) is the client of the image zoom processing, and the core processor includes a zoom processing module, which is the server of the image zoom processing. The hardware abstraction layer includes a service list (ServiceTable), which includes services for zoom processing, and the zoom processing module in the core processor can perform zoom processing. After the user issues a zoom instruction through the zoom application, the zoom application initiates communication to the hardware abstraction layer as the client through Binder, and finds the zoom service in the service list of the hardware abstraction layer.
[0051] In the present disclosure, Figure 8 As shown in the block diagram of the method for registering a zoom service, the zoom service is a service that is pre-registered by the core processor of the server into the service list of the hardware abstraction layer, and the zoom service is a service for modifying the image zoom ratio through the image zoom module.
[0052] In step S202, a thread of a core processor of the image acquisition device is called through a zoom service to send a zoom request to the core processor of the image acquisition device.
[0053] In the disclosed embodiment, in response to the zoom application finding the zoom service in the hardware abstraction layer, the hardware abstraction layer initiates a thread call, synchronizes (SYNC) the zoom service in the service list to the core processor serving as the server, transfers the zoom service for zooming, and modifies the zoom ratio of the zoom processing performed by the image zoom module in the core processor to the desired zoom ratio.
[0054] In the embodiment of the present disclosure, the above method of sending a zoom request corresponds to Figure 4 The zoom application notifies the zoom processing module of the zoom information through cross-thread and cross-process modules, and Figure 5 In the process of notifying the zoom processing module of the zoom information to process the 100th frame image through the cross-thread and cross-process modules when the user issues the instruction at the 104th frame, the zoom processing module is Figure 4 and Figure 5 Detailed description of the corresponding process in .
[0055] In the disclosed embodiment, a cross-thread call is performed through communication between the application and the hardware abstraction layer, so that the zoom processing module performs zoom processing on the first frame image that has not been zoomed, thereby eliminating the delay from the user issuing a zoom command to the zoom processing module starting the zoom processing.
[0056] In the embodiments of the present disclosure, in order to ensure the smoothness of the zoom process and the user experience, the zoom process needs to be smoothly processed. The following embodiments of the present disclosure illustrate the method of performing zoom processing based on the zoom ratio of the present disclosure.
[0057] Fig. 9 FIG. 1 is a flow chart showing a method for performing zoom processing according to an exemplary embodiment. Fig. 9 As shown, the method includes step S301 to step S302.
[0058] In step S301, the current zoom factor of the first frame image that has not been zoomed is determined, and the zoom factor is determined.
[0059] In step S302, based on the current zoom magnification and the zoom magnification after zooming, a smooth transition is made from the current zoom magnification to the zoom magnification after zooming.
[0060] In the disclosed embodiment, in order to ensure the visual experience of the user during the zooming process, the zooming process needs to be smoothed so that the zooming process is a smooth gradual process, that is, the preview image of the image acquisition device gradually increases or decreases, and the transition frame of the zooming process can be determined based on the current zoom ratio and the zoom ratio after zooming, so that the preview image is enlarged or reduced frame by frame during the zooming process. It can be understood that digital zoom is essentially to crop part of the image from the original initial image with a zoom ratio of 1.0 and enlarge the image pixels for display, so the zoom ratio cannot be less than 1.0, and the zoom ratio can be 1.0 to 1.2, 1.3 to .0, 1.3 to 1.2, but the zoom ratio cannot be 1.0 to 0.8 or 1.3 to 0.8.
[0061] In the embodiment of the present disclosure, based on the change in the span between the current zoom ratio and the zoom ratio after zooming, the process of smooth zooming also needs adaptive adjustment. The following embodiment of the present disclosure further illustrates the method of zoom processing based on the zoom ratio of the present disclosure.
[0062] Fig.10 FIG. 1 is a flowchart of a method for transitioning to a zoom ratio after zooming according to an exemplary embodiment. Fig.10 As shown, the method includes step S401 to step S402.
[0063] In step S401, the number of smoothing frames is determined based on the current zoom factor and the zoom factor after zooming.
[0064] In the disclosed embodiment, a fixed zoom ratio interval may be preset, for example, a smooth frame is set every time the zoom ratio changes by 0.6.
[0065] It can be understood that in order to ensure the rapid completion of the zoom, a fixed number of smooth frames can also be set, and the zoom factor change value M between the current zoom factor and the zoom factor after zooming is determined. After the zoom factor interval K = M / N is determined based on the ratio between the zoom factor change value M and the number of smooth frames N, a predetermined number N smooth frames are set based on the zoom factor interval K.
[0066] In step S402, the first frame image that has not been zoomed is used to smoothly transition the current zoom ratio to the zoom ratio after zooming according to the zoom ratio and the number of frames.
[0067] In the disclosed embodiment, based on the determined multiple smooth frames, the first frame image that has not been zoomed is zoomed frame by frame, and the preview screen corresponding to each smooth frame is displayed in turn in the image acquisition device until the image is zoomed to the desired zoom ratio, that is, the image is zoomed from the original zoom ratio to the zoom ratio selected by the zoom application.
[0068] In the disclosed embodiment, multiple smooth frames are determined based on the current zoom ratio and the zoom ratio after zooming, and the current image is zoomed based on the smooth frames, so that the image is gradually zoomed to an image with a desired zoom ratio, thereby optimizing the user's visual experience during the zooming process.
[0069] In one implementation of the disclosed embodiment, the image zoom application of the image acquisition device is a camera application.
[0070] In the disclosed embodiment, the image zoom application of the image acquisition device may be a camera application built into the terminal, or may be other applications that can call upon the camera function to acquire images.
[0071] An exemplary embodiment of the present disclosure shows a zoom method applied to a photographing device, such as Figure 4 and Figure 5 As shown, the method comprises the following steps:
[0072] 1. The user clicks on the camera application and issues a zoom command to request zooming. The zoom processing module is notified through the cross-process and cross-thread modules.
[0073] The user issues a zoom instruction at the 104th frame through the image capture device's image photography application, and notifies the zoom processing module through the cross-process and cross-thread modules to zoom the first frame of the image to be processed, that is, the 100th frame of the image. Specifically, the photography application initiates communication to the hardware abstraction layer as the client, and finds the zoom service in the service list of the hardware abstraction layer. The hardware abstraction layer sends a zoom request to the core processor of the image capture device based on the zoom service. The hardware abstraction layer initiates a thread call, synchronizes the zoom service in the service list to the core processor as the server, and modifies the zoom ratio of the zoom processing performed by the image zoom module in the core processor to the desired zoom ratio.
[0074] 2. After receiving the zoom command, the zoom processing module changes the zoom ratio of the image frame that has not been processed, sets 3-frame smoothing, and performs zoom processing on the image frame that has not been processed.
[0075] The zoom processing module is based on the current zoom ratio of 1.0, the zoom ratio after zooming of 1.2, and the multi-frame smoothing frames corresponding to the zoom ratios of 1.06 and 1.12. Based on the multi-frame smoothing frames, the image frames to be processed are zoomed frame by frame.
[0076] 3. Return the zoomed image with the expected zoom factor to the camera application.
[0077] After a three-frame delay, the zoom processing module completes the zooming of the 100th frame image at the 106th frame, and returns the subsequent images after the 100th frame image with a magnification of 1.2 to the camera application.
[0078] In the disclosed embodiment, in response to a zoom instruction of an image zoom application, the zoom application initiates inter-process communication to the hardware abstraction layer, uses the hardware abstraction layer as a client, and calls the zoom service pre-created by the kernel processor in the hardware abstraction layer. The hardware abstraction layer calls the thread of the kernel processor of the image acquisition device and sends the zoom request to the kernel processor. The zoom processing module in the kernel processor determines smooth frames of multiple frames with different zoom magnifications based on the current zoom magnification of the first frame image that has not been zoomed and the zoom magnification after zooming, zooms the first frame image that has not been zoomed based on the zoom magnification after zooming and the zoom magnifications corresponding to the multiple smooth frames, and smoothly transitions the current zoom magnification to the zoom magnification after zooming. Through the present disclosure, based on inter-process communication, the camera application notifies the zoom processing module to start zoom processing when receiving a zoom command. The zoom processing module performs zoom processing on the first frame image that has not been zoomed when the zoom command is issued. This can eliminate the delay from when the user issues a zoom command to when the zoom processing module starts zoom processing, shorten the delay in obtaining the zoom image after the user issues a zoom command, and improve the user experience.
[0079] Based on the same concept, the embodiment of the present disclosure further provides a zoom device 100 .
[0080] It is understandable that the zoom device 100 provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0081] Fig.11 is a block diagram of a zoom device according to an exemplary embodiment. Fig.11 The device includes a control unit 101, a determination unit 102 and a processing unit 103.
[0082] The control unit 101 is configured to control the image zoom application of the image acquisition device to send a zoom request to the core processor of the image acquisition device through the hardware abstraction layer of the image acquisition device in response to the image zoom application of the image acquisition device being triggered to perform zoom based on a zoom instruction.
[0083] The determining unit 102 is configured to determine the first frame image that has not been zoomed when the core processor receives the zoom request.
[0084] The processing unit 103 is configured to start zooming at a corresponding moment of the first frame image that has not been zoomed, and perform zooming to obtain a zoomed image.
[0085] In one embodiment, the control unit controls the image zoom application to send a zoom request to the core processor of the image acquisition device through the hardware abstraction layer of the image acquisition device in the following manner: controls the image zoom application to initiate inter-process communication to the hardware abstraction layer, and uses the hardware abstraction layer as a client to call the zoom service created in advance by the kernel processor in the hardware abstraction layer; calls the thread of the kernel processor of the image acquisition device through the zoom service to send the zoom request to the kernel processor of the image acquisition device.
[0086] In one embodiment, the zoom service provides a function of modifying the zoom ratio, and the zoom request includes the zoom ratio after zooming; the processing unit starts the zoom at the corresponding moment of the first frame image that has not been zoomed, and performs zoom processing to obtain the zoomed image in the following manner: determine the current zoom ratio of the first frame image that has not been zoomed, and determine the zoom ratio; based on the current zoom ratio and the zoom ratio after zooming, smoothly transition to the zoom ratio after zooming with the current zoom ratio.
[0087] In one embodiment, the processing unit smoothly transitions from the current zoom ratio to the zoom ratio after zooming based on the current zoom ratio and the zoom ratio after zooming in the following manner: determining the number of smoothing frames based on the current zoom ratio and the zoom ratio after zooming; using the first frame image that has not been zoomed, and smoothing the number of frames according to the zoom ratio, to smoothly transition the current zoom ratio to the zoom ratio after zooming.
[0088] In one implementation, the image zoom application of the image acquisition device is a camera application.
[0089] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0090] Fig.122 is a block diagram of a device 200 for zooming according to an exemplary embodiment. The device 200 may be provided as a terminal. For example, the device 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0091] Reference Fig.12 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0092] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
[0093] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0094] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.
[0095] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0096] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.
[0097] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0098] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0099] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0100] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0101] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0102] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0103] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0104] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.
[0105] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring that the operations be performed in the specific order shown or in a serial order, or requiring that all the operations shown be performed to obtain the desired results. In certain environments, multiple people and parallel processing may be advantageous.
[0106] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0107] It should be understood that the present disclosure is not limited to the precise structures that have been 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 limited only by the scope of the appended claims.
Claims
1. A zoom method, characterized in that: Applied to an image acquisition device, the method comprises: In response to an image zoom application of the image acquisition device being triggered to perform zooming based on a zoom instruction, controlling the image zoom application to send a zoom request to a core processor of the image acquisition device through a hardware abstraction layer of the image acquisition device; Determine a first frame image that has not been zoomed when the core processor receives the zoom request; At the time corresponding to the first frame image that has not been zoomed, zooming is started and zooming is performed to obtain a zoomed image.
2. The method according to claim 1, characterized in that The controlling the image zoom application to send a zoom request to a core processor of the image acquisition device through a hardware abstraction layer of the image acquisition device comprises: Control the image zoom application to initiate inter-process communication to the hardware abstraction layer, and use the hardware abstraction layer as a client to call the zoom service pre-created by the kernel processor in the hardware abstraction layer; The zoom service calls a thread of the core processor of the image acquisition device to send a zoom request to the core processor of the image acquisition device.
3. The method according to claim 2, characterized in that The zoom service provides a function of modifying the zoom ratio, and the zoom request includes the zoom ratio after zooming; Initiating zooming at a corresponding moment of the first frame image that has not been zoomed, and performing zooming to obtain a zoomed image, including: Determining the current zoom ratio of the first frame image that has not been zoomed; Based on the current zoom magnification and the zoom magnification after the zooming, a smooth transition is made from the current zoom magnification to the zoom magnification after the zooming.
4. The method according to claim 3, characterized in that The step of smoothly transitioning from the current zoom magnification to the zoom magnification after zooming based on the current zoom magnification and the zoom magnification after zooming includes: Determining the number of smoothing frames based on the current zoom ratio and the zoom ratio after zooming; The first frame image that has not been zoomed is used to smoothly transition the current zoom ratio to the zoom ratio after zooming according to the zoom ratio and the number of smoothing frames.
5. The method according to any one of claims 1 to 4, characterized in that: The image zoom application of the image acquisition device is a camera application.
6. A zoom device, characterized in that: Applicable to an image acquisition device, the device comprising: a control unit, configured to control the image zoom application of the image acquisition device to send a zoom request to a core processor of the image acquisition device through a hardware abstraction layer of the image acquisition device in response to the image zoom application of the image acquisition device being triggered to perform zooming based on a zoom instruction; a determining unit, configured to determine a first frame of image that has not been zoomed when the core processor receives the zoom request; The processing unit is used to start zooming at the corresponding moment of the first frame image that has not been zoomed, and perform zooming to obtain a zoomed image.
7. The device according to claim 6, characterized in that The control unit controls the image zoom application to send a zoom request to the core processor of the image acquisition device through the hardware abstraction layer of the image acquisition device in the following manner: Control the image zoom application to initiate inter-process communication to the hardware abstraction layer, and use the hardware abstraction layer as a client to call the zoom service pre-created by the kernel processor in the hardware abstraction layer; The zoom service calls a thread of the core processor of the image acquisition device to send a zoom request to the core processor of the image acquisition device.
8. The device according to claim 7, characterized in that The zoom service provides a function of modifying the zoom ratio, and the zoom request includes the zoom ratio after zooming; The processing unit starts zooming at the corresponding moment of the first frame image that has not been zoomed, and performs zooming to obtain a zoomed image in the following manner: Determining the current zoom ratio of the first frame image that has not been zoomed; Based on the current zoom magnification and the zoom magnification after the zooming, a smooth transition is made from the current zoom magnification to the zoom magnification after the zooming.
9. The device according to claim 8, characterized in that The processing unit smoothly transitions from the current zoom magnification to the zoom magnification after zooming based on the current zoom magnification and the zoom magnification after zooming in the following manner: Determining the number of smoothing frames based on the current zoom ratio and the zoom ratio after zooming; The first frame image that has not been zoomed is used to smoothly transition the current zoom ratio to the zoom ratio after zooming according to the zoom ratio and the number of smoothing frames.
10. The device according to any one of claims 6 to 9, characterized in that The image zoom application of the image acquisition device is a camera application.
11. A zoom device, characterized in that: include: processor: a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the zoom method described in any one of claims 1 to 5.
12. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor, the processor is enabled to execute the zoom method according to any one of claims 1 to 5.
