Scene image acquisition method and device, storage medium and electronic equipment
By combining a telephoto lens and a wide field-of-view lens, and utilizing resolution scaling and image fusion techniques, scene images that balance sharpness and field of view are generated. This solves the problem that a monocular camera cannot meet the dual requirements of image sharpness and field of view, and achieves a comprehensive improvement in image clarity.
Patent Information
- Application Number
- CN202410975288.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-08
AI Technical Summary
In existing technologies, although monocular cameras can provide clear images, they are difficult to balance a comprehensive field of view and high image clarity, especially in scenarios such as video conferencing, live streaming, and mobile communication. As a result, image acquisition cannot meet users' dual needs for image clarity and field of view.
By combining telephoto lenses with different focal lengths and wide field-of-view lenses, local images are acquired from the images of each lens through the region of interest, and resolution scaling, image fusion and quantization parameter adjustment are performed to generate scene images that balance sharpness and field of view.
It improves the comprehensiveness and clarity of images, ensuring clear display of regions of interest, while optimizing image encoding and transmission efficiency to meet image acquisition needs in various scenarios.
Smart Images

Figure CN118921567A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a scene image acquisition method, device, storage medium and electronic device in the field of computer technology. Background Art
[0002] Using cameras to capture images in a scene has become a part of people's daily needs. However, in some usage scenarios, there are requirements for the accuracy and viewing angle range of important areas of the captured images, such as video conferencing, live streaming, and mobile communications. In order to obtain high-definition images, the existing technology can use a monocular camera with higher resolution. However, although a monocular camera can provide relatively clear images, it is difficult to obtain a comprehensive picture with a large viewing angle range, and it is also difficult to distinguish subject content such as portraits. In addition, the cost is high. It is necessary to provide an image acquisition method that takes into account both picture clarity and viewing angle range. Summary of the invention
[0003] The embodiments of the present application provide a scene image acquisition method, device, storage medium and electronic device. The method can take into account both image clarity and viewing angle range by combining the image of the area of interest captured by a telephoto lens and the wide-angle image captured by a wide field of view lens, thereby improving the comprehensiveness and clarity of the captured image.
[0004] In a first aspect, an embodiment of the present application provides a scene image acquisition method, the method comprising:
[0005] A first lens is used to capture a first image of a target scene, and a second lens is used to capture a second image of the target scene, wherein a focal length of the first lens is greater than a focal length of the second lens, a field of view angle of the second lens is greater than a field of view angle of the first lens, and center points of the first lens and the second lens are aligned;
[0006] Acquire a first partial image in the first image based on the region of interest, and acquire a second partial image in the second image based on the region of interest;
[0007] The first partial image is used to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
[0008] Through the above technical solution, it is possible to combine the image of the area of interest captured by the telephoto lens and the wide-angle image captured by the wide-field-angle lens, taking into account both image clarity and viewing angle range, thereby improving the comprehensiveness and clarity of the captured image.
[0009] In combination with the first aspect, in some possible implementations, acquiring a first partial image in the first image based on the region of interest, and acquiring a second partial image in the second image based on the region of interest includes:
[0010] Get a pre-set region of interest;
[0011] Acquire a first partial image having an overlapping portion with the region of interest in the first image;
[0012] A second partial image corresponding to the first partial image is acquired in the second image.
[0013] Through the above technical solution, when the first lens fails to capture the complete area of interest, the local image that needs to be adjusted can be accurately obtained.
[0014] In combination with the first aspect, in some possible implementations, using the first partial image to overwrite the second partial image in the second image to obtain a scene image for the target scene includes:
[0015] Performing resolution scaling processing on the first partial image to obtain a third partial image, wherein the resolution of the third partial image is consistent with the resolution of the second partial image;
[0016] The third partial image is used to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
[0017] Through the above technical solution, the resolution of the first local image is reduced before overwriting, thereby avoiding the situation where the local images cannot be accurately overwritten due to different sizes.
[0018] In combination with the first aspect, in some possible implementations, using a third partial image to overwrite the second partial image in the second image to obtain a scene image for the target scene includes:
[0019] Performing image fusion processing on the third partial image and the second partial image to obtain a fused partial image;
[0020] The second partial image in the second image is overlaid with the fused partial image to obtain a scene image for the target scene.
[0021] Through the above technical solution, by performing fusion processing on the local images with reduced resolution, the clarity of the third local image is maintained while avoiding the visual difference between the local image and the second image.
[0022] In a first aspect, in some possible implementations, the method further includes:
[0023] Performing quantization parameter adjustment processing on the scene image based on the region of interest to obtain image quantization parameters;
[0024] Based on the image quantization parameter, the scene image is encoded to obtain the scene image encoding, and the scene image encoding is used for transmission and display of the scene image.
[0025] In combination with the first aspect, in some possible implementations, performing quantization parameter adjustment processing on a scene image based on a region of interest to obtain an image quantization parameter includes:
[0026] The quantization parameters corresponding to the region of interest in the scene image are reduced to obtain the image quantization parameters.
[0027] Through the above technical solution, by adjusting the quantization parameters, the image details of the region of interest are retained while avoiding excessive encoding of the scene image, which facilitates the transmission and display of the scene image.
[0028] In combination with the first aspect, in some possible implementations, a resolution of the first image is greater than or equal to a resolution of the second image.
[0029] In a second aspect, an embodiment of the present application provides a scene image acquisition device, the device comprising:
[0030] An image acquisition unit, used to acquire a first image of a target scene using a first lens, and acquire a second image of the target scene using a second lens, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, and the center points of the first lens and the second lens are aligned;
[0031] A local image acquisition unit, configured to acquire a first local image in the first image based on the region of interest, and acquire a second local image in the second image based on the region of interest;
[0032] The overlay processing unit is used to use the first partial image to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
[0033] In a second aspect, in some possible implementations, the local image acquisition unit is specifically used to acquire a preset region of interest;
[0034] Acquire a first partial image having an overlapping portion with the region of interest in the first image;
[0035] A second partial image corresponding to the first partial image is acquired in the second image.
[0036] In a second aspect, in some possible implementations, the overlay processing unit is specifically used to perform resolution scaling processing on the first partial image to obtain a third partial image, and the resolution of the third partial image is consistent with the resolution of the second partial image;
[0037] The third partial image is used to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
[0038] In a second aspect, in some possible implementations, the coverage processing unit is specifically used to perform image fusion processing on the third partial image and the second partial image to obtain a fused partial image;
[0039] The second partial image in the second image is overlaid with the fused partial image to obtain a scene image for the target scene.
[0040] In a second aspect, in some possible implementations, the scene image acquisition device further includes a parameter adjustment unit, configured to perform a quantization parameter adjustment process on the scene image based on the region of interest to obtain an image quantization parameter;
[0041] Based on the image quantization parameter, the scene image is encoded to obtain the scene image encoding, and the scene image encoding is used for transmission and display of the scene image.
[0042] In a second aspect, in some possible implementations, the parameter adjustment unit is specifically used to reduce the quantization parameter corresponding to the region of interest in the scene image to obtain the image quantization parameter.
[0043] In a second aspect, in some possible implementations, a resolution of the first image is greater than or equal to a resolution of the second image.
[0044] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0045] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 is an example schematic diagram of an image captured by a first lens and a second lens provided in an embodiment of the present application;
[0048] Figure 2It is a flow chart of a scene image acquisition method provided in an embodiment of the present application;
[0049] Figure 3 It is a flow chart of a scene image acquisition method provided in an embodiment of the present application;
[0050] Figure 4 is an exemplary schematic diagram of obtaining a first partial image provided in an embodiment of the present application;
[0051] Figure 5 is a structural schematic diagram of a scene image acquisition device provided in an embodiment of the present application;
[0052] Figure 6 is a structural schematic diagram of a scene image acquisition device provided in an embodiment of the present application;
[0053] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0055] In application scenarios where image or video transmission occurs, such as video conferencing, webcasting, or mobile communications, users can use a lens to capture images of the target scene, and then send the captured images to other terminals for display. When users capture images of the target scene, they need to clearly display the captured part. For example, in the application scenario of online teaching live broadcast, users need to be able to clearly capture the portrait of the teacher who is teaching the course in the scene, as well as the content of the teacher's writing on the blackboard, but also need to be able to capture the entire classroom as much as possible. However, in existing implementation methods, users often use a monocular camera with higher resolution to capture images in the scene. Although a monocular camera can capture a clearer picture, it is limited by the field of view of the focal length and cannot capture a more comprehensive picture with a larger viewing angle, making it difficult to meet the user's dual needs for image clarity and viewing angle.
[0056] The scene image acquisition method provided in the embodiment of the present application can be implemented by relying on a computer program and can be run on a scene image acquisition device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application. The scene image acquisition device can be applied to the scene image acquisition device provided in the present application. The scene image acquisition device can be connected to a first lens and a second lens, and obtain images captured by the first lens and the second lens. The first lens and the second lens can be independent devices different from the scene image acquisition device, or they can be modules integrated in the scene image acquisition device. Please refer to Figure 1 , an example schematic diagram of an image captured by a first lens and a second lens is provided for an embodiment of the present application, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, angle 1 can be the field of view of the first lens, and angle 2 can be the field of view of the second lens, so the first lens can capture a clearer picture, and the second lens can capture a more comprehensive picture, and the center points of the first lens and the second lens are aligned, and the image of the target scene is captured at the same camera angle. The user or the scene image acquisition device can set a region of interest (ROI) for the image captured for the target scene, which can be an area selected or defined as a focus area in the image. The region of interest can be automatically set by the scene image acquisition device, or it can be set by the user or relevant staff. For example, in the application scenario of online teaching live broadcast, the region of interest can be an area containing the teacher's portrait, and in the application scenario of live sales, the region of interest can be an area containing goods and sales staff.
[0057] like Figure 1 As shown, the first image is an image captured by the first lens, the second image is an image captured by the second lens, and the target scene is a classroom where online teaching is being broadcast live. The region of interest can be a portrait of the teacher. Figure 1 The fact that the first image is included in the second image does not mean that the resolution of the first image is smaller than that of the second image, but rather that the field of view corresponding to the second image and the scene range that can be captured are larger than those of the first image. Since the focal length of the first lens is longer, the clarity of the area of interest captured in the first image is higher. Therefore, the scene image acquisition device can obtain a local image including the area of interest from the first image, and then overlay the local image on the area of interest of the second image to obtain a scene image for the target scene, thereby taking into account both the clarity and comprehensiveness of the scene image. Then, the scene image acquisition device can transmit the scene image to other application terminals for display. For example, when the student's application terminal receives the scene image, it can see a clear portrait of the teacher in the scene image and the environment of the entire classroom.
[0058] The scene image acquisition method provided by the present application is described in detail below in conjunction with specific embodiments.
[0059] See also Figure 2 , which is a flow chart of a scene image acquisition method provided in an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps S101-S103.
[0060] S101, using a first lens to capture a first image of a target scene, and using a second lens to capture a second image of the target scene.
[0061] Specifically, the scene image acquisition device can simultaneously use the first lens and the second lens to capture images of the target scene, use the first lens to capture images of the target scene to obtain a first image, and use the second lens to capture images of the target scene to obtain a second image, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, the center points of the first lens and the second lens are aligned, and the images of the target scene are captured at the same camera angle.
[0062] S102: Acquire a first partial image in the first image based on the region of interest, and acquire a second partial image in the second image based on the region of interest.
[0063] Specifically, the scene image acquisition device can obtain a first partial image in the first image based on the region of interest, where the first partial image is a partial image including the region of interest in the first image. Similarly, the second partial image can be obtained in the second image based on the region of interest, where the second partial image is a partial image including the region of interest in the second image, wherein the region of interest can be automatically set by the scene image acquisition device, or can be set by a user or relevant staff.
[0064] S103: Use the first partial image to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
[0065] Specifically, the scene image acquisition device can use the first partial image to cover the second partial image in the second image, so as to obtain a scene image for the target scene, and the scene image can include a higher definition area of interest captured by the first lens, and can also include a scene image with a larger field of view captured by the second lens. The scene image acquisition device can also encode the scene image to obtain a scene image code, and the encoding process can be used to ensure the quality of the scene image, optimize the compression efficiency and transmission efficiency of the scene image, and then send the scene image code to other application terminals for display.
[0066] In the embodiment of the present application, a first lens is used to capture a first image of a target scene, and a second lens is used to capture a second image of a target scene, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, the center points of the first lens and the second lens are aligned, a first partial image is acquired in the first image based on the region of interest, a second partial image is acquired in the second image based on the region of interest, and the first partial image is used to cover the second partial image in the second image to obtain a scene image for the target scene. By combining the region of interest image captured by the telephoto lens and the wide viewing angle image captured by the wide viewing angle lens, both image clarity and viewing angle range are taken into account, thereby improving the comprehensiveness and clarity of the captured image.
[0067] See also Figure 3 , which is a flow chart of a scene image acquisition method provided in an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps S201-S207.
[0068] S201, using a first lens to capture a first image of a target scene, and using a second lens to capture a second image of the target scene.
[0069] Specifically, the scene image acquisition device can simultaneously use the first lens and the second lens to capture images of the target scene, use the first lens to capture images of the target scene to obtain a first image, and use the second lens to capture images of the target scene to obtain a second image, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, the center points of the first lens and the second lens are aligned, and the images of the target scene are captured at the same camera angle.
[0070] Optionally, the resolution of the first lens may be the same as the resolution of the second lens, so the resolution of the first image may be the same as the resolution of the second image.
[0071] Optionally, since the first lens is used to obtain a clearer image, the resolution of the first lens may also be greater than the resolution of the second lens, that is, the resolution of the first image may be greater than the resolution of the second image.
[0072] S202: Acquire a first partial image in the first image based on the region of interest, and acquire a second partial image in the second image based on the region of interest.
[0073] Specifically, the scene image acquisition device can obtain a first partial image in the first image based on the region of interest, where the first partial image is a partial image including the region of interest in the first image. Similarly, the second partial image can be obtained in the second image based on the region of interest, where the second partial image is a partial image including the region of interest in the second image, wherein the region of interest can be automatically set by the scene image acquisition device, or can be set by a user or relevant staff.
[0074] Optionally, since the focal length of the first lens is relatively long, the viewing angle of the image captured by the first lens is limited. The scene image acquisition device can be applied to application scenarios such as video conferencing, webcasting or mobile communications. In the process of the first lens continuously capturing images of the target scene, there may be a situation where the complete region of interest cannot be captured. For example, in the application scenario of online teaching live broadcast, the user or the scene image acquisition device can pre-set the teacher's portrait as the region of interest. However, since the teacher may move around during the lecture, the first image captured by the first lens may not include the complete teacher's portrait, or even fail to include the teacher's portrait. Therefore, the scene image acquisition device can first acquire the pre-set region of interest, and then acquire a first partial image that overlaps with the region of interest in the first image, and then acquire a second partial image corresponding to the first partial image in the second image. The second partial image contains the same target scene content as the first partial image. Please refer to Figure 4 , an example schematic diagram of obtaining a first partial image is provided for an embodiment of the present application. The pre-set region of interest may be A+B. However, due to reasons such as movement of the region of interest, movement of the lens, or setting of the region of interest, the first image captured by the first lens does not include the complete region of interest. In this case, the scene image acquisition device may obtain an overlapping portion B between the first image and the region of interest. The overlapping portion B corresponds to the first partial image in the first image. Similarly, the overlapping portion B corresponds to the second partial image in the second image. The second partial image is the partial image in the second image corresponding to the first partial image.
[0075] S203: Perform resolution scaling processing on the first partial image to obtain a third partial image.
[0076] Specifically, since the resolution of the first image is equal to or greater than the resolution of the second image, and since the proportion of the first partial image in the first image is greater than the proportion of the second partial image in the second image, the resolution of the first partial image is greater than the resolution of the second partial image. In order to enable the first partial image to cover the second partial image, the scene image acquisition device needs to perform resolution scaling processing on the first partial image to obtain a third partial image, and the resolution of the third partial image is consistent with the resolution of the second partial image. For example, if the resolution of the first partial image is 600*300 and the resolution of the second partial image is 400*200, the scene image acquisition device can perform resolution scaling processing on the first partial image to obtain a third partial image with a resolution of 400*200.
[0077] Optionally, the scene image acquisition device may use a scaling operator to reduce the first local image to a third local image having a resolution consistent with that of the second local image, wherein the scaling operator may be used to generate a corresponding low-resolution image from a high-resolution image.
[0078] S204: Perform image fusion processing on the third partial image and the second partial image to obtain a fused partial image.
[0079] Specifically, the scene image acquisition device can use the third partial image to cover the second partial image in the second image to obtain a scene image for the target scene. The scene image can include a region of interest with higher clarity captured by the first lens, and can also include a scene image with a larger field of view captured by the second lens. It can be understood that although the original first partial image is reduced by resolution scaling, the first image obtained has a higher clarity than the second image due to the longer focal length of the first lens. Therefore, if the third partial image is directly used to cover the second partial image, there will be a situation where there is an obvious visual difference between the edge of the third partial image and the second partial image. In order to avoid the visual difference of the edge of the partial image, the scene image acquisition device can perform image fusion processing on the third partial image and the second partial image to obtain a fused partial image. The image fusion processing can fuse the information of multiple images together to generate a new image, so that the new image can contain the key information and features of the original image, thereby maintaining the clarity of the third partial image while avoiding the visual difference between the partial image and the second image.
[0080] Optionally, when performing image fusion processing, the scene image acquisition device may use a multi-exposure fusion algorithm, a multi-depth of field fusion algorithm, a multi-view stitching algorithm, an Alpha fusion algorithm, and the like.
[0081] Optionally, if the target scene is a scene with relatively stable environmental factors and a relatively fixed lens position, such as a scene of online teaching live broadcast, since online teaching live broadcast can be in a relatively bright room, and the lens position is relatively fixed and does not need to be moved frequently, the scene image acquisition device can use the Alpha fusion algorithm to perform image fusion processing, and the formula is as follows:
[0082] I out =αI1+(1-α)I2
[0083] Wherein, I1 may be the third partial image, I2 may be the second partial image, and I out The local images may be fused, and α may be a coefficient determined by a fixed physical difference between the first lens and the second lens.
[0084] S205, using the fused local image to perform overlay processing on the second local image in the second image to obtain a scene image for the target scene.
[0085] Specifically, the scene image acquisition device can use the fused local image to overlay the second local image in the second image, so as to obtain a scene image for the target scene. The scene image can include a higher-definition area of interest captured by the first lens, and can also include a scene image with a larger field of view captured by the second lens, and also avoids the visual difference between the edge of the local image and the second image.
[0086] S206, performing quantization parameter adjustment processing on the scene image based on the region of interest to obtain an image quantization parameter.
[0087] Specifically, the scene image acquisition device can also perform encoding processing on the scene image to obtain the scene image code. The encoding processing can be used to ensure the quality of the scene image, optimize the compression efficiency and transmission efficiency of the scene image, and then send the scene image code to other application terminals for display. Before encoding the scene image, the scene image acquisition device can first adjust the quantization parameter to be used in the encoding processing. The quantization parameter (Quantizer Parameter, QP) is a key parameter in the encoding process and can directly affect the quality and size of the image. The quantization parameter controls the quality of the image by adjusting the compression of the spatial details of the image. A smaller quantization parameter means that more image details are retained, so that the image quality is higher but the corresponding bitstream will also be longer. Therefore, in order to control the size of the image code and retain important image details at the same time, the scene image acquisition device can set a smaller quantization parameter for the region of interest in the scene image, thereby improving the image quality of the region of interest and maintaining the image details of the region of interest. Therefore, the scene image acquisition device can adjust the quantization parameter of the scene image based on the region of interest to obtain the image quantization parameter.
[0088] Optionally, since the smaller the quantization parameter, the better the image quality and the higher the bit rate, and vice versa, the larger the quantization parameter, the worse the image quality, the scene image acquisition device can reduce the quantization parameter corresponding to the region of interest in the scene image to obtain the image quantization parameter. Similarly, the scene image acquisition device can also enlarge the quantization parameter corresponding to the part of the scene image outside the region of interest, thereby ensuring the image details of the region of interest while avoiding the scene image encoding being too large, thereby improving the transmission efficiency of the scene image encoding.
[0089] S207: Based on the image quantization parameter, the scene image is coded to obtain a scene image code.
[0090] Specifically, the scene image acquisition device can encode the scene image based on the image quantization parameter obtained after the quantization parameter adjustment process to obtain the scene image code. The scene image code can be used for transmission and display of the scene image.
[0091] In the embodiment of the present application, a first lens is used to capture a first image for a target scene, a second lens is used to capture a second image for a target scene, a first partial image is obtained in the first image based on an area of interest, a second partial image is obtained in the second image based on an area of interest, a resolution scaling process is performed on the first partial image to obtain a third partial image, the resolution is adjusted so that the first partial image can accurately cover the second partial image without blocking other parts of the second image, the third partial image and the second partial image are subjected to image fusion processing to obtain a fused partial image, thereby maintaining the clarity of the third partial image while avoiding the visual difference between the partial image and the second image, and the fused partial image is used to cover the second partial image in the second image to obtain a scene image for the target scene. By combining the image of the area of interest captured by the telephoto lens and the image of the wide viewing angle captured by the lens with a wide field of view, both image clarity and viewing angle range are taken into account, thereby improving the comprehensiveness and clarity of the captured image. The quantization parameters of the scene image can also be adjusted based on the region of interest to obtain image quantization parameters. Based on the image quantization parameters, the scene image is encoded to obtain scene image encoding, which retains the image details of the region of interest while avoiding excessive scene image encoding, thereby facilitating the transmission and display of the scene image.
[0092] The following will be combined with the attached Figure 5 -Attached Figure 6 , the scene image acquisition device provided in the embodiment of the present application is introduced in detail. It should be noted that the attached Figure 4 -Attached Figure 6 The scene image acquisition device in the present application is used to execute Figure 1-Figure 4 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1-Figure 4 The embodiment shown.
[0093] See also Figure 5 , which shows a schematic diagram of the structure of a scene image acquisition device provided by an exemplary embodiment of the present application. The scene image acquisition device can be implemented as all or part of the device through software, hardware or a combination of both. The device 1 includes an image acquisition unit 11, a local image acquisition unit 12 and a coverage processing unit 13.
[0094] An image acquisition unit 11 is used to acquire a first image of a target scene using a first lens, and to acquire a second image of the target scene using a second lens, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, and the center points of the first lens and the second lens are aligned;
[0095] A local image acquisition unit 12, configured to acquire a first local image in the first image based on the region of interest, and acquire a second local image in the second image based on the region of interest;
[0096] The overlay processing unit 13 is used to perform overlay processing on the second partial image in the second image using the first partial image to obtain a scene image for the target scene.
[0097] In this embodiment, a first lens is used to capture a first image of a target scene, and a second lens is used to capture a second image of a target scene, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, the center points of the first lens and the second lens are aligned, a first partial image is acquired in the first image based on the region of interest, a second partial image is acquired in the second image based on the region of interest, and the first partial image is used to cover the second partial image in the second image to obtain a scene image of the target scene. By combining the region of interest image captured by the telephoto lens and the wide viewing angle image captured by the wide viewing angle lens, both image clarity and viewing angle range are taken into account, thereby improving the comprehensiveness and clarity of the captured image.
[0098] See also Figure 6 , which shows a schematic diagram of the structure of a scene image acquisition device provided by an exemplary embodiment of the present application. The scene image acquisition device can be implemented as all or part of the device through software, hardware or a combination of both. The device 1 includes an image acquisition unit 11, a local image acquisition unit 12, a coverage processing unit 13 and a parameter adjustment unit 14.
[0099] An image acquisition unit 11 is used to acquire a first image of a target scene using a first lens, and to acquire a second image of the target scene using a second lens, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, and the center points of the first lens and the second lens are aligned;
[0100] A local image acquisition unit 12, configured to acquire a first local image in the first image based on the region of interest, and acquire a second local image in the second image based on the region of interest;
[0101] Optionally, the local image acquisition unit 12 is specifically used to acquire a preset region of interest;
[0102] Acquire a first partial image having an overlapping portion with the region of interest in the first image;
[0103] A second partial image corresponding to the first partial image is acquired in the second image.
[0104] The overlay processing unit 13 is used to perform overlay processing on the second partial image in the second image using the first partial image to obtain a scene image for the target scene.
[0105] Optionally, the overlay processing unit 13 is specifically used to perform resolution scaling processing on the first partial image to obtain a third partial image, and the resolution of the third partial image is consistent with the resolution of the second partial image;
[0106] The third partial image is used to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
[0107] Optionally, the coverage processing unit 13 is specifically used to perform image fusion processing on the third local image and the second local image to obtain a fused local image;
[0108] The second partial image in the second image is overlaid with the fused partial image to obtain a scene image for the target scene.
[0109] A parameter adjustment unit 14 is used to perform quantization parameter adjustment processing on the scene image based on the region of interest to obtain an image quantization parameter;
[0110] Based on the image quantization parameter, the scene image is encoded to obtain the scene image encoding, and the scene image encoding is used for transmission and display of the scene image.
[0111] Optionally, the parameter adjustment unit 14 is specifically configured to reduce the quantization parameter corresponding to the region of interest in the scene image to obtain the image quantization parameter.
[0112] Optionally, the resolution of the first image is greater than or equal to the resolution of the second image.
[0113] In this embodiment, a first lens is used to capture a first image for a target scene, a second lens is used to capture a second image for a target scene, a first partial image is obtained in the first image based on an area of interest, a second partial image is obtained in the second image based on an area of interest, a resolution scaling process is performed on the first partial image to obtain a third partial image, the resolution is adjusted so that the first partial image can accurately cover the second partial image without blocking other parts of the second image, the third partial image and the second partial image are subjected to image fusion processing to obtain a fused partial image, thereby maintaining the clarity of the third partial image while avoiding the visual difference between the partial image and the second image, and the fused partial image is used to cover the second partial image in the second image to obtain a scene image for the target scene. By combining the area of interest image captured by the telephoto lens and the wide viewing angle image captured by the wide field of view lens, both image clarity and viewing angle range are taken into account, thereby improving the comprehensiveness and clarity of the captured image. The quantization parameters of the scene image can also be adjusted based on the region of interest to obtain image quantization parameters. Based on the image quantization parameters, the scene image is encoded to obtain scene image encoding, which retains the image details of the region of interest while avoiding excessive scene image encoding, thereby facilitating the transmission and display of the scene image.
[0114] It should be noted that the scene image acquisition device provided in the above embodiment only uses the division of the above functional modules as an example when executing the scene image acquisition method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the scene image acquisition device provided in the above embodiment and the scene image acquisition method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0115] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0116] The present application also provides a computer storage medium that can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 1-Figure 4 The scene image acquisition method of the embodiment shown in the figure can be found in the specific execution process. Figure 1-Figure 4 The specific description of the illustrated embodiment will not be repeated here.
[0117] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by a processor as described above. Figure 1-Figure 4 The scene image acquisition method of the embodiment shown in the figure can be found in the specific execution process. Figure 1-Figure 4The specific description of the illustrated embodiment will not be repeated here.
[0118] Please refer to Figure 7 , which shows a block diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device in the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via the bus 150.
[0119] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions and processes data of the terminal 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user pages, and applications; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0120] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable medium (Non-Transitory Computer-Readable Storage Medium). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems.
[0121] The memory 120 can be divided into an operating system space and a user space. The operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good operating results, the operating system allocates corresponding system resources to different third-party applications. However, the requirements for system resources in different application scenarios in the same third-party application are also different. For example, in the local resource loading scenario, the third-party application has higher requirements for disk reading speed; in the animation rendering scenario, the third-party application has higher requirements for GPU performance. The operating system and third-party applications are independent of each other, and the operating system often cannot perceive the current application scenario of the third-party application in a timely manner, resulting in the operating system being unable to perform targeted system resource adaptation according to the specific application scenario of the third-party application.
[0122] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.
[0123] The input device 130 is used to receive input commands or data, and includes but is not limited to a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used to output commands or data, and includes but is not limited to a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are touch screen displays.
[0124] The touch display screen can be designed as a full screen, a curved screen or a special-shaped screen. The touch display screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.
[0125] In addition, those skilled in the art will appreciate that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.
[0126] exist Figure 7 In the electronic device shown, the processor 110 may be used to call the scene image acquisition application stored in the memory 120, and specifically perform the following operations:
[0127] A first lens is used to capture a first image of a target scene, and a second lens is used to capture a second image of the target scene, wherein a focal length of the first lens is greater than a focal length of the second lens, a field of view angle of the second lens is greater than a field of view angle of the first lens, and center points of the first lens and the second lens are aligned;
[0128] Acquire a first partial image in the first image based on the region of interest, and acquire a second partial image in the second image based on the region of interest;
[0129] The first partial image is used to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
[0130] In one embodiment, when the processor 110 acquires a first partial image in the first image based on the region of interest and acquires a second partial image in the second image based on the region of interest, the processor 110 specifically performs the following operations:
[0131] Get a pre-set region of interest;
[0132] Acquire a first partial image having an overlapping portion with the region of interest in the first image;
[0133] A second partial image corresponding to the first partial image is acquired in the second image.
[0134] In one embodiment, when the processor 110 performs the overlay processing of the second partial image in the second image with the first partial image to obtain the scene image for the target scene, the processor 110 specifically performs the following operations:
[0135] Performing resolution scaling processing on the first partial image to obtain a third partial image, wherein the resolution of the third partial image is consistent with the resolution of the second partial image;
[0136] The third partial image is used to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
[0137] In one embodiment, when the processor 110 performs the overlay processing of the second partial image in the second image with the third partial image to obtain the scene image for the target scene, the processor 110 specifically performs the following operations:
[0138] Performing image fusion processing on the third partial image and the second partial image to obtain a fused partial image;
[0139] The second partial image in the second image is overlaid with the fused partial image to obtain a scene image for the target scene.
[0140] In one embodiment, when executing the scene image acquisition method, the processor 110 further performs the following operations:
[0141] Performing quantization parameter adjustment processing on the scene image based on the region of interest to obtain image quantization parameters;
[0142] Based on the image quantization parameter, the scene image is encoded to obtain the scene image encoding, and the scene image encoding is used for transmission and display of the scene image.
[0143] In one embodiment, when the processor 110 performs the quantization parameter adjustment process on the scene image based on the region of interest to obtain the image quantization parameter, the processor 110 specifically performs the following operations:
[0144] The quantization parameters corresponding to the region of interest in the scene image are reduced to obtain the image quantization parameters.
[0145] In one embodiment, the resolution of the first image is greater than or equal to the resolution of the second image.
[0146] In this embodiment, a first lens is used to capture a first image for a target scene, a second lens is used to capture a second image for a target scene, a first partial image is obtained in the first image based on an area of interest, a second partial image is obtained in the second image based on an area of interest, a resolution scaling process is performed on the first partial image to obtain a third partial image, the resolution is adjusted so that the first partial image can accurately cover the second partial image without blocking other parts of the second image, the third partial image and the second partial image are subjected to image fusion processing to obtain a fused partial image, thereby maintaining the clarity of the third partial image while avoiding the visual difference between the partial image and the second image, and the fused partial image is used to cover the second partial image in the second image to obtain a scene image for the target scene. By combining the area of interest image captured by the telephoto lens and the wide viewing angle image captured by the wide field of view lens, both image clarity and viewing angle range are taken into account, thereby improving the comprehensiveness and clarity of the captured image. The quantization parameters of the scene image can also be adjusted based on the region of interest to obtain image quantization parameters. Based on the image quantization parameters, the scene image is encoded to obtain scene image encoding, which retains the image details of the region of interest while avoiding excessive scene image encoding, thereby facilitating the transmission and display of the scene image.
[0147] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0148] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
[0149] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the first image, second image, etc. involved in this specification are all obtained with full authorization.
Claims
1. A scene image acquisition method, characterized in that: The method comprises: A first lens is used to capture a first image of a target scene, and a second lens is used to capture a second image of the target scene, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, and the center points of the first lens and the second lens are aligned; Acquire a first partial image in the first image based on the region of interest, and acquire a second partial image in the second image based on the region of interest; The first partial image is used to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
2. The method according to claim 1, characterized in that The acquiring a first partial image in the first image based on the region of interest, and acquiring a second partial image in the second image based on the region of interest, comprises: Get a pre-set region of interest; Acquire a first local image having an overlapping portion with the region of interest in the first image; A second partial image corresponding to the first partial image is acquired in the second image.
3. The method according to claim 1, characterized in that The using the first partial image to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene includes: Performing resolution scaling processing on the first partial image to obtain a third partial image, wherein the resolution of the third partial image is consistent with the resolution of the second partial image; The third partial image is used to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
4. The method according to claim 3, characterized in that: The using the third partial image to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene includes: Performing image fusion processing on the third partial image and the second partial image to obtain a fused partial image; The fused local image is used to perform overlay processing on the second local image in the second image to obtain a scene image for the target scene.
5. The method according to claim 1, characterized in that The method further comprises: Performing quantization parameter adjustment processing on the scene image based on the region of interest to obtain an image quantization parameter; Based on the image quantization parameter, the scene image is encoded to obtain scene image encoding, and the scene image encoding is used for transmission and display of the scene image.
6. The method according to claim 5, characterized in that The step of performing quantization parameter adjustment processing on the scene image based on the region of interest to obtain an image quantization parameter includes: The quantization parameter corresponding to the region of interest in the scene image is reduced to obtain an image quantization parameter.
7. The method according to claim 1, characterized in that The resolution of the first image is greater than or equal to the resolution of the second image.
8. A scene image acquisition device, characterized in that: The device comprises: An image acquisition unit, configured to acquire a first image of a target scene using a first lens, and acquire a second image of the target scene using a second lens, wherein the focal length of the first lens is greater than the focal length of the second lens, the field of view of the second lens is greater than the field of view of the first lens, and the center points of the first lens and the second lens are aligned; A local image acquisition unit, configured to acquire a first local image in the first image based on a region of interest, and acquire a second local image in the second image based on the region of interest; An overlay processing unit is used to use the first partial image to perform overlay processing on the second partial image in the second image to obtain a scene image for the target scene.
9. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 7.
