Method, apparatus, device and storage medium for transmitting image data
By automatically acquiring and sending image data through onboard cameras and vehicle infotainment systems, the safety hazards of drivers sharing road condition images are resolved, and safe image data sharing is achieved.
Patent Information
- Application Number
- CN202410530810.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2044-04-29
AI Technical Summary
When a user wants to share images of the current road conditions while driving, they need to use a mobile device to take and send the images, which poses a safety hazard.
The system automatically acquires image data through cameras on the vehicle, processes it, and sends it to the target device. It uses voice recognition and orientation/time indication to generate shooting instructions, locate the target camera, and realize the automatic acquisition and transmission of image data.
While ensuring driving safety, the process of sharing image data has been simplified, reducing the need for drivers to operate mobile devices and improving safety.
Smart Images

Figure CN118400481B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of automobiles, and in particular, to a method and device for transmitting image data, an apparatus, and a storage medium. BACKGROUND
[0002] With the development of computers, automobile intelligence is becoming more and more popular. Various communication software can be installed in the car machine of the automobile, so that the user can directly send and receive information without operating the mobile phone.
[0003] At present, the communication software on the car machine can be used to send and receive text, voice and other information. When the user wants to share the image data of the current road condition, a movable device needs to be used to take a picture and then send it through the device.
[0004] In this way, the above operation when driving will have a huge safety hazard. SUMMARY
[0005] The present disclosure provides a method and device for transmitting image data, an apparatus, and a storage medium, which can solve the technical problems in the related art. The technical solution is as follows:
[0006] In a first aspect, the present disclosure provides a method for transmitting image data, which is applied to a target vehicle. The target vehicle includes a car machine and at least one camera. The car machine runs a target application program. The method includes:
[0007] The car machine acquires a shooting instruction generated by the target application program;
[0008] In response to the shooting instruction, the car machine acquires image data shot by a target camera in the at least one camera;
[0009] The car machine acquires an image transmission instruction generated by the target application program;
[0010] In response to the image transmission instruction, the car machine sends the image data to a target device.
[0011] In a possible implementation, the car machine acquires a shooting instruction generated by the target application program, which includes:
[0012] The car machine acquires voice data collected by a microphone, identifies the voice data through the target application program to obtain text data, and generates a shooting instruction in a case where the text data includes a specified keyword.
[0013] In a possible implementation, the shooting instruction is generated, which includes:
[0014] The car machine acquires a direction word in the text data, determines direction indication information based on the direction word, and generates a shooting instruction carrying the direction indication information;
[0015] The car machine acquires image data shot by a target camera in the at least one camera, including:
[0016] The car machine determines the target camera in the at least one camera based on the direction indication information in the shooting instruction;
[0017] The car machine acquires image data shot by the target camera.
[0018] In a possible implementation, before the generation of the shooting instruction carrying the direction indication information, the method further includes:
[0019] The car machine acquires a time word in the text data, and determines time indication information based on the time word;
[0020] The generation of the shooting instruction carrying the direction indication information includes:
[0021] The generation of the shooting instruction carrying the direction indication information and the time indication information;
[0022] The car machine acquires image data shot by the target camera, including:
[0023] The car machine acquires image data shot by the target camera at a time indicated by the time indication information.
[0024] In a possible implementation, the target vehicle includes a plurality of microphones, and the plurality of microphones are installed at different positions of the target vehicle;
[0025] The generation of the shooting instruction includes:
[0026] Based on voice data collected by the plurality of microphones, a sound source position is determined, and a shooting instruction carrying the sound source position is generated;
[0027] The car machine acquires image data shot by a target camera in the at least one camera, including:
[0028] The car machine determines the target camera in the at least one camera based on the sound source position in the shooting instruction;
[0029] The car machine acquires image data shot by the target camera.
[0030] In a possible implementation, the target vehicle includes a plurality of cameras, and the plurality of cameras are installed at different positions of the target vehicle;
[0031] The car machine determines a target camera in the at least one camera based on the sound source position in the shooting instruction, comprising:
[0032] The car machine determines the reference camera corresponding to the sound source position in the shooting instruction, wherein the reference camera is located in front of the sound source position and the shooting direction is towards the sound source position;
[0033] The car machine determines the face orientation of the person at the sound source position based on the image data shot by the reference camera;
[0034] The car machine determines the target camera matching the field of view of the person based on the sound source position, the face orientation, the position and shooting direction of the at least one camera.
[0035] In a possible implementation, the determination of the target camera matching the field of view of the person based on the sound source position, the face orientation, the position and shooting direction of the at least one camera comprises:
[0036] The car machine determines a first ray corresponding to the field of view of the person based on the sound source position and the face orientation, wherein the end point of the first ray is the sound source position and the direction of the first ray is the face orientation;
[0037] The car machine determines the distance between each camera and the first ray based on the first ray and the position of the at least one camera;
[0038] The car machine determines a second ray corresponding to each camera based on the position and shooting direction of the at least one camera, wherein the end point of the second ray is the position of the camera and the direction of the second ray is the shooting direction of the camera;
[0039] The car machine determines the included angle between the second ray corresponding to each camera and the first ray based on the first ray and the second ray corresponding to each camera;
[0040] The car machine determines the target camera matching the field of view of the person based on the distance and the included angle corresponding to each camera.
[0041] In a possible implementation, the determination of the target camera matching the field of view of the person based on the distance and the included angle corresponding to each camera comprises:
[0042] For each camera, the car machine performs weighting processing on the distance and the included angle corresponding to the camera based on the pre-set distance weight and the included angle weight, to obtain the weighted score corresponding to the camera as the matching degree between the camera and the field of view of the person;
[0043] The car machine determines a target camera matched with the field of view of the person based on matching degrees of each camera and the field of view of the person.
[0044] In a possible implementation, the determining of the sound source position based on the voice data collected by the plurality of microphones comprises:
[0045] determining a volume value of the voice data based on the voice data collected by the plurality of microphones respectively;
[0046] determining the sound source position based on the volume value of the voice data.
[0047] In a possible implementation, the determining of the sound source position based on the voice data collected by the plurality of microphones comprises:
[0048] determining a start time of the voice data based on the voice data collected by the plurality of microphones respectively;
[0049] determining the sound source position based on the start time of the voice data.
[0050] In a possible implementation, before the car machine acquires the image transmission instruction generated by the target application program, the method further comprises:
[0051] The car machine acquires an image adjustment instruction.
[0052] The car machine adjusts the image data based on the image adjustment instruction.
[0053] In a possible implementation, the image data comprises picture data or video data.
[0054] In a second aspect, the embodiments of the present disclosure provide a device for sending image data, the device being applied to a car machine, the car machine being on a target vehicle, the target vehicle comprising at least one camera, the car machine running a target application program, and the device comprising:
[0055] an acquisition module, configured to acquire a shooting instruction generated by the target application program;
[0056] The acquisition module is further configured to acquire image data shot by a target camera in the at least one camera in response to the shooting instruction.
[0057] The acquisition module is further configured to acquire an image transmission instruction generated by the target application program.
[0058] a sending module, configured to send the image data to a target device in response to the image transmission instruction.
[0059] In a possible implementation, the obtaining module is configured to: the car machine obtains voice data collected by a microphone, identifies the voice data by using the target application program to obtain text data, and generates a shooting instruction in a case where the text data includes a specified keyword.
[0060] In a possible implementation, the device further includes a generating module configured to: the car machine obtains a direction word in the text data, determines direction indication information based on the direction word, and generates a shooting instruction carrying the direction indication information.
[0061] The obtaining module is configured to: the car machine determines a target camera in the at least one camera based on the direction indication information in the shooting instruction, and the car machine obtains image data shot by the target camera.
[0062] In a possible implementation, the obtaining module is further configured to: the car machine obtains a time word in the text data, and determines time indication information based on the time word.
[0063] The generating module is configured to: generate a shooting instruction carrying the direction indication information and the time indication information.
[0064] The obtaining module is configured to: the car machine obtains image data shot by the target camera at a time indicated by the time indication information.
[0065] In a possible implementation, the target vehicle includes a plurality of microphones, and the plurality of microphones are installed at different positions of the target vehicle.
[0066] The generating module is configured to: determine a sound source position based on voice data collected by the plurality of microphones, and generate a shooting instruction carrying the sound source position.
[0067] The obtaining module is configured to: the car machine determines a target camera in the at least one camera based on the sound source position in the shooting instruction, and the car machine obtains image data shot by the target camera.
[0068] In a possible implementation, the target vehicle includes a plurality of cameras, and the plurality of cameras are installed at different positions of the target vehicle. The device further includes a determining module configured to:
[0069] The car machine determines a reference camera corresponding to the sound source position in the shooting instruction, where the reference camera is located in front of the sound source position and has a shooting direction towards the sound source position.
[0070] The car machine determines a face direction of a person at the sound source position based on image data shot by the reference camera.
[0071] The car machine determines a target camera matching the field of view of the person based on the sound source position, the face orientation, the position and shooting direction of the at least one camera.
[0072] In a possible implementation, the determining module is configured to: the car machine determines a distance between each camera and the first ray based on the first ray and the position of the at least one camera; the car machine determines a second ray corresponding to each camera based on the position and shooting direction of the at least one camera, wherein an end point of the second ray is the position of the camera, and a direction of the second ray is the shooting direction of the camera; the car machine determines an included angle between the second ray corresponding to each camera and the first ray based on the first ray and the second ray corresponding to each camera; and the car machine determines a target camera matching the field of view of the person based on the distance and the included angle corresponding to each camera.
[0073] In a possible implementation, the determining module is configured to: for each camera, the car machine performs weighting processing on the distance and the included angle corresponding to the camera based on a pre-set distance weight and an included angle weight, to obtain a weighted score corresponding to the camera as a matching degree between the camera and the field of view of the person; and the car machine determines a target camera matching the field of view of the person based on the matching degree between each camera and the field of view of the person.
[0074] In a possible implementation, the determining module is configured to: determine a volume value of voice data based on voice data collected by the plurality of microphones respectively; and determine the sound source position based on the volume value of the voice data.
[0075] In a possible implementation, the determining module is configured to: determine a start time of voice data based on voice data collected by the plurality of microphones respectively; and determine the sound source position based on the start time of the voice data.
[0076] In a possible implementation, the obtaining module is further configured to: the car machine obtains an image adjustment instruction; and the car machine adjusts the image data based on the image adjustment instruction.
[0077] In a possible implementation, the image data includes picture data or video data.
[0078] In a third aspect, an electronic device is provided, which includes a memory and a processor. The memory is configured to store computer instructions. The processor executes the computer instructions stored in the memory, so that the electronic device performs the method of the first aspect and possible implementation manners thereof.
[0079] In a fourth aspect, a computer-readable storage medium is provided, which stores computer program codes. When the computer program codes are executed by an electronic device, the electronic device performs the method of the first aspect and possible implementation manners thereof.
[0080] In a fifth aspect, a computer program product is provided, which includes computer program codes. When the computer program codes are executed by an electronic device, the electronic device performs the method of the first aspect and possible implementation manners thereof.
[0081] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure.
[0082] In the present disclosure, based on a shooting instruction, image data shot by a camera on a target vehicle can be automatically acquired and sent. When a user wants to share image data of a current road condition, the image data can be sent to a target device through a vehicle machine. Compared with an operation of shooting and sharing by using other devices, the operation guarantees the safety of a driver to a certain extent. BRIEF DESCRIPTION OF DRAWINGS
[0083] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.
[0084] Figure 1 is a flowchart of sending image data provided by an embodiment of the present disclosure;
[0085] Figure 2 is a flowchart of sending image data provided by an embodiment of the present disclosure;
[0086] Figure 3 is a flowchart of determining a target camera provided by an embodiment of the present disclosure;
[0087] Figure 4 is a flowchart of determining a target camera provided by an embodiment of the present disclosure;
[0088] Figure 5 is a structural diagram of an apparatus for sending image data provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0089] In order to make the purposes, technical solutions and advantages of the present disclosure clearer, the embodiments of the present disclosure will be further described in detail below with reference to the drawings.
[0090] The embodiment of the present disclosure provides a method for sending image data, which can be applied to a vehicle. The vehicle comprises a car machine and at least one camera. A plurality of microphones can be installed on the vehicle and are respectively installed at different positions in the vehicle to collect voice data. The vehicle is also provided with a camera, which can be installed at different positions of the vehicle to obtain the visual field around the vehicle, for example, front-view, side-front-view, side-rear-view and rear-view cameras can be installed outside the vehicle, and cameras can also be installed inside the vehicle, and the like. Each camera is managed by a camera controller to control the shooting of each camera. The camera controller can be integrated on the car machine, that is, the car machine can run an application program for managing the camera.
[0091] The car machine is an in-vehicle information entertainment device installed in the vehicle. Various application programs can be installed on the car machine to realize different functions. For example, the car machine is provided with application programs for playing music and communication, and the like. The car machine comprises a processor, a memory, a communication component, a display component and the like, which will be described below:
[0092] The processor can be a central processing unit (CPU), which can be used to analyze voice data and the like.
[0093] The memory can be various volatile memories or non-volatile memories, such as a solid state disk (SSD), a dynamic random access memory (DRAM) memory and the like. The memory can be used to store pre-stored data, intermediate data and result data in the process of sending image data, for example, image data of a certain time period shot by the camera.
[0094] The communication component can be a wired network connector, a wireless fidelity (WiFi) module, a Bluetooth module, a cellular communication module and the like. The communication component can be used for data transmission with other devices, for example, the communication component can be used to receive a shooting instruction, and can also be used to send collected images to a certain device for display, and the like.
[0095] Generally, the communication application program on the car machine is used to send and receive voice, text and the like. When a user needs to share image data of the current road condition, a mobile device such as a mobile phone is used to shoot and share.
[0096] In the method for sending image data provided by the embodiment of the present disclosure, the camera installed on the vehicle is used to shoot and share image data through the car machine. This operation is simple and convenient and can ensure the safety of the driver to a certain extent, for example, Figure 1 The processing flow of the method is shown in the figure, which can comprise the following steps:
[0097] In step 101, the vehicle machine acquires a shooting instruction generated by the target application.
[0098] The target application can acquire various data issued by the user, such as voice data, touch data, and the like. The target application generates a shooting instruction by analyzing the data. The shooting instruction is used to instruct the vehicle machine to acquire image data.
[0099] When the target application acquires voice data, the vehicle machine obtains text data by recognizing the voice data through the target application, and generates a shooting instruction in a case where the text data includes a specified keyword (for example, a time word or a direction word). This will be described in detail below:
[0100] The voice data can be acquired through a microphone. After the vehicle machine acquires the voice data, a voice recognition model can be used to translate the voice data into text data, and the meaning of the text data can be understood by performing semantic analysis. The text data can include various keywords, such as direction words and time words. The direction word is used to indicate a direction, for example, it can be "directly in front", "behind", "left side", "right side", and the like. The time word is used to indicate a time, which can be a certain time, for example, "7 o'clock in the morning", "1 o'clock in the afternoon", and the like. The time word can also be a certain time period, for example, "7 o'clock to 7 o'clock and 5 minutes", and the like. The time word can also be an adverb, for example, "soon", "immediately", and the like. When the text data includes a direction word, the vehicle machine determines direction indication information based on the direction word. When the text data includes a time word, the vehicle machine determines time indication information based on the time word. Then the shooting instruction carries the direction indication information and / or the time indication information. The following examples are given: for example, the text data includes the direction word "directly in front", and the direction indication information of the directly in front direction is "00". The shooting instruction carries the direction indication information "00". For another example, the text data includes the time word "soon", the vehicle machine acquires the voice data corresponding to the text data at 4 o'clock in the afternoon, and the time indication information of 4 o'clock in the afternoon is "1600". The shooting instruction carries the time indication information "1600". For another example, the text data includes the time word "from 7 o'clock in the morning to 7 o'clock and 5 minutes", and the time indication information from 7 o'clock in the morning to 7 o'clock and 5 minutes is "0700-0705". The shooting instruction carries the time indication information "0700-0705". It can be easily known that the time indication information can indicate a time or a time period.
[0101] The text data can only include a time word or a direction word, or can include both a time word and a direction word. The embodiments of the present disclosure do not limit this.
[0102] Optionally, the target application program can also acquire touch data, which is data acquired by the user touching the display screen of the vehicle machine. The display screen can display a direction word and a time, and the user selects the corresponding direction and time on the display screen through touch operation. The vehicle machine acquires the direction and time to generate direction indication information and time indication information, and then generates a shooting instruction carrying the time indication information and the direction indication information.
[0103] In step 102, in response to the shooting instruction, the vehicle machine acquires image data shot by a target camera in the at least one camera.
[0104] The image data can be picture data or video data, which is not limited in the embodiments of the present disclosure.
[0105] The vehicle machine pre-stores a correspondence table of direction indication information and camera identification information, and one direction indication information can correspond to one or more cameras. The technician can record the correspondence between the direction indication information and the camera identification information according to the installation of the cameras on the vehicle. If the shooting instruction carries the direction indication information, the vehicle machine can determine the camera identification information corresponding to the direction indication information by looking up the table, and the camera is the target camera. For example, the shooting instruction carries the direction indication information "00", which represents the front direction. It is learned through the table that the camera corresponding to the indication information "00" is the camera on the front bumper of the vehicle, and the camera is determined as the target camera.
[0106] The vehicle machine can store the image data shot by each camera, and the vehicle machine acquires the image data shot by the target camera after determining the target camera. If the shooting instruction carries the time indication information, the vehicle machine cuts the image data based on the time indication information, and displays the image data obtained after cutting. For example, the time indication information is "1600", which represents 4 o'clock in the afternoon. The picture data corresponding to 4 o'clock in the afternoon in the image data shot by the target camera is recorded and displayed. The cutting can be understood as copying and storing the picture data. For another example, the time indication information is "0700-0705", which represents 7 o'clock to 7 o'clock and 5 minutes in the morning. The video data corresponding to 7 o'clock to 7 o'clock and 5 minutes in the morning in the image data shot by the target camera is recorded and displayed.
[0107] After the user views the displayed image data, the user can adjust the image data. The user can adjust the image data through voice or touch operation. Correspondingly, the vehicle machine acquires an image adjustment instruction, and then adjusts the image according to the image adjustment instruction. For example, a filter can be added to the image data, or the image data can be cropped, etc.
[0108] In step 103, the vehicle machine acquires an image transmission instruction generated by the target application program.
[0109] After the user confirms that the image data is the image data to be sent, the user can instruct the vehicle machine to send the image data through voice or touch operation. Accordingly, the vehicle machine generates an image transmission instruction based on voice data or touch data. The voice data or touch data includes a keyword, which is used to generate the image transmission instruction. The keyword can include a time word, which is used to indicate the time of sending the image data, and the keyword can also include a contact person, which is used to indicate the target device to which the image data is sent. The vehicle machine sends the image data to the contact person, i.e., first sends the image data to a server, and then the server sends the image data to the target device used by the contact person. The vehicle machine determines various indication information based on various keywords, such as time indication information and target device indication information, and then carries the indication information in the image transmission instruction.
[0110] In step 104, in response to the image transmission instruction, the vehicle machine sends the image data to the target device.
[0111] The vehicle machine sends the image data to the target device based on various indication information carried in the image transmission instruction. Specifically, the vehicle machine sends the image data to the target device based on the target device indication information. The image transmission instruction can carry time indication information or not. If the image transmission instruction carries the time indication information, the vehicle machine sends the image data at the time indicated by the time indication information. If the image transmission instruction does not carry the time indication information, the vehicle machine can send the image data immediately after receiving the image transmission instruction.
[0112] In the above processing flow, the user explicitly indicates the target camera through voice or touch, etc. The embodiments of the present disclosure also provide a method for automatically determining the target camera based on the position of the user in the target vehicle or the field of view of the user. The method can determine the field of view of the picture data captured by the target camera, which is close to the field of view of the user. As shown in FIG. 8, the processing flow of the method can include the following steps: Figure 2
[0113] In step 201, the vehicle machine determines the sound source position based on voice data collected by multiple microphones, and generates a shooting instruction carrying the sound source position.
[0114] The target vehicle includes multiple microphones, which are respectively installed at different positions of the target vehicle. There are many methods for determining the sound source position. For example, the volume value of the voice data can be determined based on the voice data collected by the multiple microphones respectively, and then the sound source position can be determined based on the volume value of the voice data. Alternatively, the start time of the voice data can be determined based on the voice data collected by the multiple microphones respectively, and then the sound source position can be determined based on the start time of the voice data. The above two methods are described below:
[0115] The plurality of microphones respectively collect voice data, the voice data corresponds to a start time, that is, a time when the microphone starts receiving voice data, and the voice data also corresponds to a volume. The characters send voice instructions at different positions on the target vehicle, and the volumes and start times of the voice data collected by each microphone are different. Based on this, it can be determined which position on the vehicle the character sending the voice instruction is in. For example, the user sends a voice instruction at the co-pilot position, and the co-pilot is the sound source position. Among the plurality of microphones, the closer the microphone is to the co-pilot, the larger the volume of the voice data collected by the microphone, and the closer the microphone is to the co-pilot, the earlier the start time of the voice data collected by the microphone.
[0116] A correspondence table of positions of seats in the target vehicle and all sorted microphones can be established in advance. The corresponding method is: based on the distance between each seat position in the target vehicle and all microphones, for each seat position, sort the microphones according to the distance from near to far or from far to near, and record the correspondence between the seat position and all sorted microphones. For example, the seat positions include "driver", "co-pilot", "rear left seat", "rear middle seat", and "rear right seat", and the microphones include five, and the identifiers of the microphones are "01", "02", "03", "04", and "05". The form of the record in the table can be as follows:
[0117] Position of each seat Sorted microphones Driver "01”、"02”、"03”、"04”、"05” Passenger "02”、"01”、"03”、"04”、"05” Back left "03”、"02”、"01”、"04”、"05” Back middle "04”、"02”、"03”、"01”、"05” Back right "05”、"02”、"04”、"03”、"01”
[0118] After obtaining the voice data collected by all microphones, the microphones can be sorted based on the volume or start time of the voice data collected by all microphones, the sorted microphones are compared with the sorted microphones in the table, and the seat position corresponding to the microphones with the same sorting is determined as the sound source position. For example, based on the volume of the voice data collected by all microphones, the microphones are sorted in descending order of volume to obtain "01", "02", "03", "04", and "05", and the determined sound source position is the driver position.
[0119] In step 202, the car machine determines a target camera in the camera based on the sound source position in the shooting instruction.
[0120] A correspondence table of positions of seats in the target camera and the camera can be established in advance. The corresponding method is: one or more cameras closest to the position of the seat can be the camera corresponding to the position of the seat. For example, the seat positions include "driver", "co-pilot", "rear left seat", "rear middle seat", and "rear right seat", and the cameras include seven, and the identifiers of the cameras are "A", "B", "C", "D", and "E". The form of the record in the table can be as follows:
[0121] Position of each seat Camera Driver "A", "B" Passenger "B", "C" Back left "C", "D" Back middle "D", "E" Back right "A", "E"
[0122] After the car machine determines the sound source position, the target camera is determined by looking up the table. For example, the sound source position is "driving", and the corresponding cameras of "driving" are "A" and "B" obtained by looking up the table, and the target camera is "A" and "B".
[0123] In addition to the above method of determining the target camera, the target camera can also be determined based on the sound source position and the face orientation of the person, as shown in Figure 3 The processing flow of this method can include the following steps:
[0124] Step 2021, the car machine determines the reference camera corresponding to the sound source position in the shooting instruction.
[0125] The reference camera is located in front of the sound source position, and the shooting direction is towards the sound source position. To ensure that the face data of the person at the sound source position can be shot.
[0126] Step 2022, the car machine determines the face orientation of the person at the sound source position based on the image data shot by the reference camera.
[0127] The reference camera shoots the picture of the person at the sound source position, and determines the face orientation of the person based on image recognition.
[0128] Step 2023, the car machine determines the target camera matching the field of view of the person based on the sound source position, the face orientation, the position and the shooting direction of the at least one camera.
[0129] As shown in Figure 4 The processing flow of this step can include the following steps:
[0130] Step 20231, the car machine determines the first ray corresponding to the field of view of the person based on the sound source position and the face orientation.
[0131] The end point of the first ray is the sound source position, and the direction of the camera is the face orientation.
[0132] Step 20232, the car machine determines the distance between each camera and the first ray based on the position of the at least one camera and the first ray.
[0133] A space coordinate system can be established in advance, and the coordinates of each camera and each sound source position in the space coordinate system are determined, then the first ray can be represented by a straight line equation, and the distance between each camera and the first ray can be calculated as the distance from a point to a straight line. Assuming that the equation of the first ray is Ax+By+C=0, and the coordinates of a certain camera are (x0, y0), the formula corresponding to the distance between the camera and the first ray is:
[0134]
[0135] wherein d represents the distance.
[0136] In step 20233, the vehicle machine determines a second ray corresponding to each camera based on the position and shooting direction of the at least one camera.
[0137] The end point of the second ray is the position of the camera, and the direction of the second ray is the shooting direction of the camera. The shooting direction of the camera can be a directed line segment passing through the camera as the starting point and the center position of the image data shot by the camera, and the direction is from the camera to the center position of the image data shot by the camera. The second ray can also be represented by a straight line equation.
[0138] In step 20234, the vehicle machine determines the included angle between the second ray corresponding to each camera and the first ray based on the first ray and the second ray corresponding to each camera.
[0139] Based on the straight line equations of the first ray and the second rays corresponding to the respective cameras, the included angle between the second ray corresponding to each camera and the first ray can be determined. For example, the straight line equation of the first ray is A1x+B1y+C1=0, and the straight line equation of the second ray corresponding to a certain camera is A2x+B2y+C2=0. The included angle between the two straight lines is Then the following formula is obtained:
[0140]
[0141] In step 20235, the vehicle machine determines a target camera matching the field of view of the person based on the distance and the included angle corresponding to each camera.
[0142] For each camera, the vehicle machine performs weighted processing on the distance and the included angle corresponding to the camera based on the pre-set distance weight and the included angle weight, obtains a weighted score corresponding to the camera as the matching degree of the camera and the field of view of the person, and then determines a target camera matching the field of view of the person based on the matching degree of each camera and the field of view of the person. Details are as follows:
[0143] For each camera, there is a distance and an included angle corresponding to the camera. The product of the distance and the distance weight and the product of the included angle and the included angle weight are calculated, and then the two are added to obtain the matching degree. For each camera, there is a matching degree with the field of view of the person, and one or more cameras with the highest matching degree are determined as the target camera.
[0144] In step 203, in response to the shooting instruction, the vehicle machine acquires image data shot by the target camera in the at least one camera.
[0145] After the car machine determines the target camera, the image data captured by the target camera is obtained. Since there is voice data collected by multiple microphones, multiple text data is obtained after the voice data is translated into text data, and the text data with the highest frequency of occurrence in the multiple text data can be determined as the target text data. In the case where the target text data includes a specified keyword (such as a time word), a shooting instruction is generated. If the shooting instruction carries time indication information, the car machine splits the image data based on the time indication information, and displays the image data obtained after splitting. This operation is similar to the processing of the shooting instruction carrying time indication information in step 102 described above, and the detailed description of the operation in step 102 is referred to.
[0146] The subsequent processing flow is similar to steps 103-104 described above, and the detailed description of steps 103-104 is referred to.
[0147] In the embodiments of the present disclosure, based on the shooting instruction, the image data captured by the camera on the target vehicle can be automatically obtained and sent, and when the user wants to share the image data of the current road condition, the image data can be sent to the target device through the car machine. Compared with the operation of shooting and sharing using other devices, the operation ensures the safety of the driver to a certain extent.
[0148] Based on the same technical concept, the embodiments of the present disclosure provide a device for sending image data, which is applied to the car machine described above, the car machine is on a target vehicle, the target vehicle includes at least one camera, and the car machine runs a target application, such as Figure 5 As shown in the figure, the device includes:
[0149] The acquisition module 510 is configured to acquire a shooting instruction generated by the target application, and is used to realize the processing function of step 101 and other related implicit steps.
[0150] The acquisition module 510 is further configured to acquire image data captured by a target camera in the at least one camera in response to the shooting instruction, and is used to realize the processing function of step 102 and other related implicit steps.
[0151] The acquisition module 510 is further configured to acquire an image transmission instruction generated by the target application, and is used to realize the processing function of step 103 and other related implicit steps.
[0152] The sending module 520 is configured to send the image data to a target device in response to the image transmission instruction, and is used to realize the processing function of step 104 and other related implicit steps.
[0153] In a possible implementation, the acquisition module 510 is configured to: acquire, by the car machine, voice data collected by a microphone, identify text data from the voice data by using the target application program, and generate a shooting instruction in a case where the text data includes a specified keyword.
[0154] In a possible implementation, the apparatus further includes a generation module 530 configured to: acquire, by the car machine, a direction word from the text data, determine direction indication information based on the direction word, and generate a shooting instruction carrying the direction indication information; and implement the processing function of step 102 and other related implicit steps.
[0155] The acquisition module 510 is configured to: determine, by the car machine, a target camera from the at least one camera based on the direction indication information in the shooting instruction; and acquire, by the car machine, image data shot by the target camera. The processing function of step 102 and other related implicit steps are implemented.
[0156] In a possible implementation, the acquisition module 510 is further configured to: acquire, by the car machine, a time word from the text data, and determine time indication information based on the time word; and implement the processing function of step 101 and other related implicit steps.
[0157] The generation module 530 is configured to: generate a shooting instruction carrying the direction indication information and the time indication information; and implement the processing function of step 201 and other related implicit steps.
[0158] The acquisition module 510 is configured to: acquire, by the car machine, image data shot by the target camera at a time indicated by the time indication information. The processing function of step 203 and other related implicit steps are implemented.
[0159] In a possible implementation, the target vehicle includes a plurality of microphones, and the plurality of microphones are installed at different positions of the target vehicle.
[0160] The generation module 530 is configured to: determine a sound source position based on voice data collected by the plurality of microphones, and generate a shooting instruction carrying the sound source position; and implement the processing function of step 201 and other related implicit steps.
[0161] The acquisition module 510 is configured to: determine, by the car machine, a target camera in the at least one camera based on the sound source position in the shooting instruction; and acquire, by the car machine, image data shot by the target camera.
[0162] In a possible implementation, the target vehicle includes a plurality of cameras, and the plurality of cameras are installed at different positions of the target vehicle. The device further includes a determination module 540 configured to: determine, by the car machine, a reference camera corresponding to the sound source position in the shooting instruction, wherein the reference camera is located in front of the sound source position and has a shooting direction towards the sound source position; determine, by the car machine, a face orientation of a person at the sound source position based on image data shot by the reference camera; and determine, by the car machine, a target camera matching a field of view of the person based on the sound source position, the face orientation, positions of the at least one camera, and shooting directions of the at least one camera. The processing functions for implementing steps 2021-2023 and other related implicit steps are implemented.
[0163] In a possible implementation, the determination module 540 is configured to: determine, by the car machine, a distance between each camera and the first ray based on the first ray and the position of the at least one camera; determine, by the car machine, a second ray corresponding to each camera based on the position and the shooting direction of the at least one camera, wherein an end point of the second ray is the position of the camera, and a direction of the second ray is the shooting direction of the camera; determine, by the car machine, an included angle between the second ray corresponding to each camera and the first ray based on the first ray and the second ray corresponding to each camera; and determine, by the car machine, a target camera matching the field of view of the person based on the distance and the included angle corresponding to each camera. The processing functions for implementing steps 20231-20235 and other related implicit steps are implemented.
[0164] In a possible implementation, the determination module 540 is configured to: for each camera, perform, by the car machine, weighting processing on the distance and the included angle corresponding to the camera based on a pre-set distance weight and an included angle weight, to obtain a weighted score corresponding to the camera as a matching degree between the camera and the field of view of the person; and determine, by the car machine, a target camera matching the field of view of the person based on the matching degree between each camera and the field of view of the person. The processing functions for implementing step 20235 and other related implicit steps are implemented.
[0165] In a possible implementation, the determining module 540 is configured to: determine a volume value of the voice data based on the voice data collected by the plurality of microphones respectively; and determine the sound source position based on the volume value of the voice data. The processing function for implementing step 201, and other related implicit steps.
[0166] In a possible implementation, the determining module 540 is configured to: determine a start time of the voice data based on the voice data collected by the plurality of microphones respectively; and determine the sound source position based on the start time of the voice data. The processing function for implementing step 201, and other related implicit steps.
[0167] In a possible implementation, the obtaining module 510 is further configured to: obtain an image adjustment instruction; and adjust the image data based on the image adjustment instruction. The processing function for implementing step 102, and other related implicit steps.
[0168] In a possible implementation, the image data includes picture data or video data.
[0169] In the embodiments of the present disclosure, based on the shooting instruction, the image data shot by the camera on the target vehicle can be automatically obtained and sent, and when the user wants to share the image data of the current road condition, the image data can be sent to the target device through the vehicle machine. Compared with the operation of shooting and sharing using other devices, the operation guarantees the safety of the driver to a certain extent.
[0170] It should be noted that: when the apparatus for sending image data provided in the above embodiments performs the processing of sending image data, only the above division of each functional module is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for sending image data and the method for sending image data provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0171] In the above embodiments, all or part of the steps can be implemented by software, hardware, firmware or any combination thereof, when implemented by using software, all or part of the steps can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions, when the computer program instructions are loaded and executed by a device, all or part of the processes or functions according to the embodiments of the present disclosure are generated. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer readable storage medium can be any available medium that can be accessed by a device or a data storage device such as a server, data center and the like integrated with one or more available media. The available medium can be a magnetic medium (such as floppy disk, hard disk and magnetic tape), an optical medium (such as digital video disk (digital video disk, DVD) and the like), or a semiconductor medium (such as solid state disk and the like).
[0172] Those skilled in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or by program instructing relevant hardware, and the program can be stored in a computer readable storage medium, and the storage medium mentioned above can be a read only memory, a magnetic disk or an optical disk.
[0173] The above only describes one embodiment of the present disclosure, and does not limit the present disclosure, any modification, equivalent replacement, improvement and the like within the principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method of transmitting image data, characterized by, The method is applied to a target vehicle, the target vehicle comprising a car machine, at least one camera and a plurality of microphones, the car machine running a target application program, the at least one camera being installed at different positions of the target vehicle for obtaining a field of view around the target vehicle, the plurality of microphones being installed at different positions of the target vehicle, the method comprising: A correspondence table is previously established in the car machine between positions of each seat in the target vehicle and the plurality of microphones, wherein for each seat position in the target vehicle, each microphone is first sorted in order of distance from near to far or from far to near based on the distance between the seat and each microphone, and the seat position is recorded corresponding to each microphone after the first sorting; The car machine acquires voice data collected by the microphones, identifies text data from the voice data through the target application program, in a case where the text data comprises a specified keyword, second sorts the plurality of microphones based on the volume or start time of the voice data collected by the plurality of microphones, compares the second sorted microphones with the first sorted microphones in the correspondence table, determines the position of the seat corresponding to the microphone with the same order as the sound source position, and generates a shooting instruction carrying the sound source position; The car machine determines a reference camera corresponding to the sound source position in the shooting instruction, wherein the reference camera is located in front of the sound source position, and the shooting direction of the reference camera is towards the sound source position to shoot face data of a person at the sound source position; The car machine determines the face orientation of the person at the sound source position based on the image data shot by the reference camera; The car machine determines a target camera matching the field of view of the person based on the sound source position, the face orientation, and the position and shooting direction of the at least one camera; The car machine acquires image data of a current road condition shot by the target camera; The car machine acquires an image transmission instruction generated by the target application program; In response to the image transmission instruction, the car machine sends the image data of the current road condition to a target device.
2. The method of claim 1, wherein, The image data comprises picture data or video data.
3. An apparatus for transmitting image data, the apparatus comprising: The device is applied to a car machine, the car machine being on a target vehicle, the target vehicle comprising at least one camera and a plurality of microphones, the car machine running a target application program, the at least one camera being installed at different positions of the target vehicle for obtaining a field of view around the target vehicle, the plurality of microphones being installed at different positions of the target vehicle, the device comprising: The acquisition module is configured to pre-establish a correspondence table of positions of each seat in the target vehicle and the plurality of microphones, wherein, for each seat position in the target vehicle, each microphone is first sorted in order from near to far or from far to near based on the distance between the seat and each microphone, and the seat position is recorded in correspondence with each first-sorted microphone; acquire voice data collected by the microphones, identify text data from the voice data through the target application, and, in a case where the text data includes a specified keyword, second-sort the plurality of microphones based on the volume or start time of the voice data collected by the microphones, compare the second-sorted microphones with the first-sorted microphones in the correspondence table, determine the position of the seat corresponding to the microphones of the same order as the sound source position, and generate a shooting instruction carrying the sound source position; The acquisition module is further configured to determine a reference camera corresponding to the sound source position in the shooting instruction, wherein the reference camera is located in front of the sound source position, and the shooting direction of the reference camera is towards the sound source position to shoot facial data of a person at the sound source position; determine the face orientation of the person at the sound source position based on image data shot by the reference camera; determine a target camera matching the field of view of the person based on the sound source position, the face orientation, and the position and shooting direction of the at least one camera; and acquire image data of a current road condition shot by the target camera. The acquisition module is further configured to acquire an image transmission instruction generated by the target application. The sending module is configured to send the image data of the current road condition to a target device in response to the image transmission instruction.
4. An electronic device, comprising: The electronic device includes a memory and a processor, and the memory is configured to store computer instructions; The processor executes the computer instructions stored in the memory, so that the electronic device executes the method in any one of claims 1-2.
5. A computer readable storage medium, characterized in that, The computer readable storage medium stores computer program code, and when the computer program code is executed by an electronic device, the electronic device executes the method in any one of claims 1-2.
6. A computer program product, characterised in that, The computer program product includes computer program code, and when the computer program code is executed by an electronic device, the electronic device executes the method in any one of claims 1-2.
Citation Information
Patent Citations
Android-system-based information sharing method for vehicle-mounted instant communication tool
CN109559743A
Method for acquiring image, electronic equipment, computer storage medium and vehicle
CN113099104A