WO2019076156A1 - 数据传输方法及摄像机、电子设备 - Google Patents
数据传输方法及摄像机、电子设备 Download PDFInfo
- Publication number
- WO2019076156A1 WO2019076156A1 PCT/CN2018/104342 CN2018104342W WO2019076156A1 WO 2019076156 A1 WO2019076156 A1 WO 2019076156A1 CN 2018104342 W CN2018104342 W CN 2018104342W WO 2019076156 A1 WO2019076156 A1 WO 2019076156A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- image
- target data
- location
- coaxial
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/08—Systems for the simultaneous or sequential transmission of more than one television signal, e.g. additional information signals, the signals occupying wholly or partially the same frequency band, e.g. by time division
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
- H04N7/183—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a single remote source
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/765—Interface circuits between an apparatus for recording and another apparatus
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/025—Systems for the transmission of digital non-picture data, e.g. of text during the active part of a television frame
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/10—Adaptations for transmission by electrical cable
Definitions
- the present application relates to the field of signal transmission technologies, and in particular, to a data transmission method, a camera, and an electronic device.
- an image acquisition device (such as a camera) can transmit the acquired image to an electronic device, and the electronic device can receive and store the image sent by the image acquisition device, and then display the surveillance video.
- the image capture device can also transmit the coaxial data together to the electronic device while the image is being transmitted.
- Coaxial data is notification information when devices interact with each other.
- the image frame transmitted between the devices may be as shown in FIG. 1, and the image frame includes an effective image area and a blanking area. When an image frame is transmitted, the image is generally used as data of the effective image area, and the coaxial data is used as data of the blanking area.
- the purpose of the embodiment of the present application is to provide a data transmission method, a camera, and an electronic device, which do not need additional wiring to implement transmission of target data.
- the specific technical solution is as follows.
- An embodiment of the present application provides a data transmission method, where the method includes:
- the method before the sending the to-be-sent image and the target data, the method further includes:
- the coaxial data is used as data of the image frame in which the image to be transmitted and the target data are located, and the coaxial data is transmitted according to the third position by using a data transmission manner of the blanking area.
- the step of acquiring the coaxial data to be sent includes:
- Acquiring coaxial data including data representing the second location to be transmitted.
- the location of the data representing the second location in the blanking area of the image frame is before the second location.
- the target data includes a header identifier indicating a starting position of the target data, and a tail identifier indicating a trailing position of the target data.
- the step of acquiring target data to be sent includes:
- the second location is a location after the first location
- the second location is a location before the first location
- the second location is a location before the first location.
- An embodiment of the present application provides a data transmission method, where the method includes:
- the target data is different from the image and the coaxial data Data
- the coaxial data is notification information of interaction between the data receiving end and the data sending end
- the image is acquired from the image frame according to the first position, and the target data is acquired from the image frame according to the second position.
- the method further includes:
- the coaxial data is obtained from the image frame according to the third position.
- the coaxial data is acquired before determining that the target data is in the second position in the effective image area
- Data representing a second location of the target data in the effective image area is acquired from the coaxial data.
- the step of determining the second location of the target data in the effective image area comprises:
- the embodiment of the present application provides a camera, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
- the processor is configured to acquire an image to be sent, acquire target data to be sent, determine a first position of the image to be sent in an effective image area of the image frame, and determine an effective image of the target data in the image frame.
- a second location in the area, the image to be transmitted and the target data are used as data of the same image frame, and the data to be sent is sent according to the first location according to the data transmission mode of the effective image area, according to the The second location sends the target data; wherein the target data is data different from the image to be sent and the coaxial data, and the coaxial data is notification information of interaction between the data receiving end and the data sending end;
- the memory is configured to store an image to be sent and target data acquired by the processor.
- the processor is further configured to: before transmitting the to-be-transmitted image and target data, acquire coaxial data to be sent, and determine the coaxial data in a third position of a blanking area of the image frame. And using the coaxial data as the data of the image frame in which the image to be transmitted and the target data are located, and transmitting the coaxial data according to the third position by using a data transmission manner of the blanking area.
- the acquiring, by the processor, the coaxial data to be sent includes: acquiring coaxial data to be sent that includes data indicating the second location.
- the location of the data representing the second location in the blanking area of the image frame is before the second location.
- the target data includes a header identifier indicating a starting position of the target data, and a tail identifier indicating a trailing position of the target data.
- the acquiring, by the processor, the target data to be sent includes: acquiring target data of environment information of an environment in which the image collection device of the image to be transmitted is to be sent, and/or acquiring a representation to be sent Target data of the audio information collected by the image acquisition device of the image to be transmitted; and/or acquiring target data of the image information representing the image to be transmitted.
- the second location is a location after the first location
- the second location is a location before the first location
- the second location is a location before the first location.
- the embodiment of the present application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
- the processor is configured to receive an image frame, determine a first position of the image in an effective image area of the image frame, and determine a second position of the target data in the effective image area, using data of the effective image area Obtaining a method, acquiring an image from the image frame according to the first location, and acquiring target data from the image frame according to the second location; wherein the target data is different from the image and the coaxial data Data, the coaxial data is notification information of interaction between the data receiving end and the data transmitting end;
- the memory is configured to store an image acquired by the processor and target data.
- the processor is further configured to: after receiving the image frame, determine a third position of the coaxial data in the blanking area of the image frame, and adopt a data acquisition manner of the blanking area, according to the The three positions acquire the coaxial data from the image frame.
- the coaxial data is acquired before determining that the target data is in a second position in the effective image area; the processor determines a second position of the target data in the effective image area, including: Data representing a second position of the target data in the effective image area is acquired in the coaxial data.
- the determining, by the processor, the second location of the target data in the effective image area comprising: determining, from the effective image area of the image frame, a header identifier indicating a starting position of the target data, and indicating the target
- the tail identifier of the end position of the data, the position between the header identifier and the tail identifier and including the header identifier and the tail identifier is used as the second position of the target data in the effective image region.
- the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the data transmission method provided by the embodiment of the present application is implemented.
- the data transmission method includes:
- the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the data transmission method provided by the embodiment of the present application is implemented.
- the data transmission method includes:
- the target data is different from the image and the coaxial data Data
- the coaxial data is notification information of interaction between the data receiving end and the data sending end
- the image is acquired from the image frame according to the first position, and the target data is acquired from the image frame according to the second position.
- the data transmission method and the camera provided by the embodiment of the present application, after acquiring the image to be transmitted and the target data, determining the first position of the image to be transmitted in the effective image area of the image frame and the second position of the target data in the effective image area,
- the image to be transmitted and the target data are data of the same image frame, and the image to be transmitted is transmitted according to the first position, and the target data is transmitted according to the second position.
- the target data is data different from the image to be transmitted and the coaxial data. Therefore, the embodiment of the present application can realize that the target data and the image to be transmitted are sent to the electronic device in the same image frame without additional wiring, thereby saving equipment cost.
- 1 is a schematic structural diagram of an image frame
- FIG. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present application.
- FIG. 3 is a schematic structural diagram of an image frame according to an embodiment of the present application.
- FIG. 3b is a schematic diagram of a transmission frame for an image frame according to an embodiment of the present application.
- FIG. 4 is a schematic flowchart diagram of another data transmission method according to an embodiment of the present disclosure.
- FIG. 5 is a schematic structural diagram of a camera according to an embodiment of the present application.
- FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
- images and coaxial data can only be transmitted between devices through a transmission medium such as a coaxial cable or a twisted pair. If you need to transfer data other than image and coaxial data, you need to route additional.
- the embodiment of the present application provides a data transmission method, a camera, and an electronic device.
- the present application will be described in detail below through specific embodiments.
- FIG. 2 is a schematic flowchart diagram of a data transmission method according to an embodiment of the present application.
- the embodiment is applied to a data sending end, and the data sending end can be a camera, a computer, a smart phone or other device with data processing capability.
- the method includes the following steps S201 to S203:
- Step S201 Acquire an image to be sent, and obtain target data to be sent.
- the target data is data different from the image to be transmitted and the coaxial data.
- the coaxial data is notification information for interaction between the data receiving end and the data transmitting end, and the coaxial data may also be referred to as PTZ data.
- the coaxial data exchanged between the video generating end and the video receiving end may include the coaxial transmitting data sent by the video generating end to the video receiving end, and also The coaxial receiving data sent by the video receiving end to the video generating end may be included.
- the coaxial data may include shooting mode information sent by the camera to the DVR, information ready for upgrade, etc., and may also include a camera.
- Handshake data with the DVR the handshake data can be used to send data indicating device type, image resolution, etc.
- the coaxial data can also include control information sent by the DVR to the camera, the control information can include control instructions for the camera For example, image parameter adjustment command, camera aperture adjustment command, camera rotation adjustment command, resolution switching command, remote upgrade data command, and the like.
- the coaxial data may also include information such as the position of the image to be transmitted in the image frame and the position of the target data in the image frame.
- Coaxial data may or may not be included in the image frame.
- the target data of the environment information of the environment in which the image collection device of the image to be transmitted is located is acquired.
- the target data may be temperature information, humidity information, air pressure information, noise information, negative ion concentration, and the like.
- the image acquisition device may integrate one or more of a temperature sensor, a humidity sensor, a pressure sensor, a noise sensor, a negative ion sensor, etc.; the image acquisition device may also not integrate the above sensor, and the sensor is installed on the sensor The same location.
- the image acquisition device can receive the collected data sent by each sensor.
- the data transmitting end may acquire the target data collected by the sensor inside the image collecting device, or the data transmitting end may directly acquire the target data sent by the sensor.
- the image collecting device can directly acquire the target data sent by the sensor.
- the target data of the audio information collected by the image collection device that is to be sent is obtained.
- the audio information collected by the image collection device may be audio information collected within a preset time period.
- the preset time period may be a continuous time period or a plurality of time periods that are not continuous.
- the preset time period may include a time at which the target data is acquired, or may not include a time at which the target data is acquired.
- the duration of the preset time period may be fixed or variable.
- the target data of the image information representing the image to be transmitted is acquired.
- the image may be an image to be sent, or may be an image acquired before the image to be sent or an image acquired after the image to be sent.
- the image can be one or multiple.
- the image information may include a sub-image obtained from the image that conforms to the preset image feature, and may also include information for describing the sub-image.
- a sub-image may be used to represent a moving object in an image, or to represent an occluded object in the image, or an abnormal condition in the image (eg, image overexposure, blurring, or color distortion, etc.), or, Special scenes in the image (such as objects crossing predetermined boundaries, etc.).
- the object may include a human body, a vehicle, an animal, a building, and the like.
- the information for describing the sub-image may be the number of images corresponding to the sub-image, the image position corresponding to the sub-image, or the like, or an image encoding format, a video encoding format, private information, or the like.
- the image encoding format may include jpg, bmp, etc.
- the video encoding format may include H264, H265, and the like.
- the private information can be understood as any information that is not disclosed, for example, information on the usage rights of the image collection device.
- the target data to be transmitted may be acquired, and the target data of the data to be transmitted other than the image to be transmitted and the coaxial data may be acquired.
- This embodiment does not limit the specific information contained in the target data.
- the target data type may be an image type, a video type, or other types.
- Step S202 determining a first position of the image to be transmitted in the effective image area of the image frame, and determining a second position of the target data in the effective image area of the image frame.
- the first preset position when determining the first position of the image to be transmitted in the effective image area of the image frame, the first preset position may be determined as the first position in the effective image area of the image frame of the image to be transmitted, preset The position includes the start position and the end position. It is also possible to determine the first position of the image to be transmitted in the effective image area of the image frame according to the amount of data of the image to be transmitted.
- the first position of the image to be transmitted in the effective image area of the image frame may be determined as:
- the first preset initial position starts to a first end position; wherein the first end position is: a position obtained by adding a data amount of the image to be transmitted to the first preset initial position.
- the first preset initial position and the first end position are both located in the effective image area.
- the second preset position may be determined as the second position of the target data in the effective image area. It is also possible to determine the second position of the target data in the effective image area based on the amount of data of the target data.
- the second position of the target data in the effective image area may be determined as: starting from the second preset initial position, to a second end position; wherein the second end position is: a position obtained by adding a data amount of the target data to the second preset initial position.
- the second preset initial position and the second end position are both located in the effective image area.
- the second position may be a fixed position of the effective image area of the image frame, or may be an unfixed position.
- the second position of the target data in the effective image area may be a position other than the position of the image to be transmitted in the effective image area.
- the second location may be a location of a partial area other than the location of the image to be transmitted in the effective image area, or may be a location of all the areas of the effective image area except the location of the image to be transmitted. No specific restrictions.
- the resolution specification of the image frame transmitted by the data transmitting end and the data receiving end can be improved, and a low specification resolution can be transmitted using a high specification transmission frequency.
- the transmission parameters of 4MP30 can be used to transmit data originally transmitted using the transmission parameters of 2MP30.
- the transmission parameter xMPy can be understood as transmitting y frames of x megapixels of data per second.
- the data receiving end and the data sending end may pre-arrange the second location, so that the data receiving end can acquire the target data according to the agreed second location, and improve the accuracy when acquiring the target data.
- the target data may include a header identifier indicating a start position of the target data, and a tail identifier indicating a trailing position of the target data.
- the starting position of the target data may be determined according to the header identifier
- the end position of the target data is determined according to the tail identifier.
- the target data is acquired from the effective image area based on the determined start position of the target data and the end position of the target data, so that the target data can be accurately acquired when the second position is not fixed.
- the flexibility of transmitting target data is relatively large.
- the header identifier may be a first preset bit string, and the tail identifier may be a second preset bit string.
- the first first predetermined number of bits of the target data may be a first preset bit string, and the second second predetermined number of bits of the target data may be a second preset bit string.
- the amount of data in the effective image area is much larger than the amount of data in the blanking area. If a part of the effective image area is allocated to the target data, the target data may be data of a large amount of data, for example, the data may be an image, a video, an audio, or the like.
- Step S203 The image to be transmitted and the target data are used as the data of the same image frame, and the data transmission mode of the effective image area is used, the image to be transmitted is sent according to the first location, and the target data is transmitted according to the second location.
- the image to be transmitted and the target data are transmitted to the electronic device at the back end through the same image frame, and the image and the target data can be transmitted through the same cable.
- the data transmission mode may include an analog signal transmission form and a digital signal transmission form.
- the data transmission mode of the effective image area may be an analog signal transmission form or a digital signal transmission form.
- the data transmission mode of the blanking area is a digital signal transmission form.
- the target data may be transmitted in the form of a digital signal or in the form of an analog signal.
- the target data in order to make the accuracy of the transmitted target data higher, the target data may be transmitted in the form of a digital signal.
- the image to be transmitted can be transmitted in the form of an analog signal, which makes the transmitted image information richer.
- the data in the image frame may be transmitted in the form of a data stream row by row, or the data in the image frame may be transmitted in the form of a data stream column by column.
- the data receiving end may parse the image frame according to a preset data storage rule to obtain an image and target data in the image frame.
- the embodiment determines that the image to be transmitted is in the first position of the effective image area of the image frame and the target data is in the second position of the effective image area, and the image to be sent is
- the target data is data of the same image frame, and the image to be transmitted is transmitted according to the first position, and the target data is transmitted according to the second position.
- the target data is data different from the image to be transmitted and the coaxial data. Therefore, the embodiment can realize that the target data and the image to be transmitted are sent to the electronic device in the same image frame without additional wiring, thereby saving equipment cost.
- the target data may be carried in all the image frames, or the target data may be carried in the partial image frames.
- the image frame carrying the image to be transmitted and the target data in the effective image area may be transmitted to the data receiving end.
- the image frame in which the effective image area carries the image to be transmitted and the effective image area does not carry the target data may be sent to the data receiving end.
- the method may further include the following steps 1 to 2:
- Step 1 Obtain the coaxial data to be transmitted, and determine the third position of the coaxial data in the blanking area of the image frame.
- the image frame includes an image to be transmitted, target data, and coaxial data.
- Determining the coaxial data in the third position of the blanking area of the image frame may include: determining a third preset position in the blanking area of the image frame as the third position of the coaxial data. For example, the positions of the second to fourth lines preset in the blanking area may be determined as the third position.
- the blanking area may further include a location of the coaxial data sent by the data receiving end to the data sending end, where the location may be a location different from the third location in the blanking area.
- the blanking area includes a field blanking area and a line blanking area.
- the third position may be located in the field blanking area, or in the line blanking area, or part of the presence blanking area, and the other part in the blanking area.
- the amount of storable data of the field blanking area is greater than the amount of storable data of the line blanking area, so the third position can be determined from the field blanking area to improve the storable coaxial data. The amount of data.
- This step 1 may be performed before step S202, or may be performed after step S202, which is not specifically limited in this application.
- the step of acquiring the coaxial data to be sent may include: acquiring coaxial data including the data indicating the second location to be transmitted.
- the data receiving end and the data transmitting end can pre-arrange the third position, so that when the data receiving end acquires the coaxial data, the third position can be acquired according to the agreed third position.
- the second location may be determined according to the data indicating the second location included in the coaxial data, and the target data is acquired from the second location, thereby improving accuracy when acquiring the target data.
- the coaxial data may further include other data than the data indicating the second location, which is not specifically limited in the present application.
- Step 2 The coaxial data is used as the data of the image frame to be sent and the image data of the target data, and the data transmission mode of the blanking area is adopted, and the coaxial data is transmitted according to the third position.
- the data transmission mode of the blanking area is a digital signal transmission mode, and the digital signal transmission mode of the blanking area may be adopted, and the coaxial data is transmitted according to the third position.
- FIG. 3a is a schematic diagram of data corresponding to an effective image area and a blanking area of an image frame.
- the middle solid rectangle area is an effective image area, and the effective image area is divided into two parts by a broken line, one part is the area where the image to be sent is located, and the other part is the area where the target data is located.
- the portion outside the effective image area is the blanking area, and the blanking area is the area where the coaxial data is located.
- FIG. 3b is a transmission architecture diagram of a data transmitting end transmitting an image frame to a data receiving end.
- an image frame includes an image, coaxial data, and target data.
- the embodiment can obtain the coaxial data, and send the to-be-sent image, the target data, and the coaxial data as the data of the same image frame to the data receiving end, so that the data receiving end receives the image to be transmitted, the target data, and the same image frame. Coaxial data to improve data transmission efficiency.
- the position of the data representing the second location in the blanking area of the image frame may be located before the second location.
- the third position is located before the second position, so that the data indicating the second position is ensured before the position of the blanking area of the image frame is located at the second position.
- the coaxial data may be located in a blanking area above the active image area such that the position of the data at the second location in the blanking region of the image frame is before the second position in the active image area.
- the data receiving end acquires data according to the data acquisition manner from the front to the back when receiving the data carried by the image frame, the data indicating the second position is located before the second position in the blanking area of the image frame, so that the data receiving end can make the data in the blanking area of the image frame
- the data receiving end first acquires the data indicating the second position in the coaxial data, and then obtains the target data from the effective image area according to the data representing the second position, thereby improving the efficiency of acquiring the target data.
- the target data may be multiple types of data, for example, data representing environment information, data representing audio information, and data representing image information. data.
- the second position can be set in advance according to the relationship between the above type data and the image.
- the second location may be a location after the first location.
- the second location is a location before the first location.
- the second position is a position before the first position.
- the data representing the audio information and the data representing the image information have a large correlation with the image, and belong to data that can be acquired before the image, and the part of the data can be located before the first position in the effective image area;
- the data of the environmental information has a relatively small correlation with the image, and belongs to data that can be acquired after the image, and this part of the data can be located after the first position in the effective image area.
- the data receiving end acquires the data according to the data acquisition manner from the front to the back when receiving the data carried by the image frame, the data acquired before the image is first acquired, and the data can be processed after the data is acquired, for example, for example, Determining the target image from the image according to the data, so as to display the target image as soon as possible for the user to view, the target image may be an avatar of the stranger, an image of the suspicious vehicle, or the like; or the image may be processed according to the data, for example, determining There is an abnormality in the monitoring video, prompting the user to pay attention to the monitoring video, or enabling the data receiving end to enable the recording function.
- the data sending end is a camera
- the data receiving end is a Digital Video Recorder (DVR).
- the camera can acquire three types of data: image data, target data, and coaxial data.
- the obtained three kinds of data can be stored in the cache in the form of a digital signal.
- the corresponding data is obtained from the cache according to the determined first position, the second position, and the third position.
- the data transmitting end transmits the acquired data in the form of a data stream line by line according to the data in the image frame.
- the image to be transmitted needs to be transmitted when the first position is reached, the image data in the form of a digital signal is read from the buffer, and the image data is converted into an analog signal and sent to the DVR.
- the target data in the form of a digital signal is read from the cache, and the target data is transmitted to the DVR.
- the coaxial data in the form of a digital signal is read from the buffer, and the coaxial data is transmitted to the DVR.
- the front and rear positions of the first position, the second position, and the third position in the same image frame may include multiple cases, which is not specifically limited in the present application.
- an image to be transmitted may be superimposed on an effective image area in an analog signal manner, and coaxial data may be superimposed on a blanking area in a digital signal manner.
- the resolution images of each specification have their corresponding transmission parameters, and the higher resolution images can use higher transmission parameters.
- the transmission parameter can be 2MP30, which can be understood as an image of 2 million pixels transmitted 30 frames per second.
- higher resolution transmission parameters can be used to transmit lower resolution images.
- 4MP30 transmission parameters can be used to transmit image frames that could originally be transmitted with 2MP30 transmission parameters.
- the coaxial data remains unchanged in the original transmission mode, and the image to be transmitted occupies a part of the effective image area, and the target data occupies another partial area of the effective image area.
- the image to be transmitted can still be transmitted in the form of an analog signal, and the target data can be transmitted as a digital signal or an analog signal.
- the data transmitting end can agree with the data receiving end on the storage location of the target data in the image frame.
- the storage location of the target data in the image frame may also be placed in the coaxial data.
- the data receiving end can relatively easily parse the storage location from the coaxial data.
- the data transmission mode provided in this embodiment can make corresponding image data exist in each image frame, so the real-time and synchronization of the data is good, and the amount of data that can be stored is also relatively large.
- the embodiment does not limit the transmission material.
- the transmission material may be a coaxial cable, a twisted pair or other materials, and no additional wiring is required, thereby reducing equipment costs.
- a company installed an analog camera with motion detection at the gate.
- a moving object such as a person or a vehicle passes through the area detected by the camera
- the camera generates corresponding information (ie, target data) including whether there is currently a moving object, the coordinates of the moving object in the image, and the like.
- the specific process is as follows.
- the smart module built into the camera intelligently processes the image captured by the camera.
- the smart module detects a human face in the currently appearing scene image, it generates the current number of faces and the position of the face in the image. Further, the smart module of the camera can map the image according to the position information, so that each person's face generates a separate jpg picture.
- the camera detects the number of faces, the face position, and the jpg picture as the data of the effective image area of the specified image frame, and the effective image area of the specified image frame further includes the image to be transmitted.
- the current camera is a smart camera with a face capture function
- the current target data includes face detection data
- the data of the effective image area of the current image frame contains the image to be sent and Target data.
- the DVR parses the coaxial data, determines that the current image frame carries the target data and the image data, and then searches for the target data from the effective image area, and stores the face images after reading the target data to provide subsequent customers. Find face data and determine if there are suspicious people and so on.
- FIG. 4 is a schematic flowchart diagram of another data transmission method according to an embodiment of the present application.
- the method is applied to a data receiving end, and the data receiving end can be a computer, a smart phone or other electronic device with data processing capability.
- the method includes the following steps S401 to S403:
- Step S401 Receive an image frame.
- receiving an image frame can be understood as receiving an image frame sent by the data sending end.
- the image frame may be data received via a coaxial cable or a twisted pair.
- Step S402 determining a first position of the image in the effective image area of the image frame, and determining a second position of the target data in the effective image area.
- the target data is data different from the image and the coaxial data
- the coaxial data is the notification information of interaction between the data receiving end and the data sending end.
- This coaxial data can also be referred to as PTZ data.
- the coaxial data exchanged between the video generating end and the video receiving end may include the coaxial transmitting data sent by the video generating end to the video receiving end, and also The coaxial receiving data sent by the video receiving end to the video generating end may be included.
- the coaxial data may also include information such as the position of the image to be transmitted in the image frame and the position of the target data in the image frame.
- Coaxial data may or may not be included in the image frame.
- determining a first position of the image in the effective image area of the image frame, and determining the second position of the target data in the effective image area, the first position and/or the second position may be determined according to the agreed position position. This method can improve the accuracy of obtaining target data.
- the method may further include:
- the header identifier may be a first preset bit string, and the tail identifier may be a second preset bit string.
- the first first predetermined number of bits of the target data may be a first preset bit string, and the second second predetermined number of bits of the target data may be a second preset bit string.
- Step S403 Using the data acquisition mode of the effective image area, acquiring an image from the image frame according to the first position, and acquiring the target data from the image frame according to the second position.
- the data acquisition mode of the effective image area may be an analog signal acquisition form or a digital signal acquisition form.
- the data acquisition method of the blanking area is a digital signal acquisition form.
- the present embodiment can realize acquiring images and target data from the same image frame without additional wiring, thereby saving cost.
- the method may further include the following steps 1 and 2:
- Step 1 Determine the third position of the coaxial data in the blanking area of the image frame.
- the step may specifically include: determining a third position of the coaxial data in the blanking area of the image frame according to the agreed position.
- the agreed position may be a preset line in the blanking area, for example, lines 2 to 4 in the blanking area.
- the third position may be before the second position or after the second position.
- the third position may be before the first position or after the first position.
- Positioning forward or backward can be understood as the analysis of the image frame in order from top to bottom, with the top position being the top and the back position being the bottom. For example, in FIG. 3a, when the data receiving end parses the image frame line by line from top to bottom, the upper line is in the forward position compared to the lower line.
- Step 2 Using the data acquisition mode of the blanking area, the coaxial data is obtained from the image frame according to the third position.
- the step may be: adopting a digital signal acquisition form of the blanking area, and acquiring coaxial data from the image frame according to the third position.
- the image frame in this embodiment includes coaxial data, and after receiving the image frame, the third position of the coaxial data in the blanking area of the image frame may be determined, and the data acquisition manner of the blanking area is adopted, according to the The three positions acquire coaxial data from the image frame, and can receive images, target data, and coaxial data through the same image frame, thereby improving data transmission efficiency.
- the coaxial data is acquired before determining that the target data is in the second position in the effective image area; and step S402 is to determine the second position of the target data in the effective image area, Can include:
- Data representing the second position of the target data in the effective image area is acquired from the coaxial data.
- the position of the target data in the effective image area may not be a fixed position.
- the second location of the target data can be obtained from the coaxial data, thereby acquiring the target data according to the second location, and improving the accuracy when acquiring the target data.
- the target data After the target data is acquired, the target data can also be stored. In this way, the user can be queried from the stored target data for the required data.
- FIG. 5 is a schematic structural diagram of a camera according to an embodiment of the present application. This embodiment corresponds to the method embodiment shown in FIG. 2.
- the camera includes: a processor 501, a communication interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 complete communication with each other through the communication bus 504;
- the processor 501 is configured to acquire an image to be sent, acquire target data to be sent, determine a first position of the image to be transmitted in an effective image area of the image frame, and determine a second target image in the effective image area of the image frame. Position, the image to be transmitted and the target data are used as data of the same image frame, and the data transmission mode of the effective image area is adopted, the image to be transmitted is transmitted according to the first position, and the target data is transmitted according to the second position; wherein the target data is different from the target data Transmitting image and coaxial data data, and the coaxial data is notification information for interaction between the data receiving end and the data transmitting end;
- the memory 502 is configured to store the to-be-sent image and the target data acquired by the processor 501.
- the memory can be specifically cached.
- the processor 501 in the embodiment shown in FIG. 5 may specifically acquire coaxial data to be transmitted and determine coaxial data in an image frame before transmitting the image to be transmitted and the target data.
- the third position of the blanking area; the coaxial data is used as the data of the image frame to be transmitted and the image data of the target data, and the data transmission mode of the blanking area is adopted, and the coaxial data is transmitted according to the third position.
- the processor 501 acquires the coaxial data to be sent, including: acquiring coaxial data including data indicating the second location to be transmitted.
- the position of the data representing the second position in the blanking area of the image frame is located before the second position.
- the target data in the embodiment shown in FIG. 5, includes a header identifier indicating a starting position of the target data, and a tail identifier indicating a trailing position of the target data.
- the processor 501 acquires target data to be sent, including: acquiring a target of environmental information of an environment in which the image collection device of the image to be transmitted is to be sent. Data; and/or, acquiring target data of audio information collected by an image acquisition device representing an image to be transmitted; and/or acquiring target data of image information representing an image to be transmitted.
- the second location is a location after the first location; and when the target data is data representing audio information.
- the second position is a position before the first position; when the target data is data indicating image information, the second position is a position before the first position.
- the above-mentioned camera embodiment is obtained based on the method embodiment, and has the same technical effect as the method. Therefore, the technical effects of the camera embodiment are not described herein again.
- the description is relatively simple, and the relevant part can be referred to the description of the method embodiment shown in FIG. 2.
- FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. This embodiment corresponds to the method embodiment shown in FIG.
- the electronic device includes: a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604;
- the processor 601 is configured to receive an image frame, determine a first position of the image in the effective image area of the image frame, and determine a second position of the target data in the effective image area, and adopt a data acquisition manner of the effective image area, according to the A position acquires an image from an image frame, and acquires target data from the image frame according to the second position; wherein the target data is data different from the image and the coaxial data, and the coaxial data is an interaction between the data receiving end and the data transmitting end. Notification information;
- the memory 602 is configured to store an image acquired by the processor 601 and target data.
- the processor 601 in the embodiment shown in FIG. 6 is further configured to determine, after receiving the image frame, the third position of the coaxial data in the blanking area of the image frame. And adopting a data acquisition manner of the blanking area, and acquiring the coaxial data from the image frame according to the third position.
- the coaxial data is acquired before determining the second position of the target data in the effective image area; the processor 601 determines that the target data is in the effective image area.
- the second location in the method includes: obtaining, from the coaxial data, data indicating a second location of the target data in the effective image area.
- the processor 601 determines the second location of the target data in the effective image area, including: determining the target data from the effective image area of the image frame. a header identifier of a starting position, and a tail identifier indicating a trailing position of the target data, and a position between the header identifier and the tail identifier and including the header identifier and the tail identifier as a second position of the target data in the effective image region .
- the electronic device may be a DVR device, and the DVR device may include: a digital-to-analog (AD) conversion module, a main chip, a display, an interface, and a hard disk.
- the main chip may include a digital signal processing (DSP) encoding module, a DSP decoding module, and a CPU.
- the hard disk can be a ROM memory.
- the electronic device can perform live webcast on the image data in the received image frame.
- the above-mentioned electronic device embodiment is obtained based on the method embodiment, and has the same technical effect as the method. Therefore, the technical effects of the electronic device embodiment are not described herein again.
- the description is relatively simple, and the relevant part can be referred to the description of the method embodiment shown in FIG.
- the communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
- PCI Peripheral Component Interconnect
- EISA Extended Industry Standard Architecture
- the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
- the communication interface is used for communication between the above devices and other devices.
- the memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
- RAM random access memory
- NVM non-volatile memory
- the memory may also be at least one storage device located away from the aforementioned processor.
- the processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), an ARM (Advanced RISC Machines) processor, etc.; or a digital signal processor (Digital) Signal Processing (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
- CPU central processing unit
- NP network processor
- ARM Advanced RISC Machines
- DSP Digital Signal Processing
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- the embodiment of the present application further provides a computer readable storage medium.
- the computer readable storage medium stores a computer program.
- the data transmission method includes:
- the embodiment can realize that the target data and the image to be transmitted are sent to the electronic device in the same image frame without additional wiring, thereby saving equipment cost.
- the embodiment of the present application further provides a computer readable storage medium.
- the computer readable storage medium stores a computer program.
- the data transmission method includes:
- the target data is different from the image and the coaxial data Data
- the coaxial data is notification information of interaction between the data receiving end and the data sending end
- the image is acquired from the image frame according to the first position, and the target data is acquired from the image frame according to the second position.
- the present embodiment can realize acquiring images and target data from the same image frame without additional wiring, thereby saving cost.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Closed-Circuit Television Systems (AREA)
- Studio Devices (AREA)
Abstract
本申请实施例提供了一种数据传输方法及摄像机、电子设备。该方法包括:获取待发送图像,获取待发送的目标数据,确定待发送图像在图像帧的有效图像区中的第一位置,以及确定目标数据在图像帧的有效图像区中的第二位置,将待发送图像以及目标数据作为同一图像帧的数据,采用有效图像区的数据发送方式,按照第一位置发送待发送图像,按照第二位置发送所述目标数据;其中,目标数据为不同于待发送图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息。应用本申请实施例提供的方案,能够实现将目标数据和待发送图像以同一图像帧发送至电子设备,无需另外布线,从而能够节省设备成本。
Description
本申请要求于2017年10月20日提交中国专利局、申请号为201710985838.4、发明名称为“数据传输方法及摄像机、电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及信号传输技术领域,特别是涉及一种数据传输方法及摄像机、电子设备。
在监控系统中,图像采集设备(例如摄像机)可以将采集的图像发送至电子设备,电子设备可以接收并存储图像采集设备发送的图像,然后显示监控录像。在发送图像的同时,图像采集设备还可以将同轴数据一起发送至电子设备。同轴数据为设备之间交互时的通知信息。设备之间发送的图像帧可以如图1所示,该图像帧包括有效图像区和消隐区。在发送图像帧时,通常将图像作为有效图像区的数据,将同轴数据作为消隐区的数据。
相关技术中,在传输上述图像帧时,设备之间通常采用同轴电缆或双绞线进行传输。若需要传输图像及同轴数据之外的目标数据,则会在设备之间另外布线。但是这种方式增加了设备成本。
发明内容
本申请实施例的目的在于提供了一种数据传输方法及摄像机、电子设备,无需另外布线,以实现对目标数据的传输。具体的技术方案如下。
本申请实施例提供了一种数据传输方法,所述方法包括:
获取待发送图像,获取待发送的目标数据;其中,所述目标数据为不同于所述待发送图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息;
确定所述待发送图像在图像帧的有效图像区中的第一位置,以及确定所述目标数据在图像帧的有效图像区中的第二位置;
将所述待发送图像以及所述目标数据作为同一图像帧的数据,采用有效图像区的数据发送方式,按照所述第一位置发送所述待发送图像,按照所述第二位置发送所述目标数据。
可选的,在发送所述待发送图像和目标数据之前,所述方法还包括:
获取待发送的同轴数据,以及确定所述同轴数据在图像帧的消隐区的第 三位置;
将所述同轴数据作为与所述待发送图像和目标数据所在图像帧的数据,采用消隐区的数据发送方式,按照所述第三位置发送所述同轴数据。
可选的,所述获取待发送的同轴数据的步骤,包括:
获取待发送的包括表示所述第二位置的数据的同轴数据。
可选的,所述表示所述第二位置的数据在图像帧的消隐区中的位置,位于所述第二位置之前。
可选的,所述目标数据包括表示所述目标数据的起始位置的头标识,以及表示所述目标数据的末尾位置的尾标识。
可选的,所述获取待发送的目标数据的步骤,包括:
获取待发送的表示所述待发送图像的图像采集设备所处环境的环境信息的目标数据;和/或,
获取待发送的表示所述待发送图像的图像采集设备采集的音频信息的目标数据;和/或,
获取待发送的表示图像的图像信息的目标数据。
可选的,当所述目标数据为表示环境信息的数据时,所述第二位置为位于所述第一位置之后的位置;
当所述目标数据为表示音频信息的数据时,所述第二位置为位于所述第一位置之前的位置;
当所述目标数据为表示图像信息的数据时,所述第二位置为位于所述第一位置之前的位置。
本申请实施例提供了一种数据传输方法,所述方法包括:
接收图像帧;
确定图像在所述图像帧的有效图像区中的第一位置,以及确定目标数据在所述有效图像区中的第二位置;其中,所述目标数据为不同于所述图像和同轴数据的数据,所述同轴数据为数据接收端和数据发送端之间交互的通知信息;
采用有效图像区的数据获取方式,按照所述第一位置从所述图像帧中获取图像,按照所述第二位置从所述图像帧中获取目标数据。
可选的,在接收图像帧之后,所述方法还包括:
确定同轴数据在所述图像帧的消隐区中的第三位置;
采用消隐区的数据获取方式,按照所述第三位置从所述图像帧中获取所 述同轴数据。
可选的,所述同轴数据为在确定目标数据在所述有效图像区中的第二位置之前获取;
所述确定目标数据在所述有效图像区中的第二位置的步骤,包括:
从所述同轴数据中获取表示目标数据在所述有效图像区中的第二位置的数据。
可选的,所述确定目标数据在所述有效图像区中的第二位置的步骤,包括:
从所述有效图像区中确定表示目标数据的起始位置的头标识,以及表示目标数据的末尾位置的尾标识,将所述头标识和尾标识之间且包含所述头标识和尾标识的位置,作为所述目标数据在所述有效图像区中的第二位置。
本申请实施例提供了一种摄像机,包括:处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
所述处理器,用于获取待发送图像,获取待发送的目标数据,确定所述待发送图像在图像帧的有效图像区中的第一位置,以及确定所述目标数据在图像帧的有效图像区中的第二位置,将所述待发送图像以及所述目标数据作为同一图像帧的数据,采用有效图像区的数据发送方式,按照所述第一位置发送所述待发送图像,按照所述第二位置发送所述目标数据;其中,所述目标数据为不同于所述待发送图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息;
所述存储器,用于存储所述处理器获取的待发送图像和目标数据。
可选的,所述处理器,还用于在发送所述待发送图像和目标数据之前,获取待发送的同轴数据,以及确定所述同轴数据在图像帧的消隐区的第三位置;将所述同轴数据作为与所述待发送图像和目标数据所在图像帧的数据,采用消隐区的数据发送方式,按照所述第三位置发送所述同轴数据。
可选的,所述处理器获取待发送的同轴数据,包括:获取待发送的包括表示所述第二位置的数据的同轴数据。
可选的,所述表示所述第二位置的数据在图像帧的消隐区中的位置,位于所述第二位置之前。
可选的,所述目标数据包括表示所述目标数据的起始位置的头标识,以及表示所述目标数据的末尾位置的尾标识。
可选的,所述处理器获取待发送的目标数据,包括:获取待发送的表示所述待发送图像的图像采集设备所处环境的环境信息的目标数据;和/或,获取待发送的表示所述待发送图像的图像采集设备采集的音频信息的目标数据;和/或,获取待发送的表示图像的图像信息的目标数据。
可选的,当所述目标数据为表示环境信息的数据时,所述第二位置为位于所述第一位置之后的位置;
当所述目标数据为表示音频信息的数据时,所述第二位置为位于所述第一位置之前的位置;
当所述目标数据为表示图像信息的数据时,所述第二位置为位于所述第一位置之前的位置。
本申请实施例提供了一种电子设备,包括:处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
所述处理器,用于接收图像帧,确定图像在所述图像帧的有效图像区中的第一位置,以及确定目标数据在所述有效图像区中的第二位置,采用有效图像区的数据获取方式,按照所述第一位置从所述图像帧中获取图像,按照所述第二位置从所述图像帧中获取目标数据;其中,所述目标数据为不同于所述图像和同轴数据的数据,所述同轴数据为数据接收端和数据发送端之间交互的通知信息;
所述存储器,用于存储所述处理器获取的图像和目标数据。
可选的,所述处理器,还用于在接收图像帧之后,确定同轴数据在所述图像帧的消隐区中的第三位置,采用消隐区的数据获取方式,按照所述第三位置从所述图像帧中获取所述同轴数据。
可选的,所述同轴数据为在确定目标数据在所述有效图像区中的第二位置之前获取;所述处理器确定目标数据在所述有效图像区中的第二位置,包括:从所述同轴数据中获取表示目标数据在所述有效图像区中的第二位置的数据。
可选的,所述处理器确定目标数据在所述有效图像区中的第二位置,包括:从所述图像帧的有效图像区中确定表示目标数据的起始位置的头标识,以及表示目标数据的末尾位置的尾标识,将所述头标识和尾标识之间且包含所述头标识和尾标识的位置,作为所述目标数据在所述有效图像区中的第二位置。
本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例提供的数据传输方法。该数据传输方法包括:
获取待发送图像,获取待发送的目标数据;其中,所述目标数据为不同于所述待发送图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息;
确定所述待发送图像在图像帧的有效图像区中的第一位置,以及确定所述目标数据在图像帧的有效图像区中的第二位置;
将所述待发送图像以及所述目标数据作为同一图像帧的数据,采用有效图像区的数据发送方式,按照所述第一位置发送所述待发送图像,按照所述第二位置发送所述目标数据。
本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例提供的数据传输方法。该数据传输方法包括:
接收图像帧;
确定图像在所述图像帧的有效图像区中的第一位置,以及确定目标数据在所述有效图像区中的第二位置;其中,所述目标数据为不同于所述图像和同轴数据的数据,所述同轴数据为数据接收端和数据发送端之间交互的通知信息;
采用有效图像区的数据获取方式,按照所述第一位置从所述图像帧中获取图像,按照所述第二位置从所述图像帧中获取目标数据。
本申请实施例提供的数据传输方法及摄像机,在获取待发送图像和目标数据之后,确定待发送图像在图像帧的有效图像区的第一位置以及目标数据在有效图像区的第二位置,将待发送图像以及目标数据作为同一图像帧的数据,按照第一位置发送待发送图像,按照第二位置发送目标数据。其中,目标数据为不同于待发送图像和同轴数据的数据。因此,本申请实施例可以实现将目标数据与待发送图像以同一图像帧发送至电子设备,无需另外布线,能够节省设备成本。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍。显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为图像帧的一种结构示意图;
图2为本申请实施例提供的一种数据传输方法的流程示意图;
图3a为本申请实施例提供的图像帧的一种结构示意图;
图3b为本申请实施例提供的针对图像帧的一种传输框架示意图;
图4为本申请实施例提供的另一种数据传输方法的流程示意图;
图5为本申请实施例提供的摄像机的一种结构示意图;
图6为本申请实施例提供的电子设备的一种结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整的描述。显然,所描述的实施例仅仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。
在相关技术中,设备之间只能通过同轴电缆或双绞线等传输介质传输图像和同轴数据。如果需要传输除了图像和同轴数据之外的数据,则需要另外布线。
为了避免另外布线,实现对目标数据的传输,本申请实施例提供了一种数据传输方法及摄像机、电子设备。下面通过具体实施例,对本申请进行详细说明。
图2为本申请实施例提供的一种数据传输方法的流程示意图。该实施例应用于数据发送端,该数据发送端可以为摄像机、计算机、智能手机或其他具有数据处理能力的设备。该方法包括如下步骤S201~步骤S203:
步骤S201:获取待发送图像,获取待发送的目标数据。
其中,目标数据为不同于待发送图像和同轴数据的数据。同轴数据为数据接收端和数据发送端之间交互的通知信息,该同轴数据也可以称为PTZ数据。当数据发送端和数据接收端分别为视频生成端和视频接收端时,视频生成端和视频接收端之间交互的同轴数据可以包括视频生成端向视频接收端发送的同轴发送数据,也可以包括视频接收端向视频生成端发送的同轴接收数据。例如,当视频生成端为摄像机,视频接收端为硬盘录像机(Digital Video Recorder,DVR)时,同轴数据可以包括摄像机向DVR发送的拍摄模式信息、升级时准备就绪的信息等,也可以包括摄像机与DVR之间的握手数据,该握 手数据可以用于发送表示设备类型、图像分辨率的数据等;同轴数据还可以包括DVR向摄像机发送的控制信息,该控制信息可以包括针对摄像机的控制指令,例如图像参数调节指令、摄像机光圈调节指令、摄像机旋转调节指令、分辨率切换指令、远程升级数据指令等。同轴数据还可以包括待发送图像在图像帧中的位置以及目标数据在图像帧中的位置等信息。
图像帧中可以包括同轴数据,也可以不包括同轴数据。
在本步骤中,获取待发送的目标数据时,可以包括以下方式中的至少一种:
方式一,获取待发送的表示待发送图像的图像采集设备所处环境的环境信息的目标数据。
例如,本实施方式中目标数据可以为温度信息、湿度信息、气压信息、噪声信息、负离子浓度等。对应的,图像采集设备内部可以集成了温度传感器、湿度传感器、气压传感器、噪声传感器、负离子传感器等传感器中的一种或多种;图像采集设备也可以不集成上述传感器,而与上述传感器安装于同一位置。
图像采集设备可以接收各个传感器发送的采集数据。
当作为执行主体的数据发送端不为图像采集设备时,数据发送端可以获取图像采集设备内部的传感器采集的目标数据,或者,数据发送端可以直接获取传感器发送的目标数据。
当作为执行主体的数据发送端为图像采集设备时,图像采集设备可以直接获取传感器发送的目标数据。
方式二,获取待发送的表示待发送图像的图像采集设备采集的音频信息的目标数据。
其中,图像采集设备采集的音频信息可以为在预设时段内采集的音频信息。预设时段可以是连续的一个时段,也可以是不连续的多个时段。该预设时段可以包括获取目标数据的时刻,也可以不包括获取目标数据的时刻。预设时段的时长可以是固定的,也可以是可变的。
方式三,获取待发送的表示图像的图像信息的目标数据。
其中,上述图像可以为待发送图像,也可以为待发送图像之前获取的图像或者待发送图像之后获取的图像。图像可以为一个,也可以为多个。图像信息可以包括从图像中获得的符合预设图像特征的子图像,也可以包括用于描述子图像的信息。例如,子图像可以用于表示图像中的运动物体,或者, 表示图像中的被遮挡物体,或者,图像中的异常情况(例如,图像过度曝光、模糊不清或颜色失真等),或者,表示图像中的特殊场景(例如物体越过预定界限等)。其中,物体可以包括人体、车辆、动物、建筑等。用于描述子图像的信息,可以为子图像对应的图像个数、子图像对应的图像位置等,或者,图像编码格式、视频编码格式、私有信息等。图像编码格式可以包括jpg、bmp等,视频编码格式可以包括H264、H265等。私有信息可以理解为任意不对外公开的信息,例如,图像采集设备使用权限的信息等。
除了上述几种方式中获取的目标数据之外,获取待发送的目标数据,还可以为获取待发送的除了待发送图像和同轴数据之外的其他数据的目标数据。本实施例对目标数据包含的具体信息不做限定。
在本实施方式中,目标数据类型可以是图像类型、视频类型或其他类型。
步骤S202:确定待发送图像在图像帧的有效图像区中的第一位置,以及确定目标数据在该图像帧的有效图像区中的第二位置。
在本步骤中,确定待发送图像在图像帧的有效图像区中的第一位置时,可以将第一预设位置确定为待发送图像在图像帧的有效图像区中的第一位置,预设位置包括起始位置和末尾位置。也可以根据待发送图像的数据量,确定待发送图像在图像帧的有效图像区中的第一位置。
根据待发送图像的数据量,确定待发送图像在图像帧的有效图像区中的第一位置时,具体可以为,将待发送图像在图像帧的有效图像区中的第一位置确定为:从第一预设初始位置开始,到第一末尾位置;其中,第一末尾位置为:第一预设初始位置加待发送图像的数据量后得到的位置。第一预设初始位置和第一末尾位置均位于有效图像区。
在本步骤中,确定目标数据在有效图像区中的第二位置时,可以将第二预设位置确定为目标数据在有效图像区中的第二位置。也可以根据目标数据的数据量,确定目标数据在有效图像区中的第二位置。
根据目标数据的数据量,确定目标数据在有效图像区中的第二位置时,具体可以为,将目标数据在有效图像区中的第二位置确定为:从第二预设初始位置开始,到第二末尾位置;其中,第二末尾位置为:第二预设初始位置加目标数据的数据量后得到的位置。第二预设初始位置和第二末尾位置均位于有效图像区。
上述第二位置可以是图像帧有效图像区的固定位置,也可以是不固定的位置。当有效图像区中待发送图像的位置是固定位置时,目标数据在有效图 像区的第二位置可以是有效图像区中除待发送图像的位置之外的位置。例如,第二位置可以为有效图像区中除待发送图像的位置之外的部分区域的位置,也可以为有效图像区中除待发送图像的位置之外的全部区域的位置,本申请对此不做具体限定。
为了能够在有效图像区中同时传输图像数据和目标数据,可以提高数据发送端与数据接收端传输的图像帧的分辨率规格,可以使用高规格的传输频率来传输低规格的分辨率。例如,可以使用4MP30的传输参数来传输原来用2MP30的传输参数传输的数据。其中,传输参数xMPy可以理解为,每秒传输y帧x百万像素的数据。在使用4MP30的传输参数传输数据时,有效图像区传输的行数增加了,每一行能够传输的数据量也增加了,因此在传输图像数据时,可以使有效图像区出现大片的闲置区,这些闲置区可以用来存储目标数据。
当第二位置为固定的位置时,数据接收端和数据发送端可以预先约定第二位置,从而使数据接收端可以按照约定的第二位置获取目标数据,提高获取目标数据时的准确性。
当第二位置为不固定的位置时,目标数据可以包括表示目标数据的起始位置的头标识,以及表示目标数据的末尾位置的尾标识。这样,当数据接收端在获取目标数据时,可以根据上述头标识确定目标数据的起始位置,根据上述尾标识确定目标数据的末尾位置。根据确定的目标数据的起始位置和目标数据的末尾位置,从有效图像区获取目标数据,从而在第二位置不固定时能够准确地获取目标数据。这种实施方式中目标数据发送时的灵活性比较大。
其中,头标识可以为第一预设比特串,尾标识可以为第二预设比特串。目标数据的前第一预设数量个比特位可以为第一预设比特串,目标数据的后第二预设数量个比特位可以为第二预设比特串。
在图像帧中,有效图像区的数据量远大于消隐区的数据量。如果将有效图像区的一部分分配给目标数据,则目标数据可以为数据量很大的数据,例如该数据可以为图像、视频、音频等。
步骤S203:将待发送图像以及目标数据作为同一图像帧的数据,采用有效图像区的数据发送方式,按照第一位置发送待发送图像,按照第二位置发送目标数据。
在本实施例中,将待发送图像和目标数据通过同一图像帧发送至后端的电子设备,可以通过同一线缆实现对图像和目标数据的发送。
数据发送方式,可以包括模拟信号发送形式和数字信号发送形式。有效图像区的数据发送方式,可以为模拟信号发送形式或数字信号发送形式。消隐区的数据发送方式为数字信号发送形式。
在本步骤中,目标数据可以以数字信号的形式发送,也可以以模拟信号的形式发送。在一种具体实施方式中,为了使传输的目标数据的准确性更高,可以采用数字信号的形式发送目标数据。待发送图像可以以模拟信号的形式发送,这样可以使传输的图像信息更丰富。
在发送上述图像帧时,可以将图像帧中的数据逐行地以数据流的形式进行发送,也可以将图像帧中的数据逐列地以数据流的形式进行发送。
数据接收端在接收到数据发送端发送的图像帧时,可以按照预设的数据存储规则,对图像帧进行解析,获得图像帧中的图像和目标数据。
由上述内容可知,本实施例在获取待发送图像和目标数据之后,确定待发送图像在图像帧的有效图像区的第一位置以及目标数据在有效图像区的第二位置,将待发送图像以及目标数据作为同一图像帧的数据,按照第一位置发送待发送图像,按照第二位置发送目标数据。其中,目标数据为不同于待发送图像和同轴数据的数据。因此,本实施例可以实现将目标数据与待发送图像以同一图像帧发送至电子设备,无需另外布线,能够节省设备成本。
在数据发送端向数据接收端发送的大量图像帧中,可以在所有图像帧中均携带目标数据,也可以在部分图像帧中携带目标数据。当获取到目标数据时,可以将有效图像区携带待发送图像和目标数据的图像帧发送至数据接收端。当没有获取到目标数据时,可以将有效图像区携带待发送图像、有效图像区不携带目标数据的图像帧发送至数据接收端。
在本申请的另一实施例中,图2所示实施例中,在发送待发送图像和目标数据之前,该方法还可以包括以下步骤1~步骤2:
步骤1:获取待发送的同轴数据,以及确定同轴数据在图像帧的消隐区的第三位置。
本实施例中,图像帧中包括待发送图像、目标数据和同轴数据。
确定同轴数据在图像帧的消隐区的第三位置时,可以包括:将图像帧的消隐区中的第三预设位置确定为同轴数据的第三位置。例如,可以将消隐区中预设的第2行到第4行的位置确定为第三位置。在另一种实施方式中,消隐区中还可以包括数据接收端向数据发送端发送的同轴数据的位置,该位置可以为消隐区中不同于第三位置的位置。
消隐区包括场消隐区和行消隐区。第三位置可以位于场消隐区,也可以位于行消隐区,也可以一部分在场消隐区,另一部分在行消隐区。在一种具体实施方式中,场消隐区的可存储数据量大于行消隐区的可存储数据量,因此可以从场消隐区中确定第三位置,以提高可存储的同轴数据的数据量。
本步骤1可以在步骤S202之前执行,也可以在步骤S202之后执行,本申请对此不作具体限定。
当第二位置不是固定位置时,获取待发送的同轴数据的步骤,可以包括:获取待发送的包括表示第二位置的数据的同轴数据。
由于同轴数据的第三位置可以为固定位置,数据接收端和数据发送端可以预先约定第三位置,从而在数据接收端获取同轴数据时,可以按照约定的第三位置获取。在获取同轴数据之后,可以根据同轴数据中包括的表示第二位置的数据,确定第二位置,从第二位置中获取目标数据,提高获取目标数据时的准确性。
在本实施例中,同轴数据还可以包括除了表示第二位置的数据之外的其他数据,本申请对此不作具体限定。
步骤2:将同轴数据作为与待发送图像和目标数据所在图像帧的数据,采用消隐区的数据发送方式,按照第三位置发送同轴数据。
本步骤中,消隐区的数据发送方式为数字信号发送形式,可以采用消隐区的数字信号发送方式,按照第三位置发送同轴数据。
作为一个例子,图3a为图像帧的有效图像区和消隐区所对应的数据的一种示意图。其中,中间实线矩形框区为有效图像区,有效图像区由虚线分割成两部分,其中一部分为待发送图像的位置所在区域,另一部分为目标数据的位置所在区域。有效图像区之外的部分为消隐区,消隐区为同轴数据的位置所在区域。
作为一个例子,图3b为数据发送端向数据接收端发送图像帧的一种传输架构图。其中,一个图像帧中包括图像、同轴数据和目标数据。
可见,本实施例可以获取同轴数据,将待发送图像、目标数据和同轴数据作为同一图像帧的数据发送至数据接收端,使数据接收端通过同一图像帧接收待发送图像、目标数据和同轴数据,提高数据传输效率。
在上述实施例的一种具体实施方式中,表示第二位置的数据在图像帧的消隐区中的位置,可以位于第二位置之前。
本实施例具体可以为,第三位置位于第二位置之前,这样可以保证表示 第二位置的数据在图像帧的消隐区的位置位于第二位置之前。
例如,在图3a中,同轴数据可以位于有效图像区上方的消隐区中,这样表示第二位置的数据在图像帧的消隐区中的位置位于有效图像区中第二位置之前。
如果数据接收端在接收图像帧携带的数据时,按照从前向后的数据获取方式获取数据,则使表示第二位置的数据在图像帧的消隐区中的位置位于第二位置之前,能够使数据接收端先获取同轴数据中表示第二位置的数据,然后可以根据该表示第二位置的数据从有效图像区中获取目标数据,从而提高获取目标数据的效率。
在本申请的另一实施例中,在图2所示实施例中,目标数据可以为多种类型的数据,例如,可以为表示环境信息的数据,表示音频信息的数据,以及表示图像信息的数据。可以根据上述类型数据与图像的关系预先设置第二位置。
具体的,当目标数据为表示环境信息的数据时,第二位置可以为位于第一位置之后的位置。
当目标数据为表示音频信息的数据时,第二位置为位于第一位置之前的位置。
当目标数据为表示图像信息的数据时,第二位置为位于第一位置之前的位置。
本实施例中,认为表示音频信息的数据和表示图像信息的数据与图像的相关性较大,属于可以在图像之前获取的数据,这部分数据可以位于有效图像区中第一位置之前;认为表示环境信息的数据与图像的相关性比较小,属于可以在图像之后获取的数据,这部分数据可以位于有效图像区中第一位置之后。
这样,如果数据接收端在接收图像帧携带的数据时,按照从前向后的数据获取方式获取数据,则先获取可以在图像之前获取的数据,获取该数据之后即可以对该数据进行处理,例如,根据该数据从图像中确定目标图像,以便尽快地显示目标图像,供用户查看,目标图像可以为陌生人的头像、可疑车辆的图像等;或者可以根据该数据对图像进行处理,例如,确定监控视频中存在异常,提示用户注意监控视频,或者使数据接收端开启录像功能等。
下面结合具体实例对本申请再做详细说明。
数据发送端为摄像机,数据接收端为硬盘录像机(Digital Video Recorder, DVR)。摄像机可以获取三种数据:图像数据、目标数据、同轴数据。获取的这三种数据均可以以数字信号的形式存储在缓存中,在图像帧的发送周期到来时,按照确定的第一位置、第二位置和第三位置,从缓存中获取对应的数据。数据发送端按照图像帧中的数据逐行地以数据流的形式对获取的数据进行发送。在到达第一位置时即需要发送待发送图像时,从缓存中读取数字信号形式的图像数据,将该图像数据转换为模拟信号的形式,发送至DVR。在到达第二位置时即需要发送目标数据时,从缓存中读取数字信号形式的目标数据,将目标数据发送至DVR。在到达第三位置时即需要发送同轴数据时,从缓存中读取数字信号形式的同轴数据,将同轴数据发送至DVR。上述第一位置、第二位置和第三位置在同一图像帧中的前后位置可以包括多种情况,本申请对此不作具体限定。
在相关技术中,待发送图像可以以模拟信号的方式叠加在有效图像区,而同轴数据可以以数字信号的方式叠加在消隐区。每种规格的分辨率图像均存在其对应的传输参数,较高分辨率的图像可以使用较高的传输参数。传输参数可以为2MP30,该参数可以理解为每秒传输30帧200万像素的图像。在本实施例中,可以使用更高规格的传输参数来传输较低分辨率的图像,例如可以使用4MP30的传输参数来传输原来可以用2MP30的传输参数来传输的图像帧。这样,图像帧的有效图像区会存在大片的闲置区,这些闲置区可以用来传输目标数据。
在本实施例中,同轴数据仍然保持原来的传输方式不变,而待发送图像占用有效图像区的一部分区域,目标数据占用有效图像区的另一部分区域。待发送图像可以仍然以模拟信号的方式来传送,目标数据可以以数字信号或模拟信号的方式来传送。数据发送端可以与数据接收端约定目标数据在图像帧中的存储位置。或者,也可以将目标数据在图像帧中的存储位置放置在同轴数据中。数据接收端可以比较容易地从同轴数据中解析出该存储位置。
本实施例提供的数据传输方式,可以使每一图像帧均存在相应的目标数据,因此数据的实时性和同步性较好,可存储的数据量也比较大。本实施例也不限制传输材料,传输材料可以为同轴线缆、双绞线或其他材料,无需另外布线,减少了设备成本。
下面结合具体实例对本申请的应用场景再做详细说明。
某公司在大门口安装了一个带有移动侦测功能的模拟相机。当相机检测的区域中有人、车辆等运动的物体经过时,相机会生成相应的信息(即目标 数据),该信息包括:当前是否有移动的物体,移动的物体在图像中的坐标等。
具体的流程如下。相机内置的智能模块会针对相机采集的图像进行智能处理,当智能模块检测到当前出现的场景图像中有人脸时,会生成当前人脸的个数以及人脸在图像中的位置。进一步地,相机的智能模块可以根据这些位置信息去图像中抠图,使每一个人脸生成一个独立的jpg图片。相机将检测的人脸个数、人脸位置以及jpg图片作为指定图像帧的有效图像区的数据,指定图像帧的有效图像区中还包括待发送图像。同时,在同轴数据中增加以下描述:当前相机为带人脸抓图功能的智能相机,当前目标数据中包含人脸侦测数据,并且当前图像帧的有效图像区的数据包含待发送图像和目标数据。DVR收到图像帧信号后解析同轴数据,确定当前图像帧携带目标数据和图像数据后,则从有效图像区查找目标数据,读取目标数据后会将这些人脸图像进行存储,提供后续客户查找人脸数据并确定是否有可疑人物等用途。
图4为本申请实施例提供的另一种数据传输方法的流程示意图。该方法应用于数据接收端,该数据接收端可以为计算机、智能手机或其他具有数据处理能力的电子设备。该方法包括以下步骤S401~步骤S403:
步骤S401:接收图像帧。
具体的,接收图像帧,可以理解为接收数据发送端发送的图像帧。该图像帧可以是通过同轴线缆或双绞线接收的数据。
步骤S402:确定图像在图像帧的有效图像区中的第一位置,以及确定目标数据在该有效图像区中的第二位置。
其中,目标数据为不同于图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息。
该同轴数据也可以称为PTZ数据。当数据发送端和数据接收端分别为视频生成端和视频接收端时,视频生成端和视频接收端之间交互的同轴数据可以包括视频生成端向视频接收端发送的同轴发送数据,也可以包括视频接收端向视频生成端发送的同轴接收数据。同轴数据还可以包括待发送图像在图像帧中的位置以及目标数据在图像帧中的位置等信息。
图像帧中可以包括同轴数据,也可以不包括同轴数据。
在本步骤中,确定图像在图像帧的有效图像区中的第一位置,以及确定目标数据在有效图像区中的第二位置时,可以根据约定的位置确定该第一位置和/或第二位置。这种方式能够提高获取目标数据时的准确性。
当目标数据包括表示目标数据的起始位置的头标识,以及表示目标数据 的末尾位置的尾标识时,在确定目标数据在有效图像区中的第二位置时,还可以包括:
从有效图像区中确定表示目标数据的起始位置的头标识,以及表示目标数据的末尾位置的尾标识,将头标识和尾标识之间且包含头标识和尾标识的位置,作为目标数据在有效图像区中的第二位置。这种方式能够准确地确定目标数据的位置,并且目标数据发送时位置的灵活性比较大。
其中,头标识可以为第一预设比特串,尾标识可以为第二预设比特串。目标数据的前第一预设数量个比特位可以为第一预设比特串,目标数据的后第二预设数量个比特位可以为第二预设比特串。
步骤S403:采用有效图像区的数据获取方式,按照第一位置从图像帧中获取图像,按照第二位置从图像帧中获取目标数据。
其中,有效图像区的数据获取方式,可以为模拟信号获取形式或数字信号获取形式。消隐区的数据获取方式为数字信号获取形式。
可见,本实施例可以在接收到图像帧之后,确定图像在图像帧的有效图像区中的第一位置,以及确定目标数据在有效图像区中的第二位置,采用有效图像区的数据获取方式,按照第一位置获取图像,按照第二位置获取目标数据。因此,本实施例可以实现从同一图像帧中获取图像和目标数据,无需另外布线,从而能够节省成本。
在本申请的另一实施例中,图4所示实施例中的步骤S401之后,即在接收图像帧之后,该方法还可以包括以下步骤1和步骤2:
步骤1:确定同轴数据在图像帧的消隐区中的第三位置。
本步骤具体可以包括:根据约定的位置确定同轴数据在图像帧的消隐区中的第三位置。约定的位置可以为消隐区中的预设行,例如,消隐区中的第2行到第4行。
其中,第三位置可以在第二位置之前,也可以在第二位置之后。第三位置可以在第一位置之前,也可以在第一位置之后。位置靠前或靠后,可以理解为按照从上到下的顺序对图像帧进行解析时,上方为靠前位置,下方为靠后位置。例如,在图3a中,数据接收端按照从上到下逐行地对图像帧进行解析时,上方的行相比于下方的行为靠前位置。
步骤2:采用消隐区的数据获取方式,按照第三位置从图像帧中获取同轴数据。
本步骤具体可以为,采用消隐区的数字信号获取形式,按照第三位置从 图像帧中获取同轴数据。
可见,本实施例的图像帧中包括同轴数据,可以在接收到图像帧之后,确定同轴数据在图像帧的消隐区中的第三位置,采用消隐区的数据获取方式,按照第三位置从图像帧中获取同轴数据,能够通过同一图像帧接收图像、目标数据和同轴数据,提高数据传输效率。
在上述实施例的另一实施方式中,同轴数据为在确定目标数据在有效图像区中的第二位置之前获取;步骤S402,即确定目标数据在有效图像区中的第二位置的步骤,可以包括:
从同轴数据中获取表示目标数据在有效图像区中的第二位置的数据。
在本实施例中,目标数据在有效图像区中的位置可以不是固定位置。这样,针对每个图像帧,可以从同轴数据中获取目标数据的第二位置,从而根据第二位置获取目标数据,提高获取目标数据时的准确性。
在获取目标数据之后,还可以存储目标数据。这样,可以使用户从存储的目标数据中查询需要的数据。
图5为本申请实施例提供的摄像机的一种结构示意图。该实施例与图2所示方法实施例相对应。该摄像机包括:处理器501、通信接口502、存储器503和通信总线504,其中,处理器501,通信接口502,存储器503通过通信总线504完成相互间的通信;
处理器501,用于获取待发送图像,获取待发送的目标数据,确定待发送图像在图像帧的有效图像区中的第一位置,以及确定目标数据在图像帧的有效图像区中的第二位置,将待发送图像以及目标数据作为同一图像帧的数据,采用有效图像区的数据发送方式,按照第一位置发送待发送图像,按照第二位置发送目标数据;其中,目标数据为不同于待发送图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息;
存储器502,用于存储处理器501获取的待发送图像和目标数据。存储器具体可以为缓存。
在本申请的另一实施例中,图5所示实施例中的处理器501,具体可以在发送待发送图像和目标数据之前,获取待发送的同轴数据,以及确定同轴数据在图像帧的消隐区的第三位置;将同轴数据作为与待发送图像和目标数据所在图像帧的数据,采用消隐区的数据发送方式,按照第三位置发送同轴数据。
在本申请的另一实施例中,在图5所示实施例中,处理器501获取待发 送的同轴数据,包括:获取待发送的包括表示所述第二位置的数据的同轴数据。
在本申请的另一实施例中,图5所示实施例中,表示第二位置的数据在图像帧的消隐区中的位置,位于第二位置之前。
在本申请的另一实施例中,图5所示实施例中,目标数据包括表示目标数据的起始位置的头标识,以及表示目标数据的末尾位置的尾标识。
在本申请的另一实施例中,图5所示实施例中,处理器501获取待发送的目标数据,包括:获取待发送的表示待发送图像的图像采集设备所处环境的环境信息的目标数据;和/或,获取待发送的表示待发送图像的图像采集设备采集的音频信息的目标数据;和/或,获取待发送的表示图像的图像信息的目标数据。
在本申请的另一实施例中,图5所示实施例中,当目标数据为表示环境信息的数据时,第二位置为位于第一位置之后的位置;当目标数据为表示音频信息的数据时,第二位置为位于第一位置之前的位置;当目标数据为表示图像信息的数据时,第二位置为位于第一位置之前的位置。
由于上述摄像机实施例是基于方法实施例得到的,与该方法具有相同的技术效果,因此该摄像机实施例的技术效果在此不再赘述。对于摄像机实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见图2所示方法实施例的部分说明即可。
图6为本申请实施例提供的电子设备的一种结构示意图。该实施例与图4所示方法实施例相对应。该电子设备包括:处理器601、通信接口602、存储器603和通信总线604,其中,处理器601,通信接口602,存储器603通过通信总线604完成相互间的通信;
处理器601,用于接收图像帧,确定图像在图像帧的有效图像区中的第一位置,以及确定目标数据在有效图像区中的第二位置,采用有效图像区的数据获取方式,按照第一位置从图像帧中获取图像,按照第二位置从图像帧中获取目标数据;其中,目标数据为不同于图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息;
存储器602,用于存储处理器601获取的图像和目标数据。
在本申请的另一实施例中,图6所示实施例中的处理器601,还可以用于在接收图像帧之后,确定同轴数据在所述图像帧的消隐区中的第三位置,采用消隐区的数据获取方式,按照所述第三位置从所述图像帧中获取所述同轴 数据。
在本申请的另一实施例中,图6所示实施例中,同轴数据为在确定目标数据在有效图像区中的第二位置之前获取;处理器601确定目标数据在所述有效图像区中的第二位置,包括:从同轴数据中获取表示目标数据在有效图像区中的第二位置的数据。
在本申请的另一实施例中,图6所示实施例中,处理器601确定目标数据在所述有效图像区中的第二位置,包括:从图像帧的有效图像区中确定表示目标数据的起始位置的头标识,以及表示目标数据的末尾位置的尾标识,将头标识和尾标识之间且包含上述头标识和尾标识的位置,作为目标数据在有效图像区中的第二位置。
本实施例中,该电子设备可以为DVR设备,该DVR设备具体可以包括:数模(AD)转换模块、主芯片、显示器、接口、硬盘。主芯片可以包括数字信号处理器(Digital Signal Processing,DSP)编码模块、DSP解码模块、CPU。硬盘可以为ROM存储器。该电子设备可以对接收的图像帧中的图像数据进行网络直播。
由于上述电子设备实施例是基于方法实施例得到的,与该方法具有相同的技术效果,因此该电子设备实施例的技术效果在此不再赘述。对于电子设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见图4所示方法实施例的部分说明即可。
上述摄像机实施例和电子设备实施例中,通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)、ARM(Advanced RISC Machines)处理器等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列 (Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时实现本申请实施例提供的数据传输方法。该数据传输方法包括:
获取待发送图像,获取待发送的目标数据;其中,所述目标数据为不同于所述待发送图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息;
确定所述待发送图像在图像帧的有效图像区中的第一位置,以及确定所述目标数据在图像帧的有效图像区中的第二位置;
将所述待发送图像以及所述目标数据作为同一图像帧的数据,采用有效图像区的数据发送方式,按照所述第一位置发送所述待发送图像,按照所述第二位置发送所述目标数据。
可见,本实施例在获取待发送图像和目标数据之后,确定待发送图像在图像帧的有效图像区的第一位置以及目标数据在有效图像区的第二位置,将待发送图像以及目标数据作为同一图像帧的数据,按照第一位置发送待发送图像,按照第二位置发送目标数据。其中,目标数据为不同于待发送图像和同轴数据的数据。因此,本实施例可以实现将目标数据与待发送图像以同一图像帧发送至电子设备,无需另外布线,能够节省设备成本。
本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时实现本申请实施例提供的数据传输方法。该数据传输方法包括:
接收图像帧;
确定图像在所述图像帧的有效图像区中的第一位置,以及确定目标数据在所述有效图像区中的第二位置;其中,所述目标数据为不同于所述图像和同轴数据的数据,所述同轴数据为数据接收端和数据发送端之间交互的通知信息;
采用有效图像区的数据获取方式,按照所述第一位置从所述图像帧中获取图像,按照所述第二位置从所述图像帧中获取目标数据。
可见,本实施例可以在接收到图像帧之后,确定图像在图像帧的有效图像区中的第一位置,以及确定目标数据在有效图像区中的第二位置,采用有效图像区的数据获取方式,按照第一位置获取图像,按照第二位置获取目标 数据。因此,本实施例可以实现从同一图像帧中获取图像和目标数据,无需另外布线,从而能够节省成本。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所做的任何修改、等同替换、改进等,均包含在本申请的保护范围内。
Claims (24)
- 一种数据传输方法,其特征在于,所述方法包括:获取待发送图像,获取待发送的目标数据;其中,所述目标数据为不同于所述待发送图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息;确定所述待发送图像在图像帧的有效图像区中的第一位置,以及确定所述目标数据在图像帧的有效图像区中的第二位置;将所述待发送图像以及所述目标数据作为同一图像帧的数据,采用有效图像区的数据发送方式,按照所述第一位置发送所述待发送图像,按照所述第二位置发送所述目标数据。
- 根据权利要求1所述的方法,其特征在于,在发送所述待发送图像和目标数据之前,所述方法还包括:获取待发送的同轴数据,以及确定所述同轴数据在图像帧的消隐区的第三位置;将所述同轴数据作为与所述待发送图像和目标数据所在图像帧的数据,采用消隐区的数据发送方式,按照所述第三位置发送所述同轴数据。
- 根据权利要求2所述的方法,其特征在于,所述获取待发送的同轴数据的步骤,包括:获取待发送的包括表示所述第二位置的数据的同轴数据。
- 根据权利要求3所述的方法,其特征在于,所述表示所述第二位置的数据在图像帧的消隐区中的位置,位于所述第二位置之前。
- 根据权利要求1所述的方法,其特征在于,所述目标数据包括表示所述目标数据的起始位置的头标识,以及表示所述目标数据的末尾位置的尾标识。
- 根据权利要求1~5任一项所述的方法,其特征在于,所述获取待发送的目标数据的步骤,包括:获取待发送的表示所述待发送图像的图像采集设备所处环境的环境信息的目标数据;和/或,获取待发送的表示所述待发送图像的图像采集设备采集的音频信息的目标数据;和/或,获取待发送的表示图像的图像信息的目标数据。
- 根据权利要求6所述的方法,其特征在于,当所述目标数据为表示环 境信息的数据时,所述第二位置为位于所述第一位置之后的位置;当所述目标数据为表示音频信息的数据时,所述第二位置为位于所述第一位置之前的位置;当所述目标数据为表示图像信息的数据时,所述第二位置为位于所述第一位置之前的位置。
- 一种数据传输方法,其特征在于,所述方法包括:接收图像帧;确定图像在所述图像帧的有效图像区中的第一位置,以及确定目标数据在所述有效图像区中的第二位置;其中,所述目标数据为不同于所述图像和同轴数据的数据,所述同轴数据为数据接收端和数据发送端之间交互的通知信息;采用有效图像区的数据获取方式,按照所述第一位置从所述图像帧中获取图像,按照所述第二位置从所述图像帧中获取目标数据。
- 根据权利要求8所述的方法,其特征在于,在接收图像帧之后,所述方法还包括:确定同轴数据在所述图像帧的消隐区中的第三位置;采用消隐区的数据获取方式,按照所述第三位置从所述图像帧中获取所述同轴数据。
- 根据权利要求9所述的方法,其特征在于,所述同轴数据为在确定目标数据在所述有效图像区中的第二位置之前获取;所述确定目标数据在所述有效图像区中的第二位置的步骤,包括:从所述同轴数据中获取表示目标数据在所述有效图像区中的第二位置的数据。
- 根据权利要求8所述的方法,其特征在于,所述确定目标数据在所述有效图像区中的第二位置的步骤,包括:从所述有效图像区中确定表示目标数据的起始位置的头标识,以及表示目标数据的末尾位置的尾标识,将所述头标识和尾标识之间且包含所述头标识和尾标识的位置,作为所述目标数据在所述有效图像区中的第二位置。
- 一种摄像机,其特征在于,包括:处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;所述处理器,用于获取待发送图像,获取待发送的目标数据,确定所述待发送图像在图像帧的有效图像区中的第一位置,以及确定所述目标数据在 图像帧的有效图像区中的第二位置,将所述待发送图像以及所述目标数据作为同一图像帧的数据,采用有效图像区的数据发送方式,按照所述第一位置发送所述待发送图像,按照所述第二位置发送所述目标数据;其中,所述目标数据为不同于所述待发送图像和同轴数据的数据,同轴数据为数据接收端和数据发送端之间交互的通知信息;所述存储器,用于存储所述处理器获取的待发送图像和目标数据。
- 根据权利要求12所述的摄像机,其特征在于,所述处理器,还用于在发送所述待发送图像和目标数据之前,获取待发送的同轴数据,以及确定所述同轴数据在图像帧的消隐区的第三位置;将所述同轴数据作为与所述待发送图像和目标数据所在图像帧的数据,采用消隐区的数据发送方式,按照所述第三位置发送所述同轴数据。
- 根据权利要求13所述的摄像机,其特征在于,所述处理器获取待发送的同轴数据,包括:获取待发送的包括表示所述第二位置的数据的同轴数据。
- 根据权利要求14所述的摄像机,其特征在于,所述表示所述第二位置的数据在图像帧的消隐区中的位置,位于所述第二位置之前。
- 根据权利要求12所述的摄像机,其特征在于,所述目标数据包括表示所述目标数据的起始位置的头标识,以及表示所述目标数据的末尾位置的尾标识。
- 根据权利要求12~16任一项所述的摄像机,其特征在于,所述处理器获取待发送的目标数据,包括:获取待发送的表示所述待发送图像的图像采集设备所处环境的环境信息的目标数据;和/或,获取待发送的表示所述待发送图像的图像采集设备采集的音频信息的目标数据;和/或,获取待发送的表示图像的图像信息的目标数据。
- 根据权利要求17所述的摄像机,其特征在于,当所述目标数据为表示环境信息的数据时,所述第二位置为位于所述第一位置之后的位置;当所述目标数据为表示音频信息的数据时,所述第二位置为位于所述第一位置之前的位置;当所述目标数据为表示图像信息的数据时,所述第二位置为位于所述第一位置之前的位置。
- 一种电子设备,其特征在于,包括:处理器、通信接口、存储器和通 信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;所述处理器,用于接收图像帧,确定图像在所述图像帧的有效图像区中的第一位置,以及确定目标数据在所述有效图像区中的第二位置,采用有效图像区的数据获取方式,按照所述第一位置从所述图像帧中获取图像,按照所述第二位置从所述图像帧中获取目标数据;其中,所述目标数据为不同于所述图像和同轴数据的数据,所述同轴数据为数据接收端和数据发送端之间交互的通知信息;所述存储器,用于存储所述处理器获取的图像和目标数据。
- 根据权利要求19所述的电子设备,其特征在于,所述处理器,还用于在接收图像帧之后,确定同轴数据在所述图像帧的消隐区中的第三位置,采用消隐区的数据获取方式,按照所述第三位置从所述图像帧中获取所述同轴数据。
- 根据权利要求20所述的电子设备,其特征在于,所述同轴数据为在确定目标数据在所述有效图像区中的第二位置之前获取;所述处理器确定目标数据在所述有效图像区中的第二位置,包括:从所述同轴数据中获取表示目标数据在所述有效图像区中的第二位置的数据。
- 根据权利要求19所述的电子设备,其特征在于,所述处理器确定目标数据在所述有效图像区中的第二位置,包括:从所述图像帧的有效图像区中确定表示目标数据的起始位置的头标识,以及表示目标数据的末尾位置的尾标识,将所述头标识和尾标识之间且包含所述头标识和尾标识的位置,作为所述目标数据在所述有效图像区中的第二位置。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-7任一所述的方法步骤。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求8-11任一所述的方法步骤。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/757,171 US11128835B2 (en) | 2017-10-20 | 2018-09-06 | Data transmission method, camera and electronic device |
EP18869102.6A EP3700199B1 (en) | 2017-10-20 | 2018-09-06 | Data transmission method, camera and electronic device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710985838.4 | 2017-10-20 | ||
CN201710985838.4A CN109698933B (zh) | 2017-10-20 | 2017-10-20 | 数据传输方法及摄像机、电子设备、计算机可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019076156A1 true WO2019076156A1 (zh) | 2019-04-25 |
Family
ID=66173988
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/104342 WO2019076156A1 (zh) | 2017-10-20 | 2018-09-06 | 数据传输方法及摄像机、电子设备 |
Country Status (4)
Country | Link |
---|---|
US (1) | US11128835B2 (zh) |
EP (1) | EP3700199B1 (zh) |
CN (1) | CN109698933B (zh) |
WO (1) | WO2019076156A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108886461B (zh) * | 2018-06-15 | 2021-10-15 | 北京小米移动软件有限公司 | 数据传输方法及装置 |
CN113810645B (zh) * | 2021-11-16 | 2022-02-08 | 北京数字小鸟科技有限公司 | 视频消隐区自定义数据的传输系统、方法和设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101127819A (zh) * | 2007-10-12 | 2008-02-20 | 杭州华三通信技术有限公司 | 一种图像传输的方法和设备 |
CN103873806A (zh) * | 2008-11-12 | 2014-06-18 | 北京中星微电子有限公司 | 监控图像相关信息传输方法、系统及装置 |
JP2015016918A (ja) * | 2013-07-08 | 2015-01-29 | 株式会社日立ビルシステム | エレベータ乗かご内監視装置 |
CN107241563A (zh) * | 2017-06-16 | 2017-10-10 | 深圳天珑无线科技有限公司 | 视频传输的方法、智能移动终端及具有存储功能的装置 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7168084B1 (en) * | 1992-12-09 | 2007-01-23 | Sedna Patent Services, Llc | Method and apparatus for targeting virtual objects |
JP5407957B2 (ja) * | 2009-06-29 | 2014-02-05 | ソニー株式会社 | 立体画像データ送信装置および立体画像データ受信装置 |
JP5372687B2 (ja) | 2009-09-30 | 2013-12-18 | ソニー株式会社 | 送信装置、送信方法、受信装置および受信方法 |
CN105791752B (zh) * | 2014-12-26 | 2019-03-26 | 浙江大华技术股份有限公司 | 一种信号共缆传输的方法与装置 |
KR101698864B1 (ko) * | 2016-07-12 | 2017-01-24 | 주식회사 하이트론씨스템즈 | 메타 데이터를 이용한 영상 검출 방법을 실행시키는 프로그램이 기록된 기록 매체 |
-
2017
- 2017-10-20 CN CN201710985838.4A patent/CN109698933B/zh active Active
-
2018
- 2018-09-06 WO PCT/CN2018/104342 patent/WO2019076156A1/zh unknown
- 2018-09-06 US US16/757,171 patent/US11128835B2/en active Active
- 2018-09-06 EP EP18869102.6A patent/EP3700199B1/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101127819A (zh) * | 2007-10-12 | 2008-02-20 | 杭州华三通信技术有限公司 | 一种图像传输的方法和设备 |
CN103873806A (zh) * | 2008-11-12 | 2014-06-18 | 北京中星微电子有限公司 | 监控图像相关信息传输方法、系统及装置 |
JP2015016918A (ja) * | 2013-07-08 | 2015-01-29 | 株式会社日立ビルシステム | エレベータ乗かご内監視装置 |
CN107241563A (zh) * | 2017-06-16 | 2017-10-10 | 深圳天珑无线科技有限公司 | 视频传输的方法、智能移动终端及具有存储功能的装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3700199A4 |
Also Published As
Publication number | Publication date |
---|---|
EP3700199A4 (en) | 2020-08-26 |
CN109698933B (zh) | 2020-07-24 |
CN109698933A (zh) | 2019-04-30 |
US20200344444A1 (en) | 2020-10-29 |
US11128835B2 (en) | 2021-09-21 |
EP3700199B1 (en) | 2022-07-13 |
EP3700199A1 (en) | 2020-08-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11089214B2 (en) | Generating output video from video streams | |
WO2017181777A1 (zh) | 全景视频直播方法、装置和系统以及视频源控制设备 | |
KR101703931B1 (ko) | 감시 시스템 | |
US10523820B2 (en) | High-quality audio/visual conferencing | |
CN103716584A (zh) | 基于上下文感知的智能移动终端现场监测方法 | |
US20110255590A1 (en) | Data transmission apparatus and method, network data transmission system and method using the same | |
CN106791699A (zh) | 一种远程头戴交互式视频共享系统 | |
WO2022088447A1 (zh) | 视频播放方法、系统、电子设备和存储介质 | |
WO2019076156A1 (zh) | 数据传输方法及摄像机、电子设备 | |
US8456532B1 (en) | Internet protocol camera transcode avoidance | |
CA3015189A1 (en) | Systems and methods for transmitting a high quality video image from a low power sensor | |
JP2019212963A (ja) | 撮影装置、情報処理装置、情報処理方法、およびプログラム | |
US10798366B2 (en) | Motion detection device and motion detection method | |
WO2019076155A1 (zh) | 数据传输方法及摄像机、电子设备 | |
US11546556B2 (en) | Redundant array of inexpensive cameras | |
CN109698923B (zh) | 数据传输方法及摄像机、电子设备 | |
KR101840838B1 (ko) | Ip 카메라 일체형 nvr 시스템 | |
JP2009088666A (ja) | 画像処理装置 | |
KR102126794B1 (ko) | 영상 데이터 전송 장치 및 방법 | |
US10298885B1 (en) | Redundant array of inexpensive cameras | |
KR101581835B1 (ko) | 서브 관리형 영상 촬영 장치 | |
CN117440175A (zh) | 用于视频传输的方法、装置、系统、设备和介质 | |
KR20200139612A (ko) | 네트워크 감시 카메라 시스템 및 그 동작 방법 |
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: 18869102 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2018869102 Country of ref document: EP Effective date: 20200520 |