Method and device for adding image watermark, electronic equipment and storage medium
By establishing a communication channel between QNX and the Android operating system, image watermark addition is realized across operating systems, solving the problem that the existing technology cannot add watermarks to Android application images under the QNX system, and cross-system collaboration between image acquisition and watermark addition is realized.
Patent Information
- Application Number
- CN202311572732.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2025-05-23
AI Technical Summary
The prior art cannot add watermarks to Android application images under the QNX operating system, making it difficult to add image watermarks across operating systems.
By establishing communication channels between different operating systems, responding to the application's acquisition instructions, controlling the camera to acquire the pending image, obtaining the watermark information and adding it to the image, obtaining the target image, and then transmitting the target image to the application.
The image watermark addition across operating systems is realized, allowing the Android system to control the QNX system for image acquisition and watermark addition, solving the problem of adding watermarks to Android application images under the QNX system.
Smart Images

Figure CN120031701A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of vehicle technology, and in particular to a method, device, electronic device and storage medium for adding an image watermark. Background Art
[0002] In order to ensure the security and provability of multimedia content such as images and videos, watermarks are usually added to images or videos, especially to images and videos captured by vehicle-mounted cameras (such as driving recorders). Currently, vehicle-mounted cameras, codec modules, etc. are mainly deployed on the same operating system, such as the Android system. After the vehicle-mounted camera captures the image, the codec module adds a watermark to the image, and the watermarked image is stored in the vehicle terminal, so that the watermark containing information such as time and speed is displayed when the user views the driving record later.
[0003] However, more and more applications in vehicle operating systems include embedded real-time operating systems (Quick UNIX, QNX) systems in the real-time safety domain of the instrument side and Android systems in the entertainment domain (central control screen / co-pilot screen / rear screen), as well as other operating systems such as the power domain and body domain. The QNX system runs components such as driving recorders and codecs. Currently, there is no relevant technology that can add watermarks to Android application images under the QNX operating system, so a method for adding watermarks to images across operating systems is urgently needed. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, device, electronic device and storage medium for adding image watermarks, which can realize adding watermarks to images across operating systems.
[0005] In order to achieve the above objectives, the technical solutions provided by the embodiments of the present disclosure are as follows:
[0006] In a first aspect, the present disclosure provides a method for adding an image watermark, comprising:
[0007] In response to a capture instruction issued by an application, the camera is controlled to capture an image to be processed; wherein the camera and the application run on different operating systems;
[0008] Acquire watermark information, add the watermark information to the image to be processed, and obtain the target image;
[0009] Transfer the target image to the application.
[0010] As an optional implementation of the embodiment of the present disclosure, a communication channel is established between the different operating systems;
[0011] Before controlling the camera to collect the image to be processed in response to the acquisition instruction sent by the application, the method further includes:
[0012] Receiving the start instruction sent by the application through the communication channel;
[0013] In response to the start instruction, controlling the camera to start working;
[0014] Receiving the acquisition instruction sent by the application through the communication channel.
[0015] As an optional implementation manner of the embodiment of the present disclosure, transmitting the target image to the application includes:
[0016] Transmitting the target image to the application through the communication channel for the application to output the target image.
[0017] As an optional implementation manner of the embodiment of the present disclosure, obtaining the watermark information, adding the watermark information to the image to be processed to obtain the target image includes:
[0018] Collecting the vehicle speed signal, motor speed signal, and throttle opening signal through the controller area network bus, and processing to obtain the watermark information, where the watermark information includes the vehicle speed, motor speed, and throttle opening;
[0019] Adding the watermark information to the image to be processed through an encoder to obtain the target image.
[0020] As an optional implementation manner of the embodiment of the present disclosure, the camera runs on an embedded real-time operating system, and the application runs on the Android system.
[0021] As an optional implementation manner of the embodiment of the present disclosure, after obtaining the watermark information, adding the watermark information to the image to be processed to obtain the target image, the method further includes:
[0022] Storing the target image in the window buffer;
[0023] Performing video encoding on the target image through an encoder to obtain bitstream data;
[0024] Transmitting the bitstream data to the application.
[0025] As an optional implementation manner of the embodiment of the present disclosure, after collecting the vehicle speed signal, motor speed signal, and throttle opening signal through the controller area network bus and processing to obtain the watermark information, the method further includes:
[0026] Sending an inquiry request to the in-vehicle terminal, where the inquiry request includes options corresponding to the watermark information;
[0027] Receiving the target option returned by the vehicle terminal;
[0028] The target watermark information corresponding to the target option is added to the image to be processed through an encoder to obtain a target image.
[0029] In a second aspect, the present disclosure provides a device for adding an image watermark, the device comprising:
[0030] A control module, configured to control the camera to acquire the image to be processed in response to an acquisition instruction issued by the application program; wherein the camera and the application program run on different operating systems;
[0031] An adding module is used to obtain watermark information and add the watermark information to the image to be processed to obtain a target image;
[0032] A transmission module is used to transmit the target image to the application.
[0033] As an optional implementation of the embodiment of the present disclosure, a communication channel is established between different operating systems; the control module, in response to the acquisition instruction issued by the application program, controls the camera to acquire the image to be processed before the control module is further used to:
[0034] Receiving an opening instruction sent by the application through the communication channel;
[0035] In response to the start instruction, controlling the camera to start working;
[0036] Receive the collection instruction sent by the application through the communication channel.
[0037] As an optional implementation of the embodiment of the present disclosure, the transmission module is specifically used to: transmit the target image to the application through the communication channel, so that the application outputs the target image.
[0038] As an optional implementation of the embodiment of the present disclosure, the acquisition module is specifically used to: collect a vehicle speed signal, a motor speed signal and a throttle opening signal through a controller area network bus, and process them to obtain watermark information, wherein the watermark information includes the vehicle speed, the motor speed and the throttle opening;
[0039] The watermark information is added to the image to be processed through an encoder to obtain the target image.
[0040] As an optional implementation of the embodiment of the present disclosure, the camera runs on an embedded real-time operating system, and the application runs on an Android system.
[0041] As an optional implementation of the embodiment of the present disclosure, an adding module is also used to: store the target image in a window buffer; perform video encoding on the target image through an encoder to obtain bitstream data; and transmit the bitstream data to the application.
[0042] As an optional implementation of the embodiment of the present disclosure, an adding module, after collecting the vehicle speed signal, the motor speed signal and the throttle opening signal through the controller local area network bus and processing them to obtain the watermark information, is also used to: send an inquiry request to the vehicle terminal, the inquiry request including the option corresponding to the watermark information; receive the target option returned by the vehicle terminal; add the target watermark information corresponding to the target option to the image to be processed through an encoder to obtain the target image.
[0043] In a third aspect, the present disclosure provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for adding an image watermark as described in the first aspect or any one of its optional embodiments is implemented.
[0044] In a fourth aspect, the present disclosure provides a computer-readable storage medium, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for adding an image watermark as described in the first aspect or any optional embodiment thereof is implemented.
[0045] In a fifth aspect, the present disclosure provides a computer program product, including: the computer program product includes a computer program, and when the computer program runs on a computer, the computer implements the method for adding an image watermark as described in the first aspect or any optional embodiment thereof.
[0046] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0047] The embodiments of the present disclosure provide a method, device, electronic device and storage medium for adding image watermarks, wherein the method comprises: first, in response to an acquisition instruction issued by an application, controlling a camera to acquire an image to be processed, wherein the application and the camera are applied to different operating systems, then acquiring watermark information and adding it to the image to be processed to obtain a target image, further transmitting the target image to the application, thereby enabling the operating system running the application to control the operating system running the camera to perform image acquisition and watermark adding, thereby realizing image watermark adding across operating systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0050] Figure 1A A schematic diagram of a method for adding an image watermark according to an embodiment of the present disclosure;
[0051] Figure 1B A schematic diagram of a target image provided by an embodiment of the present disclosure;
[0052] Figure 2 A schematic diagram of the structure of a device for adding an image watermark according to an embodiment of the present disclosure;
[0053] Figure 3 The present invention is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0054] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0055] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the technical terms required to be used in the embodiments or the prior art description are briefly introduced below:
[0057] The embedded real-time operating system (Quick UNIX, QNX) is a commercial, Unix-like real-time operating system that complies with the Portable Operating System Interface of Unix (POSIX) specification. In the cross-domain of high-performance processing and functional safety in the automotive field, QNX is the world's largest commercial operating system provider, with the characteristics of hard real-time, microkernel, modularization, weak coupling, and distribution. QNX is widely used in automotive electronic subsystems such as advanced driver assistance systems, intelligent digital cockpit systems based on virtualization technology, intelligent network modules, intelligent gateways, high-performance computing platforms, and infotainment systems.
[0058] Hypervisor Abstract Communication driver (HAB), the underlying virtual machine driver of QNX and Android, is mainly responsible for virtual address translation. It is implemented using assembly instructions internally in QNX, provides a virtualization API to the upper layer, and encapsulates the interface for upper layer use. The Android side also provides mapping of virtual addresses and physical addresses, thereby enabling hardware resource sharing between physical and virtual machines. HAB is for sharing memory resources.
[0059] DVR (Digital Video Recorder), or digital video recorder, uses hard disk recording compared to traditional analog video recorders, so it is often called a hard disk recorder, also known as a DVR. It is a computer system for image storage and processing, with the functions of long-term image / voice recording, recording, remote monitoring and control. DVR uses digital recording technology, and is far superior to analog monitoring equipment in image processing, image storage, retrieval, backup, network transmission, remote control, etc. DVR represents the development direction of TV monitoring systems and is the preferred product for TV monitoring systems on the market.
[0060] Controller Area Network (CAN) is a serial communication protocol bus for real-time applications. It can use twisted pair cables to transmit signals and is one of the most widely used field buses in the world. The CAN protocol is used for communication between various components in a car.
[0061] At present, the in-vehicle operating systems include the QNX system in the security domain and the Android system in the entertainment domain, as well as other operating systems such as the power domain and the body domain. Among them, the QNX system runs components such as driving recorders and codecs, but there is currently no relevant technology that can add watermarks to Android application images under the QNX operating system. Therefore, a method for adding watermarks to images across operating systems is urgently needed.
[0062] In order to solve the above problems, the embodiments of the present disclosure provide a method, device, electronic device and storage medium for adding image watermarks, wherein the method includes: first responding to an acquisition instruction issued by an application, controlling a camera to acquire an image to be processed, the application and the camera running on different operating systems, then acquiring watermark information and adding it to the image to be processed to obtain a target image, and further transmitting the target image to the application, so that the operating system running the application can control the operating system running the camera to perform image acquisition and watermark adding, thereby realizing image watermark adding across operating systems.
[0063] A method for adding an image watermark provided in an embodiment of the present disclosure can be implemented by an electronic device, and the electronic device includes but is not limited to a vehicle-mounted device, a server, a personal computer, a laptop computer, a tablet computer, a smart phone, etc. The electronic device includes a user device and a network device. Among them, the user device includes but is not limited to a computer, a smart phone, a tablet computer, etc.; the network device includes but is not limited to a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of computers or network servers in cloud computing, wherein cloud computing is a kind of distributed computing, a super virtual computer composed of a group of loosely coupled computer sets. Among them, the electronic device can be operated alone to implement the present disclosure, and can also be connected to the network and implement the present disclosure through interactive operations with other electronic devices in the network. Among them, the network where the electronic device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN) network, etc.
[0064] It should be noted that the protection scope of the method for adding an image watermark described in the embodiment of the present disclosure is not limited to the execution order of the steps listed in the present embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present disclosure are included in the protection scope of the present disclosure.
[0065] like Figure 1A As shown, Figure 1A The figure is a flow chart of a method for adding an image watermark according to an embodiment of the present disclosure. The method can be executed by a device for adding an image watermark, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1AAs shown, the method mainly includes the following steps S101 to S103:
[0066] S101 . In response to a capture instruction issued by an application program, control a camera to capture an image to be processed.
[0067] The application and the camera run on different operating systems. Optionally, the application runs on an Android system, and the camera is applied to a QNX system, and the camera can be a 5-way camera running on the QNX side.
[0068] A communication channel is established between different operating systems. Optionally, a HAB communication channel is established between the Android system and the QNX system. For example, the Android system and the QNX system communicate through the HAB communication channel based on the EGLWindowSurface mechanism. Different operating systems can also communicate based on Ethernet Socket communication, UDP communication, and TCP communication, which is not specifically limited in the present disclosure.
[0069] In some embodiments, before executing step S101, based on the communication channels that have been established in different operating systems, it also includes: receiving a start instruction sent by the application through the communication channel; in response to the start instruction, controlling the camera to start working; receiving a capture instruction sent by the application through the communication channel.
[0070] Specifically, an opening instruction (Open Camera) is received from an application (such as DVR Client) under the Android system through the HAB communication channel, so that the QNX system can start the camera (Camera) in combination with relevant drivers and start working. Then the application under the Android system sends a collection instruction (Start Camera) through the HAB communication channel, so that the QNX system controls the camera to collect images and obtain images to be processed.
[0071] In some embodiments, after executing step S101, the collected image to be processed is preprocessed, including but not limited to: image enhancement, noise reduction, cropping, etc.
[0072] In the above embodiment, in response to a capture instruction issued by an application running on another operating system, the camera running on the operating system is controlled to capture the image to be processed, especially the Android system controls the QNX side camera to capture images, thereby realizing image capture control across operating systems.
[0073] S102: Acquire watermark information, and add the watermark information to the image to be processed to obtain a target image.
[0074] In some embodiments, the camera in the QNX system is connected to the CAN bus. During the execution of step S102, the vehicle speed signal, the motor speed signal and the throttle opening signal are collected through the CAN bus. The CAN bus processes the above signals to obtain watermark information, and the watermark information includes the vehicle speed, the motor speed and the throttle opening. Then, the watermark information is added to the image to be processed through the encoder to obtain the target image, thereby realizing the addition of watermarks to the image across systems.
[0075] The throttle opening refers to the throttle opening, which can be understood as the opening of the accelerator pedal, and the throttle opening can control the amount of fuel injection. The watermark information can also include time information, etc., which is not specifically limited in the present disclosure.
[0076] It should be noted that the CAN bus can also transmit gear signals, steering wheel angles, left and right turn signals, lighting signals, seat belt wearing signals, etc., to process and obtain corresponding watermark information and add it to the image to be processed.
[0077] In some embodiments, after the CAN bus collects and processes the vehicle speed signal, motor speed signal and throttle opening signal to obtain the watermark information, the embodiment of the present disclosure provides an implementation method, sending an inquiry request to the vehicle terminal, the inquiry request including options corresponding to the watermark information, so that the vehicle terminal displays the options corresponding to the watermark information, and allows the user to select the content to be displayed; receiving the target options returned by the vehicle terminal, and then adding the target watermark information corresponding to the target option to the image to be processed through the encoder to obtain the target image, wherein some watermark information can be set to be displayed by default and fixed, and does not support user customization, such as vehicle speed and time, to ensure the proof function of the watermark.
[0078] In some embodiments, in the process of adding watermark information to the image to be processed by an encoder to obtain a target image, the embodiment of the present disclosure provides an implementation method, in which the watermark information is added to a preset area of the image to be processed by the encoder in a preset style to obtain the target image. The preset style includes but is not limited to: a preset font, size, color, transparency, or a preset icon, etc. The preset position is a preset watermark display area, such as the upper right corner of the image. The preset style and preset position support customization.
[0079] In some embodiments, the process of adding watermark information to the image to be processed through an encoder to obtain the target image includes: calling a DVR service, drawing the watermark information on a window (EGLsurface) page through an open graphics library (OpenGL), specifically, EGLsurface includes a window buffer (Buffer), and after obtaining the watermark information, using a codec to add the watermark information to the image to be processed to obtain the target image.
[0080] In some embodiments, after obtaining the target image, the target image is stored in a Buffer in the EGLsurface, and then the video is encoded (codec) through an encoder to obtain code stream data (Output Stream), thereby achieving the addition of a watermark to the video. Optionally, the code stream data can be in H264 format, which is not specifically limited in the present disclosure. It should be noted that EGLsurface represents a surface associated with a platform-specific window, such as a local window or a window provided by a window system. It is typically used to render graphics on the screen. Window surfaces can be created using platform-specific APIs.
[0081] For example, Figure 1B As shown, Figure 1B A schematic diagram of a target image provided by an embodiment of the present disclosure, in which the target image shows a lane line image captured by a camera, and watermark information 11. The watermark information 11 includes: date, time, vehicle speed, steering wheel angle, meeting condition, left lighting, right lighting, left turn signal, right turn signal, fog light, and seat belt wearing condition. Figure 1B This is only an exemplary description, and the specific content and specific display form of the watermark information 11 are not specifically limited in this disclosure.
[0082] S103: Transmit the target image to the application.
[0083] In some embodiments, in the process of transmitting the target image to the application, the target image is transmitted to the application through a communication channel so that the application outputs the target image. Exemplarily, the target image is transmitted to the application through a HAB communication channel.
[0084] In some embodiments, the bitstream data can also be transmitted to the application program. The bitstream data is transmitted to the application program through the HAB communication channel. The bitstream data can be stored in the vehicle terminal by the application program under the Android system, so that the user can view the video with the watermark added on the vehicle terminal, such as the driving record.
[0085] In some embodiments, the present disclosure also supports another operating system controlling the closing of the camera, specifically, receiving a closing instruction sent by an application through a communication channel; and controlling the camera to close in response to the closing instruction. Exemplarily, an application under an Android system sends a closing instruction (Stop Camera) to a QNX system through a HAB communication channel, and the QNX system controls a camera-related driver to close the camera in response to the closing instruction.
[0086] In summary, the disclosed embodiments provide a method for adding image watermarks, which first responds to the acquisition instruction issued by the application, controls the camera to acquire the image to be processed, wherein the application and the camera run on different operating systems, then obtains the watermark information and adds it to the image to be processed to obtain the target image, and further transmits the target image to the application, so that the operating system running the application can control the operating system running the camera to perform image acquisition and watermark addition, thereby realizing image watermark addition across operating systems. It is possible to realize that the Android system controls the QNX system to perform image acquisition and watermark addition, thereby realizing the addition of watermarks to Android application images under the QNX system.
[0087] like Figure 2 As shown, Figure 2 A schematic diagram of a device for adding an image watermark provided in an embodiment of the present disclosure, the device comprising:
[0088] The control module 201 is used to control the camera to collect the image to be processed in response to the collection instruction issued by the application program; wherein the camera and the application program run on different operating systems;
[0089] An adding module 202 is used to obtain watermark information and add the watermark information to the image to be processed to obtain a target image;
[0090] The transmission module 203 is used to transmit the target image to the application.
[0091] As an optional implementation of the embodiment of the present disclosure, a communication channel is established between different operating systems; the control module 201, in response to the acquisition instruction issued by the application program, before controlling the camera to acquire the image to be processed, is further used to:
[0092] Receiving an opening instruction sent by the application through the communication channel;
[0093] In response to the start instruction, controlling the camera to start working;
[0094] Receive the collection instruction sent by the application through the communication channel.
[0095] As an optional implementation of the embodiment of the present disclosure, the transmission module 203 is specifically used to: transmit the target image to the application through the communication channel, so that the application outputs the target image.
[0096] As an optional implementation of the embodiment of the present disclosure, the acquisition module is specifically used to: collect a vehicle speed signal, a motor speed signal and a throttle opening signal through a controller area network bus, and process them to obtain watermark information, wherein the watermark information includes the vehicle speed, the motor speed and the throttle opening;
[0097] The watermark information is added to the image to be processed through an encoder to obtain the target image.
[0098] As an optional implementation of the embodiment of the present disclosure, the camera runs on an embedded real-time operating system, and the application runs on an Android system.
[0099] As an optional implementation of the embodiment of the present disclosure, the adding module 202 is also used to: store the target image in a window buffer; perform video encoding on the target image through an encoder to obtain bitstream data; and transmit the bitstream data to the application.
[0100] As an optional implementation of the embodiment of the present disclosure, the adding module 202, after collecting the vehicle speed signal, the motor speed signal and the throttle opening signal through the controller local area network bus and processing them to obtain the watermark information, is also used to: send an inquiry request to the vehicle terminal, the inquiry request including the option corresponding to the watermark information; receive the target option returned by the vehicle terminal; and add the target watermark information corresponding to the target option to the image to be processed through the encoder to obtain the target image.
[0101] In summary, the disclosed embodiment provides a device for adding image watermarks, which firstly controls the camera to collect the image to be processed in response to the collection instruction issued by the application by the control module, wherein the application and the camera run on different operating systems, and then obtains the watermark information by the adding module and adds it to the image to be processed to obtain the target image, and further transmits the target image to the application through the transmission module, so that the operating system running the application can control the operating system running the camera to perform image collection and watermark addition, thereby realizing image watermark addition across operating systems. It is possible to realize that the Android system controls the QNX system to perform image collection and watermark addition, thereby realizing the addition of watermarks to Android application images under the QNX system.
[0102] like Figure 3 As shown, the embodiment of the present disclosure provides an electronic device, which includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, each process of the method for adding an image watermark in the above method embodiment is implemented. And the same technical effect can be achieved, so it will not be described here to avoid repetition.
[0103] The embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the method for adding an image watermark in the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0104] The computer readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0105] The embodiment of the present disclosure provides a vehicle, which includes: a camera and the aforementioned device for adding an image watermark, or the aforementioned electronic device, wherein the camera may be a driving recorder.
[0106] The embodiment of the present disclosure provides a computer program product, which stores a computer program. When the computer program is executed by a processor, each process of the method for adding an image watermark in the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0107] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0108] In several embodiments provided by the present disclosure, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0109] In the present disclosure, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0110] In the present disclosure, memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0111] In the present disclosure, computer-readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0112] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0113] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for adding image watermarks, It is characterized in that include: In response to a capture instruction issued by an application, control a camera to capture an image to be processed; wherein the camera and the application run on different operating systems; Acquire watermark information, and add the watermark information to the image to be processed to obtain a target image; The target image is transmitted to the application.
2. The method according to claim 1, It is characterized in that A communication channel is established between the different operating systems; Before controlling the camera to collect the image to be processed in response to the collection instruction issued by the application, the method further includes: Receiving an opening instruction sent by the application through the communication channel; In response to the start instruction, controlling the camera to start working; Receive the collection instruction sent by the application through the communication channel.
3. The method according to claim 2, It is characterized in that The transmitting the target image to the application comprises: The target image is transmitted to the application through the communication channel so that the application outputs the target image.
4. The method according to claim 1, It is characterized in that The step of obtaining watermark information and adding the watermark information to the image to be processed to obtain a target image includes: The vehicle speed signal, the motor speed signal and the throttle opening signal are collected through the controller local area network bus, and the watermark information is obtained by processing, wherein the watermark information includes the vehicle speed, the motor speed and the throttle opening; The watermark information is added to the image to be processed through an encoder to obtain the target image.
5. The method according to claim 1, It is characterized in that The camera runs on an embedded real-time operating system, and the application runs on an Android system.
6. The method according to claim 1, It is characterized in that After acquiring the watermark information and adding the watermark information to the image to be processed to obtain the target image, the method further includes: Storing the target image in a window buffer; The target image is encoded by an encoder to obtain code stream data; and the code stream data is transmitted to the application.
7. The method according to claim 4, It is characterized in that After collecting the vehicle speed signal, the motor speed signal and the throttle opening signal through the controller area network bus and processing them to obtain the watermark information, the method further includes: Sending an inquiry request to the vehicle terminal, wherein the inquiry request includes an option corresponding to the watermark information; Receiving the target option returned by the vehicle terminal; The target watermark information corresponding to the target option is added to the image to be processed through an encoder to obtain a target image.
8. A device for adding image watermarks, It is characterized in that include: A control module, configured to control the camera to acquire the image to be processed in response to an acquisition instruction issued by the application program; wherein the camera and the application program run on different operating systems; An adding module is used to obtain watermark information and add the watermark information to the image to be processed to obtain a target image; A transmission module is used to transmit the target image to the application.
9. An electronic device, It is characterized in that include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for adding an image watermark according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, It is characterized in that include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for adding an image watermark according to any one of claims 1 to 7 is implemented.
11. A vehicle, It is characterized in that include: A camera, and the device for adding an image watermark as claimed in claim 8, or an electronic device as claimed in claim 9.