WO2020042769A1 - Image information transmission method and apparatus, and storage medium and electronic device - Google Patents

Image information transmission method and apparatus, and storage medium and electronic device Download PDF

Info

Publication number
WO2020042769A1
WO2020042769A1 PCT/CN2019/095433 CN2019095433W WO2020042769A1 WO 2020042769 A1 WO2020042769 A1 WO 2020042769A1 CN 2019095433 W CN2019095433 W CN 2019095433W WO 2020042769 A1 WO2020042769 A1 WO 2020042769A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory space
image
image memory
application
address
Prior art date
Application number
PCT/CN2019/095433
Other languages
French (fr)
Chinese (zh)
Inventor
王健
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2020042769A1 publication Critical patent/WO2020042769A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72406User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging

Definitions

  • the present application relates to the technical field of electronic devices, and in particular, to a method, a device, a storage medium, and an electronic device for transmitting image information.
  • the augmented reality technology is a method that combines real world information and virtual world information.
  • the new technology of "seamless" integration is to use physical information (visual information, sound, taste, touch, etc.) that is difficult to experience in a certain time and space range in the real world, and then use computer and other scientific technologies to simulate the simulation.
  • Superposition applying virtual information to the real world and being perceived by human senses, thereby achieving a sensory experience beyond reality.
  • Real environment and virtual objects are superimposed on the same picture or space in real time.
  • mobile phones need to capture the current image in real time through the camera component and transmit the current image to the augmented reality component in a process.
  • the augmented reality component renders the received current image by correspondingly augmented reality graphics to achieve the display effect of augmented reality.
  • the shooting pixels of the camera are getting higher and higher, the storage space of the captured images is correspondingly getting larger and larger.
  • the efficiency of image transmission across processes is limited, which will lead to an increase in the transmission time of the image, or even a failure of the transmission.
  • the embodiments of the present application provide a method, a device, a storage medium, and an electronic device for transmitting image information, which can save the transmission time of the image information, thereby improving the transmission efficiency of the image information.
  • an embodiment of the present application provides a method for transmitting image information, including:
  • an embodiment of the present application provides a device for transmitting image information, including:
  • An adjustment unit configured to adjust a corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with a third-party application;
  • a determining unit configured to obtain the image memory space and determine corresponding handle information of the image memory space
  • a loading unit configured to load the handle information when an image transmission instruction of a third-party application is detected to determine a corresponding image memory space
  • the transmission unit is configured to access the image memory space to transmit image information in the image memory space to a third-party application.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is run on a computer, the computer is caused to execute image information provided by any embodiment of the present application. Transmission method.
  • an embodiment of the present application provides an electronic device including a processor and a memory, where the processor executes steps by calling a computer program stored in the memory:
  • FIG. 1 is a system architecture diagram of an electronic device running according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for transmitting image information according to an embodiment of the present application.
  • FIG. 3 is another schematic flowchart of a method for transmitting image information according to an embodiment of the present application.
  • FIG. 4 is another system architecture diagram of an electronic device running according to an embodiment of the present application.
  • FIG. 5 is a schematic block diagram of an image information transmission device according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another module of an image information transmission apparatus according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 8 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
  • module can be considered as a software object executing on the computing system.
  • the different components, modules, engines, and services described in this article can be considered as implementation objects on this computing system.
  • the device and method described herein are preferably implemented in software, and of course, they can also be implemented in hardware, which are all within the protection scope of this application.
  • FIG. 1 is a system architecture diagram of an electronic device running according to an embodiment of the present invention.
  • the system architecture is an Android system architecture.
  • the system architecture may also be Apple (iphone Operating System). , IOS) system framework.
  • the Android system architecture is the Android system architecture.
  • the Android system architecture like its operating system, uses a layered architecture that is divided into four layers. From high to low are the Android application layer and the Android application framework. Layer (Application Framework), Android system running layer and Linux kernel layer.
  • Application layer An application is a program written in the Java language and running on a virtual machine, such as a camera application, Email client, SMS short message program, and calendar.
  • Application framework layer This layer is an application programming interface (API) framework used when writing core applications published by Google. Developers can also use these frameworks to develop their own applications, which simplifies Structural design of program development, but must adhere to the development principles of its framework.
  • API application programming interface
  • Linux kernel layer Android's core system services are given to the Linux 2.6 kernel, such as security, memory management, process management, network protocol stack, and driver model, etc. all depend on this kernel, such as the Binder IPC (Internet Process Connection Connection) driver , A special driver for Android, with a separate device node that provides inter-process communication.
  • the Binder IPC Internet Process Connection Connection
  • Binder is an Android cross-process communication method.
  • the transmission efficiency is low, which will cause the AR application to wait too long and cause the AR application to run at a reduced speed.
  • cross-process is Under normal circumstances, memory cannot be shared between applications in the Android system. The data exchange between different applications is called cross-process.
  • the transmission device of image information may be specifically integrated into an electronic device, such as a mobile phone, a tablet computer, a personal digital assistant (PDA, Personal Assistant), and the like.
  • PDA personal digital assistant
  • An embodiment of the present invention provides a method for transmitting image information, including:
  • the step of determining corresponding handle information of the image memory space may include:
  • the step of determining the first address and the number of memory addresses corresponding to the image memory space may include:
  • the step of loading the handle information to determine a corresponding image memory space may include:
  • the step of adjusting a corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with a third-party application may include:
  • the access right of the image memory space of the camera application is adjusted through the software development kit, and the sharing permission of the image memory space of the camera application to the third-party application is opened.
  • the step of adjusting a corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with a third-party application may include:
  • the corresponding image memory space of the camera application is shared to third-party applications.
  • the third-party application is an augmented reality application.
  • the step of loading the handle information to determine a corresponding image memory space may include:
  • An embodiment of the present application provides a method for transmitting image information. As shown in FIG. 2, the method for transmitting image information may include the following steps:
  • step S101 the corresponding software development kit in the camera application is adjusted.
  • this software development kit is generally a collection of development tools used by some software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, and so on.
  • the function of the camera application is an application that calls a camera on a terminal for real-time shooting, and converts optical image information into electrical signals for storage or transmission.
  • the camera application generally stores image information obtained by the camera application in real time.
  • a preset memory space such as the image memory space.
  • the memory space is also called internal memory, and its function is to temporarily store the operation data in the central processing unit (CPU) and data exchanged with external memories such as hard disks.
  • the corresponding software development kit for the camera application is a collection of related documents, examples, and tools to assist in the development of the camera application.
  • the corresponding image memory space of the camera application can be shared with third-party applications. In other words, the third-party application can quickly call the image information in the image memory space.
  • the step of adjusting the corresponding software development kit in the camera application may include adjusting the access right of the image memory space of the camera application through the software development kit, and opening the image memory space of the camera application to the first Sharing permissions for third-party applications.
  • the access right of the image memory space of the camera application can be modified correspondingly through the SDK. For example, if the access right is closed by default, it is adjusted to be open so that the third-party application can obtain the sharing permission corresponding to the image memory space of the camera application.
  • step S102 an image memory space is acquired, and corresponding handle information of the image memory space is determined.
  • the handle information is a unique integer value, that is, a 4-byte (8-byte in a 64-bit program) value, to identify different objects in the application and different instances in the same category, such as , A window, button, icon, scroll bar, output device, control, or file.
  • the application can access the information of the corresponding object through the handle. That is, the corresponding storage address of the image memory space can be found through the corresponding handle information of the image memory space, that is, the memory address corresponding to the image memory space can be quickly found through the handle information.
  • the steps of obtaining image memory space and determining handle information corresponding to the image memory space may include:
  • the image memory space is composed of multiple memory addresses for storing image information.
  • a memory address is a number, which represents a memory space, and a memory address represents a byte, that is, a storage space of 8 bits.
  • the camera application stores the image information obtained in real time on the memory, and the memory allocates a corresponding number of memory addresses according to the data size of the image information.
  • the first address and the number of memory addresses corresponding to the image memory space can be determined to determine the entire image memory space, and the corresponding handle information representing the image memory space can be generated based on the first address and the number of memory addresses.
  • the step of determining the first address and the number of memory addresses corresponding to the image memory space may include:
  • the memory blocks of all the image information in the image memory space on the memory are determined, and the memory address corresponding to each memory block is analyzed to obtain the corresponding first address of the memory address and the total number of memory addresses.
  • step S103 when an image transmission instruction of a third-party application is detected, the handle information is loaded to determine a corresponding image memory space.
  • the third-party application is a non-camera application, such as an AR application. Since an AR application is an application that renders a corresponding augmented reality image based on the camera ’s shooting position, that is, the angle, the AR application needs to call the camera application in real time. Image information.
  • an image transmission instruction is generated, that is, when an image transmission instruction of a third-party application is detected, the handle information generated according to the image memory space is loaded to obtain the corresponding memory address of the image memory space. To determine the corresponding image memory space.
  • the step of loading handle information to determine a corresponding image memory space may include:
  • the terminal can determine the start address of the image memory space according to the first address in the handle information, and the start address is the start address of the image information contained in the image memory space. Based on the start address, the total number of memory addresses is based on the start address. By traversing, the image information in the entire image memory space can be obtained.
  • step S104 the image memory space is accessed to transmit the image information in the image memory space to a third-party application.
  • the terminal can access the image memory space in real time. Because the image memory space has sharing permissions, the terminal can transmit the image information in the memory space to the AR application in real time, thereby saving the process of Binder communication. Because Binder communication requires the camera application to transfer image information to the AR application across processes, the process of the AR application will be suspended during the image information transmission process, that is, there is a waiting time, so it will affect the smoothness of the use of the AR application. In the embodiment of the present invention, the AR application directly calls the image information in the memory, which can save the waiting time of the image information.
  • the image information transmission method provided in this embodiment adjusts the corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with the third-party application, and the image memory space is obtained.
  • the third-party application calls the image information of the camera application, the image information stored by the camera application can be directly loaded from the memory space according to the handle information, which avoids the inconvenience caused by cross-process transmission and saves the transmission time of image information. , Thereby improving the transmission efficiency of image information.
  • FIG. 3 is a schematic flowchart of another image information transmission method according to an embodiment of the present application.
  • the method includes:
  • step S201 the access right of the image memory space of the camera application is adjusted by using a software development kit, and the image memory space of the camera application is opened to the sharing authority of the third-party application.
  • the terminal is described by using a mobile phone, a system as an Android system, and a third-party application as an AR application.
  • the mobile phone since the memory cannot be shared between applications in the Android system, the mobile phone needs to modify the access right of the image memory space of the camera application through the SDK, and open the sharing permission of the image memory space of the camera application to the AR application, so that the AR application The image memory space can be directly called from the memory later.
  • the image memory space applied for saving the image in the SDK in the camera application layer 3 is shared to the augmented reality server 4 of the AR application. Therefore, after the image information is transmitted to the camera client through the camera server and reaches the application SDK, the image information does not need to be transmitted to the augmented reality server through the Binder cross-process communication method. Instead, the image memory space can be shared to directly access the phone memory. Image information in the image memory space.
  • step S202 an image memory space is acquired, and a first address and a number of memory addresses corresponding to the image memory space are determined.
  • the mobile phone obtains attribute information of the image memory space. Since the mobile phone digitizes the image information in the image memory space, the mobile phone knows where the image information is stored in the memory. Based on this, the mobile phone can determine the first address and the number of memory addresses corresponding to the image memory space.
  • the first address is the first memory address where the image information is stored, and the number of memory addresses is the total number of memory addresses.
  • step S203 the corresponding handle information of the image memory space is determined according to the first address and the number of memory addresses.
  • the mobile phone can generate the corresponding handle information of the image memory space according to the first address and the number of memory addresses.
  • the handle information can be used to find the image information in the image memory space.
  • the handle information will be updated according to the change of the memory address. So only need to know the handle information, you can find the corresponding position of the specific image information in memory.
  • step S204 when the image transmission instruction of the third-party application is detected, the start address of the image memory space is determined according to the first address in the handle information.
  • an image transmission instruction is generated, that is, when it is determined that the image transmission instruction of the third-party application is detected, the first address of the handle information is obtained, and the first address is used to determine the image memory space. starting address.
  • step S205 a traversal is performed according to the number of memory addresses based on the start address to obtain a corresponding image memory space.
  • the traversal is performed based on the starting address of the image memory space according to the number of memory addresses, and all the memory addresses storing the image information of the camera application are obtained, that is, the image memory space storing the image information of the camera application is obtained.
  • step S206 the image memory space is accessed to transfer the image information in the image memory space to a third-party application.
  • the mobile phone can directly access the image memory space, and transfer the image information in the image memory space to the AR application, so that the AR application can obtain it in real time and quickly The image information in the camera application, and render the image retrieved in real time.
  • the image information transmission method provided in this embodiment adjusts the access right of the image memory space of the camera application through the SDK, opens the image memory space of the camera application to the AR application's sharing permission, and obtains the image memory space.
  • the corresponding handle information is determined according to the first address corresponding to the image memory space and the number of memory addresses.
  • the start address of the image memory space is determined according to the first address in the handle information, and the memory address is determined according to the memory address. The number is traversed to obtain the image memory space, access the image memory space, and transfer the image information in the image memory space to the third-party application.
  • the image information stored by the camera application can be directly loaded from the memory space according to the handle information, which avoids the inconvenience caused by cross-process transmission and saves the transmission time of image information. , Thereby improving the transmission efficiency of image information.
  • the embodiment of the present application further provides a device based on the image information transmission method.
  • the meanings of the nouns are the same as in the foregoing image information transmission method. For specific implementation details, refer to the description in the method embodiment.
  • An embodiment of the present invention provides a device for transmitting image information, including:
  • An adjustment unit configured to adjust a corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with a third-party application;
  • a determining unit configured to obtain the image memory space and determine corresponding handle information of the image memory space
  • a loading unit configured to load the handle information when an image transmission instruction of a third-party application is detected to determine a corresponding image memory space
  • the transmission unit is configured to access the image memory space to transmit image information in the image memory space to a third-party application.
  • the determining unit may include a first determining unit configured to obtain the image memory space, and determine a first address and a number of memory addresses corresponding to the image memory space; a second determining unit configured to: Determining corresponding handle information of the image memory space according to the first address and the number of memory addresses.
  • the first determining subunit is specifically configured to: obtain the image memory space, determine a memory block corresponding to the image memory space, and analyze a memory address corresponding to each memory block to obtain a corresponding First address and the number of memory addresses.
  • the loading unit is specifically configured to: when an image transmission instruction of a third-party application is detected, determine a start address of the image memory space according to a first address in the handle information; based on the The starting address is traversed according to the number of memory addresses to obtain the corresponding image memory space.
  • the adjusting unit is specifically configured to adjust the access right of the image memory space of the camera application through a software development kit, and open the sharing right of the image memory space of the camera application to a third-party application.
  • FIG. 5 is a schematic diagram of a module of an image information transmission device according to an embodiment of the present application.
  • the image information transmission device 300 includes: an adjustment unit 31, a determination unit 32, a loading unit 33, and a transmission unit 34.
  • the adjusting unit 31 is configured to adjust a corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with the third-party application.
  • the function of the camera application is an application that calls a camera on a terminal for real-time shooting, and converts optical image information into electrical signals for storage or transmission.
  • the camera application generally stores image information obtained by the camera application in real time.
  • a preset memory space such as the image memory space.
  • the memory space is also called internal memory, and its function is to temporarily store the operation data in the central processing unit and data exchanged with external memories such as hard disks.
  • the corresponding software development toolkit of the camera application is a collection of related documents, examples, and tools to assist in the development of the camera application.
  • the adjustment unit 31 performs the API, dynamic link library, and import library of the corresponding software development toolkit of the camera application. Adjusted so that the corresponding image memory space of the camera application can be shared with third-party applications. In other words, the third-party application can quickly call the image information in the image memory space.
  • the transmission unit 34 is specifically configured to adjust the access right of the image memory space of the camera application through a software development kit, and open the sharing right of the image memory space of the camera application to a third-party application.
  • the determining unit 32 is configured to obtain the image memory space and determine corresponding handle information of the image memory space.
  • the handle information is a unique integer value, that is, a 4-byte (8-byte in a 64-bit program) value, to identify different objects in the application and different instances in the same category, such as , A window, button, icon, scroll bar, output device, control, or file.
  • the determining unit 32 obtains storage address information corresponding to the image memory space, and determines a corresponding 4-byte or 8-byte value.
  • the application can access the information of the corresponding object through the handle. That is, the corresponding storage address of the image memory space can be found through the corresponding handle information of the image memory space, that is, the memory address corresponding to the image memory space can be quickly found through the handle information.
  • the loading unit 33 is configured to load the handle information when an image transmission instruction of a third-party application is detected to determine a corresponding image memory space.
  • the third-party application is a non-camera application, such as an AR application. Since an AR application is an application that renders a corresponding augmented reality image based on the camera ’s shooting position, that is, the angle, the AR application needs to call the camera application in real time. Image information.
  • the detection and loading unit 33 detects that the AR application needs to retrieve image information, it generates an image transmission instruction, that is, when an image transmission instruction of a third-party application is detected, it loads the handle information generated according to the image memory space and obtains the corresponding image memory space Memory address to determine the corresponding image memory space.
  • the loading unit 33 is specifically configured to determine a start address of the image memory space according to a first address in the handle information, and based on the start address, traverse according to the number of memory addresses to obtain a corresponding image Memory space.
  • the transmitting unit 34 is configured to access the image memory space to transmit the image information in the image memory space to a third-party application.
  • the transmission unit 34 can access the image memory space in real time. Because the image memory space has sharing permissions, the transmission unit 34 can transmit the image information in the memory space to the AR application in real time, thereby saving Binder.
  • Binder communication since Binder communication requires the camera application to transfer image information to the AR application across processes, the process of the AR application will be suspended during the image information transmission process, that is, there is a waiting time, so it will affect the AR application.
  • the smoothness of the use, and in the embodiment of the present invention, the AR application directly calls the image information in the memory, which can save the waiting time of the image information.
  • FIG. 6, is a schematic diagram of another module of an image information transmission apparatus according to an embodiment of the present application.
  • the image information transmission apparatus 300 may further include:
  • the determining unit 32 may include a first determining unit 331 and a second determining unit 332.
  • the first determining unit 331 is configured to obtain the image memory space, and determine a first address and a number of memory addresses corresponding to the image memory space.
  • the second determining unit 332 is configured to determine corresponding handle information of the image memory space according to the first address and the number of memory addresses.
  • the first determining unit 331 obtains the image memory space and determines the memory block corresponding to the image memory space; and analyzes the memory address corresponding to each memory block to obtain the corresponding first address and the number of memory addresses.
  • the image information transmission device adjusts the corresponding software development kit in the camera application through the adjustment unit 31, so that the image memory space of the image saved by the camera application is shared with the third-party application; the determining unit 32 obtains the image memory space and determines the corresponding handle information of the image memory space; when the loading unit 33 detects an image transmission instruction of a third-party application, loads the handle information to determine the corresponding image memory space; the transmission unit 34 accesses the image memory space, To transfer the image information in the image memory space to a third-party application.
  • the image information stored by the camera application can be directly loaded from the memory space according to the handle information, which avoids the inconvenience caused by cross-process transmission and saves the transmission time of image information. , Thereby improving the transmission efficiency of image information.
  • the electronic device 500 includes a processor 501 and a memory 502.
  • the processor 501 is electrically connected to the memory 502.
  • the processor 500 is a control center of the electronic device 500, and uses various interfaces and lines to connect various parts of the entire electronic device.
  • the processor 500 runs or loads a computer program stored in the memory 502, and calls data stored in the memory 502 to execute Various functions of the electronic device 500 and data are processed to perform overall monitoring of the electronic device 500.
  • the memory 502 can be used to store software programs and modules.
  • the processor 501 executes various functional applications and data processing by running computer programs and modules stored in the memory 502.
  • the memory 502 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, a computer program (such as a sound playback function, an image playback function, etc.) required for at least one function; the storage data area may store data according to Data created by the use of electronic devices, etc.
  • the memory 502 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may further include a memory controller to provide the processor 501 with access to the memory 502.
  • the processor 501 in the electronic device 500 loads the instructions corresponding to the process of one or more computer programs into the memory 502 according to the following steps, and the processor 501 runs the stored data in the memory 502
  • a computer program in the computer to achieve various functions, as follows:
  • the handle information is loaded to determine the corresponding image memory space
  • Access the image memory space to transfer the image information in the image memory space to a third-party application.
  • the processor 501 when determining the corresponding handle information of the image memory space, the processor 501 may specifically perform the following steps:
  • the corresponding handle information of the image memory space is determined according to the first address and the number of memory addresses.
  • the processor 501 when determining the first address and the number of memory addresses corresponding to the image memory space, the processor 501 may specifically perform the following steps:
  • the processor 501 when loading the handle information to determine the corresponding image memory space, the processor 501 may specifically perform the following steps:
  • the processor 501 when adjusting the corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with the third-party application, the processor 501 may specifically perform the following steps:
  • the access right of the image memory space of the camera application is adjusted through the software development kit, and the image memory space of the camera application is shared to the third-party application.
  • the processor 501 when adjusting the corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with the third-party application, the processor 501 may specifically perform the following steps:
  • the corresponding image memory space of the camera application is shared to third-party applications.
  • the processor 501 may specifically perform the following steps:
  • the electronic device in the embodiment of the present application adjusts the corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with the third-party application; the image memory space is obtained, and the corresponding image memory space is determined.
  • the handle information is loaded when an image transmission instruction of a third-party application is detected to determine the corresponding image memory space; the image memory space is accessed to transfer the image information in the image memory space to the third-party application.
  • the third-party application calls the image information of the camera application
  • the image information stored by the camera application can be directly loaded from the memory space according to the handle information, which avoids the inconvenience caused by cross-process transmission and saves the transmission time of image information. , Thereby improving the transmission efficiency of image information.
  • the electronic device 500 may further include a display 503, a radio frequency circuit 504, an audio circuit 505, and a power source 506.
  • the display 503, the radio frequency circuit 504, the audio circuit 505, and the power supply 506 are electrically connected to the processor 501, respectively.
  • the display 503 may be used to display information input by the user or information provided to the user and various graphical user interfaces. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof.
  • the display 503 may include a display panel.
  • the display panel may be configured by using a liquid crystal display (Liquid Crystal Display, LCD), or an organic light emitting diode (Organic Light-Emitting Diode, OLED).
  • the radio frequency circuit 504 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic device through wireless communication, and transmit and receive signals to and from the network device or other electronic device.
  • the audio circuit 505 may be used to provide an audio interface between the user and the electronic device through a speaker or a microphone.
  • the power supply 506 can be used to power various components of the electronic device 500.
  • the power supply 506 may be logically connected to the processor 501 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system.
  • the electronic device 500 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • An embodiment of the present application further provides a storage medium.
  • the storage medium stores a computer program.
  • the computer program runs on a computer, the computer causes the computer to execute the image information transmission method in any of the foregoing embodiments, such as adjusting a camera.
  • the corresponding software development kit in the application so that the camera application saves the image memory space of the image to the third-party application; obtains the image memory space, determines the corresponding handle information of the image memory space; when the image transmission instruction of the third-party application is detected To load the handle information to determine the corresponding image memory space; access the image memory space to transfer the image information in the image memory space to a third-party application.
  • the storage medium may be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (Random Access Memory, RAM).
  • ROM read-only memory
  • RAM Random Access Memory
  • the computer program may be stored in a computer-readable storage medium, such as stored in a memory of an electronic device, and executed by at least one processor in the electronic device. During execution, the program may include, for example, The flow of the embodiment of the image information transmission method.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
  • the image information transmission device in the embodiment of the present application, its functional modules may be integrated in one processing chip, or each module may exist separately physically, or two or more modules may be integrated in one module.
  • the above integrated modules may be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)
  • Facsimiles In General (AREA)

Abstract

Disclosed is an image information transmission method. The method comprises: adjusting a corresponding software development kit in a camera application, so that an image memory space of the camera application for saving images is shared with a third-party application; acquiring the image memory space to determine corresponding handle information of the image memory space; when an image transmission instruction is detected, loading the handle information to determine the corresponding image memory space; and transmitting image information in the image memory space to the third-party application.

Description

图像信息的传输方法、装置、存储介质及电子设备Image information transmission method, device, storage medium and electronic equipment
本申请要求于2018年08月27日提交中国专利局、申请号为201810982933.3、发明名称为“一种图像信息的传输方法、装置、存储介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on August 27, 2018 with the Chinese Patent Office, application number 201810982933.3, and the invention name "A method, device, storage medium, and electronic device for transmitting image information" The contents are incorporated herein by reference.
技术领域Technical field
本申请涉及电子设备技术领域,尤其涉及一种图像信息的传输方法、装置、存储介质及电子设备。The present application relates to the technical field of electronic devices, and in particular, to a method, a device, a storage medium, and an electronic device for transmitting image information.
背景技术Background technique
随着电子技术的不断发展,电子设备如手机的功能越来越强大,用户可以通过手机实现增强现实(Augmented Reality,AR)功能,所述增强现实技术是一种将真实世界信息和虚拟世界信息“无缝”集成的新技术,是把原本在现实世界的一定时间空间范围内很难体验到的实体信息(视觉信息、声音、味道、触觉等),通过电脑等科学技术,模拟仿真后再叠加,将虚拟的信息应用到真实世界,被人类感官所感知,从而达到超越现实的感官体验。真实的环境和虚拟的物体实时地叠加到了同一个画面或空间同时存在。With the continuous development of electronic technology, the functions of electronic devices such as mobile phones are becoming more and more powerful. Users can implement Augmented Reality (AR) functions through mobile phones. The augmented reality technology is a method that combines real world information and virtual world information. The new technology of "seamless" integration is to use physical information (visual information, sound, taste, touch, etc.) that is difficult to experience in a certain time and space range in the real world, and then use computer and other scientific technologies to simulate the simulation. Superposition, applying virtual information to the real world and being perceived by human senses, thereby achieving a sensory experience beyond reality. Real environment and virtual objects are superimposed on the same picture or space in real time.
目前,手机需要通过摄像头组件实时拍摄当前图像,并将当前图像跨进程传输到增强现实组件中,增强现实组件通过对接收的当前图像进行相应的增强现实图形渲染,以实现增强现实的显示效果,但是由于摄像头的拍摄像素越来越高,拍摄的图像的存储空间也相应越来越大,然而图像跨进程传输的效率有限,所以会造成图像的传输时间提升,甚至是传输失败的情况。At present, mobile phones need to capture the current image in real time through the camera component and transmit the current image to the augmented reality component in a process. The augmented reality component renders the received current image by correspondingly augmented reality graphics to achieve the display effect of augmented reality. However, as the shooting pixels of the camera are getting higher and higher, the storage space of the captured images is correspondingly getting larger and larger. However, the efficiency of image transmission across processes is limited, which will lead to an increase in the transmission time of the image, or even a failure of the transmission.
发明内容Summary of the Invention
本申请实施例提供一种图像信息的传输方法、装置、存储介质及电子设备,可以节省图像信息的传输时间,进而提升图像信息的传输效率。The embodiments of the present application provide a method, a device, a storage medium, and an electronic device for transmitting image information, which can save the transmission time of the image information, thereby improving the transmission efficiency of the image information.
第一方面,本申请实施例提供了一种图像信息的传输方法,包括:In a first aspect, an embodiment of the present application provides a method for transmitting image information, including:
调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用;Adjusting the corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with the third-party application;
获取所述图像内存空间,确定所述图像内存空间相应的句柄信息;Acquiring the image memory space and determining corresponding handle information of the image memory space;
当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间;When an image transmission instruction of a third-party application is detected, loading the handle information to determine a corresponding image memory space;
访问所述图像内存空间,以将所述图像内存空间中的图像信息传输至第三方应用中。Accessing the image memory space to transmit image information in the image memory space to a third-party application.
第二方面,本申请实施例提供了一种图像信息的传输装置,包括:In a second aspect, an embodiment of the present application provides a device for transmitting image information, including:
调整单元,用于调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用;An adjustment unit, configured to adjust a corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with a third-party application;
确定单元,用于获取所述图像内存空间,确定所述图像内存空间相应的句柄信息;A determining unit, configured to obtain the image memory space and determine corresponding handle information of the image memory space;
加载单元,用于当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间;A loading unit, configured to load the handle information when an image transmission instruction of a third-party application is detected to determine a corresponding image memory space;
传输单元,用于访问所述图像内存空间,以将所述图像内存空间中的图像信息传输至第三方应用中。The transmission unit is configured to access the image memory space to transmit image information in the image memory space to a third-party application.
第三方面,本申请实施例提供了一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如本申请任一实施例提供的图像信息的传输方法。In a third aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is run on a computer, the computer is caused to execute image information provided by any embodiment of the present application. Transmission method.
第四方面,本申请实施例提供了一种电子设备,包括处理器和存储器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行步骤:In a fourth aspect, an embodiment of the present application provides an electronic device including a processor and a memory, where the processor executes steps by calling a computer program stored in the memory:
调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用;Adjusting the corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with the third-party application;
获取所述图像内存空间,确定所述图像内存空间相应的句柄信息;Acquiring the image memory space and determining corresponding handle information of the image memory space;
当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间;When an image transmission instruction of a third-party application is detected, loading the handle information to determine a corresponding image memory space;
访问所述图像内存空间,以将所述图像内存空间中的图像信息传输至第三方应用中。Accessing the image memory space to transmit image information in the image memory space to a third-party application.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其它有益效果显而易见。The following detailed description of specific embodiments of the present application will make the technical solutions and other beneficial effects of the present application obvious in conjunction with the accompanying drawings.
图1为本发明实施例所提供电子设备运行的系统架构图。FIG. 1 is a system architecture diagram of an electronic device running according to an embodiment of the present invention.
图2是本申请实施例提供的图像信息的传输方法的流程示意图。FIG. 2 is a schematic flowchart of a method for transmitting image information according to an embodiment of the present application.
图3为本申请实施例提供的图像信息的传输方法的另一流程示意图。FIG. 3 is another schematic flowchart of a method for transmitting image information according to an embodiment of the present application.
图4为本申请实施例提供的电子设备运行的另一系统架构图。FIG. 4 is another system architecture diagram of an electronic device running according to an embodiment of the present application.
图5为本申请实施例提供的图像信息的传输装置的模块示意图。FIG. 5 is a schematic block diagram of an image information transmission device according to an embodiment of the present application.
图6为本申请实施例提供的图像信息的传输装置的另一模块示意图。FIG. 6 is a schematic diagram of another module of an image information transmission apparatus according to an embodiment of the present application.
图7为本申请实施例提供的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
图8为本申请实施例提供的电子设备的另一结构示意图。FIG. 8 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式detailed description
请参照图式,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。Please refer to the drawings, in which the same component symbols represent the same components. The principle of the present application is illustrated by implementing in an appropriate computing environment. The following description is based on the exemplified specific embodiments of the present application, which should not be construed as limiting other specific embodiments not detailed herein.
本文所使用的术语「模块」可看做为在该运算系统上执行的软件对象。本文该的不同组件、模块、引擎及服务可看做为在该运算系统上的实施对象。而本文该的装置及方法优 选的以软件的方式进行实施,当然也可在硬件上进行实施,均在本申请保护范围之内。The term "module" as used herein can be considered as a software object executing on the computing system. The different components, modules, engines, and services described in this article can be considered as implementation objects on this computing system. The device and method described herein are preferably implemented in software, and of course, they can also be implemented in hardware, which are all within the protection scope of this application.
请参阅图1,图1为本发明实施例所提供电子设备运行的系统架构图,该系统架构为安卓(Android)系统架构,在一实施方式中,该系统架构还可以为苹果(iphone Operating System,IOS)系统框架等。该安卓系统架构是安卓系统的体系结构,安卓的系统架构和其操作系统一样,采用了分层的架构,共分为四层,从高到低分别是安卓应用层(Application),安卓应用框架层(Application Framework),安卓系统运行层和Linux内核层。Please refer to FIG. 1. FIG. 1 is a system architecture diagram of an electronic device running according to an embodiment of the present invention. The system architecture is an Android system architecture. In one embodiment, the system architecture may also be Apple (iphone Operating System). , IOS) system framework. The Android system architecture is the Android system architecture. The Android system architecture, like its operating system, uses a layered architecture that is divided into four layers. From high to low are the Android application layer and the Android application framework. Layer (Application Framework), Android system running layer and Linux kernel layer.
应用层:应用是用java语言编写的运行在虚拟机上的程序,比如摄像机应用、Email客户端、SMS短消息程序以及日历等。Application layer: An application is a program written in the Java language and running on a virtual machine, such as a camera application, Email client, SMS short message program, and calendar.
应用框架层:这一层是编写谷歌(Google)发布的核心应用时所使用的应用程序编程接口(Application Programming Interface,API)框架,开发人员同样可以使用这些框架来开发自己的应用,这样便简化了程序开发的结构设计,但是必须要遵守其框架的开发原则。Application framework layer: This layer is an application programming interface (API) framework used when writing core applications published by Google. Developers can also use these frameworks to develop their own applications, which simplifies Structural design of program development, but must adhere to the development principles of its framework.
系统运行库(C/C++库以及安卓运行库)层:当使用安卓应用框架时,安卓系统会通过一些C/C++库来支持我们使用的各个组件,使其更好的为我们服务,比如其中的SQLite(关系数据库),Webkit(Web浏览器引擎)。System runtime (C / C ++ library and Android runtime) layer: When using the Android application framework, the Android system will support various components we use through some C / C ++ libraries to make it better serve us, such as among them SQLite (Relational Database), Webkit (Web Browser Engine).
Linux内核层:安卓的核心系统服务给予Linux2.6内核,如安全性、内存管理、进程管理、网络协议栈和驱动模型等都依赖于该内核,比如Binder IPC(Internet Process Connection进程间通信)驱动,安卓的一个特殊驱动程序,具有单独的设备节点,提供进程间通信的功能。Linux kernel layer: Android's core system services are given to the Linux 2.6 kernel, such as security, memory management, process management, network protocol stack, and driver model, etc. all depend on this kernel, such as the Binder IPC (Internet Process Connection Connection) driver , A special driver for Android, with a separate device node that provides inter-process communication.
其中,彼此不同的应用之间的信息传递,如摄像机应用与第三方应用(如AR应用)之间的图像信息传递,首先需要通过摄像机应用的服务层(camera Service)将存储在图像内存空间的图像信息调取到摄像机客户端(camera client)中,最终到达摄像机应用的软件开发工具包(Software Development Kit,SDK)中,通过Binder通讯方式,将图像信息跨进程传输到AR应用中,AR应用在接收到图像信息后,可以进行增强现实渲染,实现增强现实功能。需要说明的是,Binder是安卓跨进程通信方式,在图像信息较大时,传输效率较低,会导致AR应用等待时间过长,导致AR应用运行速度下降,之所以需要进行跨进程是因为在一般情况下,安卓系统中应用程序之间不能共享内存。在不同应用程序之间进行的数据交换叫跨进程。Among them, the information transfer between different applications, such as the image information transfer between camera applications and third-party applications (such as AR applications), first needs to be stored in the image memory space through the camera application service layer (camera Service). The image information is transferred to the camera client, and finally arrives in the Software Development Kit (SDK) of the camera application. Through the Binder communication method, the image information is transmitted to the AR application across processes, and the AR application After receiving the image information, it can perform augmented reality rendering to achieve the function of augmented reality. It should be noted that Binder is an Android cross-process communication method. When the image information is large, the transmission efficiency is low, which will cause the AR application to wait too long and cause the AR application to run at a reduced speed. The reason why cross-process is needed is Under normal circumstances, memory cannot be shared between applications in the Android system. The data exchange between different applications is called cross-process.
以下进行具体分析说明。Specific analysis and description are given below.
在本实施例中,将从图像信息的传输装置的角度进行描述,该图像信息的传输装置具体可以集成在电子设备,比如手机、平板电脑、掌上电脑(PDA,Personal Digital Assistant)等。In this embodiment, description will be made from the perspective of a transmission device of image information, and the transmission device of image information may be specifically integrated into an electronic device, such as a mobile phone, a tablet computer, a personal digital assistant (PDA, Personal Assistant), and the like.
本发明实施例提供一种图像信息的传输方法,包括:An embodiment of the present invention provides a method for transmitting image information, including:
调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内 存空间共享给第三方应用;Adjusting the corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with the third-party application;
获取所述图像内存空间,确定所述图像内存空间相应的句柄信息;Acquiring the image memory space and determining corresponding handle information of the image memory space;
当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间;When an image transmission instruction of a third-party application is detected, loading the handle information to determine a corresponding image memory space;
访问所述图像内存空间,以将所述图像内存空间中的图像信息传输至第三方应用中。Accessing the image memory space to transmit image information in the image memory space to a third-party application.
在一种实施方式中,该确定所述图像内存空间相应的句柄信息的步骤,可以包括:In an implementation manner, the step of determining corresponding handle information of the image memory space may include:
确定所述图像内存空间对应的首地址以及内存地址数量;Determining the first address and the number of memory addresses corresponding to the image memory space;
根据所述首地址以及内存地址数量确定所述图像内存空间相应的句柄信息。Determining corresponding handle information of the image memory space according to the first address and the number of memory addresses.
在一种实施方式中,该确定所述图像内存空间对应的首地址以及内存地址数量的步骤,可以包括:In one embodiment, the step of determining the first address and the number of memory addresses corresponding to the image memory space may include:
确定所述图像内存空间对应的内存块;Determining a memory block corresponding to the image memory space;
分析每一内存块对应的内存地址,以得到对应的首地址以及内存地址数量。Analyze the memory address corresponding to each memory block to obtain the corresponding first address and the number of memory addresses.
在一种实施方式中,该加载所述句柄信息,以确定对应的图像内存空间的步骤,可以包括:In an implementation manner, the step of loading the handle information to determine a corresponding image memory space may include:
根据所述句柄信息中的首地址确定所述图像内存空间的起始地址;Determining a start address of the image memory space according to a first address in the handle information;
基于所述起始地址,按照内存地址数量进行遍历,以得到对应的图像内存空间。Traverse according to the number of memory addresses based on the starting address to obtain a corresponding image memory space.
在一种实施方式中,该调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用的步骤,可以包括:In one embodiment, the step of adjusting a corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with a third-party application may include:
通过软件开发工具包对摄像机应用的图像内存空间的访问权限进行调节,开放所述摄像机应用的图像内存空间对第三方应用的共享权限。The access right of the image memory space of the camera application is adjusted through the software development kit, and the sharing permission of the image memory space of the camera application to the third-party application is opened.
在一种实施方式中,该调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用的步骤,可以包括:In one embodiment, the step of adjusting a corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with a third-party application may include:
通过对摄像机应用相应的软件开发工具包的编程接口、动态链接库以及导入库进行调整,使得摄像机应用相应的图像内存空间共享给第三方应用。By adjusting the programming interface, dynamic link library, and import library of the corresponding software development kit of the camera application, the corresponding image memory space of the camera application is shared to third-party applications.
在一种实施方式中,该第三方应用为增强现实应用,该当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间的步骤,可以包括:In one embodiment, the third-party application is an augmented reality application. When an image transmission instruction of the third-party application is detected, the step of loading the handle information to determine a corresponding image memory space may include:
当检测到增强现实应用需要调取图像信息时,生成图像传输指令;When it is detected that the AR application needs to retrieve image information, an image transmission instruction is generated;
根据所述图像传输指令加载所述句柄信息,获取图像内存空间相应的内存地址,以确定对应的图像内存空间。Load the handle information according to the image transmission instruction, and obtain a corresponding memory address of the image memory space to determine the corresponding image memory space.
本申请实施例提供一种图像信息的传输方法,如图2所示,该图像信息的传输方法,可以包括以下步骤:An embodiment of the present application provides a method for transmitting image information. As shown in FIG. 2, the method for transmitting image information may include the following steps:
在步骤S101中,调整摄像机应用中相应的软件开发工具包。In step S101, the corresponding software development kit in the camera application is adjusted.
需要说明的是,该软件开发工具包一般都是一些软件工程师为特定的软件包、软件框 架、硬件平台、操作系统等建立应用软件时的开发工具的集合。It should be noted that this software development kit is generally a collection of development tools used by some software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, and so on.
其中,该摄像机应用的功能为调用终端上的摄像头进行实时拍摄的应用,将光学图像信息转变为电信号,以进行存储或者传输,为了便于管理,摄像机应用一般将摄像机应用实时获取的图像信息存储到预设内存空间中,如图像内存空间。需要说明的是,内存(Memory)空间也被称为内存储器,其作用是用于暂时存放中央处理器(Central Processing Unit,CPU)中的运算数据,以及与硬盘等外部存储器交换的数据。Among them, the function of the camera application is an application that calls a camera on a terminal for real-time shooting, and converts optical image information into electrical signals for storage or transmission. In order to facilitate management, the camera application generally stores image information obtained by the camera application in real time. To a preset memory space, such as the image memory space. It should be noted that the memory space is also called internal memory, and its function is to temporarily store the operation data in the central processing unit (CPU) and data exchanged with external memories such as hard disks.
而该摄像机应用相应的软件开发工具包为辅助开发该摄像机应用的相关文档、范例和工具的集合,通过对摄像机应用相应的软件开发工具包的API、动态链接库以及导入库等进行调整,使得摄像机应用相应的图像内存空间可以共享给第三方应用。也就是说第三方应用可以快速的调用图像内存空间中的图像信息。The corresponding software development kit for the camera application is a collection of related documents, examples, and tools to assist in the development of the camera application. By adjusting the API, dynamic link library, and import library of the corresponding software development tool kit for the camera, The corresponding image memory space of the camera application can be shared with third-party applications. In other words, the third-party application can quickly call the image information in the image memory space.
在一些实施方式中,该调整摄像机应用中相应的软件开发工具包的步骤,可以包括通过软件开发工具包对摄像机应用的图像内存空间的访问权限进行调节,开放该摄像机应用的图像内存空间对第三方应用的共享权限。In some embodiments, the step of adjusting the corresponding software development kit in the camera application may include adjusting the access right of the image memory space of the camera application through the software development kit, and opening the image memory space of the camera application to the first Sharing permissions for third-party applications.
其中,可以通过SDK对摄像头应用的图像内存空间的访问权限进行相应的修改,如访问权限默认为关闭,那么调节为开放,使得第三方应用可以获取到摄像头应用的图像内存空间对应的共享权限。The access right of the image memory space of the camera application can be modified correspondingly through the SDK. For example, if the access right is closed by default, it is adjusted to be open so that the third-party application can obtain the sharing permission corresponding to the image memory space of the camera application.
在步骤S102中,获取图像内存空间,确定图像内存空间相应的句柄信息。In step S102, an image memory space is acquired, and corresponding handle information of the image memory space is determined.
其中,该句柄信息为使用的一个唯一的整数值,即一个4字节(64位程序中为8字节)长的数值,来标识应用程序中的不同对象和同类中的不同的实例,诸如,一个窗口,按钮,图标,滚动条,输出设备,控件或者文件等。获取图像内存空间对应的存储地址信息,确定相应的4字节或者8字节长的数值。Among them, the handle information is a unique integer value, that is, a 4-byte (8-byte in a 64-bit program) value, to identify different objects in the application and different instances in the same category, such as , A window, button, icon, scroll bar, output device, control, or file. Obtain the storage address information corresponding to the image memory space, and determine the corresponding 4-byte or 8-byte value.
因此,应用程序能够通过句柄访问相应的对象的信息。即通过该图像内存空间相应的句柄信息可以找到该图像内存空间相应的存储地址,即可以通过该句柄信息快速找到图像内存空间对应的内存地址。Therefore, the application can access the information of the corresponding object through the handle. That is, the corresponding storage address of the image memory space can be found through the corresponding handle information of the image memory space, that is, the memory address corresponding to the image memory space can be quickly found through the handle information.
在一些实施方式中,获取图像内存空间,确定图像内存空间相应的句柄信息的步骤,可以包括:In some embodiments, the steps of obtaining image memory space and determining handle information corresponding to the image memory space may include:
(1)确定该图像内存空间对应的首地址以及内存地址数量;(1) Determine the first address and the number of memory addresses corresponding to the image memory space;
(2)根据该首地址以及内存地址数量确定该图像内存空间相应的句柄信息。(2) Determine the corresponding handle information of the image memory space according to the first address and the number of memory addresses.
其中,图像内存空间为存储图像信息的多个内存地址组成,一个内存地址为一个编号,代表一个内存空间,一个内存地址代表一个字节(byte)即8位(bit)的存储空间。摄像机应用将实时获取的图像信息存储在内存上,内存会按照图像信息的数据大小分配相应数量的内存地址。The image memory space is composed of multiple memory addresses for storing image information. A memory address is a number, which represents a memory space, and a memory address represents a byte, that is, a storage space of 8 bits. The camera application stores the image information obtained in real time on the memory, and the memory allocates a corresponding number of memory addresses according to the data size of the image information.
因此,只需要确定图像内存空间对应的首地址以及内存地址数量就可以确定整个图像 内存空间,并根据首地址以及内存地址数量可以生成表示图像内存空间相应的句柄信息。Therefore, only the first address and the number of memory addresses corresponding to the image memory space can be determined to determine the entire image memory space, and the corresponding handle information representing the image memory space can be generated based on the first address and the number of memory addresses.
在一些实施方式中,该确定该图像内存空间对应的首地址以及内存地址数量的步骤,可以包括:In some embodiments, the step of determining the first address and the number of memory addresses corresponding to the image memory space may include:
(2.1)确定该图像内存空间对应的内存块;(2.1) determine the memory block corresponding to the image memory space;
(2.2)分析每一内存块对应的内存地址,以得到对应的首地址以及内存地址数量。(2.2) Analyze the memory address corresponding to each memory block to obtain the corresponding first address and the number of memory addresses.
其中,确定图像内存空间的所有图像信息在内存上的内存块,并且对每一内存块对应的内存地址进行分析,得到内存地址相应的首地址以及总的内存地址数量。Among them, the memory blocks of all the image information in the image memory space on the memory are determined, and the memory address corresponding to each memory block is analyzed to obtain the corresponding first address of the memory address and the total number of memory addresses.
在步骤S103中,当检测到第三方应用的图像传输指令时,加载句柄信息,以确定对应的图像内存空间。In step S103, when an image transmission instruction of a third-party application is detected, the handle information is loaded to determine a corresponding image memory space.
其中,该第三方应用为非摄像机应用的其他应用,如AR应用,由于AR应用为根据摄像机拍摄的位置即角度并渲染相应增强现实图像的应用,所以AR应用需要实时调取摄像机应用实时获取的图像信息。The third-party application is a non-camera application, such as an AR application. Since an AR application is an application that renders a corresponding augmented reality image based on the camera ’s shooting position, that is, the angle, the AR application needs to call the camera application in real time. Image information.
因此,当检测到AR应用需要调取图像信息时,生成图像传输指令,即检测到第三方应用的图像传输指令时,加载根据图像内存空间生成的句柄信息,获取图像内存空间相应的内存地址,以确定对应的图像内存空间。Therefore, when it is detected that the AR application needs to retrieve image information, an image transmission instruction is generated, that is, when an image transmission instruction of a third-party application is detected, the handle information generated according to the image memory space is loaded to obtain the corresponding memory address of the image memory space. To determine the corresponding image memory space.
在一些实施方式中,该加载句柄信息,以确定对应的图像内存空间的步骤,可以包括:In some embodiments, the step of loading handle information to determine a corresponding image memory space may include:
(1)根据该句柄信息中的首地址确定该图像内存空间的起始地址;(1) Determine the starting address of the image memory space according to the first address in the handle information;
(2)基于该起始地址,按照内存地址数量进行遍历,以得到对应的图像内存空间。(2) Traversing according to the number of memory addresses based on the starting address to obtain the corresponding image memory space.
其中,终端可以根据句柄信息中的首地址来确定图像内存空间的起始地址,该起始地址为图像内存空间包含的图像信息的起始地址,基于该起始地址,按照总的内存地址数量进行遍历,可以整个图像内存空间中的图像信息。The terminal can determine the start address of the image memory space according to the first address in the handle information, and the start address is the start address of the image information contained in the image memory space. Based on the start address, the total number of memory addresses is based on the start address. By traversing, the image information in the entire image memory space can be obtained.
在步骤S104中,访问图像内存空间,以将图像内存空间中的图像信息传输至第三方应用中。In step S104, the image memory space is accessed to transmit the image information in the image memory space to a third-party application.
其中,终端可以实时访问该图像内存空间,由于该图像内存空间的具有共享权限,所以终端可以实时的将该内存空间中的图像信息传输至AR应用中,以此,节省了Binder通讯的过程,由于Binder通讯需要摄像机应用跨进程将图像信息传输到AR应用,在图像信息传输的过程中,AR应用的进程会被挂起,也就是说有一个等待时间,所以会影响AR应用的使用流畅度,而本发明实施例中AR应用直接调用内存中的图像信息,可以节省图像信息的等待时间。The terminal can access the image memory space in real time. Because the image memory space has sharing permissions, the terminal can transmit the image information in the memory space to the AR application in real time, thereby saving the process of Binder communication. Because Binder communication requires the camera application to transfer image information to the AR application across processes, the process of the AR application will be suspended during the image information transmission process, that is, there is a waiting time, so it will affect the smoothness of the use of the AR application. In the embodiment of the present invention, the AR application directly calls the image information in the memory, which can save the waiting time of the image information.
由上述可知,本实施例提供的一种图像信息的传输方法,通过调整摄像机应用中相应的软件开发工具包,以使得摄像机应用保存图像的图像内存空间共享给第三方应用;获取图像内存空间,确定图像内存空间相应的句柄信息;当检测到第三方应用的图像传输指令时,加载句柄信息,以确定对应的图像内存空间;访问图像内存空间,以将图像内存空间 中的图像信息传输至第三方应用中。以此在第三方应用调用摄像机应用的图像信息时,可以直接根据句柄信息直接从内存空间中加载摄像机应用存储在的图像信息,避免了跨进程传输带来的不便,节省了图像信息的传输时间,进而提升了图像信息的传输效率。It can be known from the foregoing that the image information transmission method provided in this embodiment adjusts the corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with the third-party application, and the image memory space is obtained. Determine the corresponding handle information of the image memory space; when the third-party application image transfer instruction is detected, load the handle information to determine the corresponding image memory space; access the image memory space to transfer the image information in the image memory space to the first Three-party application. In this way, when the third-party application calls the image information of the camera application, the image information stored by the camera application can be directly loaded from the memory space according to the handle information, which avoids the inconvenience caused by cross-process transmission and saves the transmission time of image information. , Thereby improving the transmission efficiency of image information.
根据上述实施例所描述的方法,以下将举例作进一步详细说明。According to the method described in the above embodiment, an example will be further described in detail below.
请参阅图3,图3为本申请实施例提供的图像信息的传输方法的另一流程示意图。Please refer to FIG. 3, which is a schematic flowchart of another image information transmission method according to an embodiment of the present application.
具体而言,该方法包括:Specifically, the method includes:
在步骤S201中,通过软件开发工具包对摄像头应用的图像内存空间的访问权限进行调节,开放摄像头应用的图像内存空间对第三方应用的共享权限。In step S201, the access right of the image memory space of the camera application is adjusted by using a software development kit, and the image memory space of the camera application is opened to the sharing authority of the third-party application.
需要说明的是,为了更好的说明本实施例,将终端以手机、系统为安卓系统以及第三方应用为AR应用进行说明。It should be noted that, in order to better describe this embodiment, the terminal is described by using a mobile phone, a system as an Android system, and a third-party application as an AR application.
其中,由于安卓系统中应用程序之间不能共享内存,所以手机需要通过SDK来对摄像头应用的图像内存空间的访问权限进行修改,开放摄像头应用的图像内存空间对AR应用的共享权限,使得AR应用后期可以从内存中直接调用图像内存空间。Among them, since the memory cannot be shared between applications in the Android system, the mobile phone needs to modify the access right of the image memory space of the camera application through the SDK, and open the sharing permission of the image memory space of the camera application to the AR application, so that the AR application The image memory space can be directly called from the memory later.
如图4所示,图像信息通过摄像机服务端1传递到摄像机客户端2到达SDK后,摄像机应用层3中的SDK中申请保存图像的图像内存空间共享给AR应用的增强现实服务端4,以此,图像信息通过摄像机服务端传递到摄像机客户端到达应用SDK后,不需要通过Binder跨进程通讯方式将图像信息传递给增强现实服务端,而是可以通过图像内存空间共享,直接调取手机内存中图像内存空间中的图像信息。As shown in FIG. 4, after the image information is transmitted to the camera client 2 through the camera server 1 and reaches the SDK, the image memory space applied for saving the image in the SDK in the camera application layer 3 is shared to the augmented reality server 4 of the AR application. Therefore, after the image information is transmitted to the camera client through the camera server and reaches the application SDK, the image information does not need to be transmitted to the augmented reality server through the Binder cross-process communication method. Instead, the image memory space can be shared to directly access the phone memory. Image information in the image memory space.
在步骤S202中,获取图像内存空间,确定图像内存空间对应的首地址以及内存地址数量。In step S202, an image memory space is acquired, and a first address and a number of memory addresses corresponding to the image memory space are determined.
其中,手机获取图像内存空间的属性信息,由于手机把图像内存空间中的图像信息都数字化了,所以手机知道图像信息存储在内存中的哪一位置上。基于此,手机可以确定图像内存空间对应的首地址以及内存地址数量,该首地址为图像信息存储的第一个内存地址,而该内存地址数量为总的内存地址数量。The mobile phone obtains attribute information of the image memory space. Since the mobile phone digitizes the image information in the image memory space, the mobile phone knows where the image information is stored in the memory. Based on this, the mobile phone can determine the first address and the number of memory addresses corresponding to the image memory space. The first address is the first memory address where the image information is stored, and the number of memory addresses is the total number of memory addresses.
在步骤S203中,根据首地址以及内存地址数量确定图像内存空间相应的句柄信息。In step S203, the corresponding handle information of the image memory space is determined according to the first address and the number of memory addresses.
其中,手机可以根据首地址以及内存地址数量来生成图像内存空间相应的句柄信息,通过该句柄信息可以找到图像内存空间中的图像信息,该句柄信息会根据内存地址的变化而进行相应的更新,所以只需要知道该句柄信息,就可以找到具体图像信息在内存中的相应位置。The mobile phone can generate the corresponding handle information of the image memory space according to the first address and the number of memory addresses. The handle information can be used to find the image information in the image memory space. The handle information will be updated according to the change of the memory address. So only need to know the handle information, you can find the corresponding position of the specific image information in memory.
在步骤S204中,当检测到第三方应用的图像传输指令时,根据句柄信息中的首地址确定图像内存空间的起始地址。In step S204, when the image transmission instruction of the third-party application is detected, the start address of the image memory space is determined according to the first address in the handle information.
其中,当检测到AR应用调用摄像机应用中的图像信息时,生成图像传输指令,即判定为检测到第三方应用的图像传输指令时,获取句柄信息的首地址,以首地址确定图像内 存空间的起始地址。Among them, when it is detected that the AR application calls the image information in the camera application, an image transmission instruction is generated, that is, when it is determined that the image transmission instruction of the third-party application is detected, the first address of the handle information is obtained, and the first address is used to determine the image memory space. starting address.
在步骤S205中,基于起始地址,按照内存地址数量进行遍历,以得到对应的图像内存空间。In step S205, a traversal is performed according to the number of memory addresses based on the start address to obtain a corresponding image memory space.
其中,基于图像内存空间的起始地址,按照内存地址数量进行遍历,获取到存储有摄像机应用的图像信息的所有的内存地址,即得到存储有摄像机应用的图像信息的图像内存空间。The traversal is performed based on the starting address of the image memory space according to the number of memory addresses, and all the memory addresses storing the image information of the camera application are obtained, that is, the image memory space storing the image information of the camera application is obtained.
在步骤S206中,访问图像内存空间,以将图像内存空间中的图像信息传输至第三方应用中。In step S206, the image memory space is accessed to transfer the image information in the image memory space to a third-party application.
其中,由于该图像内存空间开放了共享权限,所以手机可以直接访问该图像内存空间,并调取该图像内存空间中的图像信息传输至AR应用中,以此AR应用可以实时并快速的获取到摄像机应用中的图像信息,并进行对实时调取的图像进行渲染。Among them, because the image memory space is open for sharing permissions, the mobile phone can directly access the image memory space, and transfer the image information in the image memory space to the AR application, so that the AR application can obtain it in real time and quickly The image information in the camera application, and render the image retrieved in real time.
由上述可知,本实施例提供的一种图像信息的传输方法,通过SDK对摄像机应用的图像内存空间的访问权限进行调节,开放摄像机应用的图像内存空间对AR应用的共享权限,获取图像内存空间,根据图像内存空间对应的首地址以及内存地址数量确定相应的句柄信息,当检测到第三方应用的图像传输指令时,根据句柄信息中的首地址确定图像内存空间的起始地址,按照内存地址数量进行遍历,得到图像内存空间,访问图像内存空间,将图像内存空间中的图像信息传输至第三方应用中。以此在第三方应用调用摄像机应用的图像信息时,可以直接根据句柄信息直接从内存空间中加载摄像机应用存储在的图像信息,避免了跨进程传输带来的不便,节省了图像信息的传输时间,进而提升了图像信息的传输效率。From the above, it is known that the image information transmission method provided in this embodiment adjusts the access right of the image memory space of the camera application through the SDK, opens the image memory space of the camera application to the AR application's sharing permission, and obtains the image memory space. The corresponding handle information is determined according to the first address corresponding to the image memory space and the number of memory addresses. When an image transfer instruction of a third-party application is detected, the start address of the image memory space is determined according to the first address in the handle information, and the memory address is determined according to the memory address. The number is traversed to obtain the image memory space, access the image memory space, and transfer the image information in the image memory space to the third-party application. In this way, when the third-party application calls the image information of the camera application, the image information stored by the camera application can be directly loaded from the memory space according to the handle information, which avoids the inconvenience caused by cross-process transmission and saves the transmission time of image information. , Thereby improving the transmission efficiency of image information.
为便于更好的实施本申请实施例提供的图像信息的传输方法,本申请实施例还提供一种基于上述图像信息的传输方法的装置。其中名词的含义与上述图像信息的传输方法中相同,具体实现细节可以参考方法实施例中的说明。In order to facilitate better implementation of the image information transmission method provided in the embodiment of the present application, the embodiment of the present application further provides a device based on the image information transmission method. The meanings of the nouns are the same as in the foregoing image information transmission method. For specific implementation details, refer to the description in the method embodiment.
本发明实施例提供一种图像信息的传输装置,包括:An embodiment of the present invention provides a device for transmitting image information, including:
调整单元,用于调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用;An adjustment unit, configured to adjust a corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with a third-party application;
确定单元,用于获取所述图像内存空间,确定所述图像内存空间相应的句柄信息;A determining unit, configured to obtain the image memory space and determine corresponding handle information of the image memory space;
加载单元,用于当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间;A loading unit, configured to load the handle information when an image transmission instruction of a third-party application is detected to determine a corresponding image memory space;
传输单元,用于访问所述图像内存空间,以将所述图像内存空间中的图像信息传输至第三方应用中。The transmission unit is configured to access the image memory space to transmit image information in the image memory space to a third-party application.
在一种实施方式中,该确定单元,可以包括:第一确定单元,用于获取所述图像内存空间,确定所述图像内存空间对应的首地址以及内存地址数量;第二确定单元,用于根据 所述首地址以及内存地址数量确定所述图像内存空间相应的句柄信息。In an implementation manner, the determining unit may include a first determining unit configured to obtain the image memory space, and determine a first address and a number of memory addresses corresponding to the image memory space; a second determining unit configured to: Determining corresponding handle information of the image memory space according to the first address and the number of memory addresses.
在一种实施方式中,该第一确定子单元,具体用于:获取所述图像内存空间,确定所述图像内存空间对应的内存块;分析每一内存块对应的内存地址,以得到对应的首地址以及内存地址数量。In an implementation manner, the first determining subunit is specifically configured to: obtain the image memory space, determine a memory block corresponding to the image memory space, and analyze a memory address corresponding to each memory block to obtain a corresponding First address and the number of memory addresses.
在一种实施方式中,该加载单元,具体用于:当检测到第三方应用的图像传输指令时,根据所述句柄信息中的首地址确定所述图像内存空间的起始地址;基于所述起始地址,按照内存地址数量进行遍历,以得到对应的图像内存空间。In an implementation manner, the loading unit is specifically configured to: when an image transmission instruction of a third-party application is detected, determine a start address of the image memory space according to a first address in the handle information; based on the The starting address is traversed according to the number of memory addresses to obtain the corresponding image memory space.
在一种实施方式中,该调整单元,具体用于:通过软件开发工具包对摄像机应用的图像内存空间的访问权限进行调节,开放所述摄像机应用的图像内存空间对第三方应用的共享权限。In one embodiment, the adjusting unit is specifically configured to adjust the access right of the image memory space of the camera application through a software development kit, and open the sharing right of the image memory space of the camera application to a third-party application.
请参阅图5,图5为本申请实施例提供的图像信息的传输装置的模块示意图。具体而言,该图像信息的传输装置300,包括:调整单元31、确定单元32、加载单元33以及传输单元34。Please refer to FIG. 5, which is a schematic diagram of a module of an image information transmission device according to an embodiment of the present application. Specifically, the image information transmission device 300 includes: an adjustment unit 31, a determination unit 32, a loading unit 33, and a transmission unit 34.
调整单元31,用于调整摄像机应用中相应的软件开发工具包,以使得该摄像机应用保存图像的图像内存空间共享给第三方应用。The adjusting unit 31 is configured to adjust a corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with the third-party application.
其中,该摄像机应用的功能为调用终端上的摄像头进行实时拍摄的应用,将光学图像信息转变为电信号,以进行存储或者传输,为了便于管理,摄像机应用一般将摄像机应用实时获取的图像信息存储到预设内存空间中,如图像内存空间。需要说明的是,内存空间也被称为内存储器,其作用是用于暂时存放中央处理器中的运算数据,以及与硬盘等外部存储器交换的数据。Among them, the function of the camera application is an application that calls a camera on a terminal for real-time shooting, and converts optical image information into electrical signals for storage or transmission. In order to facilitate management, the camera application generally stores image information obtained by the camera application in real time. To a preset memory space, such as the image memory space. It should be noted that the memory space is also called internal memory, and its function is to temporarily store the operation data in the central processing unit and data exchanged with external memories such as hard disks.
而该摄像机应用相应的软件开发工具包为辅助开发该摄像机应用的相关文档、范例和工具的集合,调整单元31通过对摄像机应用相应的软件开发工具包的API、动态链接库以及导入库等进行调整,使得摄像机应用相应的图像内存空间可以共享给第三方应用。也就是说第三方应用可以快速的调用图像内存空间中的图像信息。The corresponding software development toolkit of the camera application is a collection of related documents, examples, and tools to assist in the development of the camera application. The adjustment unit 31 performs the API, dynamic link library, and import library of the corresponding software development toolkit of the camera application. Adjusted so that the corresponding image memory space of the camera application can be shared with third-party applications. In other words, the third-party application can quickly call the image information in the image memory space.
在一些实施方式中,该传输单元34,具体用于通过软件开发工具包对摄像机应用的图像内存空间的访问权限进行调节,开放该摄像机应用的图像内存空间对第三方应用的共享权限。In some embodiments, the transmission unit 34 is specifically configured to adjust the access right of the image memory space of the camera application through a software development kit, and open the sharing right of the image memory space of the camera application to a third-party application.
确定单元32,用于获取该图像内存空间,确定该图像内存空间相应的句柄信息。The determining unit 32 is configured to obtain the image memory space and determine corresponding handle information of the image memory space.
其中,该句柄信息为使用的一个唯一的整数值,即一个4字节(64位程序中为8字节)长的数值,来标识应用程序中的不同对象和同类中的不同的实例,诸如,一个窗口,按钮,图标,滚动条,输出设备,控件或者文件等。确定单元32获取图像内存空间对应的存储地址信息,确定相应的4字节或者8字节长的数值。Among them, the handle information is a unique integer value, that is, a 4-byte (8-byte in a 64-bit program) value, to identify different objects in the application and different instances in the same category, such as , A window, button, icon, scroll bar, output device, control, or file. The determining unit 32 obtains storage address information corresponding to the image memory space, and determines a corresponding 4-byte or 8-byte value.
因此,应用程序能够通过句柄访问相应的对象的信息。即通过该图像内存空间相应的 句柄信息可以找到该图像内存空间相应的存储地址,即可以通过该句柄信息快速找到图像内存空间对应的内存地址。Therefore, the application can access the information of the corresponding object through the handle. That is, the corresponding storage address of the image memory space can be found through the corresponding handle information of the image memory space, that is, the memory address corresponding to the image memory space can be quickly found through the handle information.
加载单元33,用于当检测到第三方应用的图像传输指令时,加载该句柄信息,以确定对应的图像内存空间。The loading unit 33 is configured to load the handle information when an image transmission instruction of a third-party application is detected to determine a corresponding image memory space.
其中,该第三方应用为非摄像机应用的其他应用,如AR应用,由于AR应用为根据摄像机拍摄的位置即角度并渲染相应增强现实图像的应用,所以AR应用需要实时调取摄像机应用实时获取的图像信息。The third-party application is a non-camera application, such as an AR application. Since an AR application is an application that renders a corresponding augmented reality image based on the camera ’s shooting position, that is, the angle, the AR application needs to call the camera application in real time. Image information.
因此,当检加载单元33测到AR应用需要调取图像信息时,生成图像传输指令,即检测到第三方应用的图像传输指令时,加载根据图像内存空间生成的句柄信息,获取图像内存空间相应的内存地址,以确定对应的图像内存空间。Therefore, when the detection and loading unit 33 detects that the AR application needs to retrieve image information, it generates an image transmission instruction, that is, when an image transmission instruction of a third-party application is detected, it loads the handle information generated according to the image memory space and obtains the corresponding image memory space Memory address to determine the corresponding image memory space.
在一些实施方式中,该加载单元33,具体用于根据该句柄信息中的首地址确定该图像内存空间的起始地址,基于该起始地址,按照内存地址数量进行遍历,以得到对应的图像内存空间。In some embodiments, the loading unit 33 is specifically configured to determine a start address of the image memory space according to a first address in the handle information, and based on the start address, traverse according to the number of memory addresses to obtain a corresponding image Memory space.
传输单元34,用于访问该图像内存空间,以将该图像内存空间中的图像信息传输至第三方应用中。The transmitting unit 34 is configured to access the image memory space to transmit the image information in the image memory space to a third-party application.
其中,传输单元34可以实时访问该图像内存空间,由于该图像内存空间的具有共享权限,所以传输单元34可以实时的将该内存空间中的图像信息传输至AR应用中,以此,节省了Binder通讯的过程,由于Binder通讯需要摄像机应用跨进程将图像信息传输到AR应用,在图像信息传输的过程中,AR应用的进程会被挂起,也就是说有一个等待时间,所以会影响AR应用的使用流畅度,而本发明实施例中AR应用直接调用内存中的图像信息,可以节省图像信息的等待时间。The transmission unit 34 can access the image memory space in real time. Because the image memory space has sharing permissions, the transmission unit 34 can transmit the image information in the memory space to the AR application in real time, thereby saving Binder. In the communication process, since Binder communication requires the camera application to transfer image information to the AR application across processes, the process of the AR application will be suspended during the image information transmission process, that is, there is a waiting time, so it will affect the AR application. The smoothness of the use, and in the embodiment of the present invention, the AR application directly calls the image information in the memory, which can save the waiting time of the image information.
可一并参考图6,图6为本申请实施例提供的图像信息的传输装置的另一模块示意图,该图像信息的传输装置300还可以包括:Reference may also be made to FIG. 6, which is a schematic diagram of another module of an image information transmission apparatus according to an embodiment of the present application. The image information transmission apparatus 300 may further include:
其中,该确定单元32可以包括第一确定单元331以及第二确定单元332。The determining unit 32 may include a first determining unit 331 and a second determining unit 332.
进一步的,该第一确定单元331,用于获取该图像内存空间,确定该图像内存空间对应的首地址以及内存地址数量。该第二确定单元332,用于根据该首地址以及内存地址数量确定该图像内存空间相应的句柄信息。Further, the first determining unit 331 is configured to obtain the image memory space, and determine a first address and a number of memory addresses corresponding to the image memory space. The second determining unit 332 is configured to determine corresponding handle information of the image memory space according to the first address and the number of memory addresses.
其中,该第一确定单元331,获取该图像内存空间,确定该图像内存空间对应的内存块;分析每一内存块对应的内存地址,以得到对应的首地址以及内存地址数量。The first determining unit 331 obtains the image memory space and determines the memory block corresponding to the image memory space; and analyzes the memory address corresponding to each memory block to obtain the corresponding first address and the number of memory addresses.
由上述可知,本实施例提供的一种图像信息的传输装置,通过调整单元31调整摄像机应用中相应的软件开发工具包,以使得摄像机应用保存图像的图像内存空间共享给第三方应用;确定单元32获取图像内存空间,确定图像内存空间相应的句柄信息;当加载单元33检测到第三方应用的图像传输指令时,加载句柄信息,以确定对应的图像内存空间;传 输单元34访问图像内存空间,以将图像内存空间中的图像信息传输至第三方应用中。以此在第三方应用调用摄像机应用的图像信息时,可以直接根据句柄信息直接从内存空间中加载摄像机应用存储在的图像信息,避免了跨进程传输带来的不便,节省了图像信息的传输时间,进而提升了图像信息的传输效率。It can be known from the foregoing that the image information transmission device provided in this embodiment adjusts the corresponding software development kit in the camera application through the adjustment unit 31, so that the image memory space of the image saved by the camera application is shared with the third-party application; the determining unit 32 obtains the image memory space and determines the corresponding handle information of the image memory space; when the loading unit 33 detects an image transmission instruction of a third-party application, loads the handle information to determine the corresponding image memory space; the transmission unit 34 accesses the image memory space, To transfer the image information in the image memory space to a third-party application. In this way, when the third-party application calls the image information of the camera application, the image information stored by the camera application can be directly loaded from the memory space according to the handle information, which avoids the inconvenience caused by cross-process transmission and saves the transmission time of image information. , Thereby improving the transmission efficiency of image information.
本申请实施例还提供一种电子设备。请参阅图7,电子设备500包括处理器501以及存储器502。其中,处理器501与存储器502电性连接。An embodiment of the present application further provides an electronic device. Referring to FIG. 7, the electronic device 500 includes a processor 501 and a memory 502. The processor 501 is electrically connected to the memory 502.
该处理器500是电子设备500的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器502内的计算机程序,以及调用存储在存储器502内的数据,执行电子设备500的各种功能并处理数据,从而对电子设备500进行整体监控。The processor 500 is a control center of the electronic device 500, and uses various interfaces and lines to connect various parts of the entire electronic device. The processor 500 runs or loads a computer program stored in the memory 502, and calls data stored in the memory 502 to execute Various functions of the electronic device 500 and data are processed to perform overall monitoring of the electronic device 500.
该存储器502可用于存储软件程序以及模块,处理器501通过运行存储在存储器502的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的计算机程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器501对存储器502的访问。The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running computer programs and modules stored in the memory 502. The memory 502 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, a computer program (such as a sound playback function, an image playback function, etc.) required for at least one function; the storage data area may store data according to Data created by the use of electronic devices, etc. In addition, the memory 502 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may further include a memory controller to provide the processor 501 with access to the memory 502.
在本申请实施例中,电子设备500中的处理器501会按照如下的步骤,将一个或一个以上的计算机程序的进程对应的指令加载到存储器502中,并由处理器501运行存储在存储器502中的计算机程序,从而实现各种功能,如下:In the embodiment of the present application, the processor 501 in the electronic device 500 loads the instructions corresponding to the process of one or more computer programs into the memory 502 according to the following steps, and the processor 501 runs the stored data in the memory 502 A computer program in the computer to achieve various functions, as follows:
调整摄像机应用中相应的软件开发工具包,以使得该摄像机应用保存图像的图像内存空间共享给第三方应用;Adjust the corresponding software development kit in the camera application so that the image memory space of the camera application's saved image is shared with third-party applications;
获取该图像内存空间,确定该图像内存空间相应的句柄信息;Obtain the image memory space, and determine the corresponding handle information of the image memory space;
当检测到第三方应用的图像传输指令时,加载该句柄信息,以确定对应的图像内存空间;When an image transmission instruction of a third-party application is detected, the handle information is loaded to determine the corresponding image memory space;
访问该图像内存空间,以将该图像内存空间中的图像信息传输至第三方应用中。Access the image memory space to transfer the image information in the image memory space to a third-party application.
在某些实施方式中,在确定该图像内存空间相应的句柄信息时,处理器501可以具体执行以下步骤:In some embodiments, when determining the corresponding handle information of the image memory space, the processor 501 may specifically perform the following steps:
确定该图像内存空间对应的首地址以及内存地址数量;Determine the first address and the number of memory addresses corresponding to the image memory space;
根据该首地址以及内存地址数量确定该图像内存空间相应的句柄信息。The corresponding handle information of the image memory space is determined according to the first address and the number of memory addresses.
在某些实施方式中,在确定该图像内存空间对应的首地址以及内存地址数量时,处理器501可以具体执行以下步骤:In some implementations, when determining the first address and the number of memory addresses corresponding to the image memory space, the processor 501 may specifically perform the following steps:
确定该图像内存空间对应的内存块;Determining a memory block corresponding to the image memory space;
分析每一内存块对应的内存地址,以得到对应的首地址以及内存地址数量。Analyze the memory address corresponding to each memory block to obtain the corresponding first address and the number of memory addresses.
在某些实施方式中,在加载该句柄信息,以确定对应的图像内存空间时,处理器501可以具体执行以下步骤:In some embodiments, when loading the handle information to determine the corresponding image memory space, the processor 501 may specifically perform the following steps:
根据该句柄信息中的首地址确定该图像内存空间的起始地址;Determine the starting address of the image memory space according to the first address in the handle information;
基于该起始地址,按照内存地址数量进行遍历,以得到对应的图像内存空间。Based on the starting address, it traverses according to the number of memory addresses to obtain the corresponding image memory space.
在某些实施方式中,在调整摄像机应用中相应的软件开发工具包,以使得该摄像机应用保存图像的图像内存空间共享给第三方应用时,处理器501可以具体执行以下步骤:In some embodiments, when adjusting the corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with the third-party application, the processor 501 may specifically perform the following steps:
通过软件开发工具包对摄像机应用的图像内存空间的访问权限进行调节,开放该摄像机应用的图像内存空间对第三方应用的共享权限。The access right of the image memory space of the camera application is adjusted through the software development kit, and the image memory space of the camera application is shared to the third-party application.
在某些实施方式中,在调整摄像机应用中相应的软件开发工具包,以使得该摄像机应用保存图像的图像内存空间共享给第三方应用时,处理器501可以具体执行以下步骤:In some embodiments, when adjusting the corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with the third-party application, the processor 501 may specifically perform the following steps:
通过对摄像机应用相应的软件开发工具包的编程接口、动态链接库以及导入库进行调整,使得摄像机应用相应的图像内存空间共享给第三方应用。By adjusting the programming interface, dynamic link library, and import library of the corresponding software development kit of the camera application, the corresponding image memory space of the camera application is shared to third-party applications.
在某些实施方式中,在当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间时,处理器501可以具体执行以下步骤:In some embodiments, when an image transmission instruction of a third-party application is detected and the handle information is loaded to determine a corresponding image memory space, the processor 501 may specifically perform the following steps:
当检测到增强现实应用需要调取图像信息时,生成图像传输指令;When it is detected that the AR application needs to retrieve image information, an image transmission instruction is generated;
根据所述图像传输指令加载所述句柄信息,获取图像内存空间相应的内存地址,以确定对应的图像内存空间。Load the handle information according to the image transmission instruction, and obtain a corresponding memory address of the image memory space to determine the corresponding image memory space.
由上述可知,本申请实施例的电子设备,通过调整摄像机应用中相应的软件开发工具包,以使得摄像机应用保存图像的图像内存空间共享给第三方应用;获取图像内存空间,确定图像内存空间相应的句柄信息;当检测到第三方应用的图像传输指令时,加载句柄信息,以确定对应的图像内存空间;访问图像内存空间,以将图像内存空间中的图像信息传输至第三方应用中。以此在第三方应用调用摄像机应用的图像信息时,可以直接根据句柄信息直接从内存空间中加载摄像机应用存储在的图像信息,避免了跨进程传输带来的不便,节省了图像信息的传输时间,进而提升了图像信息的传输效率。It can be known from the foregoing that the electronic device in the embodiment of the present application adjusts the corresponding software development kit in the camera application so that the image memory space of the image saved by the camera application is shared with the third-party application; the image memory space is obtained, and the corresponding image memory space is determined. The handle information is loaded when an image transmission instruction of a third-party application is detected to determine the corresponding image memory space; the image memory space is accessed to transfer the image information in the image memory space to the third-party application. In this way, when the third-party application calls the image information of the camera application, the image information stored by the camera application can be directly loaded from the memory space according to the handle information, which avoids the inconvenience caused by cross-process transmission and saves the transmission time of image information. , Thereby improving the transmission efficiency of image information.
请一并参阅图8,在某些实施方式中,电子设备500还可以包括:显示器503、射频电路504、音频电路505以及电源506。其中,其中,显示器503、射频电路504、音频电路505以及电源506分别与处理器501电性连接。Please refer to FIG. 8 together. In some embodiments, the electronic device 500 may further include a display 503, a radio frequency circuit 504, an audio circuit 505, and a power source 506. Among them, the display 503, the radio frequency circuit 504, the audio circuit 505, and the power supply 506 are electrically connected to the processor 501, respectively.
该显示器503可以用于显示由用户输入的信息或提供给用户的信息以及各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示器503可以包括显示面板,在某些实施方式中,可以采用液晶显示器(Liquid Crystal Display,LCD)、或者有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板。The display 503 may be used to display information input by the user or information provided to the user and various graphical user interfaces. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof. The display 503 may include a display panel. In some embodiments, the display panel may be configured by using a liquid crystal display (Liquid Crystal Display, LCD), or an organic light emitting diode (Organic Light-Emitting Diode, OLED).
该射频电路504可以用于收发射频信号,以通过无线通信与网络设备或其他电子设备 建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 504 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic device through wireless communication, and transmit and receive signals to and from the network device or other electronic device.
该音频电路505可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。The audio circuit 505 may be used to provide an audio interface between the user and the electronic device through a speaker or a microphone.
该电源506可以用于给电子设备500的各个部件供电。在一些实施例中,电源506可以通过电源管理系统与处理器501逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power supply 506 can be used to power various components of the electronic device 500. In some embodiments, the power supply 506 may be logically connected to the processor 501 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system.
尽管图8中未示出,电子设备500还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 8, the electronic device 500 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
本申请实施例还提供一种存储介质,该存储介质存储有计算机程序,当该计算机程序在计算机上运行时,使得该计算机执行上述任一实施例中的图像信息的传输方法,比如:调整摄像机应用中相应的软件开发工具包,以使得摄像机应用保存图像的图像内存空间共享给第三方应用;获取图像内存空间,确定图像内存空间相应的句柄信息;当检测到第三方应用的图像传输指令时,加载句柄信息,以确定对应的图像内存空间;访问图像内存空间,以将图像内存空间中的图像信息传输至第三方应用中。An embodiment of the present application further provides a storage medium. The storage medium stores a computer program. When the computer program runs on a computer, the computer causes the computer to execute the image information transmission method in any of the foregoing embodiments, such as adjusting a camera. The corresponding software development kit in the application, so that the camera application saves the image memory space of the image to the third-party application; obtains the image memory space, determines the corresponding handle information of the image memory space; when the image transmission instruction of the third-party application is detected To load the handle information to determine the corresponding image memory space; access the image memory space to transfer the image information in the image memory space to a third-party application.
在本申请实施例中,存储介质可以是磁碟、光盘、只读存储器(Read Only Memory,ROM,)、或者随机存取记忆体(Random Access Memory,RAM)等。In the embodiment of the present application, the storage medium may be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (Random Access Memory, RAM).
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the description of each embodiment has its own emphasis. For a part that is not described in detail in one embodiment, reference may be made to related descriptions in other embodiments.
需要说明的是,对本申请实施例的图像信息的传输方法而言,本领域普通测试人员可以理解实现本申请实施例的图像信息的传输方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如图像信息的传输方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器、随机存取记忆体等。It should be noted that, for the image information transmission method in the embodiment of the present application, ordinary testers in the art can understand that all or part of the process for implementing the image information transmission method in the embodiment of the present application can be controlled by a computer program. The computer program may be stored in a computer-readable storage medium, such as stored in a memory of an electronic device, and executed by at least one processor in the electronic device. During execution, the program may include, for example, The flow of the embodiment of the image information transmission method. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
对本申请实施例的图像信息的传输装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,所述存储介质譬如为只读存储器,磁盘或光盘等。For the image information transmission device in the embodiment of the present application, its functional modules may be integrated in one processing chip, or each module may exist separately physically, or two or more modules may be integrated in one module. The above integrated modules may be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk. .
以上对本申请实施例所提供的一种图像信息的传输方法、装置、存储介质及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The method, device, storage medium, and electronic device for transmitting image information provided in the embodiments of the present application have been described in detail above. Specific examples are used in this document to explain the principle and implementation of the present application. The description is only used to help understand the method of the application and its core ideas; at the same time, for those skilled in the art, according to the ideas of the application, there will be changes in the specific implementation and application scope. In summary, The contents of this description should not be construed as limiting the present application.

Claims (20)

  1. 一种图像信息的传输方法,其中,包括:A method for transmitting image information, including:
    调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用;Adjusting the corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with the third-party application;
    获取所述图像内存空间,确定所述图像内存空间相应的句柄信息;Acquiring the image memory space and determining corresponding handle information of the image memory space;
    当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间;When an image transmission instruction of a third-party application is detected, loading the handle information to determine a corresponding image memory space;
    访问所述图像内存空间,以将所述图像内存空间中的图像信息传输至第三方应用中。Accessing the image memory space to transmit image information in the image memory space to a third-party application.
  2. 如权利要求1所述的图像信息的传输方法,其中,所述确定所述图像内存空间相应的句柄信息的步骤,包括:The method for transmitting image information according to claim 1, wherein the step of determining handle information corresponding to the image memory space comprises:
    确定所述图像内存空间对应的首地址以及内存地址数量;Determining the first address and the number of memory addresses corresponding to the image memory space;
    根据所述首地址以及内存地址数量确定所述图像内存空间相应的句柄信息。Determining corresponding handle information of the image memory space according to the first address and the number of memory addresses.
  3. 如权利要求2所述的图像信息的传输方法,其中,所述确定所述图像内存空间对应的首地址以及内存地址数量的步骤,包括:The method for transmitting image information according to claim 2, wherein the step of determining a first address and a number of memory addresses corresponding to the image memory space comprises:
    确定所述图像内存空间对应的内存块;Determining a memory block corresponding to the image memory space;
    分析每一内存块对应的内存地址,以得到对应的首地址以及内存地址数量。Analyze the memory address corresponding to each memory block to obtain the corresponding first address and the number of memory addresses.
  4. 如权利要求3所述的图像信息的传输方法,其中,所述加载所述句柄信息,以确定对应的图像内存空间的步骤,包括:The method for transmitting image information according to claim 3, wherein the step of loading the handle information to determine a corresponding image memory space comprises:
    根据所述句柄信息中的首地址确定所述图像内存空间的起始地址;Determining a start address of the image memory space according to a first address in the handle information;
    基于所述起始地址,按照内存地址数量进行遍历,以得到对应的图像内存空间。Traverse according to the number of memory addresses based on the starting address to obtain a corresponding image memory space.
  5. 如权利要求1所述的图像信息的传输方法,其中,所述调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用的步骤,包括:The method for transmitting image information according to claim 1, wherein the step of adjusting a corresponding software development kit in a camera application so that the image memory space of the image saved by the camera application is shared with a third-party application, comprising:
    通过软件开发工具包对摄像机应用的图像内存空间的访问权限进行调节,开放所述摄像机应用的图像内存空间对第三方应用的共享权限。The access right of the image memory space of the camera application is adjusted through the software development kit, and the sharing permission of the image memory space of the camera application to the third-party application is opened.
  6. 如权利要求1所述的图像信息的传输方法,其中,所述调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用的步骤,包括:The method for transmitting image information according to claim 1, wherein the step of adjusting a corresponding software development kit in a camera application so that the image memory space of the image saved by the camera application is shared with a third-party application, comprising:
    通过对摄像机应用相应的软件开发工具包的编程接口、动态链接库以及导入库进行调整,使得摄像机应用相应的图像内存空间共享给第三方应用。By adjusting the programming interface, dynamic link library, and import library of the corresponding software development kit of the camera application, the corresponding image memory space of the camera application is shared to third-party applications.
  7. 如权利要求1所述的图像信息的传输方法,其中,所述第三方应用为增强现实应用,所述当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间的步骤,包括:The method for transmitting image information according to claim 1, wherein the third-party application is an augmented reality application, and when an image transmission instruction of the third-party application is detected, the handle information is loaded to determine a corresponding image Memory space steps, including:
    当检测到增强现实应用需要调取图像信息时,生成图像传输指令;When it is detected that the AR application needs to retrieve image information, an image transmission instruction is generated;
    根据所述图像传输指令加载所述句柄信息,获取图像内存空间相应的内存地址,以确定对应的图像内存空间。Load the handle information according to the image transmission instruction, and obtain a corresponding memory address of the image memory space to determine the corresponding image memory space.
  8. 一种图像信息的传输装置,其中,包括:A device for transmitting image information, comprising:
    调整单元,用于调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用;An adjustment unit, configured to adjust a corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with a third-party application;
    确定单元,用于获取所述图像内存空间,确定所述图像内存空间相应的句柄信息;A determining unit, configured to obtain the image memory space and determine corresponding handle information of the image memory space;
    加载单元,用于当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间;A loading unit, configured to load the handle information when an image transmission instruction of a third-party application is detected to determine a corresponding image memory space;
    传输单元,用于访问所述图像内存空间,以将所述图像内存空间中的图像信息传输至第三方应用中。The transmission unit is configured to access the image memory space to transmit image information in the image memory space to a third-party application.
  9. 如权利要求8所述的图像信息的传输装置,其中,所述确定单元,包括:The image information transmission device according to claim 8, wherein the determining unit comprises:
    第一确定单元,用于获取所述图像内存空间,确定所述图像内存空间对应的首地址以及内存地址数量;A first determining unit, configured to obtain the image memory space, and determine a first address and a number of memory addresses corresponding to the image memory space;
    第二确定单元,用于根据所述首地址以及内存地址数量确定所述图像内存空间相应的句柄信息。A second determining unit is configured to determine corresponding handle information of the image memory space according to the first address and the number of memory addresses.
  10. 如权利要求9所述的图像信息的传输装置,其中,所述第一确定子单元,具体用于:The image information transmission device according to claim 9, wherein the first determining subunit is specifically configured to:
    获取所述图像内存空间,确定所述图像内存空间对应的内存块;Acquiring the image memory space and determining a memory block corresponding to the image memory space;
    分析每一内存块对应的内存地址,以得到对应的首地址以及内存地址数量。Analyze the memory address corresponding to each memory block to obtain the corresponding first address and the number of memory addresses.
  11. 如权利要求10所述的图像信息的传输装置,其中,所述加载单元,具体用于:The image information transmission device according to claim 10, wherein the loading unit is specifically configured to:
    当检测到第三方应用的图像传输指令时,根据所述句柄信息中的首地址确定所述图像内存空间的起始地址;When an image transmission instruction of a third-party application is detected, determining a start address of the image memory space according to a first address in the handle information;
    基于所述起始地址,按照内存地址数量进行遍历,以得到对应的图像内存空间。Traverse according to the number of memory addresses based on the starting address to obtain a corresponding image memory space.
  12. 如权利要求8所述的图像信息的传输装置,其中,所述调整单元,具体用于:The image information transmission device according to claim 8, wherein the adjustment unit is specifically configured to:
    通过软件开发工具包对摄像机应用的图像内存空间的访问权限进行调节,开放所述摄像机应用的图像内存空间对第三方应用的共享权限。The access right of the image memory space of the camera application is adjusted through the software development kit, and the sharing permission of the image memory space of the camera application to the third-party application is opened.
  13. 一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1所述的图像信息的传输方法。A storage medium having stored thereon a computer program, wherein when the computer program is run on a computer, the computer is caused to execute the image information transmission method according to claim 1.
  14. 一种电子设备,包括存储器和处理器,其中,所述处理器通过调用所述存储器中存储的计算机程序,用于执行步骤:An electronic device includes a memory and a processor, wherein the processor executes steps by calling a computer program stored in the memory:
    调整摄像机应用中相应的软件开发工具包,以使得所述摄像机应用保存图像的图像内存空间共享给第三方应用;Adjusting the corresponding software development kit in the camera application, so that the image memory space of the image saved by the camera application is shared with the third-party application;
    获取所述图像内存空间,确定所述图像内存空间相应的句柄信息;Acquiring the image memory space and determining corresponding handle information of the image memory space;
    当检测到第三方应用的图像传输指令时,加载所述句柄信息,以确定对应的图像内存空间;When an image transmission instruction of a third-party application is detected, loading the handle information to determine a corresponding image memory space;
    访问所述图像内存空间,以将所述图像内存空间中的图像信息传输至第三方应用中。Accessing the image memory space to transmit image information in the image memory space to a third-party application.
  15. 如权利要求14所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:The electronic device according to claim 14, wherein the processor is configured to execute the steps by calling the computer program:
    确定所述图像内存空间对应的首地址以及内存地址数量;Determining the first address and the number of memory addresses corresponding to the image memory space;
    根据所述首地址以及内存地址数量确定所述图像内存空间相应的句柄信息。Determining corresponding handle information of the image memory space according to the first address and the number of memory addresses.
  16. 如权利要求15所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:The electronic device according to claim 15, wherein the processor is configured to execute the steps by calling the computer program:
    确定所述图像内存空间对应的内存块;Determining a memory block corresponding to the image memory space;
    分析每一内存块对应的内存地址,以得到对应的首地址以及内存地址数量。Analyze the memory address corresponding to each memory block to obtain the corresponding first address and the number of memory addresses.
  17. 如权利要求16所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:The electronic device of claim 16, wherein the processor executes the steps by calling the computer program:
    根据所述句柄信息中的首地址确定所述图像内存空间的起始地址;Determining a start address of the image memory space according to a first address in the handle information;
    基于所述起始地址,按照内存地址数量进行遍历,以得到对应的图像内存空间。Traverse according to the number of memory addresses based on the starting address to obtain a corresponding image memory space.
  18. 如权利要求14所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:The electronic device according to claim 14, wherein the processor is configured to execute the steps by calling the computer program:
    通过软件开发工具包对摄像机应用的图像内存空间的访问权限进行调节,开放所述摄像机应用的图像内存空间对第三方应用的共享权限。The access right of the image memory space of the camera application is adjusted through the software development kit, and the sharing permission of the image memory space of the camera application to the third-party application is opened.
  19. 如权利要求14所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:The electronic device according to claim 14, wherein the processor is configured to execute the steps by calling the computer program:
    通过对摄像机应用相应的软件开发工具包的编程接口、动态链接库以及导入库进行调整,使得摄像机应用相应的图像内存空间共享给第三方应用。By adjusting the programming interface, dynamic link library, and import library of the corresponding software development kit of the camera application, the corresponding image memory space of the camera application is shared to third-party applications.
  20. 如权利要求14所述的电子设备,其中,所述处理器通过调用所述计算机程序,用于执行步骤:The electronic device according to claim 14, wherein the processor is configured to execute the steps by calling the computer program:
    当检测到增强现实应用需要调取图像信息时,生成图像传输指令;When it is detected that the AR application needs to retrieve image information, an image transmission instruction is generated;
    根据所述图像传输指令加载所述句柄信息,获取图像内存空间相应的内存地址,以确定对应的图像内存空间。Load the handle information according to the image transmission instruction, and obtain a corresponding memory address of the image memory space to determine the corresponding image memory space.
PCT/CN2019/095433 2018-08-27 2019-07-10 Image information transmission method and apparatus, and storage medium and electronic device WO2020042769A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810982933.3A CN109213613B (en) 2018-08-27 2018-08-27 Image information transmission method and device, storage medium and electronic equipment
CN201810982933.3 2018-08-27

Publications (1)

Publication Number Publication Date
WO2020042769A1 true WO2020042769A1 (en) 2020-03-05

Family

ID=64985829

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/095433 WO2020042769A1 (en) 2018-08-27 2019-07-10 Image information transmission method and apparatus, and storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN109213613B (en)
WO (1) WO2020042769A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213613B (en) * 2018-08-27 2020-08-14 Oppo广东移动通信有限公司 Image information transmission method and device, storage medium and electronic equipment
CN110134532A (en) * 2019-05-13 2019-08-16 浙江商汤科技开发有限公司 A kind of information interacting method and device, electronic equipment and storage medium
CN112068968B (en) * 2019-06-11 2022-10-18 成都鼎桥通信技术有限公司 Service access method and device for dual-system terminal
CN111930641A (en) * 2020-07-28 2020-11-13 展讯通信(天津)有限公司 Image data processing method and intelligent equipment
CN112004147A (en) * 2020-08-20 2020-11-27 北京云中融信网络科技有限公司 Video rendering method and device, electronic equipment and storage medium
CN112181340B (en) * 2020-09-29 2022-05-31 联想(北京)有限公司 AR image sharing method and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110131492A1 (en) * 2009-11-27 2011-06-02 Ching-Yao Chen Audio-visual multimedia transmitting/editing device
CN103327278A (en) * 2013-07-10 2013-09-25 亿览在线网络技术(北京)有限公司 Real time sharing method and device of images
CN106708631A (en) * 2016-11-30 2017-05-24 福建省天奕网络科技有限公司 Shared memory property modification method and system
CN109213613A (en) * 2018-08-27 2019-01-15 Oppo广东移动通信有限公司 Transmission method, device, storage medium and the electronic equipment of image information

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070152076A1 (en) * 2004-12-13 2007-07-05 Chiang Kuo C Monitoring system with a wireless transmitting/receiving module
CN107329742B (en) * 2017-06-14 2021-01-29 北京小米移动软件有限公司 Software development kit calling method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110131492A1 (en) * 2009-11-27 2011-06-02 Ching-Yao Chen Audio-visual multimedia transmitting/editing device
CN103327278A (en) * 2013-07-10 2013-09-25 亿览在线网络技术(北京)有限公司 Real time sharing method and device of images
CN106708631A (en) * 2016-11-30 2017-05-24 福建省天奕网络科技有限公司 Shared memory property modification method and system
CN109213613A (en) * 2018-08-27 2019-01-15 Oppo广东移动通信有限公司 Transmission method, device, storage medium and the electronic equipment of image information

Also Published As

Publication number Publication date
CN109213613A (en) 2019-01-15
CN109213613B (en) 2020-08-14

Similar Documents

Publication Publication Date Title
WO2020042769A1 (en) Image information transmission method and apparatus, and storage medium and electronic device
US20210216700A1 (en) Information Processing Method and System
WO2020052337A1 (en) Information processing method and apparatus, storage medium, and electronic device
KR101215230B1 (en) Multi-context graphics processing
US11864248B2 (en) Application function implementation method and electronic device
US20210209404A1 (en) Method for Adjusting Thematic Color, Storage Medium, and Electronic Device
Haris et al. Evolution of android operating system: a review
US11449242B2 (en) Shared storage space access method, device and system and storage medium
US10579129B2 (en) Method, apparatus and storage medium for processing application of mobile terminal and electronic device
US20180196584A1 (en) Execution of multiple applications on a device
WO2020088681A1 (en) Management method for model files and terminal device
WO2021189257A1 (en) Malicious process detection method and apparatus, electronic device, and storage medium
KR102516696B1 (en) Third-party access of end-user device assets
WO2019179068A1 (en) Risk detection method and device, and mobile terminal and storage medium
WO2021098823A1 (en) Memory isolation apparatus, memory isolation method, and related device
WO2020134833A1 (en) Data sharing method, device, equipment and system
WO2019047708A1 (en) Resource configuration method and related product
CN109889468B (en) Network data transmission method, system, device, equipment and storage medium
WO2020215833A1 (en) Offline cache method and apparatus, and terminal and readable storage medium
CN117472321B (en) Audio processing method and device, storage medium and electronic equipment
WO2024078348A1 (en) Method and apparatus for processing registry operation in application porting environment, and medium
WO2021052488A1 (en) Information processing method and electronic device
CN107395737A (en) Access method, apparatus, system and the computer-readable recording medium of Internet resources
US20180300160A1 (en) Host and Component Relationship between Applications
WO2023169157A1 (en) Sub application running method and apparatus, electronic device, program product, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19853945

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19853945

Country of ref document: EP

Kind code of ref document: A1