Image processing method, device, chip, electronic device and medium
By subject detection and prism deflection angle adjustment on the initial image collected by the shooting module, the problem of frequent manual zooming and subject loss when shooting moving subjects is solved, automated image processing is realized, and the image display effect and User experience.
Patent Information
- Application Number
- CN202311037882.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-08-16
AI Technical Summary
Users need to frequently manually zoom when shooting moving subjects, and the subject is easily partially or completely lost from the displayed image, resulting in poor image display and poor user shooting experience.
By subject detection on the initial image collected by the shooting module, part of the image corresponding to the subject in focus is intercepted, and the deflection angle of the prism is adjusted according to the subject detection results to ensure that the subject is centered in the displayed image and is not lost, realizing automatic image adjustment. Scale and position to achieve desired image display.
It effectively avoids the problem of subject loss, improves the image display effect and user shooting experience, and realizes automated image processing without the need for users to manually zoom.
Smart Images

Figure CN117714840B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to an image processing method, device, chip, electronic equipment and medium. Background Art
[0002] In order to achieve the desired image display effect (such as the subject is in the center of the displayed image as much as possible and occupies a larger proportion of the displayed image, etc.), when shooting a moving subject, the user can manually zoom to adjust the image zoom ratio of the shooting module, and can manually adjust the position and orientation of the shooting module.
[0003] However, the movement of the subject is mostly uncertain and flexible, which requires users to frequently zoom manually when shooting moving subjects. In addition, when the subject is enlarged, it is easy for the subject to be partially or completely lost from the displayed image, so the image display effect is poor and the user shooting experience is not good. Summary of the invention
[0004] The embodiments of the present application provide an image processing method, device, chip, electronic device and medium, which can solve the problems of manual zooming and easy loss of the subject, thereby improving the image display effect and enhancing the user's shooting experience.
[0005] In a first aspect, an embodiment of the present application provides an image processing method, comprising: acquiring a first image captured by a shooting module; obtaining subject detection data of a first subject based on the first image; obtaining the magnification of the first field of view angle based on the magnification of the field of view angle used by the shooting module to capture the first image, the subject detection data of the first subject and the set image display requirements; acquiring a second image based on the magnification of the first field of view angle, the second image being a portion of the first image corresponding to the subject detection data of the first subject and the first field of view angle, and the second image meets the image display requirements; and outputting the second image to a display module.
[0006] Based on the movement of the focus subject, the position and size of the subject in the real-time image captured by the shooting module are not fixed. The embodiment of the present application performs subject detection on the initial image captured by the shooting module, and based on the subject detection result, intercepts the part of the initial image corresponding to the focus subject for display, so as to achieve the desired image display effect and avoid the problem of subject loss in the displayed image, so the image display effect is good, and this implementation process does not require the user to manually zoom, so the user shooting experience is good.
[0007] Optionally, the image processing method also includes: obtaining first information, the first information being used to describe the positional relationship between the first subject and the boundary of the first image; when the first information does not meet the set positional relationship requirements, controlling the deflection angle of the prism to change; wherein the change in the image acquisition range of the shooting module is associated with the change in the deflection angle of the prism.
[0008] After completing the subject detection, the positional relationship between the focused subject and the boundary of the initial image can be obtained. This positional relationship can be used to reflect whether there is a possibility that the subject is about to be out of the frame (that is, the subject is about to be partially lost in the initial image). If so, the prism can be controlled to make corresponding deflections for compensation. This can ensure that the initial image captured by the shooting module in real time does not have the subject out of the frame, thereby supporting the display image to meet expectations.
[0009] Optionally, the subject detection data of the first subject includes the subject detection size of the first subject; the image processing method also includes: obtaining the minimum distance between the boundary corresponding to the first subject and the boundary of the first image in the first direction, and obtaining the minimum distance between the boundary corresponding to the first subject and the boundary of the first image in the second direction; wherein, the boundary corresponding to the first subject is the boundary of the second image or the boundary of the subject detection size of the first subject, and the first direction and the second direction are perpendicular to each other; the situation where the first information does not meet the positional relationship requirements includes: any one of the minimum distance in the first direction is not greater than the first distance threshold and the minimum distance in the second direction is not greater than the second distance threshold is established.
[0010] The minimum distance between the boundary corresponding to the focus subject and the boundary of the initial image can be used to reflect whether the subject is likely to be out of the frame in two directions, so that compensation can be made in the corresponding direction as needed later.
[0011] Optionally, when the first information does not meet the set positional relationship requirements, the deflection angle of the prism is controlled to change, including: if the minimum spacing in the first direction is not greater than a first spacing threshold, according to a first preset correspondence between the boundary spacing and the deflection angle adjustment amount, a first deflection angle adjustment amount corresponding to the minimum spacing in the first direction is obtained, and the deflection angle of the prism in the first direction is adjusted according to the first deflection angle adjustment amount; if the minimum spacing in the second direction is not greater than a second spacing threshold, according to a second preset correspondence between the boundary spacing and the deflection angle adjustment amount, a second deflection angle adjustment amount corresponding to the minimum spacing in the second direction is obtained, and the deflection angle of the prism in the second direction is adjusted according to the second deflection angle adjustment amount.
[0012] The deflection angles of the prism in two directions can be adjusted separately through a preset corresponding relationship, so that the deflection angle of the prism can be accurately adjusted.
[0013] Optionally, obtaining subject detection data of the first subject based on the first image includes: proportionally reducing the first image to obtain a third image; and performing subject detection on the third image based on pre-acquired subject identification data of the first subject to obtain subject detection data of the first subject.
[0014] By scaling down the initial image and then performing subject detection, it is possible to improve detection efficiency and ensure real-time image display while ensuring detection accuracy.
[0015] Optionally, before acquiring the first image captured by the shooting module, the image processing method also includes: in response to a subject selection operation on the image displayed by the display module, taking the selected subject as the first subject, acquiring subject identification data of the first subject; and obtaining subject detection data of the first subject based on the first image, including: performing subject detection based on the subject identification data of the first subject and the first image to obtain subject detection data of the first subject.
[0016] During image display, the user can select the focus subject as needed, and then based on the focus subject selected by the user, an image mainly focusing on the focus subject can be displayed for the user to view.
[0017] In a second aspect, an embodiment of the present application provides an image processing device, comprising: an acquisition module, used to acquire a first image captured by a shooting module; a perception module, used to obtain subject detection data of a first subject based on the first image; a decision module, used to obtain the magnification of the first field of view angle according to the magnification of the field of view angle used by the shooting module to capture the first image, the subject detection data of the first subject and the set image display requirements; a processing module, used to acquire a second image according to the magnification of the first field of view angle, the second image being a portion of the first image corresponding to the subject detection data of the first subject and the first field of view angle, and the second image meets the image display requirements; and a display module, used to output the second image to the display module.
[0018] In a third aspect, an embodiment of the present application provides an electronic chip, comprising: a processor, which is used to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the electronic chip is triggered to execute any method as in the first aspect.
[0019] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising one or more memories for storing computer program instructions, and one or more processors, wherein when the computer program instructions are executed by the one or more processors, the electronic device is triggered to execute a method as described in any one of the first aspects.
[0020] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes any method in the first aspect.
[0021] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run on a computer, the computer executes any method in the first aspect.
[0022] The technical effects of the aforementioned aspects can be referenced to each other and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments are briefly introduced below.
[0024] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0025] Figure 2 is a schematic diagram for reflecting displayed images at different viewing angles;
[0026] Figure 3 A schematic diagram showing an image;
[0027] Figure 4 is another schematic diagram for displaying an image;
[0028] Figure 5 A schematic diagram of a display image in a scenario provided by an embodiment of the present application;
[0029] Figure 6 A schematic diagram of displaying an image in another scenario provided by an embodiment of the present application;
[0030] Figure 7 A schematic diagram of an image acquired at a prism deflection angle provided in an embodiment of the present application;
[0031] Figure 8 A schematic diagram of an image acquired at another prism deflection angle provided in an embodiment of the present application;
[0032] Fig. 9 A schematic diagram of an image processing system implementing image processing provided by an embodiment of the present application;
[0033] Fig.10 A flowchart of an image processing method provided for one embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0035] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0036] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0037] It should be understood that the term "at least one" used in this article refers to one or more, and "plurality" refers to two or more. The term "and / or" used in this article is merely a description of 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. Among them, A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, wherein a, b, c can be single or multiple.
[0038] It should be understood that, although the terms first, second, etc. may be used to describe the set thresholds in the embodiments of the present application, these set thresholds should not be limited to these terms. These terms are only used to distinguish the set thresholds from each other. For example, without departing from the scope of the embodiments of the present application, the first set threshold may also be referred to as the second set threshold, and similarly, the second set threshold may also be referred to as the first set threshold.
[0039] The image processing method provided in any embodiment of the present application can be applied to Figure 1 In the electronic device 100 shown. Figure 1 A schematic structural diagram of an electronic device 100 is shown.
[0040] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a camera 193, a display screen 194, etc. The sensor module 180 may include a touch sensor, an ambient light sensor, etc.
[0041] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0042] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0043] In some embodiments, the processor 110 may be a system on chip (SOC), which may include a central processing unit (CPU) and may further include other types of processors. In some embodiments, the processor 110 may be a PWM control chip.
[0044] The processor 110 may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the technical solution program, etc. In addition, the processor 110 may have the function of operating one or more software programs, which may be stored in a storage medium.
[0045] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0046] In some embodiments, the memory of the electronic device 100 may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), or any computer-readable medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.
[0047] In some embodiments, the processor 110 and the memory may be combined into a processing device, or may be independent components, and the processor 110 may be used to execute program codes stored in the memory. In specific implementation, the memory may also be integrated into the processor 110, or may be independent of the processor 110.
[0048] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0049] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0050] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0051] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0052] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0053] The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture static images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The processor 110 can perform image processing on the image captured by the camera 193 to obtain a display image, and output the display image to the display screen 194 for image display.
[0054] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0055] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0056] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0057] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0058] The ambient light sensor is used to sense the brightness of the ambient light. The camera 193 can capture images based on the brightness of the ambient light, such as fill light on demand.
[0059] A touch sensor is also called a "touch control device". The touch sensor can be arranged on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor can also be arranged on the surface of the electronic device 100, which is different from the position of the display screen 194. For example, when the touch screen displays a preview image or a captured image, the user can click the touch screen to select the focus subject.
[0060] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
[0061] In order to achieve the desired image display effect (for example, the photographed subject is as centered as possible in the displayed image and occupies a larger proportion of the displayed image), when photographing a moving subject, the user can manually zoom in and out to adjust the image zoom ratio (or the magnification of the field of view) of the shooting module, and can manually adjust the position and orientation of the shooting module.
[0062] However, the movement of the subject is mostly uncertain and flexible, which requires users to frequently zoom manually when shooting moving subjects. In addition, when the subject is enlarged, it is easy for the subject to be partially or completely lost from the displayed image (or the subject is out of the frame), so the image display effect is poor and the user shooting experience is not good.
[0063] For example, when the subject is far away from the user, the user can manually zoom in on the image to use a larger field of view (such as 4×FOV) to shoot the subject, so as to avoid the subject being too small in the displayed image. When the subject is close to the user, the user can manually zoom out on the image to use a smaller field of view (such as 1×FOV) to shoot the subject, so as to avoid the subject being too large in the displayed image and the subject being incompletely displayed. Based on the changes in the distance of the subject's position, the user needs to zoom manually frequently, resulting in a poor user shooting experience. Furthermore, the image zoom ratio used by the user is usually difficult to control accurately and is prone to lag, resulting in poor image display. Among them, FOV (Field of view) represents the field of view.
[0064] Please refer to Figure 2 , the image capture scene can be Figure 2 In the basketball court scene shown, the boundary line of the basketball court is shown as numeral 201, and the boundary line of the buffer zone outside the basketball court is shown as numeral 202. It is assumed that the subject 203 is the focus tracking subject selected by the user. By selecting the focus tracking subject, the image clarity at the subject in the captured and displayed image can be higher than the clarity of the image at other positions.
[0065] When other factors (such as the position and orientation of the shooting module, etc.) remain unchanged, if the user uses a field of view of 1×FOV to shoot an image, the image captured by the shooting module may be the image shown by label 204; if the user uses a field of view of 4×FOV to shoot an image, the image captured by the shooting module may be the image shown by label 205.
[0066] If the desired image display effect includes a focus subject that accounts for a large proportion of the displayed image, the user Figure 2 When photographing the subject 203 in the scene shown, manual zooming can be performed to adjust to 4×FOV for image capture, and the image captured and displayed can be the image shown by reference numeral 205 .
[0067] For another example, when the subject moves in a certain direction, the user can manually adjust the position and / or orientation of the shooting module to shoot in that direction, and when the subject moves in another direction, the user can adjust the position and / or orientation of the shooting module again to shoot in the new direction. However, when the user uses a larger magnification field of view to shoot the subject, the image acquisition range of the shooting module is more sensitive to position movement, which can easily cause the subject to be partially or completely lost in the displayed image. Out-of-frame situations. Furthermore, the shaking of the user's hands when holding the shooting module for shooting can easily cause the subject to be out of frame.
[0068] For example, a displayed image without the subject being out of the frame may be as follows: Figure 3 As shown, a display image with the subject out of the frame can be as follows Figure 4 As shown, Figure 4 The portion indicated by the middle dotted line is outside the displayed image, that is, the image of the portion indicated by the dotted line is not captured and is not displayed.
[0069] To solve the problem that users need to manually zoom in and out when shooting the focus-tracking subject, and the subject is easily out of the frame during the manual zooming process, resulting in poor focus-tracking effect, please refer to Fig.10 An embodiment of the present application provides an image processing method, which may include the following steps 1001 to 1005. The method may be applicable to handheld shooting scenes and tripod shooting scenes.
[0070] In the handheld shooting scenario, the user holds the shooting module to take photos or videos. Based on the change in the position of the user's hand, the position and / or orientation of the shooting module can be changed accordingly, and the user can also manually zoom as needed, thereby affecting the image acquisition range of the shooting module.
[0071] In the tripod shooting scenario, the user places the camera module on the tripod to take photos or videos, and the position and orientation of the camera module can remain unchanged to solve the adverse effects of hand shaking on image acquisition during handheld shooting. In the tripod shooting scenario, the user can manually zoom in and out as needed to adjust the image acquisition range of the camera module.
[0072] Step 1001, obtaining a first image captured by a shooting module.
[0073] In one embodiment, the shooting module may be a camera in a mobile phone.
[0074] The shooting module can capture images in real time. Each image captured by the shooting module in real time can be used as the first image and executed Fig.10 The image processing method shown.
[0075] The first image may be an initial image captured by the shooting module. The initial image is not directly displayed, that is, it is not directly displayed as a captured image.
[0076] Please refer to Figure 2 , the shooting module is Figure 2 In the basketball court scene shown in FIG. 1 and when the field of view used is 1×FOV, the first image collected can be Figure 2 The image shown by the label 204, when the field of view used is 4×FOV, the first image collected can be Figure 2 The image is shown in reference numeral 205.
[0077] In one embodiment, the field of view angle magnification used by the shooting module can be limited to no more than a set field of view angle magnification (such as 1×, 2×, etc.), so that the shooting module can use a smaller field of view angle (such as 1×FOV, 2×FOV, etc.) to capture the first image, to ensure that the image of the focus subject can usually be included in the first image captured in real time, thereby supporting the subsequent extraction of the image of the focus subject from the first image for display.
[0078] Please refer to Figure 5 , the image capture scene can also be Figure 5 In the basketball court scene shown in the figure, the boundary line of the basketball court is shown as numeral 501, and the boundary line of the buffer zone outside the basketball court is shown as numeral 502. It is assumed that the subject 503 is the focus tracking subject selected by the user. Figure 5 When using 1×FOV for image acquisition in the basketball court scene shown, the first image acquired can be Figure 5 The image is shown as 504. Figure 5 As shown, the captured first image includes an image of the subject 503, and subject detection of the focus-tracking subject can be performed based on the first image.
[0079] Please refer to Figure 6 , the image capture scene can also be Figure 6 In the basketball court scene shown in the figure, the boundary line of the basketball court is shown as 601, and the boundary line of the buffer zone outside the basketball court is shown as 602. It is assumed that the subject 603 is the focus tracking subject selected by the user. Figure 6 When using 1×FOV for image acquisition in the basketball court scene shown, the first image acquired can be Figure 6 The image is shown as 604. Figure 6 As shown, the captured first image includes an image of the subject 603, and subject detection of the focus-tracking subject can be performed based on the first image.
[0080] Step 1002: Obtain subject detection data of a first subject according to a first image.
[0081] Exemplarily, the first subject may be a human, an animal, a plant, or any other type of photographable object.
[0082] The first subject may be any subject that can be photographed by the photographing module. Taking the photographing of athletes on a basketball court as an example, the first subject may be any athlete on the basketball court.
[0083] When the position or orientation of the shooting module has not been significantly moved, the first image usually contains part or all of the image of the first subject, and subject detection is performed based on the first image to obtain subject detection data of the first subject. If the position and / or orientation of the shooting module has been significantly moved, subject detection data of the first subject may not be obtained based on the first image, or it is considered that the subject detection data of the first subject is empty. In this case, in a feasible implementation method, the first image can be sent for display.
[0084] In one embodiment, the subject detection data may include the subject position and the subject size. Exemplarily, the subject position may be the center point position of the subject. Exemplarily, the subject size may be the size of the smallest rectangle that can contain the subject, for example, the subject size may be represented by the coordinate values of the two diagonal points of the smallest rectangle.
[0085] Based on the requirements for the position of the subject in the image in the image display requirements (for example, the subject can be required to be located in the center of the displayed image as much as possible), the subject position included in the subject detection data can be used to determine the position of the displayed image (i.e., the second image described below) in the first image.
[0086] Based on the requirements for the proportion of the subject in the image in the image display requirements (for example, it can be required that the proportion of the subject in the displayed image is not less than a preset proportion), the subject size included in the subject detection data can be used to determine the size of the image to be displayed (i.e., the second image described below), i.e., to determine the value of the magnification of the first field of view angle described below.
[0087] In one embodiment, the first subject may be a focus tracking subject pre-selected by a user.
[0088] In one embodiment, the subject identification data of the first subject may be acquired in advance, and subject detection may be performed based on the subject identification data in combination with the first image to obtain subject detection data. Exemplarily, whether the first subject exists in the first image may be detected based on the subject identification data, and if so, the position and size of the first subject in the first image may be acquired as the subject detection data of the first subject.
[0089] In one embodiment of the present application, before acquiring the first image captured by the shooting module, the image processing method may further include: in response to a subject selection operation on the image displayed by the display module, taking the selected subject as the first subject, and acquiring subject identification data of the first subject. Based on this, step 1002 may include: performing subject detection according to the subject identification data of the first subject and the first image, and obtaining subject detection data of the first subject.
[0090] In a feasible implementation, when the display module is displaying an image, if the user needs to focus on a subject of interest, the user can click on the subject to perform a subject selection operation.
[0091] In one embodiment, the image display period may be an image preview display period. In another embodiment, the image display period may also be a video recording period.
[0092] During image display, the user can select the focus subject as needed, and then based on the focus subject selected by the user, an image mainly focusing on the focus subject can be displayed for the user to view.
[0093] In a feasible implementation, the subject identification data may include facial features and body features of the subject. For example, when the tracking subject is a human, the subject identification data may include facial features and body features of the human.
[0094] The first subject Figure 5 Taking the subject 503 shown as an example, it is possible to detect whether the subject 503 exists in the first image (i.e., the image shown by label 504) based on the subject identification data of the subject 503, and after detecting the existence, obtain the subject position and subject size of the subject 503 in the first image as the detected subject detection data.
[0095] In one embodiment of the present application, step 1002 may include: scaling down the first image to obtain a third image; performing subject detection on the third image based on pre-acquired subject identification data of the first subject to obtain subject detection data of the first subject.
[0096] The size of the initial image captured by the shooting module is usually large, for example, 3000×2000 (in pixels), or 6 million pixels. If the original image is used directly for subject detection, it will be energy-consuming and time-consuming. In this way, the original image can be reduced in proportion and subject detection can be performed based on the reduced image.
[0097] In one feasible implementation, multiple (such as 4, 16, etc.) pixels can be combined into one pixel, and the size of the image obtained after pixel synthesis processing becomes smaller, for example, it can be changed to 600×400 (in pixels), but the image content remains unchanged to support accurate execution of subject detection.
[0098] By scaling down the initial image and then performing subject detection, it is possible to improve detection efficiency and ensure real-time image display while ensuring detection accuracy.
[0099] Step 1003, obtaining the magnification of the first field of view angle according to the magnification of the field of view angle used by the shooting module to capture the first image, the subject detection data of the first subject and the set image display requirements.
[0100] The magnification of the field of view angle is also called the optical magnification of the field of view angle, magnification, or zoom ratio.
[0101] In one embodiment, the set image display requirement may include that the proportion of the first subject in the transmitted image is not less than a set proportion threshold. The set proportion threshold can be set to 30%, 40%, 60% or other values as required. Figure 2 In the image shown by reference numeral 204 (1×FOV) and the image shown by reference numeral 205 (4×FOV), the larger the magnification of the field of view angle, the larger the proportion of the subject in the image, and conversely, the smaller the magnification of the field of view angle, the smaller the proportion of the subject in the image.
[0102] In one embodiment, the set image display requirement may further include that a portion of the first subject in the transmitted image is consistent with a portion of the first subject in the first image, so as to avoid a subject missing problem.
[0103] In order to avoid the problem of missing subjects, and based on the limitation of setting the proportion threshold, the magnification of the first field of view angle corresponding to the image to be displayed (the image content in the image to be displayed can be captured by the shooting module at the first field of view angle) can be determined according to the magnification of the field of view angle corresponding to the first image (the image content in the first image can be captured by the shooting module at the first field of view angle).
[0104] The image acquisition range under different field of view angles is different accordingly. For example, please refer to Figure 5 , the image acquisition range of the first image corresponding to the field of view angle (such as the image range of the image shown by label 504) is larger than the image acquisition range of the first field of view angle (such as the image range of the image shown by label 505).
[0105] Please refer to Figure 5 ,exist Figure 5 In the image shooting scene shown, the first image may be the image shown by reference numeral 504 corresponding to 1×FOV, the first field of view may be 4×FOV, and the image sent for display may be the image shown by reference numeral 505 corresponding to 4×FOV (ie, the second image). Figure 5 As shown, the second image is a part of the first image, the subject 503 occupies a larger proportion in the second image, and compared with the first image, the subject 503 is not missing in the second image.
[0106] Please refer to Figure 6 ,exist Figure 6 In the image shooting scene shown in FIG. 1 , the first image may be the image shown in label 604 corresponding to 1×FOV, the first field of view may be 2.5×FOV, and the image sent for display may be the image shown in label 605 corresponding to 2.5×FOV (i.e., the second image). Figure 6 As shown, the second image is a part of the first image, the subject 603 occupies a larger proportion in the second image, and compared with the first image, the subject 603 is not missing in the second image.
[0107] Based on the magnification of the field of view angle corresponding to the first image, the subject detection data of the first subject and the set image display requirements, a suitable magnification of the first field of view angle can be determined so that when the shooting module captures an image at the first field of view angle, the captured image can meet the image display requirements.
[0108] In one embodiment, the set image display requirement may include the center position of the first subject in the sent image if the subject center display condition is met. Preferably, if the distance between the center of the first subject and the center of the sent image is not greater than a preset spacing threshold, it can be considered that the first subject is located in the center position of the sent image.
[0109] In a feasible implementation, the boundary of the second image can be obtained by taking the position of the first subject as the center and combining the magnification of the first field of view. If the boundary of the second image is within the first image, the subject center display condition is met, otherwise the subject center display condition is not met. If the subject center display condition is not met, the first subject can be located in a non-center position in the transmitted image.
[0110] For example, if the subject is partially out of the frame in the first image, the condition for displaying the subject in the center is not met. If the subject is close to the boundary of the first image in the first image, it is highly likely that the condition for displaying the subject in the center is not met.
[0111] Step 1004 , acquiring a second image according to the magnification of the first field of view angle, the second image being a portion of the first image corresponding to the subject detection data of the first subject and the first field of view angle, and the second image meets the image display requirement.
[0112] The second image can be directly acquired based on the first image without using the first field of view angle for image acquisition to obtain the second image, that is, there is no need to adjust the field of view angle magnification to obtain the second image, and the second image that meets the image display requirements can be quickly and accurately obtained for display.
[0113] The magnification of the first field of view is not less than the magnification of the field of view corresponding to the first image. If the magnifications of the two are equal, the second image is the first image. If the magnifications of the two are not equal, the second image is a part of the first image. For example, please refer to Figure 5 , the magnification of the first field of view angle is 4×, and the magnification of the field of view angle corresponding to the first image is 1×.
[0114] After determining the magnification of the first field of view angle, the second image can be acquired according to the first image, the subject detection data of the first subject, and the image size corresponding to the first field of view angle. By taking the portion of the image corresponding to the subject in the first image for display, an image that meets the image display requirements can be obtained without manual scaling by the user, and the subject can be out of the frame in the image.
[0115] In one embodiment, a smaller magnification field of view (such as 1×FOV, 2×FOV) may be used to capture the first image to increase the probability that the image of the focus subject exists in the first image and the focus subject is not lost in the first image.
[0116] In one embodiment of the present application, the first image can be cut according to the image size corresponding to the first field of view angle, combined with the position of the first subject in the first image and the image display requirements, to obtain the second image. The first field of view angle can affect the proportion of the second image in the first image, and the subject position of the first subject can affect the position of the second image in the first image.
[0117] In one embodiment, please refer to Figure 5 The first image is the image shown by the label 504 corresponding to 1×FOV, and the second image is the image shown by the label 505 corresponding to 4×FOV. The subject 503 is in the center of the second image, and the subject 503 occupies a large proportion in the second image and is not missing.
[0118] In another embodiment, please refer to Figure 6 The first image is the image shown by the label 604 corresponding to 1×FOV, and the second image is the image shown by the label 605 corresponding to 2.5×FOV. The subject 603 is in the center of the second image, and the subject 603 occupies a large proportion in the second image and is not missing.
[0119] Step 1005: output the second image to the display module.
[0120] After obtaining the second image that meets the image display requirements, the second image can be displayed as the captured image, so that the user can view the image content of the second image, and the displayed image meets the image display requirements. Fig.10 The image processing flow shown can keep the size of the focused subject on the display screen basically unchanged.
[0121] In one embodiment, please refer to Figure 5 After the image shown by label 505 is sent for display, the display module can display the image shown by label 506, and the image size of the image shown by label 506 matches the display screen size of the display module.
[0122] In another embodiment, please refer to Figure 6 After the image shown by label 605 is sent for display, the display module can display the image shown by label 606, and the image size of the image shown by label 606 matches the display screen size of the display module.
[0123] In one embodiment, when the display module displays an image according to the transmitted image, the display module may be in a preview display state, and the displayed image may be a preview image. In the preview display state, the user may subsequently take photos or videos as needed, and each frame of the photo or video stream obtained by taking the photo or video may be an image that meets the image display requirements.
[0124] In another embodiment, when the display module displays an image according to the transmitted image, the display module may be in a camera state, and the displayed image may be a camera image.
[0125] Based on the movement of the focus subject, the position and size of the subject in the real-time image captured by the shooting module are not fixed. The embodiment of the present application performs subject detection on the initial image captured by the shooting module, and based on the subject detection result, intercepts the part of the initial image corresponding to the focus subject for display, so as to achieve the desired image display effect and avoid the problem of subject loss in the displayed image, so the image display effect is good, and this implementation process does not require the user to manually zoom, so the user shooting experience is good.
[0126] In one embodiment of the present application, the image processing method may further include: obtaining first information, the first information being used to describe the positional relationship between the first subject and the boundary of the first image; when the first information does not meet the set positional relationship requirements, controlling the deflection angle of the prism to change; wherein the change in the image acquisition range of the shooting module is associated with the change in the deflection angle of the prism.
[0127] In one embodiment, the set position relationship requirement includes, for example, that the first subject is far from the boundary of the first image. By limiting the first subject to be far from the boundary of the first image, the first subject can be located in the middle of the first image, thereby avoiding the situation where the subject has or will be out of the frame, so as to support the cutting out of the second image that meets the image display requirements from the first image for display.
[0128] After completing the subject detection, the positional relationship between the focused subject and the boundary of the initial image can be obtained. This positional relationship can be used to reflect whether there is a possibility that the subject is about to be out of the frame (that is, the subject is about to be partially lost in the initial image). If so, the prism can be controlled to make corresponding deflections for compensation. This can ensure that the initial image captured by the shooting module in real time does not have the subject out of the frame, thereby supporting the display image to meet expectations.
[0129] When the subject is about to go out of the frame, the prism deflection is controlled to compensate. Based on the continuous execution of compensation on demand, the possibility of the first image not having the subject about to go out of the frame can be increased, thereby providing support for cutting out a display image that meets the image display requirements from the first image.
[0130] In one embodiment of the present application, please refer to Figure 7 The optical path of the optical sensor 701 of the camera module may be provided with an optical lens 702 (eg Figure 7 As shown, the optical lens 702 may be located in front of the optical sensor 701, and a prism 703 is built in the optical lens 702. The prism 703 may be moved by a corresponding motor (in Figure 7 The prism 703 is deflected in a specific direction under the control of a controller (not shown) to change the deflection angle of the prism 703.
[0131] In one embodiment, the prism 703 can be arranged along the longitudinal direction (eg Figure 7 The vertical direction of the schematic diagram shown in FIG. 1 is deflected, for example, it can be deflected to Figure 8 The position shown, the deflection angle is Figure 8 The angle α shown is based on the deflection of the prism 703 along the longitudinal axis, which can produce an effect similar to that of the optical sensor 701 raising or lowering its head to change the image acquisition range accordingly.
[0132] Please refer to Figure 7 When the prism 703 is not deflected, if the optical sensor 701 shoots the subject 704, the middle part of the image of the subject 704 can be captured (see the solid line part in the image shown by label 705), but the upper and lower parts of the image of the subject 704 cannot be captured (see the dotted line part in the image shown by label 705).
[0133] Please refer to Figure 8 , prism 703 exists as Figure 8 When the optical sensor 701 is deflected to the angle α shown, if the optical sensor 701 shoots the subject 704, the upper part of the image of the subject 704 can be captured (see the part indicated by the solid line in the image shown by label 801), but the lower part of the image of the subject 704 cannot be captured (see the part indicated by the dotted line in the image shown by label 801).
[0134] It can be seen that based on the change in the deflection angle of the prism 703, the image acquisition range of the optical sensor 701 can be changed accordingly, so that when the position of the optical sensor 701 remains unchanged, the image content within the required range can still be acquired.
[0135] In this way, when the optical sensor 701 is fixed in position, the image acquisition range of the optical sensor 701 in the longitudinal direction can be expanded by deflecting the prism 703 along the longitudinal axis, so as to deal with the problem of the subject being out of the frame in the longitudinal direction. For example, when the subject is close to a certain boundary in the longitudinal direction, the prism can be controlled to deflect in the longitudinal direction to a corresponding degree, so that the image acquisition range of the shooting module changes toward the boundary direction, so that the initial image of the subject can be captured, which is more centered, and the subject can be prevented from being out of the frame.
[0136] Whether the subject has or will be out of the frame can be determined based on the distance between the subject and the boundary of the initial image. If so, the lens can be controlled to deflect the angle in the corresponding direction and degree to compensate, so that in the initial image captured after angle compensation, the subject can be as close to the center of the image as possible rather than at the boundary.
[0137] In another embodiment, the prism 703 can be arranged along the horizontal axis (eg Figure 7 The prism 703 is deflected in the direction of the inside and outside of the paper of the schematic diagram shown in the figure). Based on the deflection of the prism 703 along the horizontal axis, it can play an effect similar to that of the optical sensor 701 shaking its head left and right to change the image acquisition range accordingly. In this way, when the position of the optical sensor 701 is fixed, the image acquisition range of the optical sensor 701 in the horizontal axis direction can be expanded by deflecting the prism 703 along the horizontal axis direction, so as to deal with the problem of the subject being out of the frame horizontally.
[0138] In another embodiment, the prism 703 can be deflected along the horizontal and vertical directions respectively, so as to expand the image acquisition range of the optical sensor 701 in the horizontal and vertical directions, thereby coping with the problem of the subject being out of the frame horizontally and vertically.
[0139] By introducing new compensation devices including prisms and prism-related control components, compensation can be performed when the subject is about to or has already left the frame, so as to achieve adaptive on-demand adjustment of the image acquisition range without the user having to manually change the position and orientation of the camera module to adjust the image acquisition range, and it helps to achieve adaptive and smooth scaling of the displayed image.
[0140] For handheld scenarios, when users use the shooting module in handheld scenarios, the newly added compensation device can compensate for the hand shake when the user holds the camera, so as to weaken the adverse effect of hand shake on image display. In addition, the on-demand operation based on the compensation device can replace the on-demand adjustment of the image acquisition range by the user's hand to a certain extent, and the adjustment effect is more accurate.
[0141] For tripod scenarios, when users use the shooting module in a tripod scenario, by adding compensation devices, the image acquisition range can be expanded in all directions, so that the shooting module is equivalent to having a larger image acquisition range, so as to achieve the effect of full coverage of the desired shooting range. This can effectively avoid the occurrence of the subject out of the frame and effectively ensure the stability of the image display.
[0142] Please refer to Figure 5 When the position of the shooting module is fixed, if prism compensation is not performed, the image acquisition range of the shooting module can be the range covered by the image shown by label 504, and if prism compensation is performed in the horizontal and vertical directions, the image acquisition range of the shooting module can be the range shown by label 507.
[0143] In a feasible implementation, the deflection of the prism in the horizontal direction can make the image acquisition range within Figure 5 The prism moves in the left and right directions as shown in the schematic diagram, and the deflection in the longitudinal direction of the prism can make the image acquisition range within Figure 5 Move in the up and down directions as shown in the schematic diagram.
[0144] Please refer to Figure 6 When the position of the shooting module is fixed, if prism compensation is not performed, the image acquisition range of the shooting module can be the range covered by the image shown by label 604, and if prism compensation is performed in the horizontal and vertical directions, the image acquisition range of the shooting module can be the range shown by label 607.
[0145] In one embodiment of the present application, the subject detection data of the first subject includes the subject detection size of the first subject; the image processing method also includes: obtaining the minimum distance between the boundary corresponding to the first subject and the boundary of the first image in the first direction, and obtaining the minimum distance between the boundary corresponding to the first subject and the boundary of the first image in the second direction; wherein, the boundary corresponding to the first subject is the boundary of the second image or the boundary of the subject detection size of the first subject, and the first direction and the second direction are perpendicular to each other; the situation where the first information does not meet the positional relationship requirements includes: any one of the minimum distance in the first direction is not greater than (or less than) the first distance threshold and the minimum distance in the second direction is not greater than (or less than) the second distance threshold is established.
[0146] The minimum distance between the boundary corresponding to the focus subject and the boundary of the initial image can be used to reflect whether the subject is likely to be out of the frame in two directions, so that compensation can be made in the corresponding direction as needed later.
[0147] In one embodiment, the first direction and the second direction may be the horizontal direction and the vertical direction mentioned above, respectively, and the first direction is parallel to a portion of a boundary of the first image.
[0148] In one embodiment, specific values of the first distance threshold and the second distance threshold may be equal.
[0149] In one embodiment, the specific values of the first spacing threshold and the second spacing threshold may not be equal. For example, taking the boundary corresponding to the first subject as the boundary of the second image as an example, the first spacing threshold may be the product of the boundary length of the first image in the first direction and a preset percentage, and the second spacing threshold may be the product of the boundary length of the first image in the second direction and the preset percentage. Exemplarily, the preset percentage may be any percentage between 5% and 10%.
[0150] Considering that the larger the field of view magnification is, the smaller the image acquisition range is, in one embodiment, when the field of view magnification used to acquire the first image is not greater than (or less than) the set magnification, the boundary of the second image is used as the boundary corresponding to the first subject, otherwise the boundary of the subject detection size of the first subject is used as the boundary corresponding to the first subject. In this way, accurate judgment of whether the subject is out of the frame can be achieved.
[0151] Preferably, the setting ratio can be obtained through empirical value or through debugging.
[0152] In one embodiment of the present application, when the first information does not meet the set positional relationship requirements, the deflection angle of the prism is controlled to change, including: if the minimum spacing in the first direction is not greater than the first spacing threshold, according to a first preset correspondence between the boundary spacing and the deflection angle adjustment amount, a first deflection angle adjustment amount corresponding to the minimum spacing in the first direction is obtained, and the deflection angle of the prism in the first direction is adjusted according to the first deflection angle adjustment amount; if the minimum spacing in the second direction is not greater than the second spacing threshold, according to a second preset correspondence between the boundary spacing and the deflection angle adjustment amount, a second deflection angle adjustment amount corresponding to the minimum spacing in the second direction is obtained, and the deflection angle of the prism in the second direction is adjusted according to the second deflection angle adjustment amount.
[0153] The deflection angles of the prism in two directions can be adjusted separately through a preset corresponding relationship, so that the deflection angle of the prism can be accurately adjusted.
[0154] In one embodiment, the first preset corresponding relationship and the second preset corresponding relationship can be calibrated based on the conversion relationship between the spacing and the deflection angle adjustment amount, combined with the adjustment coefficient corresponding to the spacing. The adjustment coefficient can be used to adjust the deflection angle adjustment amount converted from the spacing to increase, decrease or maintain the converted deflection angle adjustment amount.
[0155] In a feasible implementation, the spacing is negatively correlated with its corresponding adjustment coefficient, that is, the larger the spacing, the smaller the corresponding adjustment coefficient, so that when the subject is not seriously out of the frame, light compensation is performed, and when the subject is seriously out of the frame, heavy compensation is performed. In this way, the degree of compensation can be implemented, and the compensation effect is better.
[0156] Taking the above preset percentage of 10% as an example, if the minimum spacing in the first direction is between 5% and 10% of the boundary length of the first image in the first direction, it means that the situation of the subject being out of the frame is not serious. If the minimum spacing in the first direction is between 0% and 5% of the boundary length of the first image in the first direction, it means that the situation of the subject being out of the frame is serious.
[0157] In a feasible implementation, the image processing module can send a deflection instruction carrying the deflection direction and the deflection angle adjustment amount to a motor that controls the deflection of the prism, and the motor executes the received deflection instruction to control the prism to deflect in the corresponding direction.
[0158] Please refer to Fig. 9 An embodiment of the present application further provides an image processing system, which may include a data input module 91, a perception engine 92, a decision engine 93, an image processing module 94 and a display module 95.
[0159] The data input module 91 may include a sensor output acquisition module 911 and a subject detection module 912 .
[0160] Among them, the sensor output image acquisition module 911 can be used to obtain the initial image captured by the optical sensor of the shooting module.
[0161] The subject detection module 912 can be used to proportionally reduce the initial image acquired by the sensor output acquisition module 911, and perform subject detection on the processed image according to the subject identification data of the focus subject selected by the user to obtain the subject detection data of the focus subject.
[0162] The perception engine 92 may include a subject detection data acquisition module 921 , an image data acquisition module 922 , and a camera configuration data acquisition module 923 .
[0163] The subject detection data acquisition module 921 may be used to acquire subject detection data obtained by the subject detection module 912 through subject detection.
[0164] The image data acquisition module 922 may be used to acquire basic image information (such as size, format, etc.) of the initial image obtained by the sensor output image acquisition module 911 .
[0165] The camera configuration data acquisition module 923 may be used to acquire camera configuration data. The camera configuration data may include, for example, the field of view angle magnification used to acquire the initial image.
[0166] In one embodiment, the perception engine 92 may also include a compensation module, which can be used to obtain the minimum distance between the boundary corresponding to the focus subject and the boundary of the initial image in the horizontal and vertical directions based on the subject detection data, and adjust the deflection angle of the prism as needed based on the comparison between the minimum distance and the corresponding distance threshold, so as to achieve on-demand compensation for the subject out of frame situation.
[0167] In a feasible implementation, when the prism deflection angle needs to be adjusted, the compensation module can send a deflection angle adjustment instruction to the motor driver that controls the prism deflection through the hardware abstraction layer (Hal), and the motor driver can convert the deflection angle adjustment instruction into a current value, and send the current value to the motor through the I2C interface, so that the motor controls the prism to deflect to a corresponding angle.
[0168] The decision engine 93 may include a scaling output module 931 .
[0169] Among them, the scaling ratio output module 931 can be used to obtain the field of view angle magnification corresponding to the displayed image based on the subject detection data obtained by the subject detection data acquisition module 921, the basic image information obtained by the image data acquisition module 922, and the camera configuration data obtained by the camera configuration data acquisition module 923, combined with the set image display requirements.
[0170] The image processing module 94 may include an image cutting module 941 .
[0171] Among them, the image cutting module 941 can be used to call the hardware to perform image cutting on the initial image to obtain the display image according to the image size of the field of view angle magnification corresponding to the display image, combined with the position of the focus subject in the initial image and the set image display requirements, and output the display image to the display module 95 for image display.
[0172] By cutting the initial image collected in real time to obtain a display image that meets the image display requirements and displaying the image in real time based on it, the effect of image smoothing can be achieved.
[0173] An embodiment of the present application provides an image processing device, including: an acquisition module, used to acquire a first image captured by a shooting module; a perception module, used to obtain subject detection data of a first subject based on the first image; a decision module, used to obtain the magnification of the first field of view angle according to the magnification of the field of view angle used by the shooting module to capture the first image, the subject detection data of the first subject and the set image display requirements; a processing module, used to acquire a second image according to the magnification of the first field of view angle, the second image is a part of the first image corresponding to the subject detection data of the first subject and the first field of view angle, and the second image meets the image display requirements; and a display module, used to output the second image to a display module.
[0174] An embodiment of the present application also provides an electronic chip, which task processing chip is installed in an electronic device (UE), and the electronic chip includes: a processor, which is used to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the electronic chip is triggered to execute the method steps provided by any method embodiment of the present application.
[0175] An embodiment of the present application also proposes a terminal device, which includes a communication module, a memory for storing computer program instructions, and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the terminal device is triggered to execute the method steps provided by any method embodiment of the present application.
[0176] An embodiment of the present application also proposes a server device, which includes a communication module, a memory for storing computer program instructions, and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the server device is triggered to execute the method steps provided by any method embodiment of the present application.
[0177] An embodiment of the present application also provides an electronic device, which includes multiple antennas, a memory for storing computer program instructions, a processor for executing computer program instructions, and a communication device (such as a communication module that can implement 5G communication based on the NR protocol), wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps provided by any method embodiment of the present application.
[0178] Specifically, in an embodiment of the present application, one or more computer programs are stored in the above-mentioned memory, and the one or more computer programs include instructions. When the instructions are executed by the above-mentioned device, the above-mentioned device executes the method steps described in the embodiment of the present application.
[0179] Furthermore, the devices, apparatuses, and modules described in the embodiments of the present application may be implemented by computer chips or entities, or by products having certain functions.
[0180] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0181] In the several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0182] Specifically, a computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method steps provided in the embodiment of the present application.
[0183] The embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is run on a computer, it enables the computer to execute the method steps provided by the embodiment of the present application.
[0184] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0185] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0186] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0187] The integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory, random access memory, disk or optical disk and other media that can store program code.
[0188] In the embodiments of the present application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.
[0189] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0190] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments of the present application can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0191] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the same or similar parts between the various embodiments in this application can be referred to each other. For example, the specific working process of the system, device and unit described in the embodiments of this application can refer to the corresponding process in the method embodiment of this application, and will not be repeated here.
[0192] The above description is only a specific embodiment of the present application and is not intended to limit the present application. The protection scope of the present application shall be based on the claims.
Claims
1. An image processing method, characterized in that: include: Acquire a first image captured by the shooting module; obtaining subject detection data of a first subject according to the first image; Obtaining a magnification of a first field of view angle according to a magnification of a field of view angle used by the shooting module to capture the first image, subject detection data of the first subject, and a set image display requirement; Acquire a second image according to the magnification of the first field of view, wherein the second image is a portion of the first image corresponding to the subject detection data of the first subject and the first field of view, and the second image meets the image display requirement; outputting the second image to a display module; The method further comprises: If the positional relationship between the boundary corresponding to the first subject and the boundary of the first image does not meet the set positional relationship requirement, changing the image acquisition range of the shooting module; If the magnification of the field of view angle used to capture the first image is less than or equal to the set magnification, the boundary of the second image is used as the boundary corresponding to the first subject.
2. The method according to claim 1, characterized in that The method further comprises: Acquire first information, where the first information is used to describe a positional relationship between the first subject and a boundary of the first image; When the first information does not meet the set position relationship requirement, the deflection angle of the prism is controlled to change; Among them, the change of the image acquisition range of the shooting module is associated with the change of the deflection angle of the prism.
3. The method according to claim 2, characterized in that The subject detection data of the first subject includes a subject detection size of the first subject; The method further comprises: Acquire a minimum distance between a boundary corresponding to the first subject and a boundary of the first image in a first direction, and acquire a minimum distance between a boundary corresponding to the first subject and a boundary of the first image in a second direction; The boundary corresponding to the first subject is the boundary of the second image or the boundary of the subject detection size of the first subject, and the first direction is perpendicular to the second direction; The case where the first information does not meet the positional relationship requirement includes: any one of the following cases is true: the minimum spacing in the first direction is not greater than a first spacing threshold and the minimum spacing in the second direction is not greater than a second spacing threshold.
4. The method according to claim 3, characterized in that When the first information does not meet the set position relationship requirement, controlling the deflection angle of the prism to change includes: When the minimum spacing in the first direction is not greater than the first spacing threshold, according to a first preset correspondence between a boundary spacing and a deflection angle adjustment amount, obtaining a first deflection angle adjustment amount corresponding to the minimum spacing in the first direction, and adjusting the deflection angle of the prism in the first direction according to the first deflection angle adjustment amount; When the minimum spacing in the second direction is not greater than the second spacing threshold, a second deflection angle adjustment amount corresponding to the minimum spacing in the second direction is obtained according to a second preset correspondence between the boundary spacing and the deflection angle adjustment amount, and the deflection angle of the prism in the second direction is adjusted according to the second deflection angle adjustment amount.
5. The method according to any one of claims 1 to 4, characterized in that: The obtaining subject detection data of the first subject according to the first image includes: Performing proportional reduction processing on the first image to obtain a third image; According to the pre-acquired subject identification data of the first subject, subject detection is performed on the third image to obtain subject detection data of the first subject.
6. The method according to any one of claims 1 to 4, characterized in that: Before acquiring the first image captured by the shooting module, the method further includes: In response to a subject selection operation on the image displayed by the display module, taking the selected subject as the first subject, and acquiring subject identification data of the first subject; The obtaining subject detection data of the first subject according to the first image includes: Subject detection is performed according to the subject identification data of the first subject and the first image to obtain subject detection data of the first subject.
7. An image processing device, characterized in that: include: An acquisition module, used to acquire a first image captured by the shooting module; a perception module, configured to obtain subject detection data of a first subject according to the first image; a decision module, configured to obtain a magnification of the first field of view angle according to the magnification of the field of view angle used by the shooting module to capture the first image, subject detection data of the first subject, and a set image display requirement; a processing module, configured to acquire a second image according to a magnification of the first field of view angle, wherein the second image is a portion of the first image corresponding to the subject detection data of the first subject and the first field of view angle, and the second image meets the image display requirement; A display sending module, used for outputting the second image to a display module; The image processing device is further configured to change the image acquisition range of the shooting module if the positional relationship between the boundary corresponding to the first subject and the boundary of the first image does not meet the set positional relationship requirement; If the magnification of the field of view angle used to capture the first image is less than or equal to the set magnification, the boundary of the second image is used as the boundary corresponding to the first subject.
8. An electronic chip, characterized in that: include: A processor, configured to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the electronic chip is triggered to execute the method according to any one of claims 1 to 6.
9. An electronic device, characterized in that: The electronic device comprises one or more memories for storing computer program instructions, and one or more processors, wherein when the computer program instructions are executed by the one or more processors, the electronic device is triggered to execute the method as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and apparatus for extending locating range of binocular camera
CN106060527A
Following type flight control method and device, and unmanned plane
CN106708089A
An axial distribution sensing integrated imaging method with a tracking function
CN109819235A
Method and device for expanding positioning range of binocular camera
CN110099215A
Stackable panoramic video real-time splicing method
CN111526302A
