Image data generation method and device, equipment, storage medium and vehicle
By using wide-angle images to replace missing telephoto images in vehicle vision training, the problem of model performance degradation caused by the missing telephoto images is solved, ensuring the completeness of model training data and performance reliability.
Patent Information
- Application Number
- CN202410459060.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2025-10-24
AI Technical Summary
During vehicle vision training, the overall performance of the model degrades due to the lack of images captured by the telephoto camera.
By determining whether the image captured by the on-board camera contains a telephoto image, if it is missing, the wide-angle image is extracted and cropped based on it to generate the first target image to replace the missing telephoto image, ensuring that the model training data is complete.
The integrity of the model training data is guaranteed, the degradation of robustness caused by missing training data is avoided, and the reliability of the model performance is ensured.
Smart Images

Figure CN120833264A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing, and in particular to an image data generation method and device, equipment, a storage medium and a vehicle. BACKGROUND
[0002] In the process of vehicle visual learning training, images of corresponding positions are needed to be captured by vehicle-mounted cameras and input to a model for training. In the process of image capturing, the cameras used can be divided into wide-angle cameras and long-focus cameras, and the images captured by the wide-angle cameras can contain the images captured by the long-focus cameras. However, due to the limited vehicle-mounted computing power, the images captured by the long-focus cameras are selectively returned, so that in the process of model training, if the images captured by the long-focus cameras are missing, the overall performance of the model finally generated by training will be reduced. SUMMARY
[0003] Therefore, the present application provides an image data generation method and device, equipment, a storage medium and a vehicle, mainly aiming to solve the technical problem of the overall performance of the model caused by the missing images captured by the long-focus cameras as training data in the process of vehicle visual training.
[0004] To achieve the above-mentioned purpose, the first aspect of the present application discloses an image data generation method, which comprises:
[0005] determining whether a long-focus image is contained in a to-be-processed image generated by a vehicle-mounted camera, the long-focus image being an image generated by a long-focus camera;
[0006] if the long-focus image is not contained in the to-be-processed image, extracting a wide-angle image in the to-be-processed image, the wide-angle image being an image generated by a wide-angle camera;
[0007] generating a first target image by cropping in the wide-angle image according to required image data of the long-focus image;
[0008] reading image data of the first target image in the wide-angle image as first target image data.
[0009] The second aspect of the present application provides an image data generation device, which comprises:
[0010] a determination module configured to determine whether a long-focus image is contained in a to-be-processed image generated by a vehicle-mounted camera, the long-focus image being an image generated by a long-focus camera;
[0011] an extraction module configured to extract a wide-angle image in the to-be-processed image if the long-focus image is not contained in the to-be-processed image, the wide-angle image being an image generated by a wide-angle camera;
[0012] a cropping module configured to crop a first target image from the wide-angle image according to required image data of the long-focus image;
[0013] a reading module configured to read image data of the first target image in the wide-angle image as first target image data.
[0014] In a third aspect of the present application, an electronic device is provided, comprising:
[0015] at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the methods disclosed in the first aspect.
[0016] In a fourth aspect of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect.
[0017] In a fifth aspect of the present application, a vehicle is provided, which is equipped with the device of the second aspect or the electronic device of the third aspect.
[0018] In summary, according to the technical solution disclosed in the present application, in order to solve the technical problem that the performance of the trained model may be reduced due to the lack of long-focus images in the process of training the vehicle-mounted visual model, the present application first determines whether the long-focus image is contained in the image to be processed generated by the vehicle-mounted camera, and the long-focus image is the image generated by the long-focus camera; secondly, if the long-focus image is not contained in the image to be processed, the wide-angle image is extracted from the image to be processed, the wide-angle image is the image generated by the wide-angle camera, and the wide-angle image covers the long-focus image; then, according to the required image data of the long-focus image, the first target image is cropped from the wide-angle image; finally, the image data of the first target image in the wide-angle image is read as the first target image data. When the long-focus image is missing, the present application selects the wide-angle image from the images captured by the vehicle-mounted camera, and at the same time, the wide-angle image needs to cover the long-focus image. The present application extracts the first target image from the wide-angle image, so that the first target image can replace the missing long-focus image, and the first target image and its corresponding image data can further form the first target image data to participate in the model training process, ensuring the completeness of the model training data, avoiding the decline of the robustness of the model due to the lack of training data, and ensuring the performance reliability of the trained model.
[0019] The above description is only a summary of the technical solutions of the present application. In order to enable the technical means of the present application to be more clearly understood, and to be implemented according to the content of the description, and in order to enable the above and other purposes, characteristics and advantages of the present application to be more apparent and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0020] The drawings incorporated in the specification and constituting a part of the specification illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required to be used in the embodiments or the prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0022] Figure 1 A flow chart of an image data generation method provided by an embodiment of the present application is shown;
[0023] Figure 2 A structural diagram of an image data generation device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] In order to enable the above purposes, characteristics and advantages of the present application to be more clearly understood, the technical solutions of the present application will be further described as follows. It should be noted that, in the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
[0025] In order to solve the technical problem that the overall performance of the model may be affected due to the lack of long-focus camera images as training data in the process of performing vehicle visual training, the present application provides the following embodiments to solve the above problem:
[0026] The present embodiment provides an image data generation method, as shown in Figure 1 The flow chart of the method of the present embodiment, the method of the present embodiment can specifically include the following steps:
[0027] Step 101, determine whether the long-focus image is contained in the to-be-processed image generated by the vehicle-mounted camera, the long-focus image is the image generated by the long-focus camera.
[0028] The to-be-processed image of the embodiment is derived from an image captured by a vehicle-mounted camera. In order to ensure that the image captured by the vehicle-mounted camera is clearer, various types of cameras can be mounted on the vehicle machine. Each type of camera captures corresponding images according to its own shooting characteristics. At least, the types of vehicle-mounted cameras include a long-focus camera and a wide-angle camera. The long-focus camera is mounted with a long-focus lens, which can also be called a long-focus lens, a telephoto lens or a telephoto lens, which refers to a photographic lens with a longer focal length than a standard lens. During the process of shooting distant objects, it is often found that the shooting object cannot be zoomed in. This requires the use of a long-focus lens, which can well represent the details of distant scenery and capture some shooting objects that are not easily approached.
[0029] The long-focus lens mounted in the vehicle machine can clearly capture objects far away from the vehicle machine. Further, the to-be-processed image captured by the vehicle-mounted camera in the embodiment specifically refers to the image captured by the vehicle-mounted camera facing the direction of vehicle travel. The vehicle machine is mounted with cameras at different positions, and these cameras are responsible for capturing images in fixed directions of the vehicle and uploading the captured images to the image storage space mounted on the vehicle machine. Due to the actual computing power of the vehicle machine, in some cases, the camera does not need to capture objects far away from the vehicle machine. At this time, the image captured by the long-focus camera does not need to be transmitted back to the image storage space, or the long-focus camera is not controlled to perform shooting. When training the vehicle machine visual learning model, images captured by the vehicle-mounted camera within a period of time are often used for training. However, due to the non-transmission of the long-focus camera images, there may be a problem of long-focus image missing within this period of time. Therefore, the embodiment needs to first extract the images captured by the vehicle-mounted camera within a preset period of time in the image storage space as to-be-processed images, and the to-be-processed images are used as training data for the model, and further identify whether the long-focus image exists in the to-be-processed image to determine whether there is a problem of long-focus image missing. In a feasible embodiment, whether the long-focus image is included can be directly found by reading whether there is an image transmission record of the vehicle-mounted camera. If there is no long-focus image, it is determined that the long-focus image is missing, and the to-be-processed image without the long-focus image is directly used for model training, which may cause the problem of low performance of the model generated by training.
[0030] In step 102, if the to-be-processed image does not include a long-focus image, a wide-angle image is extracted from the to-be-processed image. The wide-angle image is an image generated by a wide-angle camera, and the wide-angle image covers the long-focus image.
[0031] When it is determined that the long-focus image is not included in the to-be-processed image, a wide-angle image is further searched for in the to-be-processed image. The wide-angle lens is a photographic lens with a shorter focal length, a larger angle of view than the standard lens, a longer focal length than the fisheye lens, and a smaller angle of view than the fisheye lens. The wide-angle lens has a short focal length and a large angle of view, and can capture a larger area of the scene within a shorter shooting distance range. That is, the wide-angle lens can capture a larger range of objects, and in this embodiment, the image captured by the wide-angle lens can cover the image captured by the long-focus lens. That is, the content captured by the long-focus lens is actually part of the wide-angle lens, but the long-focus image captured by the long-focus lens has a more clear visual effect than the wide-angle image captured by the wide-angle lens. Therefore, according to the coverage of the wide-angle image to the long-focus image, a feasible image basis is provided for generating the first target image to replace the long-focus image.
[0032] In step 103, the first target image is cropped from the wide-angle image according to the required image data of the long-focus image.
[0033] Since the long-focus image is part of the wide-angle image, this embodiment proposes to further crop the image based on the wide-angle image, so that the cropped wide-angle image can participate in the model training process as the missing long-focus image. In addition, during the process of cropping the wide-angle image, the first target image generated by cropping is used as a training image to train the model, and during the model training process, since there are many training images as training data, a certain data limit is generally applied to the training images as training images. The data limit is the required image data, for example, the image size (256*256) of the training image or the image space size (4K) of the training image. When the required image data exists, even if the long-focus image exists, the long-focus image needs to be processed to meet the required image data. After processing the long-focus image, the visual effect of the long-focus image will be affected, and under the premise that the wide-angle image contains the long-focus image and the visual effect of the wide-angle image is slightly worse than that of the long-focus image, the first target image directly cropped from the wide-angle image can achieve the goal of replacing the long-focus image.
[0034] In step 104, the image data of the first target image in the wide-angle image is read as the first target image data.
[0035] In the case of directly cropping the wide-angle image to generate the first target image and replacing the telephoto image with the target image as training data for model training, the image data corresponding to the first target image can be directly extracted from the wide-angle image, such as the image position, image space size, etc. corresponding to the first target image in the wide-angle image. Further, in the process of participating in model training, the data required by the model can further include camera configuration data such as focal length and exposure of the wide-angle camera when capturing the image, in addition to the data of the image data. On the basis of replacing the first target image with the telephoto image, the camera configuration data corresponding to the first target image is further provided, so as to establish the corresponding relationship between the camera configuration data of different telephoto cameras and wide-angle cameras, and to more accurately reflect the corresponding relationship between the wide-angle image and the telephoto image according to the configuration data in the model training process.
[0036] Therefore, when the telephoto image is missing, the embodiment proposes to select a wide-angle image in the image captured by the vehicle-mounted camera, and the wide-angle image needs to cover the telephoto image. The embodiment extracts the first target image from the wide-angle image, so that the first target image can replace the missing telephoto image, and the first target image and its corresponding image data can further form the first target image data to participate in the model training process, ensuring the completeness of the model training data, avoiding the decline of the robustness of the model due to the lack of training data, and ensuring the performance reliability of the generated model.
[0037] In a possible embodiment, according to the required image data of the telephoto image, the first target image is cropped from the wide-angle image, comprising:
[0038] A first center point is determined in the wide-angle image, and the first center point is a random point position selected within a preset range of the center point of the to-be-processed image; a first image size value of the first target image is determined according to the required image data of the telephoto image; the first center point is taken as the center point of the first target image, and the first target image is cropped from the wide-angle image according to the first image size value.
[0039] The embodiment further describes the image cropping scheme. Since the first target image cropped is part of the wide-angle image, the cropping range needs to be determined in the to-be-processed image of the wide-angle image during the cropping process.
[0040] When the wide-angle image captured by the wide-angle camera is taken as the to-be-processed image, the to-be-processed image is generally a regular shape image, such as a rectangular, circular or elliptical shape, and therefore, the center point can be determined in the to-be-processed image relatively quickly. After the center point of the to-be-processed image is determined, a point is further randomly determined as the first center point, and at this time, the first center point is taken as the center point of the first target image, which is also a regular shape. Meanwhile, the selection of the first center point is within a preset range of the center point of the to-be-processed image. Since the to-be-processed image is taken as the wide-angle image and contains the first target image as the long-focus image, for example, the wide-angle camera has a 120° shooting range, and the long-focus lens has a 30° shooting range, when the preset range of the to-be-processed image is constructed, any point selected in the preset range can be taken as the center point of the long-focus image, and the image range captured by the long-focus lens with a 30° shooting range is cropped in the to-be-processed image. In the process of determining the first center point in the embodiment, since the first center point is randomly selected, the first target image cropped and generated is not exactly the same as each training data, and at this time, the characteristics that each long-focus image is not exactly the same due to the disordered shaking of the camera when the long-focus image is actually acquired are simulated.
[0041] After the first center point is determined, the image size of the first target image also needs to be further determined as the first image size value. In the embodiment, the determination of the first image size can be determined according to the required image data, which represents the specific image size of the long-focus image required in the model training process. For example, on the basis of the required image being rectangular, the required image data can directly provide the width value and the height value of the image, and at this time, the wide-angle image can be directly cropped according to the width value and the height value, so that the image size after the cropping meets the requirements of the required image data.
[0042] Therefore, the embodiment achieves the random cropping of the first target image according to the long-focus image, so that the first target image can represent the long-focus image captured by the long-focus camera, and the first target image can meet the parameter requirements in the model training.
[0043] In a possible embodiment, the image data of the first target image in the wide-angle image is read as the first target image data, including:
[0044] The first offset value between the center point of the to-be-processed image and the first center point is calculated, the first image focal length value of the first target image in the wide-angle image is read according to the first image size value and the first offset value, and the first offset value and the second image focal length value are combined as the first target image data.
[0045] In the embodiment, the establishment process of the first target image data is further described. Since the first target image is extracted from the wide-angle image, after the first target image is cropped from the wide-angle image, the image data corresponding to the first target image in the wide-angle image needs to be further provided. The image data listed in the embodiment includes a first offset value. In the model training, the first offset value can be used to determine the position of the first target image data in the wide-angle image. For example, the first offset value can include the offset value between the x-axis and the y-axis of the image. In addition, the image coordinate system of different cameras may
[0046] The embodiment provides more detailed training data for model training after the first target image is generated. The training data reflects not only the image data but also the camera data, so that the model can be trained according to the detailed simulation long-focus image data, and the model generated by the training is more reliable.
[0047] In a possible embodiment, after it is determined whether the image captured by the vehicle-mounted camera contains a long-focus image, the method further includes:
[0048] If the long-focus image is contained in the image to be processed, the long-focus image is extracted from the image to be processed; the size ratio of the long-focus image is adjusted according to the required image data of the long-focus image, and a second target image is generated; a third target image is cropped from the second target image according to the parameter correspondence between the long-focus image and the second target image; and the image data of the third target image in the second target image is read as the second target image data.
[0049] The embodiment represents another possible case, that is, the image to be processed contains a long-focus image. At this time, the long-focus image can be input into the model as training data, but since the long-focus image after shooting may not meet the training data requirements of the model, the embodiment further describes the step of adjusting the image.
[0050] In the embodiment, the main means of adjusting the image is to adjust the size ratio value, for example, the width-height ratio of the image. For example, when the required image data requires a ratio value of 1:1, and the long-focus image has a ratio value of 1.2:1, the width of the image is compressed to reach the required ratio value of the required image data.
[0051] Meanwhile, in order to further improve the accuracy of image training, after adjusting the size ratio value, a process of adjusting the parameters is further included. The main means of parameter adjustment is image cropping, so that the parameters of the cropped images correspond to each other, that is, the effect of internal parameter alignment is achieved. In this way, the alignment effect between images is better, and it is easier to establish the corresponding relationship between images, so that the model is easier to perform the training process according to the adjusted images.
[0052] In a possible embodiment, the size ratio value of the long-focus image is adjusted according to the required image data of the long-focus image to generate a second target image, including:
[0053] reading the target size ratio value of the image in the required image data; calculating the second image focal length ratio value of the long-focus image according to the target size ratio value; combining the target size ratio value and the second image focal length ratio value to generate the adjustment parameter of the long-focus image; and adjusting the size ratio value of the long-focus image by using the adjustment parameter to generate the second target image.
[0054] The embodiment further describes the size ratio value adjustment of the long-focus image. First, the target size ratio value required in the required image data is determined. Then, according to the size ratio value of the long-focus image itself, the adjustment parameter required to adjust the long-focus image to reach the target size ratio value is further determined, and the size ratio value adjustment process of the long-focus image is performed by using the adjustment parameter as a guide, so that the finally generated second target image meets the requirements of the required image data, and the processed long-focus image can be used as training data for model training.
[0055] In a possible embodiment, a third target image is cropped from the second target image according to the parameter correspondence relationship between the long-focus image and the second target image, including:
[0056] determining a second center point in the second target image, the second center point being a random point position selected within a preset range of the center point of the second target image; calculating a second offset value between the second center point and the center point of the second target image; determining a third image size value of the third target image by using the adjustment parameter; and cropping the third target image from the second target image by using the second center point as the center point of the third target image and combining the third image size value.
[0057] The embodiment is described for further processing of the second target image. The generated second target image mainly realizes adjustment of the size ratio value, so as to meet the requirement of the model on the image data. The embodiment further cuts the second target image to generate a third target image, so that the parameters of the third target image correspond to those of the second target image, for example, the proportional positions of certain objects in the images correspond to each other after cutting, so that the internal parameters of the images correspond to each other, and the model can quickly identify the corresponding objects according to the corresponding images, and the training efficiency of the model is improved.
[0058] The embodiment provides an image data generation device, as shown in the structural diagram of the device. Figure 2 The device comprises:
[0059] The determination module 21 is configured to determine whether a long-focus image is contained in a to-be-processed image generated by a vehicle-mounted camera, and the long-focus image is an image generated by a long-focus camera.
[0060] The extraction module 22 is configured to extract a wide-angle image from the to-be-processed image if the long-focus image is not contained in the to-be-processed image, the wide-angle image is an image generated by a wide-angle camera, and the wide-angle image covers the long-focus image.
[0061] The cutting module 23 is configured to cut a first target image from the wide-angle image according to requirement image data of the long-focus image.
[0062] The reading module 24 is configured to read image data of the first target image in the wide-angle image as first target image data.
[0063] In a possible embodiment, the cutting module 23 is specifically configured to:
[0064] determine a first center point in the wide-angle image, and the first center point is a random point position selected in a preset range of a center point of the to-be-processed image;
[0065] determine a first image size value of the first target image according to the requirement image data of the long-focus image;
[0066] cut the first target image from the wide-angle image by taking the first center point as a center point of the first target image and combining the first image size value.
[0067] In a possible embodiment, the reading module 24 is specifically configured to:
[0068] calculate a first offset value between the center point of the to-be-processed image and the first center point;
[0069] reading a first image focal length value of the first target image in the wide-angle image according to the first image size value and the first offset value;
[0070] The first offset value and the second image focal length value are combined as the first target image data.
[0071] In a possible embodiment, the image data generating apparatus further includes a generating module 25 configured to:
[0072] If the image to be processed includes the telephoto image, extracting the telephoto image from the image to be processed;
[0073] Adjusting the size ratio of the telephoto image according to the required image data of the telephoto image to generate a second target image;
[0074] cropping the second target image to generate a third target image according to a parameter correspondence between the telephoto image and the second target image;
[0075] Image data of the third target image in the second target image is read as second target image data.
[0076] In a possible embodiment, the generating module 25 is specifically configured to:
[0077] Reading the image target size ratio value in the required image data;
[0078] Calculating a second image focal length ratio of the telephoto image according to the target size ratio value;
[0079] generating adjustment parameters for the telephoto image by combining the target size ratio value and the second image focal length ratio value;
[0080] The adjustment parameters are used to adjust the size ratio value of the telephoto image to generate a second target image.
[0081] In a possible embodiment, the generating module 25 is specifically configured to:
[0082] Determining a second center point in the second target image, where the second center point is a random point selected within a preset range of the center point of the second target image;
[0083] Calculating a second offset value between the second center point and the center point of the second target image;
[0084] Determining a third image size value of the third target image using the adjustment parameter;
[0085] Taking the second center point as a center point of the third target image, the third target image is generated by cropping the second target image in combination with the third image size value.
[0086] Based on the understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.), and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method of each implementation scenario of the present application.
[0087] Based on the above method as shown in Figure 1 , and Figure 2 the virtual device embodiment, in order to achieve the above purpose, the embodiment of the present application also provides an electronic device which can be configured at the side of a vehicle (such as a new energy vehicle), the device includes at least one processor, and a memory in communication connection with the at least one processor; the memory is used to store instructions executable by the at least one processor, the instructions are executed by the at least one processor, the processor is used to execute a computer program to realize the method as shown in Figure 1 .
[0088] Optionally, the above-mentioned entity device can also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface can include a display screen (Display), an input unit such as a keyboard (Keyboard), etc. The optional user interface can also include a USB interface, a card reader interface, etc. The network interface can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0089] Those skilled in the art can understand that the above-mentioned entity device structure provided by the embodiment does not constitute a limitation on the entity device, and can include more or fewer components, or combine certain components, or different component arrangements.
[0090] Based on the above method as shown in Figure 1 , the embodiment of the present application also provides a computer readable storage medium having a computer program stored thereon, the computer program is executed by the processor to realize the method corresponding to any embodiment. The storage medium can also include an operating system, a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned entity device, supports the running of information processing programs and other software and / or programs. The network communication module is used to realize the communication between the components in the storage medium, and the communication with other hardware and software in the information processing entity device.
[0091] Based on the above electronic device, the embodiment of the present application also provides a vehicle, which can specifically include the device shown in Figure 2 The vehicle can be a new energy vehicle or a traditional vehicle.
[0092] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary general hardware platforms, or by hardware. By applying the scheme of the present embodiment, compared with the prior art, the present embodiment first determines whether the long-focus image is contained in the to-be-processed image generated by the vehicle-mounted camera, the long-focus image being an image generated by a long-focus camera; secondly, if the to-be-processed image does not contain the long-focus image, the wide-angle image is extracted from the to-be-processed image, the wide-angle image being an image generated by a wide-angle camera, the wide-angle image covering the long-focus image; then, according to the required image data of the long-focus image, the first target image is cropped from the wide-angle image; finally, the image data of the first target image in the wide-angle image is read as the first target image data. When the long-focus image is missing, the present application proposes to select the wide-angle image from the images captured by the vehicle-mounted camera, and at the same time, the wide-angle image needs to cover the long-focus image. The present application extracts the first target image from the wide-angle image, so that the first target image can replace the missing long-focus image, and the first target image and its corresponding image data can further constitute the first target image data to participate in the model training process, ensuring the completeness of the model training data, avoiding the decline of the robustness of the model caused by the missing of the training data, and ensuring the performance reliability of the generated model.
[0093] It should be noted that, in this document, the relationship terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0094] The foregoing detailed description of the application has been presented for purposes of illustration and description. Various modifications and changes can be made to these embodiments without departing from the spirit and scope of the application. It is intended that the scope of the application should not be limited by the particular representative embodiments described above.
Claims
1. An image data generating method characterized by comprising: The method comprises the following steps: determining whether a long-focus image is contained in a to-be-processed image generated by shooting of a vehicle-mounted camera, the long-focus image being an image generated by shooting of a long-focus camera in the vehicle-mounted camera; if the long-focus image is not contained in the to-be-processed image, extracting a wide-angle image in the to-be-processed image, the wide-angle image being an image generated by shooting of a wide-angle camera in the vehicle-mounted camera, the wide-angle image covering the long-focus image; generating a first target image in the wide-angle image according to required image data of the long-focus image; reading image data of the first target image in the wide-angle image as first target image data.
2. The method of claim 1, wherein, The step of generating the first target image in the wide-angle image according to the required image data of the long-focus image comprises the following steps: determining a first center point in the wide-angle image, the first center point being a random point position selected within a preset range of a center point of the to-be-processed image; determining a first image size value of the first target image according to the required image data of the long-focus image; generating the first target image in the wide-angle image by taking the first center point as a center point of the first target image and combining the first image size value.
3. The method of claim 2, wherein, The step of reading the image data of the first target image in the wide-angle image as the first target image data comprises the following steps: calculating a first offset value between the center point of the to-be-processed image and the first center point; reading a first image focal length value of the first target image in the wide-angle image according to the first image size value and the first offset value; combining the first offset value and the second image focal length value as the first target image data.
4. The method of claim 1, wherein, After the step of determining whether the long-focus image is contained in the to-be-processed image generated by shooting of the vehicle-mounted camera, the method further comprises the following steps: if the long-focus image is contained in the to-be-processed image, extracting the long-focus image in the to-be-processed image; generating a second target image by adjusting a size ratio value of the long-focus image according to required image data of the long-focus image; generating a third target image in the second target image according to a parameter correspondence relationship between the long-focus image and the second target image; reading image data of the third target image in the second target image as second target image data.
5. The method of claim 4, wherein, The step of generating the second target image by adjusting the size ratio value of the long-focus image according to the required image data of the long-focus image comprises the following steps: reading an image target size ratio value in the required image data; calculating a second image focal length ratio value of the long-focus image according to the target size ratio value; generating an adjustment parameter of the long-focus image by combining the target size ratio value and the second image focal length ratio value; adjusting the size ratio value of the long-focus image by using the adjustment parameter to generate the second target image.
6. The method of claim 4, wherein, The step of generating the third target image in the second target image according to the parameter correspondence relationship between the long-focus image and the second target image comprises the following steps: determining a second center point in the second target image, the second center point being a random point position selected within a preset range of a center point of the second target image; calculating a second offset value between the second center point and the center point of the second target image; determining a third image size value of the third target image by using the adjustment parameter; cropping the third target image from the second target image by taking the second center point as the center point of the third target image and combining the third image size value.
7. An image data generating apparatus characterized by comprising: comprising: a determining module configured to determine whether a long-focus image is contained in a to-be-processed image generated by a vehicle-mounted camera, the long-focus image being an image generated by a long-focus camera; an extracting module configured to extract a wide-angle image from the to-be-processed image if the long-focus image is not contained in the to-be-processed image, the wide-angle image being an image generated by a wide-angle camera, the wide-angle image covering the long-focus image; a cropping module configured to crop a first target image from the wide-angle image according to required image data of the long-focus image; a reading module configured to read image data of the first target image in the wide-angle image as first target image data.
8. An electronic device, comprising: comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1-6.
10. A vehicle characterized by comprising: The vehicle is equipped with the device of claim 7 or the electronic equipment of claim 8.