Image generation method and electronic equipment

By utilizing data judgment conditions of different image acquisition devices in electronic devices and processing the first image only when necessary, the problem of high power consumption of multi-camera devices is solved, and low power consumption and flexible image storage are achieved.

CN120751277APending Publication Date: 2025-10-03LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510897840.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

In existing electronic devices, at least two cameras both output image signals, resulting in high power consumption and failing to meet low power consumption requirements.

Method used

By acquiring data from image acquisition devices in different ranges, the data from the second image acquisition device is used to determine whether the conditions are met. The first image is processed only when the conditions are met. The second image acquisition device maintains a low power consumption mode to avoid unnecessary image signal output.

Benefits of technology

It effectively saves power consumption of electronic devices, avoids resource waste, and provides flexible image saving options to enhance user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751277A_ABST
    Figure CN120751277A_ABST
Patent Text Reader

Abstract

The invention discloses an image generation method and electronic equipment. The image generation method comprises the following steps: acquiring first data acquired by a first image acquisition device and second data acquired by a second image acquisition device; wherein the image range acquired by the first image acquisition device is different from the image range acquired by the second image acquisition device; obtaining a first image based on the first data; if the second data meets the first condition, the first image is processed based on the second data, a second image is obtained, and the image range displayed by the second image is different from the image range displayed by the first image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image generation method and electronic device. Background Art

[0002] At present, the market has increasingly higher requirements for the image acquisition functions of common electronic products such as mobile phones. Usually, at least two cameras are set in electronic devices to meet users' shooting needs, but at least two cameras output image signals, resulting in high power consumption of the electronic devices. Summary of the Invention

[0003] The purpose of the embodiments of the present application is to provide an image generation method and an electronic device.

[0004] In a first aspect, an embodiment of the present application provides an image generation method, comprising:

[0005] Acquire first data acquired by a first image acquisition device and second data acquired by a second image acquisition device; wherein the image range acquired by the first image acquisition device is different from the image range acquired by the second image acquisition device;

[0006] A first image is obtained based on the first data; if the second data satisfies a first condition, the first image is processed based on the second data to obtain a second image, and the image range displayed by the second image is different from the image range displayed by the first image.

[0007] In a possible implementation manner, the second data includes multiple groups, and the collection time of each group of second data is different;

[0008] Determining whether the second data satisfies the first condition includes:

[0009] For each set of the second data, extract target data corresponding to the target object; wherein the target data can at least represent the distance between the target object and the second image acquisition device;

[0010] Comparing multiple groups of target data to obtain comparison results;

[0011] If the comparison result indicates that the distance between the target object and the second image acquisition device has changed, it is determined that the second data meets the first condition.

[0012] In a possible implementation manner, before determining whether the second data satisfies the first condition, the method further includes:

[0013] Obtaining a generation identifier corresponding to the first image;

[0014] If the generated identifier indicates that the first image corresponds to a cropping operation, determining whether the second data satisfies the first condition is performed.

[0015] In a possible implementation, processing the first image based on the second data to obtain the second image includes:

[0016] determining objects contained in the first image and positions of the objects;

[0017] determining a center of the first image based on the object and its position;

[0018] Based on the center, the first image is processed using the second data to obtain the second image.

[0019] In a possible implementation, processing the first image at least includes restoring the first image;

[0020] The image generation further comprises:

[0021] When restoring the first image, if the first data cannot meet the requirements corresponding to the reduction processing;

[0022] Generate prompt information and display it to the user; wherein, the prompt information is used to prompt the user that the second image is generated based on the first data and the second data, and the second data includes more image information than the first data.

[0023] In a possible implementation, obtaining a first image based on the first data includes:

[0024] generating a third image based on the first data;

[0025] determining the number of target objects in the third image;

[0026] determining an imaging strategy according to the number of the target objects;

[0027] The third image is adjusted according to the imaging strategy to obtain the first image.

[0028] In a possible implementation, when the number of the target object is 1, adjusting the third image according to the imaging strategy to obtain the first image includes:

[0029] Determining an area corresponding to the target object;

[0030] determining an area ratio of the region in the third image as a target area ratio, and determining a position of the region in the third image as a target position;

[0031] When the target area ratio and the target position meet the second condition, the third image is scaled according to the cropping ratio to obtain the first image.

[0032] In a possible implementation, when the number of the target objects is 2, adjusting the third image according to the imaging strategy to obtain the first image includes:

[0033] respectively determining the area corresponding to each of the target objects;

[0034] respectively determining an area ratio of each of the regions in the first image and a difference between two area ratios;

[0035] When the difference is greater than or equal to a preset threshold, determining the larger area ratio of the two area ratios as the target area ratio, and determining the position of the region corresponding to the target area ratio in the first image as the target position; and if the target area ratio and the target position meet a second condition, cropping the third image according to the cropping ratio to obtain the first image;

[0036] When the difference is less than the preset threshold, the corresponding area is determined based on the two target objects, the area ratio of the area in the first image is determined as the target area ratio, and the position of the area in the third image is determined as the target position. When the target area ratio and the target position meet the second condition, the third image is cropped according to the cropping ratio to obtain the first image.

[0037] In one possible implementation, the image generation method includes:

[0038] The cropping ratio is determined based on the edge parameters of the region and the target position.

[0039] In a second aspect, an embodiment of the present application further provides an electronic device, including a first image acquisition device, a first image acquisition device, and a processor;

[0040] a first image acquisition device, which acquires first data and transmits the first data to the processor;

[0041] a second image acquisition device for acquiring second data and transmitting the data to the processor; wherein the image range acquired by the first image acquisition device is different from the image range acquired by the second image acquisition device;

[0042] The processor obtains the first data and the second data, and obtains a first image based on the first data; if the second data satisfies a first condition, the processor processes the first image based on the second data to obtain a second image, and the image range displayed by the second image is different from the image range displayed by the first image. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in this application or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] Figure 1 A flowchart of an image generation method provided by the present application is shown;

[0045] Figure 2 A flowchart of determining whether second data meets a first condition in an image generation method provided by the present application is shown;

[0046] Figure 3 A flowchart showing a method for generating an image provided by the present application, in which a first image is processed based on second data to obtain a second image;

[0047] Figure 4 A flowchart of obtaining a first image based on first data in an image generation method provided by the present application is shown;

[0048] Figure 5 shows a third image provided by the present application;

[0049] Figure 6 Another third image provided by the present application is shown;

[0050] Figure 7 A schematic structural diagram of an electronic device provided by the present application is shown;

[0051] Figure 8 A schematic structural diagram of an electronic device provided in this application is shown. DETAILED DESCRIPTION

[0052] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0053] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0054] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0055] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0056] It should also be understood that although the present application has been described with reference to certain specific examples, those skilled in the art will be able to surely realize many other equivalent forms of the present application that have the characteristics described in the claims and are therefore within the scope of protection defined thereby.

[0057] The above and other aspects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.

[0058] Specific embodiments of the present application will be described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments described are merely examples of the present application and may be implemented in a variety of ways. Familiar and / or repetitive functions and structures are not described in detail to avoid obscuring the present application with unnecessary or redundant details. Therefore, the specific structural and functional details described herein are not intended to be limiting, but rather serve merely as a basis and representative basis for the claims to teach those skilled in the art to variously utilize the present application with substantially any suitable detailed structure.

[0059] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," which may all refer to one or more of the same or different embodiments according to the present application.

[0060] To facilitate understanding of this application, we first introduce in detail an image generation method provided by this application. Here, the scenario in which the image generation method of the embodiment of this application is applied is to use an electronic device for image acquisition, and the electronic device is provided with at least one conventional camera and at least one wide-angle camera, and can also be provided with a telephoto camera, a black and white camera, and an ultra-wide-angle camera. For example, the electronic device is provided with a conventional camera, a telephoto camera, and an ultra-wide-angle camera, and another example is provided with two conventional cameras and an ultra-wide-angle camera, etc. The embodiment of this application does not specifically limit this.

[0061] Next, the embodiment of the present application is described by taking an electronic device including a conventional camera and a wide-angle camera as an example.

[0062] As an example, Figure 1A flowchart of an image generation method provided in an embodiment of the present application is shown, wherein specific steps include S101 and S102.

[0063] S101, acquiring first data acquired by a first image acquisition device and second data acquired by a second image acquisition device; wherein the image range acquired by the first image acquisition device is different from the image range acquired by the second image acquisition device.

[0064] As an example, the user can start the image acquisition function by clicking a virtual button of the electronic device (such as a virtual button corresponding to a camera, a virtual button corresponding to image capture in an application, etc.) or pressing a physical button of the electronic device.

[0065] After determining to activate the image acquisition function of the electronic device, the electronic device controls the activation of the first image acquisition device and the second image acquisition device. The first image acquisition device can be set as a conventional camera, and the second image acquisition device can be set as a wide-angle camera. In other words, the image range captured by the first image acquisition device is different from the image range captured by the second image acquisition device.

[0066] After the first image acquisition device and the second image acquisition device are started, the first image acquisition device can acquire first data corresponding to its image range, and the second image acquisition device can acquire second data corresponding to its image range.

[0067] The processor of the electronic device can obtain the first data collected by the first image acquisition device and the second data collected by the second image acquisition device. As an example, the first data collected by the first image acquisition device and the second data collected by the second image acquisition device can be directly transmitted to the processor.

[0068] S102, obtaining a first image based on the first data; if the second data satisfies the first condition, processing the first image based on the second data to obtain a second image, wherein the image range displayed by the second image is different from the image range displayed by the first image.

[0069] After obtaining the first data, a first image is obtained based on the first data. The first image can be obtained by directly using the first data to generate an image as the first image, or by performing certain processing on the image after generating the image using the first data.

[0070] Moreover, after obtaining the second data, it is further determined whether the second data meets the first condition. If the second data meets the first condition, the first image is processed based on the second data; if the second data does not meet the first condition, the first image is not processed.

[0071] The embodiment of the present application limits the use of the second data collected by the second image acquisition device to determine whether to process the first image, that is, the first image acquisition device only needs to output an image signal, and the second image acquisition device does not need to output an image signal. It only needs to be in a low power consumption mode, which effectively saves power consumption of the electronic device.

[0072] The second data includes multiple groups, and the collection time of each group of second data is different. Based on this, when determining whether the second data meets the first condition, you can refer to Figure 2 The method flow chart shown, wherein the specific steps include S201-S203.

[0073] S201 : For each set of second data, extract target data corresponding to the target object; wherein the target data can at least represent the distance between the target object and the second image acquisition device.

[0074] S202, comparing multiple groups of target data to obtain comparison results.

[0075] S203: If the comparison result indicates that the distance between the target object and the second image acquisition device has changed, determine that the second data meets the first condition.

[0076] In this embodiment of the present application, the second data at least includes environmental information within the image range captured by the second image acquisition device, attribute information of each object, relative postures between objects, and relative postures between the objects and the second image acquisition device, etc.

[0077] After obtaining multiple sets of second data, target data corresponding to the target object is extracted for each set of second data; wherein the target data can at least characterize the distance between the target object and the second image acquisition device, such as the focal length of the second image acquisition device, the actual size of the target object, and the pixel size of the target object, etc., and the distance between the target object and the second image acquisition device can be determined by calculation based on computer vision and photogrammetry principles.

[0078] Furthermore, multiple sets of target data, i.e., the distances between multiple target objects and the second image acquisition device, are compared to obtain a comparison result. Correspondingly, the comparison result can indicate whether the distances between the target objects and the second image acquisition device have changed. For example, if the comparison result indicates that the distances between the multiple target objects and the second image acquisition device are all the same, then it indicates that the distances between the target objects and the second image acquisition device have not changed. If the comparison result indicates that the distances between the multiple target objects and the second image acquisition device are different in two or more, then it indicates that the distances between the target objects and the second image acquisition device have changed.

[0079] In one example, if the comparison result indicates a change in the distance between the target object and the second image capture device, the second data is determined to satisfy the first condition. The change in the distance between the target object and the second image capture device includes both the target object and the second image capture device moving closer together and the target object and the second image capture device moving further away from each other. For example, user A is stationary and uses a mobile phone to take a photo of user B. When user B moves toward user A, the wide-angle camera in the mobile phone, i.e., the second image capture device, approaches user B, i.e., the target object, i.e., moves closer to the second image capture device. In this case, the comparison result indicates a change in the distance between the target object and the second image capture device.

[0080] As another example, before determining whether the second data meets the first condition, it is also necessary to determine whether the first image corresponds to a cropping operation, wherein the first image can be obtained after performing a certain cropping operation based on the first data, that is, the image range displayed by the first image obtained based on the first data is smaller than the image range captured by the first image acquisition device.

[0081] Optionally, if a certain cropping operation is performed on the first data, a generation identifier can be generated, which indicates that a cropping operation has been performed on the first data, that is, the generated first image corresponds to a cropping operation. Based on this, when determining whether the first image corresponds to a cropping operation, the generation identifier corresponding to the first image is obtained. If the generation identifier indicates that the first image corresponds to a cropping operation, then the step of determining whether the second data meets the first condition is performed. Conversely, if the generation identifier indicates that the first image does not correspond to a cropping operation, the step of determining whether the second data meets the first condition is not performed, that is, there is no need to process the first image based on the second data, effectively avoiding waste of resources.

[0082] Furthermore, after the second data satisfies the first condition and the first image is processed based on the second data, a second image can be obtained, and the image range displayed by the second image is different from the image range displayed by the first image. In other words, in the image generation method of the embodiment of the present application, it is not necessary for both the first image acquisition device and the second image acquisition device to output image signals. The second image acquisition device can simply be in low-power mode, without outputting an image signal, and only serves as a trigger for determining whether to process the first image, effectively saving power consumption of the electronic device.

[0083] It is worth noting that when an electronic device is equipped with more than two cameras, such as a regular camera, a telephoto camera and an ultra-wide-angle camera, or two regular cameras and one ultra-wide-angle camera are set on the electronic device, one camera such as a regular camera can be set to collect first data, and the data collected by the other two cameras can be used as the second data as a trigger basis for determining whether to process the first image.

[0084] Optionally, after obtaining the second image, only the second image can be saved, or the first image and the second image can be saved at the same time. The user can also choose to save either the first image or the second image. Therefore, the images in the embodiment of the present application can be saved flexibly and have a wider range of usage scenarios.

[0085] As one example, Figure 3 A flow chart of a method for processing a first image based on second data to obtain a second image is shown, wherein the specific steps include S301-S303.

[0086] S301: Determine objects contained in a first image and positions of the objects.

[0087] S302: Determine the center of the first image based on the object and its position.

[0088] S303 : Based on the center, process the first image using the second data to obtain a second image.

[0089] After determining that the second data satisfies the first condition, the first image is further identified and analyzed to determine the objects contained in the first image and the positions of the objects. The objects may be human bodies, or human bodies and animals, etc. The positions of the objects are the pixel positions of the objects in the first image.

[0090] After determining the objects contained in the first image and the positions of the objects, the center of the first image is determined based on the objects and their positions. The first image is then processed based on the center using the second data to obtain a second image. The center formed by the positions of all objects in the first image can be used as the center of the first image.

[0091] Optionally, processing the first image at least includes restoring and cropping the first image.

[0092] In a scenario where the first image is processed to restore the first image, when restoring the first image, it is first determined whether the first data meets the requirements corresponding to the reduction processing. When performing the reduction processing, it is necessary to reduce the pixel size of the first image at the current pixel size and use the first data to fill the blank pixel areas. If the first data cannot fill all the pixel areas, it indicates that the first data cannot meet the requirements corresponding to the reduction processing.

[0093] Among them, when the first data cannot meet the corresponding requirements of the reduction processing, a prompt information is generated and displayed to the user; wherein the prompt information is used to prompt the user that the second image is generated based on the first data and the second data, and the image information included in the second data is more than the image information included in the first data, that is, the first data and the second data are used to fill the blank pixel area generated after the reduction processing.

[0094] As an example, Figure 4 A flow chart of a method for obtaining a first image based on first data is shown, wherein the specific steps include S401-S404.

[0095] S401: Generate a third image based on the first data.

[0096] S402: Determine the number of target objects in the third image.

[0097] S403: Determine an imaging strategy according to the number of target objects.

[0098] S404: Adjust the third image according to the imaging strategy to obtain the first image.

[0099] After obtaining the first data captured by the first image acquisition device, a third image is directly generated based on the first data. The third image then contains all image information of the first data, such as pixel size, number of objects, object posture, etc.

[0100] Furthermore, the third image is identified to determine the number of target objects in the third image. In the embodiment of the present application, the target objects may be human bodies or faces. Then, an imaging strategy is determined based on the number of target objects, and the third image is adjusted according to the imaging strategy to obtain the first image.

[0101] Optionally, when the number of target objects is 1, for the target object in the third image, the area corresponding to the target object is determined, and then the area ratio of the area in the third image is determined as the target area ratio, and the position of the area in the third image is determined as the target position.

[0102] Further determine whether the target area ratio and the target position meet the second condition, and if the target area ratio and the target position meet the second condition, scale the third image according to the cropping ratio to obtain the first image. Figure 5 , Figure 5 A third image is shown. Figure 5 The target object of the third image is a human face, and the area corresponding to the target object is W f and L f The area determined, therefore, the area corresponding to the target object is S f =W f *L f , the area of ​​the third image is S o =W*L, the distances between the edge of the target object and the edge of the third image are d L and d W .

[0103] Optionally, the area ratio of the region in the third image is the target area ratio, that is, S f / S o >70%, or the target area ratio, i.e. S f / S o <70% and the position of the region in the third image is the target position, i.e., d W When the target area ratio and target position do not meet the second condition, the target area ratio is less than 1 / 10W. f / S o <70% and the position of the region in the third image is the target position, i.e., d W When the target area ratio and the target position meet the second condition, the first image can be obtained by cropping the third image according to the cropping ratio using the center point of the area corresponding to the target object as the cropping reference point.

[0104] Optionally, the cropping ratio can be determined based on the edge parameters of the region and the target position. In the embodiment of the present application, the cropping ratio can be set to (W f +0.75*d W ) / W f Of course, the cropping ratio is not limited thereto, and the above-mentioned 70% and 1 / 10 can also be adjusted according to actual needs.

[0105] Optionally, when the number of target objects is 2, for each target object in the third image, the area corresponding to each target object is determined respectively, and the area ratio of each area in the first image and the difference between the two area ratios are determined respectively. Figure 6 Another third image is shown, here, Figure 6 The target object in the third image shown is also a human face.

[0106] Furthermore, the difference between the two area ratios is compared. When the difference is greater than or equal to a preset threshold, the larger of the two area ratios is determined as the target area ratio, and the position of the region corresponding to the target area ratio in the first image is determined as the target position. If the target area ratio and the target position meet the second condition, the third image is cropped according to the cropping ratio to obtain the first image. Specifically, the third image can be adjusted and processed according to the imaging strategy described above when the number of target objects is 1 to obtain the first image, which will not be further described here.

[0107] When the difference is less than a preset threshold, the corresponding area is determined based on the two target objects, the area ratio of the area in the first image is determined as the target area ratio, and the position of the area in the third image is determined as the target position. When the target area ratio and the target position meet the second condition, the third image is cropped according to the cropping ratio to obtain the first image. Figure 6 , the area corresponding to the two target objects is W f ' and L f 'determined area, thus, the area corresponding to the target object is S f '=W f '*L f ', the area of ​​the third image is S o =W*L, the distances between the edge of the target object and the edge of the third image are d L and d W It is worth noting that W, L, d L and d W Not shown.

[0108] Optionally, the area ratio of the region in the third image is the target area ratio, that is, S f ' / S o >70%, or the target area ratio, i.e. S f ' / S o <70% and the position of the region in the third image is the target position, i.e., d W When the target area ratio and target position do not meet the second condition, the target area ratio is less than 1 / 10W. f ' / S o <70% and the position of the region in the third image is the target position, i.e., d W When the target area ratio and the target position meet the second condition, the first image can be obtained by cropping the third image according to the cropping ratio using the center point of the area corresponding to the target object as the cropping reference point.

[0109] Similarly, in this scenario, the cropping ratio can also be determined based on the edge parameters of the region and the target position. In the embodiment of the present application, the cropping ratio can be set to (W f '+0.75*d W ) / W f Of course, the cropping ratio is not limited to this, and the above-mentioned 70% and 1 / 10 can also be adjusted according to actual needs.

[0110] In addition, when the number of target objects is greater than or equal to 3, the third image is not adjusted and is directly determined as the first image, avoiding the problem of cropping the first image resulting in incomplete first image, and ensuring that the first image can restore the first data more completely.

[0111] As described above, the embodiments of the present application define that when an electronic device is provided with at least two image acquisition devices, the first image acquisition device is used to acquire first data and generate a first image, and the second image acquisition device is used to acquire second data to determine whether to process the first image. In other words, only the first image acquisition device is required to output an image signal, and the second image acquisition device does not need to output an image signal; it only needs to be in a low-power mode. Compared to traditional electronic devices in which each camera outputs an image signal, this effectively saves power consumption of the electronic device. Furthermore, when it is determined that the first image does not need to be processed, that is, when the second data meets the first condition of the group, the first image is directly output without any processing of the first image, thereby avoiding waste of processing resources of the electronic device. Furthermore, when it is determined that the first image is to be processed, the first and second images can be saved simultaneously for user selection, thereby improving the user experience and having a wide range of application scenarios.

[0112] The second aspect of the present application also provides an electronic device corresponding to the image generation method. Since the principle of solving the problem by the electronic device in the present application is similar to the above-mentioned image generation method of the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0113] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application is shown, with reference to Figure 7 It can be seen that the electronic device includes a first image acquisition device 701, a second image acquisition device 702 and a processor 703;

[0114] A first image acquisition device 701 acquires first data and transmits it to the processor;

[0115] A second image acquisition device 702 acquires second data and transmits it to the processor; wherein the image range acquired by the first image acquisition device is different from the image range acquired by the second image acquisition device;

[0116] Processor 703 obtains the first data and the second data, and obtains a first image based on the first data; if the second data meets the first condition, the first image is processed based on the second data to obtain a second image, and the image range displayed by the second image is different from the image range displayed by the first image.

[0117] In yet another embodiment, the second data includes multiple groups, and each group of second data is collected at a different time;

[0118] The processor 703:

[0119] For each set of the second data, extract target data corresponding to the target object; wherein the target data can at least represent the distance between the target object and the second image acquisition device;

[0120] Comparing multiple groups of target data to obtain comparison results;

[0121] If the comparison result indicates that the distance between the target object and the second image acquisition device has changed, it is determined that the second data meets the first condition.

[0122] In yet another embodiment, the processor 703:

[0123] Obtaining a generation identifier corresponding to the first image;

[0124] If the generated identifier indicates that the first image corresponds to a cropping operation, determining whether the second data satisfies the first condition is performed.

[0125] In yet another embodiment, the processor 703:

[0126] determining objects contained in the first image and positions of the objects;

[0127] determining a center of the first image based on the object and its position;

[0128] Based on the center, the first image is processed using the second data to obtain the second image.

[0129] In yet another embodiment, processing the first image at least includes restoring the first image;

[0130] The processor 703:

[0131] When restoring the first image, if the first data cannot meet the requirements corresponding to the reduction processing;

[0132] Generate prompt information and display it to the user; wherein, the prompt information is used to prompt the user that the second image is generated based on the first data and the second data, and the second data includes more image information than the first data.

[0133] In yet another embodiment, the processor 703:

[0134] generating a third image based on the first data;

[0135] determining the number of target objects in the third image;

[0136] determining an imaging strategy according to the number of the target objects;

[0137] The third image is adjusted according to the imaging strategy to obtain the first image.

[0138] In yet another embodiment, when the number of the target object is 1, the processor 703:

[0139] Determining an area corresponding to the target object;

[0140] determining an area ratio of the region in the third image as a target area ratio, and determining a position of the region in the third image as a target position;

[0141] When the target area ratio and the target position meet the second condition, the third image is scaled according to the cropping ratio to obtain the first image.

[0142] In yet another embodiment, when the number of the target objects is 2, the processor 703:

[0143] respectively determining the area corresponding to each of the target objects;

[0144] respectively determining an area ratio of each of the regions in the first image and a difference between two area ratios;

[0145] When the difference is greater than or equal to a preset threshold, determining the larger area ratio of the two area ratios as the target area ratio, and determining the position of the region corresponding to the target area ratio in the first image as the target position; and if the target area ratio and the target position meet a second condition, cropping the third image according to the cropping ratio to obtain the first image;

[0146] When the difference is less than the preset threshold, the corresponding area is determined based on the two target objects, the area ratio of the area in the first image is determined as the target area ratio, and the position of the area in the third image is determined as the target position. When the target area ratio and the target position meet the second condition, the third image is cropped according to the cropping ratio to obtain the first image.

[0147] In yet another embodiment, the processor 703:

[0148] The cropping ratio is determined based on the edge parameters of the region and the target position.

[0149] The third aspect of the present application further provides a computer device, the structural diagram of which can be as follows: Figure 8 As shown, the electronic device comprises at least a memory 801 and a processor 80, the memory 801 stores a computer program, and the processor 802 implements the method provided by any embodiment of the present application when executing the computer program on the memory 801. For example, the electronic device computer program steps are as follows S11 and S12:

[0150] S11, acquiring first data acquired by a first image acquisition device and second data acquired by a second image acquisition device; wherein the image range acquired by the first image acquisition device is different from the image range acquired by the second image acquisition device;

[0151] S12, obtaining a first image based on the first data; if the second data satisfies a first condition, processing the first image based on the second data to obtain a second image, wherein the image range displayed by the second image is different from the image range displayed by the first image.

[0152] A fourth aspect of the present application further provides a storage medium, which is a computer-readable medium and carries one or more computer programs. When the one or more computer programs are executed by a processor, the method provided in any embodiment of the present application is implemented, including the following steps S21 and S22:

[0153] S21, acquiring first data acquired by a first image acquisition device and second data acquired by a second image acquisition device; wherein the image range acquired by the first image acquisition device is different from the image range acquired by the second image acquisition device;

[0154] S12, obtaining a first image based on the first data; if the second data satisfies a first condition, processing the first image based on the second data to obtain a second image, wherein the image range displayed by the second image is different from the image range displayed by the first image.

[0155] In the image generation method of the embodiment of the present application, it is not necessary for both the first image acquisition device and the second image acquisition device to output image signals. The second image acquisition device only needs to be in low power consumption mode. It does not need to output image signals, and only serves as a trigger basis for determining whether to process the first image signal, thereby effectively saving power consumption of the electronic device.

[0156] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0157] Optionally, in this embodiment, the above-mentioned storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk. Optionally, in this embodiment, the processor executes the method steps recorded in the above-mentioned embodiment according to the program code stored in the storage medium. Optionally, the specific examples in this embodiment can refer to the examples described in the above-mentioned embodiment and the optional implementation mode, and this embodiment will not be repeated here. Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented using a general-purpose computing device, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented using program codes executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.

[0158] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., solutions that intersect various embodiments), adaptations, or changes. The elements in the claims are to be interpreted broadly based on the language employed in the claims and are not limited to the examples described in this specification or during the prosecution of this application, which examples are to be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, with the true scope and spirit being indicated by the following claims and the full scope of their equivalents.

[0159] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of their solutions) can be used in combination with each other. For example, a person of ordinary skill in the art may use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as an intention that a disclosed feature that is not required to be protected is necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of a specific disclosed embodiment. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of this application should be determined with reference to the appended claims and the full scope of equivalents to which these claims are entitled.

[0160] The above describes in detail several embodiments of the present application, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection claimed by the present application.

Claims

1. A method for generating an image, comprising: Acquire first data acquired by a first image acquisition device and second data acquired by a second image acquisition device; wherein the image range acquired by the first image acquisition device is different from the image range acquired by the second image acquisition device; A first image is obtained based on the first data; if the second data satisfies a first condition, the first image is processed based on the second data to obtain a second image, and the image range displayed by the second image is different from the image range displayed by the first image.

2. The image generation method according to claim 1, wherein the second data comprises multiple groups, and each group of the second data is collected at a different time; Determining whether the second data satisfies the first condition includes: For each set of the second data, extract target data corresponding to the target object; wherein the target data can at least represent the distance between the target object and the second image acquisition device; Comparing multiple groups of target data to obtain comparison results; If the comparison result indicates that the distance between the target object and the second image acquisition device has changed, it is determined that the second data meets the first condition.

3. The image generation method according to claim 2, before determining whether the second data satisfies the first condition, further comprising: Obtaining a generation identifier corresponding to the first image; If the generated identifier indicates that the first image corresponds to a cropping operation, determining whether the second data satisfies the first condition is performed.

4. The image generation method according to claim 1 , wherein processing the first image based on the second data to obtain the second image comprises: determining objects contained in the first image and positions of the objects; determining a center of the first image based on the object and its position; Based on the center, the first image is processed using the second data to obtain the second image.

5. The image generation method according to claim 1, wherein processing the first image at least comprises restoring the first image; The image generation method further includes: When restoring the first image, if the first data cannot meet the requirements corresponding to the reduction processing; Prompt information is generated and displayed to the user; wherein the prompt information is used to prompt the user that the second image is generated based on the first data and the second data, and the second data includes more image information than the first data.

6. The image generation method according to claim 1, wherein obtaining the first image based on the first data comprises: generating a third image based on the first data; determining the number of target objects in the third image; determining an imaging strategy according to the number of the target objects; The third image is adjusted according to the imaging strategy to obtain the first image.

7. The image generation method according to claim 6, wherein when the number of the target objects is 1, adjusting the third image according to the imaging strategy to obtain the first image comprises: Determining an area corresponding to the target object; determining an area ratio of the region in the third image as a target area ratio, and determining a position of the region in the third image as a target position; When the target area ratio and the target position meet the second condition, the third image is scaled according to the cropping ratio to obtain the first image.

8. The image generation method according to claim 6, wherein when the number of the target objects is 2, adjusting the third image according to the imaging strategy to obtain the first image comprises: respectively determining the area corresponding to each of the target objects; respectively determining an area ratio of each of the regions in the first image and a difference between two area ratios; When the difference is greater than or equal to a preset threshold, determining the larger area ratio of the two area ratios as the target area ratio, and determining the position of the region corresponding to the target area ratio in the first image as the target position; and if the target area ratio and the target position meet a second condition, cropping the third image according to the cropping ratio to obtain the first image; When the difference is less than the preset threshold, the corresponding area is determined based on the two target objects, the area ratio of the area in the first image is determined as the target area ratio, and the position of the area in the third image is determined as the target position. When the target area ratio and the target position meet the second condition, the third image is cropped according to the cropping ratio to obtain the first image.

9. The image generation method according to claim 7 or 8, comprising: The cropping ratio is determined based on the edge parameters of the region and the target position.

10. An electronic device comprising a first image acquisition device, a second image acquisition device, and a processor; a first image acquisition device, which acquires first data and transmits the first data to the processor; The second image acquisition device acquires second data and transmits it to the processor; wherein, The image range captured by the first image capturing device is different from the image range captured by the second image capturing device; The processor obtains the first data and the second data, and obtains a first image based on the first data; if the second data satisfies a first condition, the processor processes the first image based on the second data to obtain a second image, and the image range displayed by the second image is different from the image range displayed by the first image.