CN113724521A - Image data processing method, device, equipment and computer program product - Google Patents

Image data processing method, device, equipment and computer program product Download PDF

Info

Publication number
CN113724521A
CN113724521A CN202110814106.5A CN202110814106A CN113724521A CN 113724521 A CN113724521 A CN 113724521A CN 202110814106 A CN202110814106 A CN 202110814106A CN 113724521 A CN113724521 A CN 113724521A
Authority
CN
China
Prior art keywords
image data
shared memory
application software
acquisition equipment
image acquisition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110814106.5A
Other languages
Chinese (zh)
Inventor
郭国勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Innovation Co
Original Assignee
Alibaba Singapore Holdings Pte Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Singapore Holdings Pte Ltd filed Critical Alibaba Singapore Holdings Pte Ltd
Priority to CN202110814106.5A priority Critical patent/CN113724521A/en
Publication of CN113724521A publication Critical patent/CN113724521A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/09Arrangements for giving variable traffic instructions
    • G08G1/0962Arrangements for giving variable traffic instructions having an indicator mounted inside the vehicle, e.g. giving voice messages
    • G08G1/0968Systems involving transmission of navigation instructions to the vehicle
    • G08G1/0969Systems involving transmission of navigation instructions to the vehicle having a display in the form of a map
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/617Upgrading or updating of programs or applications for camera control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Automation & Control Theory (AREA)
  • Navigation (AREA)

Abstract

The present disclosure relates to an image data processing method, apparatus, device and computer program product, wherein the method is applied to a vehicle machine, and comprises: acquiring image data acquired by image acquisition equipment; and when the state identifier of the pre-created shared memory is writable, storing the image data into the shared memory so that the application software installed in the vehicle machine can acquire the image data from the shared memory. The image data processing method provided by the disclosure provides a mode for obtaining image data by application software in a vehicle, and can save time consumed by docking image acquisition equipment and an application program interface API (the API is an interface for obtaining image data from the image acquisition equipment by the application software) and docking the API and the application software.

Description

Image data processing method, device, equipment and computer program product
Technical Field
The present disclosure relates to the field of information technology, and in particular, to a method, an apparatus, a device, and a computer program product for processing image data.
Background
With the continuous development of science and technology, vehicles have become indispensable vehicles in people's daily life. Specifically, a car machine can be arranged in the vehicle, and the car machine can realize a plurality of functions, such as video playing, backing images, driving records and the like.
Some current car machines also have a navigation function, for example, a car machine is installed with a car navigation program (software), and when the car navigation program has a function of implementing image data such as Augmented Reality (AR) navigation, the car navigation program needs to acquire image data acquired by a car machine connected or integrated image acquisition device (a camera or a camera, etc.). When the image capturing device is integrated in the vehicle, an Application Programming Interface (API) associated with a camera service framework that is packaged in advance may be used.
However, when the image capturing device is independent of the vehicle, that is, the image capturing device is an independent plug-and-play device, image data cannot be captured by using an API associated with a camera service framework packaged in advance, which requires interfacing the image capturing device and the API, and interfacing the API and the vehicle navigation program, resulting in a long development time, and even if the development is completed, the vehicle navigation program cannot normally capture image data due to many nested calling levels of the APIs of the image capturing device.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the present disclosure provides an image data processing method, an apparatus, a device, and a computer program product, which provide a new way for in-vehicle application software to obtain image data, and can save time consumed by interfacing an image capture device and an application program interface API, and interfacing the API and the application software.
In a first aspect, an embodiment of the present disclosure provides an image data processing method applied to a vehicle machine, including:
acquiring image data acquired by image acquisition equipment;
and when the state identifier of the pre-created shared memory is writable, storing the image data into the shared memory so that the application software installed in the vehicle machine can acquire the image data from the shared memory.
In a second aspect, an embodiment of the present disclosure provides an image data processing apparatus, including:
the first acquisition module is used for acquiring image data acquired by the image acquisition equipment;
and the storage module is used for storing the image data into the shared memory when the state identifier of the pre-created shared memory is writable so that the application software installed in the vehicle machine can acquire the image data from the shared memory.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first aspect.
In a fourth aspect, the present disclosure provides a computer program product having a computer program stored thereon, the computer program being executable by a processor to implement the method of the first aspect.
The image data processing method provided by the embodiment of the disclosure comprises the steps of acquiring image data acquired by an image acquisition device; when the state identifier of the pre-created shared memory is writable, the image data is stored in the shared memory so that the application software installed in the vehicle machine can obtain the image data from the shared memory, and a new mode for obtaining the image data from the image acquisition equipment is provided for the application software installed in the vehicle machine. In other words, specifically, the service program of the image capturing device stores the image data captured by the image capturing device in the shared memory, and the application software obtains the image data from the shared memory, so that time consumed for interfacing the image capturing device and an application program interface API (the API is an interface for the application software to obtain the image data from the image capturing device) and interfacing the API and the application software is saved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of an image data processing method provided in an embodiment of the present disclosure;
fig. 2 is a flowchart of an image data processing method provided in an embodiment of the present disclosure;
FIG. 3 is a flowchart of an image data processing method provided by an embodiment of the present disclosure;
FIG. 4 is a flowchart of an image data processing method provided by an embodiment of the present disclosure;
FIG. 5 is a flowchart of an image data processing method provided by an embodiment of the present disclosure;
FIG. 6 is a flowchart of an image data processing method provided by an embodiment of the present disclosure;
FIG. 7 is a flowchart of an image data processing method provided by an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of an image data processing system according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a positioning device according to an embodiment of the disclosure;
fig. 10 is a schematic structural diagram of an embodiment of an electronic device provided in the embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Generally, a vehicle machine (also referred to as a vehicle-mounted multimedia system) may be disposed in the vehicle, and the vehicle machine may implement a plurality of functions, such as video playing, backing image, driving recording, and the like. Some current car machines also have a navigation function, for example, a car machine is installed with a car navigation program (software), and when the car navigation program has a function of AR navigation and the like that needs to be implemented by image data, the car navigation program needs to acquire image data collected by an image collection device (such as a camera or a camera) connected to or integrated with the car machine. When the image acquisition device is integrated in the vehicle, the vehicle navigation program may use an API associated with a service framework of the image acquisition device, which is packaged in advance, to acquire image data acquired by the image acquisition device.
However, when the image capturing device is independent of the vehicle, for example, when the image capturing device is an independent plug-and-play device (for example, the image capturing device is in communication connection with the vehicle through a data line), image data cannot be captured by using an API associated with a camera service framework that is packaged in advance, which requires interfacing the image capturing device and the API, and interfacing the API and a vehicle navigation program, resulting in a long development time, and even if the development is completed, the vehicle navigation program cannot normally obtain image data due to multiple factors such as nesting and calling levels of the APIs of the image capturing device. In view of the above problems, an embodiment of the present disclosure provides an image data processing method, which aims to solve how to quickly acquire image data acquired by an image acquisition device by a vehicle-mounted navigation program installed in a vehicle machine when the image acquisition device exists independently of the vehicle machine, so as to save the work of docking the image acquisition device with an API and the API and docking the API with the vehicle-mounted navigation program, thereby improving development efficiency. The method is described below with reference to specific examples.
Fig. 1 is a flowchart of an image data processing method according to an embodiment of the present disclosure. The image data processing method provided by the embodiment can be applied to a vehicle machine, and more particularly, can be applied to a service program which is installed in the vehicle machine and used for controlling an image acquisition device. The method may be performed by an image data processing apparatus, which may be implemented in software and/or hardware, and may be configured in an electronic device, such as a car machine.
As shown in fig. 1, the method comprises the following specific steps:
and S101, acquiring image data acquired by image acquisition equipment.
The image capturing device may be, for example, a camera.
S102, when the state mark of the pre-created shared memory is writable, storing the image data into the shared memory so that the application software installed in the vehicle machine can obtain the image data from the shared memory.
The shared memory is a memory space shared by the service program of the image acquisition equipment and other application software installed in the vehicle, namely the service program and the application software can read data or write data from the shared memory. The status flag of the shared memory is writable, which indicates that data can be written into the shared memory. The shared memory can exist all the time, or can be dynamically created when needed and released in time when not needed.
According to the image data processing method provided by the embodiment of the disclosure, after the image data is acquired by the image acquisition equipment, the service program judges whether the state identifier of the pre-created shared memory is writable, if the state identifier of the shared memory is writable, the service program writes the image data into the shared memory, so that the application software installed in the vehicle machine can acquire the image data from the shared memory. By using the shared memory as a bridge, information transmission between the service program and the application software is realized, so that the application software can freely, conveniently and quickly acquire image data acquired by the image acquisition equipment.
Fig. 2 is a flowchart of an image data processing method according to another embodiment of the disclosure. In this embodiment, the image data processing method in the foregoing embodiment is further extended, specifically, after the service program stores the image data in the shared memory, the following steps are added: and the service program modifies the state identifier of the shared memory to be readable, the application software reads the image data from the shared memory when detecting that the state identifier of the shared memory is readable, and after the application software reads the image data, the state identifier of the shared memory is modified to be writable so that the service program continues to write new image data into the shared memory when detecting the writable state identifier. The advantage of such expansion is that the application software can read the image data from the shared memory in time, so as to improve the efficiency of the application software for acquiring the image data, and meanwhile, the problem that the application software fails to read the image data from the shared memory (for example, when the service program has not written the image data into the shared memory, the application software fails to read the image data from the shared memory) or reads the repeated image data can be avoided. Meanwhile, the service program can write new image data into the shared memory in time, the application software can acquire continuous new image data, and the good matching between the service program and the application software can realize the purpose that the application software can freely, conveniently and quickly acquire the image data.
As shown in fig. 2, the method comprises the following specific steps:
s201, the service program acquires image data acquired by the image acquisition equipment.
S202, when the state identifier of the pre-created shared memory is writable, the service program stores the image data in the shared memory and modifies the state identifier of the shared memory to be readable.
S203, when the state identifier of the shared memory is readable, the application software reads the image data from the shared memory and modifies the state identifier of the shared memory into writable state.
The steps S201 to S203 are executed in a loop, the image capturing device continuously captures image data, the service program continuously writes the image data into the shared memory, and the application software continuously reads the image data from the shared memory.
In a preferred embodiment, the application software deletes the image data from the shared memory every time the application software reads the image data from the shared memory, so as to reduce the occupation of the memory space by the historical image data and make room for writing new image data.
In another embodiment, when the number of frames of image data in the shared memory reaches a preset number of frames, a deletion operation is performed, that is, multiple frames of image data may exist in the shared memory at a certain time, and at this time, the application software may read the latest image data based on the timestamp to avoid repeatedly reading the same frame of image data.
The present embodiment is further extended to the image data processing method in the foregoing embodiment, and specifically, after the service program stores the image data in the shared memory, the following steps are added: and the service program modifies the state identifier of the shared memory to be readable, the application software reads the image data from the shared memory when detecting that the state identifier of the shared memory is readable, and after the application software reads the image data, the state identifier of the shared memory is modified to be writable so that the service program continues to write new image data into the shared memory when detecting the writable state identifier. The advantage of such extension is that the application software can be ensured to acquire continuous image data, and the good cooperation between the service program and the application software can realize the purpose of enabling the application software to freely, conveniently and quickly acquire the image data.
Fig. 3 is a flowchart of an image data processing method according to another embodiment of the disclosure. In this embodiment, the image data processing method in the foregoing embodiments is further expanded, and specifically, a scheme for dynamically creating a shared memory and dynamically releasing the shared memory is provided. Illustratively, before the image data is stored in the shared memory, the following steps are added: when the image acquisition equipment is successfully opened, or the image data is the first frame of image data, establishing the shared memory; and after the shared memory is created, transmitting the file descriptor of the shared memory to the application software so that the application software can acquire the image data from the shared memory according to the file descriptor. The advantage of such an extension is that, compared to a fixed shared memory, the invalid occupancy rate of the shared memory can be reduced, for example, the shared memory is released when not needed, and the shared memory is created when needed, rather than the shared memory existing when not needed, which results in invalid occupancy of the shared memory. Meanwhile, the working efficiency of the service program can be improved, and the probability of creating an invalid shared memory can be reduced. For example, if the shared memory is created before the image capturing device is opened, and then the image capturing device is opened while failing to open, and the created shared memory is an invalid shared memory, the operation of the service program creating the shared memory is an invalid operation.
As shown in fig. 3, the method comprises the following specific steps:
s301, when the image acquisition device is successfully opened, or the image data is the first frame of image data, creating the shared memory, and transmitting the file descriptor of the shared memory to the application software, so that the application software can acquire the image data from the shared memory according to the file descriptor.
The file descriptor of the shared memory may be understood as address information or a unique Identity ID (Identity) of the shared memory. The purpose of transferring the file descriptor of the shared memory to the application software is to enable the application software to locate the shared memory according to the file descriptor of the shared memory and further read image data from the shared memory.
S302, the service program acquires image data acquired by the image acquisition equipment.
And S303, when the state identifier of the pre-created shared memory is writable, the service program stores the image data into the shared memory and modifies the state identifier of the shared memory into a readable state.
S304, when the state identifier of the shared memory is readable, the application software reads the image data from the shared memory and modifies the state identifier of the shared memory into writable state.
S305, when the image acquisition equipment is closed, closing the shared memory.
Further, before acquiring image data acquired by the image acquisition device, the method further includes: the service program receives a connection establishment request sent by the application software; the service program establishes communication connection with the application software according to the connection establishment request; and the service program sends a connection establishment success response to the application software.
The present embodiment further extends the image data processing method in the foregoing embodiments, and specifically provides a scheme for dynamically creating a shared memory and dynamically releasing the shared memory. The advantage of such an extension is that, compared to a fixed shared memory, the invalid occupancy rate of the shared memory can be reduced, for example, the shared memory is released when not needed, and the shared memory is created when needed, rather than the shared memory existing when not needed, which results in invalid occupancy of the shared memory. Meanwhile, the working efficiency of the service program can be improved, and the probability of creating an invalid shared memory can be reduced. For example, if the shared memory is created before the image capturing device is opened, and then the image capturing device is opened while failing to open, and the created shared memory is an invalid shared memory, the operation of the service program creating the shared memory is an invalid operation. By using the shared memory as a bridge, information transmission between the service program and the application software is realized, so that the application software can freely, conveniently and quickly acquire image data acquired by the image acquisition equipment.
Fig. 4 is a flowchart of an image data processing method according to another embodiment of the disclosure. In this embodiment, the image data processing method will be described by taking the application software as map navigation software as an example.
As shown in fig. 4, the method comprises the following specific steps:
s401, the service program obtains image data collected by the image collecting device.
S402, when the state mark of the pre-created shared memory is writable, the service program stores the image data into the shared memory so that the application software installed in the vehicle machine can obtain the image data from the shared memory.
And S403, when the AR navigation of the map navigation software is started, the map navigation software judges whether the communication connection with the service program is successfully established, and if the communication connection with the service program is successfully established, the pre-established state identifier of the shared memory is acquired under the condition that the image acquisition equipment is opened.
The map navigation software comprises an AR navigation mode and a common navigation mode. The map navigation software may provide a user interaction interface through which the map navigation software controls the AR navigation to be turned on when the user turns on the AR navigation mode. When the user closes the AR navigation mode through the user interaction interface, the map navigation software controls the AR navigation to be closed.
S404, when the state identifier of the shared memory is readable, the map navigation software acquires the image data from the shared memory and modifies the state identifier of the shared memory into writable one.
In the image data processing method provided by this embodiment, the application software is taken as map navigation software as an example, and the image data processing method is described, and by using the shared memory as a bridge, information transmission between the service program of the image acquisition device and the map navigation software is realized, so that the map navigation software can freely, conveniently and quickly acquire image data acquired by the image acquisition device.
Fig. 5 is a flowchart of an image data processing method according to another embodiment of the disclosure. In this embodiment, taking the application software as map navigation software as an example, the embodiment is further optimized, specifically, the following steps are added: when the AR navigation of the map navigation software is started, sending a request for starting the image acquisition equipment to a service program so that the service program controls the image acquisition equipment to be started; when the AR navigation of the map navigation software is closed, sending a request for closing the image acquisition equipment to a service program so that the service program controls the image acquisition equipment to be closed; and/or closing the shared memory when the image acquisition equipment is closed. The optimization method has the advantage that the linkage of the AR navigation of the map navigation software and the image acquisition equipment is realized by taking the AR navigation of the map navigation software as the guidance.
As shown in fig. 5, the method comprises the following specific steps:
s501, when AR navigation of the map navigation software is started, a request for starting the image acquisition equipment is sent to a service program, so that the service program controls the image acquisition equipment to be started.
Further, after the service program controls the camera to be successfully opened, a response message of successful opening is fed back to the map navigation software, so that the map navigation software performs subsequent logic steps based on the response message.
Further, before sending a request for starting the image capturing device to a service program, the method further includes:
and sending a connection establishment request to a service program so that the service program and the map navigation software establish communication connection.
Optionally, when the image capturing device is already opened, the service program opens the shared memory and obtains the status identifier of the shared memory.
S502, the service program acquires image data acquired by the image acquisition equipment; and when the state identifier of the pre-created shared memory is writable, storing the image data into the shared memory, and modifying the state identifier of the shared memory to be readable.
Optionally, before the service program acquires the image data acquired by the image acquisition device, the method further includes:
the service program receives an image acquisition equipment initialization request sent by map navigation software, initializes the parameters of the image acquisition equipment according to the initialization request, and sends an initialization success message to the map navigation software.
S503, when the state identifier of the shared memory is readable, the map navigation software acquires the image data from the shared memory and modifies the state identifier of the shared memory into writable one.
S504, when the AR navigation of the map navigation software is closed, sending a request for closing the image acquisition equipment to a service program so that the service program can control the image acquisition equipment to be closed; and/or closing the shared memory when the image acquisition equipment is closed.
Further, after the service program controls the image acquisition device to be successfully closed, a response message of successful closing is fed back to the map navigation software.
Optionally, when the AR navigation of the map navigation software is closed, the shared memory is closed to release the shared memory.
Further, the method further comprises: when the AR navigation of the map navigation software is closed, sending an image acquisition equipment anti-initialization request to a service program; and the service program performs the reverse initialization on the parameters of the image acquisition equipment according to the reverse initialization request and sends a reverse initialization success message to the map navigation software.
Further, after acquiring the image data from the shared memory, the method further includes:
and performing AR navigation according to the image data.
Optionally, the service program and the map navigation software communicate with each other in an Android Interface Definition Language (AIDL) communication manner.
On the basis of the above technical solution, in summary, the operation performed by the service program of the image capturing device (taking a camera as an example) as an execution subject includes the following operations:
1. and receiving a connection establishment request sent by the map navigation software, establishing communication connection with the map navigation software according to the connection establishment request, and feeding back information of success or failure of connection establishment to the map navigation software. 2. And receiving a request for initializing the camera sent by the map navigation software, and executing the operation of initializing the camera. 3. And receiving a request for opening the camera sent by the map navigation software, executing the operation of opening the camera, and feeding back information of success or failure of opening to the map navigation software. 4. And if the first frame of image data is acquired, establishing a shared memory. 5. And after the shared memory is successfully created, initializing the state identifier of the shared memory into writable state, and if the shared memory is failed to be created, notifying map navigation software. 6. And reading the state identifier of the shared memory. 7. And judging whether the state identifier is writable or not, and writing the first frame of image data into the shared memory if the state identifier is writable. 8. And after the first frame of image data is written in, setting the state identifier of the shared memory to be readable. And sequentially circulating the steps 6-8, and continuously acquiring new image data in the subsequent circulation process, and writing the new image data into the shared memory. Optionally, the total frame number of the image data that can be stored in the shared memory is not limited in the present disclosure. For example, optionally, after the map navigation software reads one frame of image data from the shared memory, the service program writes a new frame of image data into the shared memory. 9. And the service program receives a request for closing the camera sent by the map navigation software, executes the operation of closing the camera, marks the on-off state of the camera as off, and simultaneously informs the map navigation software that the camera is successfully closed. 10. And the service program receives a request of a reverse initialization camera sent by the map navigation software and performs reverse initialization operation on the camera. Correspondingly, reference may be made to a flow chart as shown in fig. 6.
For example, the operations performed by the map navigation software as the execution subject include the following operations:
1. when AR navigation is started, a connection establishment request is sent to the service program, and further, communication connection can be established between the map navigation software and the service program through an AIDL interface, and communication is carried out with the service program through the AIDL interface (for example, various requests are sent, but image data cannot be transmitted). 2. And after the communication connection between the map navigation software and the service program is successfully established, sending a request for initializing the camera to the service program so that the service program executes the operation of initializing the camera. 3. Sending a camera (such as a camera) state acquisition request to a service program, receiving camera state information fed back by the service program, and if the camera is not opened, sending a camera opening request to the service program so as to enable the service program to execute the operation of opening the camera. 4. And after receiving the message that the camera is successfully opened fed back by the service program, opening the shared memory. 5. And reading the state identifier of the shared memory. 6. And if the state identifier of the shared memory is readable, reading the image data in the shared memory. 7. And after the image data is read, setting the state identifier of the shared memory as writable. And the steps 5-8 are circulated in sequence. Correspondingly, referring to a flowchart shown in fig. 7, when it is determined that the communication connection is established with the service program, the map navigation software further performs the following operations: 8. registering a camera state monitoring callback; 9. the connected state of the camera is recalled; 10. the opened state of the camera is recalled; 11. the closed state of the camera is recalled; 12. the connection and disconnection state of the camera is recalled; 13. when the AR navigation is closed, closing the shared memory; 14. sending a request for closing the camera; 15. logging off the camera state monitoring callback. The meaning of the above-mentioned registration camera state monitoring callback is: the map navigation software sends a registry to the camera service program, the registry including a plurality of states of the camera (e.g., a camera connected state, a camera opened state, a camera closed state, a camera disconnected state, etc.), and an operation to be performed by the map navigation software in each state. The camera connection state means that the camera and the camera service program establish communication connection. A "callback" may be understood as information that the camera service program feeds back to the map navigation software. For example, the "callback" in the "registration camera status listening callback" indicates a registration success message fed back to the map navigation software after the camera service program successfully registers the registry. The "camera connected state callback" indicates the state information of the connected camera, which is sent to the map navigation software by the camera service program. The "camera opened state callback" represents the state information that the camera service program sends to the map navigation software that the camera is opened. The "camera-off state callback" represents the state information of the camera off, which is sent to the map navigation software by the camera service program. The "camera disconnection state callback" represents the state information that the camera service program sends the map navigation software that the camera is disconnected.
In the image data processing method provided by this embodiment, the application software is taken as map navigation software as an example, and the image data processing method is described, and by using the shared memory as a bridge, information transmission between the service program of the image acquisition device and the map navigation software is realized, so that the map navigation software can freely, conveniently and quickly acquire image data acquired by the image acquisition device. Therefore, the map navigation software can realize the AR navigation function without the limitation of an API (application program interface) of an android camera service framework.
In the embodiment, the map navigation software acquires the image data from the image acquisition device in a mode based on an aid dl communication mode and a shared memory. Referring to fig. 8, a schematic diagram of an image data processing system includes a camera service 810 of an image capturing device, a map navigation software 820, and a shared memory 830. The map navigation software 820 includes an AL (Adapter Layer), an HMI (Human Machine Interface) Layer, a BL (Business Layer), and an AR navigation engine. The user turns on or off the AR navigation through the HMI layer. When map navigation software receives an instruction of starting AR navigation by a user, communication connection is established with a camera service program, namely AIDL interface communication connection, and further communication is carried out with the camera service program through the connection. After the AL layer acquires the image data from the shared memory, the image data is provided to the AR engine through the HMI layer and the BL layer in sequence, so that the AR engine carries out AR navigation. Alternatively, after acquiring the image data from the shared memory, the AL layer may directly provide the image data to the AR engine without passing through the HMI layer or the BL layer. The content of the shared memory consists of a state identifier and image data. And after the service program receives the requests of initializing the camera and opening the camera sent by the map navigation software, executing the actions of initializing the camera and opening the camera. After the camera is successfully opened, the service program creates a shared memory area, and then transmits the file descriptor (namely the address of the shared memory) of the shared memory to the map navigation software in an AIDL interface communication callback mode. Meanwhile, the service program initializes the state identifier of the shared memory to be writable, writes the image data acquired by the camera into the shared memory, and sets the state identifier of the shared memory to be readable. And when detecting that the state identifier of the shared memory is readable, the map navigation software reads the image data in the shared memory, sets the state identifier of the shared memory as writable, and then performs AR (augmented reality) imaging display. The service program and the map navigation software respectively circulate the processes in turn. Greatly reducing the butt joint cost of the service program of the image acquisition equipment and the API of the android camera service framework. The complex camera adaptive butt joint process is constrained into a set of standard process by a set of standard low-consumption strategy, so that the internal and external butt joint cost is reduced on one hand, and the AR navigation butt joint efficiency is greatly improved on the other hand.
Fig. 9 is a schematic structural diagram of an image data processing apparatus according to an embodiment of the present disclosure. The image data processing apparatus provided in the embodiment of the present disclosure may execute the processing procedure provided in the embodiment of the image data processing method, as shown in fig. 9, the apparatus 900 includes: a first obtaining module 910 and a storing module 920.
The first obtaining module 910 is configured to obtain image data collected by an image collecting device; the storage module 920 is configured to store the image data in a shared memory when a state identifier of the pre-created shared memory is writable, so that the application software installed in the in-vehicle device obtains the image data from the shared memory.
Optionally, the image data processing apparatus further includes: the first modification module is used for modifying the state identifier of the shared memory into a readable state after the image data is stored in the shared memory; and the reading module is used for reading the image data from the shared memory when the state identifier of the shared memory is readable by the application software.
Optionally, the image data processing apparatus further includes: and the creating module is used for creating the shared memory before the image data is stored in the shared memory and when the image acquisition equipment is successfully opened or the image data is the first frame of image data.
Optionally, the image data processing apparatus further includes: and the transfer module is used for transferring the file descriptor of the shared memory to the application software after the shared memory is created.
Optionally, the image data processing apparatus further includes: the first receiving module is used for receiving a connection establishment request sent by the application software before acquiring image data acquired by image acquisition equipment; the connection module is used for establishing communication connection with the application software according to the connection establishment request; and the first sending module is used for sending a connection establishment success response to the application software.
Optionally, the application software is map navigation software, and the image data processing apparatus further includes: the judging module is used for judging whether the communication connection is successfully established or not when the AR navigation of the map navigation software is started; a second obtaining module, configured to, if the communication connection is successfully established, obtain a state identifier of a pre-created shared memory when the image acquisition device is already opened, and obtain image data from the shared memory when the state identifier of the shared memory is readable; and the second modification module is used for modifying the state identifier of the shared memory into a writable state after the image data is acquired from the shared memory.
Optionally, the image data processing apparatus further includes: the second sending module is used for sending a request for closing the image acquisition equipment to a service program when the AR navigation of the map navigation software is closed so that the service program can control the image acquisition equipment to be closed; and/or a closing module, configured to close the shared memory when the image capturing device is closed.
According to the image data processing device provided by the embodiment of the disclosure, after the image data is acquired by the image acquisition equipment, the service program judges whether the state identifier of the pre-created shared memory is writable, and if the state identifier of the shared memory is writable, the service program writes the image data into the shared memory so that the application software installed in the vehicle machine can acquire the image data from the shared memory. By using the shared memory as a bridge, information transmission between the service program and the application software is realized, so that the application software can freely, conveniently and quickly acquire image data acquired by the image acquisition equipment.
The image data processing apparatus of the embodiment shown in fig. 9 can be used to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, and are not described herein again.
The internal functions and structure of the image processing apparatus, which can be implemented as an electronic device, are described above. Fig. 10 is a schematic structural diagram of an embodiment of an electronic device provided in the embodiment of the present disclosure. As shown in fig. 10, the electronic device includes a memory 151 and a processor 152.
And a memory 151 for storing a program. In addition to the above-described programs, the memory 151 may also be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and so forth.
The memory 151 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A processor 152, coupled to the memory 151, that executes programs stored by the memory 151 to:
acquiring image data acquired by image acquisition equipment; and when the state identifier of the pre-created shared memory is writable, storing the image data into the shared memory so that the application software installed in the vehicle machine can acquire the image data from the shared memory.
Further, as shown in fig. 10, the electronic device may further include: communication components 153, power components 154, audio components 155, a display 156, and other components. Only some of the components are schematically shown in fig. 10, and the electronic device is not meant to include only the components shown in fig. 10.
The communication component 153 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 153 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 153 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
A power supply component 154 provides power to the various components of the electronic device. The power components 154 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for an electronic device.
Audio component 155 is configured to output and/or input audio signals. For example, audio component 155 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 151 or transmitted via the communication component 153. In some embodiments, audio component 155 also includes a speaker for outputting audio signals.
The display 156 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
In addition, the embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the image data processing method described in the above embodiment.
Additionally, embodiments of the present disclosure also provide a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for executing the method illustrated in the flowchart, thereby implementing the image data processing method as described above.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The image data processing method is applied to a vehicle machine, and comprises the following steps:
acquiring image data acquired by image acquisition equipment;
and when the state identifier of the pre-created shared memory is writable, storing the image data into the shared memory so that the application software installed in the vehicle machine can acquire the image data from the shared memory.
2. The method of claim 1, wherein after storing the image data to a shared memory, the method further comprises:
modifying the state identifier of the shared memory to be readable;
and when the state identifier of the shared memory is readable, the application software reads the image data from the shared memory.
3. The method of claim 1, wherein prior to storing the image data to a shared memory, the method further comprises:
and when the image acquisition equipment is successfully opened, or the image data is the first frame of image data, establishing the shared memory.
4. The method of claim 3, wherein after creating the shared memory, the method further comprises:
and transmitting the file descriptor of the shared memory to the application software so that the application software can acquire the image data from the shared memory according to the file descriptor.
5. The method of any of claims 1-4, wherein prior to acquiring image data acquired by an image acquisition device, the method further comprises:
receiving a connection establishment request sent by the application software;
establishing communication connection with the application software according to the connection establishment request;
and sending a connection establishment success response to the application software.
6. The method of claim 5, wherein the application software is map navigation software, the method further comprising:
when the AR navigation of the map navigation software is started, judging whether the communication connection is established successfully or not, and if so, acquiring a state identifier of a pre-established shared memory under the condition that the image acquisition equipment is opened;
when the state identifier of the shared memory is readable, acquiring image data from the shared memory;
and modifying the state identifier of the shared memory into a writable state.
7. The method of claim 6, wherein the method further comprises:
when the AR navigation of the map navigation software is closed, sending a request for closing the image acquisition equipment to a service program so that the service program can control the image acquisition equipment to be closed; and/or
And when the image acquisition equipment is closed, closing the shared memory.
8. An image data processing apparatus, comprising:
the first acquisition module is used for acquiring image data acquired by the image acquisition equipment;
and the storage module is used for storing the image data into the shared memory when the state identifier of the pre-created shared memory is writable so that the application software installed in the vehicle machine can acquire the image data from the shared memory.
9. A car machine, wherein, includes:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-7.
10. A computer program product having a computer program stored thereon, wherein the computer program when executed by a processor implements the method of any one of claims 1-7.
CN202110814106.5A 2021-07-19 2021-07-19 Image data processing method, device, equipment and computer program product Pending CN113724521A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110814106.5A CN113724521A (en) 2021-07-19 2021-07-19 Image data processing method, device, equipment and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110814106.5A CN113724521A (en) 2021-07-19 2021-07-19 Image data processing method, device, equipment and computer program product

Publications (1)

Publication Number Publication Date
CN113724521A true CN113724521A (en) 2021-11-30

Family

ID=78673460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110814106.5A Pending CN113724521A (en) 2021-07-19 2021-07-19 Image data processing method, device, equipment and computer program product

Country Status (1)

Country Link
CN (1) CN113724521A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204337A (en) * 2023-03-03 2023-06-02 广州市易鸿智能装备有限公司 Image transmission method, device, equipment and computer storage medium
CN116233520A (en) * 2023-05-06 2023-06-06 海马云(天津)信息技术有限公司 Method and device for transmitting and acquiring video data, server device and storage medium
CN117743445A (en) * 2024-02-18 2024-03-22 荣耀终端有限公司 Data access method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2162316A1 (en) * 2007-06-29 2010-03-17 Robert Bosch GmbH Camera-assisted navigation system and method for operating it
CN106023340A (en) * 2016-04-28 2016-10-12 努比亚技术有限公司 Driving record implementing method and mobile terminal
CN109767620A (en) * 2019-01-15 2019-05-17 上海钧正网络科技有限公司 Vehicle monitoring method, device, system, server and camera
CN111105521A (en) * 2019-11-21 2020-05-05 视联动力信息技术股份有限公司 Data reading method and device
CN112363767A (en) * 2020-11-11 2021-02-12 广州小鹏汽车科技有限公司 Vehicle-mounted camera calling method and device
CN112802232A (en) * 2021-03-22 2021-05-14 智道网联科技(北京)有限公司 Video stream data transmission method and related device thereof
CN113127213A (en) * 2019-12-30 2021-07-16 斑马智行网络(香港)有限公司 Method, device, equipment and storage medium for supporting multi-application data sharing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2162316A1 (en) * 2007-06-29 2010-03-17 Robert Bosch GmbH Camera-assisted navigation system and method for operating it
CN106023340A (en) * 2016-04-28 2016-10-12 努比亚技术有限公司 Driving record implementing method and mobile terminal
CN109767620A (en) * 2019-01-15 2019-05-17 上海钧正网络科技有限公司 Vehicle monitoring method, device, system, server and camera
CN111105521A (en) * 2019-11-21 2020-05-05 视联动力信息技术股份有限公司 Data reading method and device
CN113127213A (en) * 2019-12-30 2021-07-16 斑马智行网络(香港)有限公司 Method, device, equipment and storage medium for supporting multi-application data sharing
CN112363767A (en) * 2020-11-11 2021-02-12 广州小鹏汽车科技有限公司 Vehicle-mounted camera calling method and device
CN112802232A (en) * 2021-03-22 2021-05-14 智道网联科技(北京)有限公司 Video stream data transmission method and related device thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204337A (en) * 2023-03-03 2023-06-02 广州市易鸿智能装备有限公司 Image transmission method, device, equipment and computer storage medium
CN116204337B (en) * 2023-03-03 2024-04-09 广州市易鸿智能装备股份有限公司 Image transmission method, device, equipment and computer storage medium
CN116233520A (en) * 2023-05-06 2023-06-06 海马云(天津)信息技术有限公司 Method and device for transmitting and acquiring video data, server device and storage medium
CN117743445A (en) * 2024-02-18 2024-03-22 荣耀终端有限公司 Data access method and electronic equipment

Similar Documents

Publication Publication Date Title
CN113724521A (en) Image data processing method, device, equipment and computer program product
JP6259122B2 (en) Firmware upgrade method, apparatus, program, and recording medium
KR100894520B1 (en) Electronic conference system, electronic conference support method, electronic conference control apparatus, and portable storage device
US20140256256A1 (en) Electronic device and a method of operating the same
EP2846524B1 (en) Wireless communication apparatus, wireless communication method, program, and storage medium
US20180063361A1 (en) Electronic device and method of providing image acquired by image sensor to application
US20230021994A1 (en) Cross-Device Content Projection Method and Electronic Device
US9865228B2 (en) Computer program product, information processing method, and information processing apparatus
CN114554178A (en) Glasses type wearable information device, related method, and storage medium
JP6374666B2 (en) COMMUNICATION DEVICE, ITS CONTROL METHOD, AND PROGRAM
JP4764670B2 (en) Non-contact transmission / reception system and portable information terminal
JP2019075722A (en) Information processing apparatus, control method for information processing apparatus, and program
JP6033186B2 (en) Mobile terminal device
US10558973B2 (en) Method and apparatus for card activation
CN111726848B (en) Equipment binding method, target starting device, fixed terminal and storage medium
CN110321251B (en) Data backup method, device, equipment and storage medium based on network block equipment
CN115437719A (en) Cross-operating-system calling method and device and electronic equipment
CN117255245B (en) Camera matching method, device, terminal equipment and storage medium
EP2632180A1 (en) Method for exchanging data between two mobile devices
KR20190115361A (en) Electronic device for managing application associated with a key of external electronic device and the method for the same
WO2024092627A1 (en) Information transmission method and apparatus, and storage medium
WO2022179273A1 (en) Distributed audio playing method, and electronic device
WO2024094069A1 (en) Audio playback method and electronic device
JP2018169931A (en) Information processing device, information processing method, information processing program, and information processing system
JP6403050B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND PROGRAM

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20240306

Address after: # 03-06, Lai Zan Da Building 1, 51 Belarusian Road, Singapore

Applicant after: Alibaba Innovation Co.

Country or region after: Singapore

Address before: Room 01, 45th Floor, AXA Building, 8 Shanton Road, Singapore

Applicant before: Alibaba Singapore Holdings Ltd.

Country or region before: Singapore

TA01 Transfer of patent application right