WO2020207403A1 - 一种图像获取方法及装置 - Google Patents
一种图像获取方法及装置 Download PDFInfo
- Publication number
- WO2020207403A1 WO2020207403A1 PCT/CN2020/083707 CN2020083707W WO2020207403A1 WO 2020207403 A1 WO2020207403 A1 WO 2020207403A1 CN 2020083707 W CN2020083707 W CN 2020083707W WO 2020207403 A1 WO2020207403 A1 WO 2020207403A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- track
- buffer area
- image
- image data
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- 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/181—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/265—Mixing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
-
- 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
Definitions
- This application relates to the field of image processing technology, and in particular to an image acquisition method and device.
- the way to obtain a frame of image from real-time stream or video is to capture the picture.
- the snapshot is to capture a complete frame of image YUV data from real-time stream or video, where Y represents brightness , U means chromaticity, V means density.
- encode the captured YUV data into the required image format, such as JPEG format, RGB format, etc.
- each camera corresponds to a transmission channel, and the captured video data can be transmitted in the form of a code stream through the transmission channel.
- the snapshot can only be captured in one transmission channel. Therefore, when multiple cameras are shooting at the same time, it is necessary to capture the image from the video captured by each camera, and then use the large-screen splicing technology to capture the captured image. Multiple images are stitched together to form a complete image.
- each transmission channel corresponds to a decoder
- each decoder corresponds to a display channel.
- Each camera transmits the captured video data to the decoder through the transmission channel.
- the decoder decodes the video data in the transmission channel and transmits the decoded data to the large display screen through the display channel.
- each The image represented by the data in the display channel is only part of the image to be captured.
- the large display screen splices each part of the image through the large screen splicing technology to obtain the spliced image, and screenshots the spliced image to obtain the image to be captured.
- each camera in the current solution for capturing images needs to have a corresponding transmission channel.
- the transmission channel needs to be increased accordingly. The more cameras, the more transmission channel resources are required.
- the purpose of the embodiments of the present application is to provide an image acquisition method and device to solve the problem of waste of transmission channel resources in the case of multiple camera devices.
- the specific technical solutions are as follows:
- an image acquisition method which includes:
- the acquired image data of each track is stored in the buffer area corresponding to each track to obtain the image of the picture to be captured.
- the step of obtaining the code streams of the preset frames of the multiple tracks transmitted by the preset transmission channel includes:
- the method before the step of storing the acquired image data of each track in the buffer area corresponding to each track according to the corresponding relationship between the track and the buffer area to obtain the image of the picture to be captured, the method further includes:
- a corresponding buffer area is allocated to each track, where the buffer area is used to store image data in the track corresponding to the buffer area.
- the step of allocating a corresponding buffer area for each track includes:
- the step of storing the acquired image data of each track in the buffer area corresponding to each track to obtain the image of the picture to be captured includes:
- the image data stored in each buffer area is combined to obtain the image of the picture to be captured.
- the method further includes:
- the stored image data is encoded to obtain the image of the to-be-captured picture that meets the preset format.
- an image acquisition device which includes:
- the first acquisition module is configured to acquire the code streams of the preset frames of multiple tracks transmitted by the preset transmission channel, wherein each track corresponds to at least one camera device;
- the second acquisition module is used to acquire image data corresponding to the code stream of each track
- the storage module is used to store the acquired image data of each track in the buffer area corresponding to each track according to the corresponding relationship between the track and the buffer area to obtain the image of the picture to be captured.
- the first obtaining module is specifically used for:
- the device further includes:
- the third acquiring module is used to acquire the track quantity of multiple tracks
- the determination module is used to determine the number of buffer areas to be allocated based on the number of tracks;
- the allocation module is used to allocate a corresponding buffer area for each track, where the buffer area is used to store image data of the track corresponding to the buffer area.
- the allocation module is specifically used for:
- the storage module is specifically used for:
- the image data stored in each buffer area is combined to obtain the image of the picture to be captured.
- the device further includes:
- the encoding module is used to perform encoding processing on the stored image data after the storage of the image data of each track is completed, to obtain an image of the picture to be captured that meets a preset format.
- an embodiment of the present application provides an electronic device, including a processor and a memory, where:
- Memory used to store computer programs
- the processor is used to implement any of the above-mentioned image acquisition methods when executing the computer program stored in the memory.
- an embodiment of the present application provides a machine-readable storage medium, and a computer program is stored in the machine-readable storage medium.
- the computer program is executed by a processor, any one of the aforementioned image acquisition methods is implemented.
- an embodiment of the present application provides an application program for executing at runtime: any of the above-mentioned image acquisition methods.
- the code streams of the preset frames of the multiple tracks transmitted by the preset transmission channel are obtained, and each track corresponds to at least one camera device, and the image data corresponding to the code streams of each track is obtained.
- the corresponding relationship with the buffer area the acquired image data of each track is stored in the buffer area corresponding to each track to obtain the image of the picture to be captured.
- the code stream of the preset frame of each track is transmitted through the preset transmission channel, and the image data corresponding to the code stream of each track is obtained in the preset transmission channel, and then The image of the screen to be captured.
- the above process is completed in one transmission channel, even if the camera equipment is increased, there is no need to increase the transmission channel, saving transmission channel resources.
- the image data is obtained in one transmission channel, and the image data is correspondingly stored in the buffer area to obtain the image of the picture to be captured, without the need for image splicing processing, which saves image splicing resources.
- FIG. 1 is a flowchart of an image acquisition method provided by an embodiment of the application
- FIG. 2(a) is a schematic diagram of a determined buffer area according to an embodiment of the application.
- Fig. 2(b) is an image of a picture to be captured obtained based on the determined buffer area according to an embodiment of the application;
- FIG. 2(c) is a schematic diagram of a picture to be captured obtained based on the determined buffer area according to an embodiment of the application;
- FIG. 3(a) is another schematic diagram of the determined buffer area according to an embodiment of this application.
- FIG. 3(b) is another schematic diagram of the determined buffer area according to an embodiment of this application.
- FIG. 4 is a schematic diagram of a structure of an image acquisition device provided by an embodiment of the application.
- FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
- embodiments of the present application provide an image acquisition method and device, wherein the image acquisition method includes:
- the acquired image data of each track is stored in the buffer area to obtain the image of the picture to be captured.
- the code stream of the preset frame of each track is transmitted through the preset transmission channel, and the image data corresponding to the code stream of each track is obtained in the preset transmission channel, and then The image of the screen to be captured.
- the above process is completed in one transmission channel, even if the camera equipment is increased, there is no need to increase the transmission channel, saving transmission channel resources.
- the image data is obtained in one transmission channel, and the image data is correspondingly stored in the buffer area to obtain the image of the picture to be captured, without the need for image splicing processing, which saves image splicing resources.
- An image acquisition method provided by an embodiment of the application can be applied to a video processing device.
- the video processing device can be connected to one or more camera devices, and each camera device can send the captured video data to the video processing device for processing. deal with.
- the video processing device receives the bit stream sent by the camera device, it can decode the received bit stream to obtain the video image taken by the camera device.
- an image acquisition method provided by an embodiment of the present application includes the following steps.
- S101 Obtain code streams of preset frames of multiple tracks transmitted by a preset transmission channel.
- each track corresponds to at least one camera device.
- the track corresponding to camera device 1 is track 1
- the code stream output by camera device 1 is the code stream of track 1.
- a multi-eye camera includes multiple sensors, and one track can correspond to one sensor.
- a transmission channel can transmit the code stream of multiple tracks.
- the transmission channel is the physical channel that actually transmits the code stream (for example, a bus).
- the track represents the camera equipment of the terminal.
- a camera equipment has at least one track.
- multiple tracks transmit code streams to the video processing device through the same transmission channel.
- the code streams of multiple tracks are transmitted in the preset transmission channel, the code streams of the preset frames of multiple tracks can be packaged into one data packet for transmission.
- the pre-determined data of multiple tracks can also be transmitted by sub-packet transmission. Set the code stream of the frame.
- the preset frame may be a frame with the same identifier, or may be a frame with a time stamp within a certain error range.
- the identifier mentioned here refers to the label of the frame, for example, the first frame code stream collected by the camera device 1, the first frame code stream collected by the camera device 2, and the first frame code stream collected by the camera device 3.
- the time stamp of a frame refers to the time when the frame is collected.
- the preset frame can be a frame with the same time stamp, for example, a frame at 12 o’clock by camera 1, a frame at 12 o’clock by camera 2 and a frame at 12 o’clock by camera 3 A frame at 12 o'clock; due to the difference in the acquisition frequency of different camera equipment, a certain error in the time stamp is allowed. Therefore, the preset frame can also be a frame with a time stamp within a certain error range, and the certain error range can be microseconds. , Millisecond level, second level, etc. The specific settings are related to accuracy requirements.
- S101 may specifically be: acquiring a data packet of a picture to be captured transmitted by a preset transmission channel, where the data packet carries a code stream of a preset frame of multiple tracks.
- the code stream included in a data packet can be only the code stream of one frame of image.
- the first data packet includes the code stream of the first frame of each camera device
- the second data packet includes the first frame of each camera device.
- the code streams of different camera devices in a data packet can be distinguished by using a preset start mark and end mark.
- the code stream included in a data packet can also include the code stream of multiple frames of images. In this case, the data packet can have the start and end marks of each frame of code stream to distinguish the code of each frame. flow.
- the picture to be captured can be customized.
- the currently displayed screen can be used as the screen to be captured.
- the currently displayed picture can be used as the picture to be captured during the playback process. It is also possible to determine the picture of the first frame image of the currently played video as the picture to be captured.
- any frame of the video can be determined as the frame to be captured. Therefore, the frame to be captured can be determined according to user instructions, and the frame to be captured can be obtained from the replayed video Take an image of the screen.
- the preset transmission channel can be customized, and the preset transmission channel is used to transmit the code streams of the connected multiple tracks of camera devices, that is, the multiple camera devices pass the preset The transmission channel transmits the code stream.
- a transmission protocol is customized in advance, and each camera device encodes the acquired image information into a code stream according to the transmission protocol, and transmits the code stream obtained by encoding through a preset transmission channel.
- the multi-track streaming protocol is the streaming protocol used for stream encoding and decoding, transmission, preview, video storage, etc.
- the multi-track streaming includes multiple cameras based
- the code streams of multiple tracks are encoded by the image information of the device.
- the code streams of different tracks can be spliced and combined to form an image, and the code streams of multiple tracks can be transmitted, previewed, and recorded in one transmission channel. Storage and other processing.
- the protocol header of the multi-track stream protocol may include information such as the number of tracks, the start and end marks of the code stream of each track in the data packet.
- each camera device can be connected to a processing device, and each camera device can send the image information collected by each camera device to the processing device.
- the processing device After the processing device receives the image information sent by each camera device, it can encode the image information into a code stream, and pack the code stream belonging to the same frame of image into a data packet, and transmit it through the preset transmission channel in the form of a data packet .
- the processing device is connected to the camera device 1, the camera device 2, and the camera device 3.
- the camera device 1, the camera device 2 and the camera device 3 respectively send the first frame of image information collected to the processing device, and the processing device responds to the received
- the first frame of image information is encoded into a code stream for the first frame of image, and the code stream of the first frame image of the camera device 1, the code stream of the first frame image of the camera device 2 and the first frame of the camera device 3
- the code stream of the image is packaged into a data packet, and the data packet is transmitted through a preset transmission channel. In this way, it is ensured that the first frame of images captured by the camera device 1, the camera device 2 and the camera device 3 are synchronized.
- the code streams belonging to the same frame of image can be transmitted in the same data packet, thereby ensuring synchronization between various camera devices.
- code stream information can also be obtained, such as MFI (Multiple Frame Indicator, composite frame information byte) information.
- the code stream information can include the number of tracks, the information of each code stream in the data packet, The start and end of the code stream of each track, etc.
- the code stream information can also be carried in the data packet to which the code stream belongs for transmission.
- the code stream transmitted in the track is decoded image data
- the image data can be directly obtained from each track.
- the code stream transmitted in the track is coded image data
- the code stream of each track can be decoded to obtain the image data of the track.
- each track corresponds to a decoder, and the decoder can decode the code stream on the corresponding track, and the decoder corresponding to each track will not The code streams of tracks other than this track are decoded.
- camera device 1 corresponds to track 1
- camera device 2 corresponds to track 2
- camera device 3 corresponds to track 3.
- track 1 corresponds to decoder 1
- track 2 corresponds to decoder 2
- track 3 corresponds to decoder 3.
- decoder 1 decodes the code stream of track 1
- decoder 2 decodes the code stream of track 2
- decoder 3 decodes the code stream of track 3.
- the image data is data used to represent an image
- the image data may be YUV data, RGB data, and so on.
- YUV data is taken as an example for introduction.
- the YUV data can be used to represent an image.
- the image represented by the YUV data is the image captured by the imaging device 1.
- the corresponding relationship between the track and the buffer area can be preset or determined according to the code stream, which is not limited here.
- the corresponding relationship between the track and the buffer area is used to determine the storage location of the image data of each track. After the image data of each track are stored in the corresponding buffer area, that is, after the corresponding image data has been stored in each buffer area, all the stored image data are combined to form an image, which is the waiting area. Grab the image of the screen.
- the camera device includes camera device 1, camera device 2, and camera device 3.
- the buffer area includes buffer area 1, buffer area 2 and buffer area 3, as shown in Figure 2(a), where camera device 1 corresponds to buffer area 1.
- Camera device 2 corresponds to buffer area 2
- camera device 3 corresponds to buffer area 3.
- the YUV data obtained by decoding the code stream output by camera device 1 is stored in buffer 1
- the YUV data obtained by decoding the code stream output by camera device 2 is stored in buffer 2
- the code output by camera device 3 The YUV data obtained after the stream is decoded is stored in the buffer area 3.
- the YUV data in the three buffer areas are combined together to obtain a combined image, as shown in Figure 2(b).
- the two vertical lines of is added for the convenience of comparison with Figure 2(a), and the final image is the image to be captured, as shown in Figure 2(c).
- the buffer area is preset.
- the number of buffer areas is consistent with the number of tracks, and each track corresponds to a buffer area, which can be in a one-to-one correspondence.
- the buffer area is determined, the corresponding relationship between each track and the buffer area is determined in advance. In the subsequent process of image acquisition, the corresponding relationship remains unchanged, that is, the image data transmitted in each track is fixedly stored in the corresponding buffer area.
- buffer area 1 and buffer area 2 are preset, and track 1 corresponds to buffer area 1, and track 2 corresponds to buffer area 2.
- track 1 corresponds to buffer area 1
- track 2 corresponds to buffer area 2.
- the image data transmitted in track 1 is stored in the buffer area.
- the image data transmitted in track 2 is stored in buffer 2.
- the buffer area can be adjusted, and the correspondence between the track and the buffer area can be adjusted again.
- the buffer area corresponding to each track may be a custom-set buffer area, and the buffer area corresponding to each track may be continuous or non-continuous.
- the image data in each track can be stored in the corresponding buffer area.
- the stored image data can be obtained from each buffer area, and the obtained image data can be combined according to a preset arrangement rule, that is, the image of the picture to be captured can be obtained.
- format conversion, scaling, etc. can be performed to obtain an image of the screen to be captured that meets the requirements.
- the preset arrangement rules can be customized.
- the image data in track 1 is captured by camera 1
- the image data in track 2 is captured by camera 2
- the image data in track 3 is captured by camera 3.
- the preset arrangement rules are: The image data in track 1 is located on the leftmost side, the image data in track 2 is located in the middle, and the image data in track 3 is located on the far right.
- the image taken by the camera device 1 is located On the far left, the picture taken by the imaging device 2 is in the middle, and the picture taken by the imaging device 3 is on the far right.
- the acquired image data of each track is stored in the buffer area corresponding to each track, and before the step of obtaining the image of the picture to be captured (S103), it may further include The steps are as follows: Obtain the track number of multiple tracks; determine the number of buffer areas that need to be allocated based on the number of tracks; allocate a corresponding buffer area for each track, where the buffer area is used to store the track in the corresponding buffer area Image data.
- the number of tracks of multiple tracks can also be obtained. Based on the number of tracks, the number of buffer areas can be determined, and the number of buffer areas is consistent with the number of tracks. Specifically, the number of tracks can be carried in a data packet for transmission. For example, if the track number information carried in the data packet is 4, it means that the data packet carries a code stream of 4 tracks, and the number of buffer areas can be determined to be 4.
- the available storage space of each cache area can be allocated, and the available storage space of each cache area can be customized. That is to say, the available storage space of each buffer area can be greater than or equal to the data amount of the image data in the track corresponding to the buffer area. In this case, the image data in the track can be directly stored in the corresponding buffer area. in. The available storage space of each buffer area can be smaller than the data amount of the image data in the track corresponding to the buffer area. In this case, before storing, the image data in the track can be scaled to make the image data The amount is less than or equal to the available storage space of the corresponding buffer area.
- the available storage space allocated for each buffer area may be greater than or equal to the buffer area.
- the data volume of the image data of the track corresponding to the area can be considered that the available storage space of each buffer area is greater than or equal to the data volume of the code stream of the track corresponding to the buffer area. In this way, even the image data of the track can be stored in the corresponding buffer area without scaling.
- the data packet may carry the target data amount required for the image of the picture to be captured.
- the target data amount of the image can be customized, that is, the size of the generated image can be set. For example, if the target data amount is set to 5M, it means that the image of the screen to be captured is 5M.
- the data packet can also carry the width and height information required for the image of the image to be captured.
- the width and height information includes the preset width and the preset height, that is to say, the required width of the image of the image to be captured is the preset width ,
- the height is the preset height.
- the preset width and the preset height can be customized settings, for example, the preset width is 800 pixels, and the preset height is 480 pixels, which means that the resolution width of the image generated by the image to be captured is 800 Pixels, the resolution height is 480 pixels.
- the step of allocating a buffer area for each track may specifically include the following steps:
- a total buffer area can be allocated first, and the total buffer area is used to store the image data of each track in the data packet after decoding processing.
- the available storage space of the total buffer area can be customized according to the target data volume required by the image of the picture to be captured, that is, the available storage space of the total buffer area should at least not be less than the target data volume.
- the width of the total buffer area is not less than the preset width, and the height is not less than the preset height.
- the preset width and the preset height are the width and height required by the image of the image to be captured, and the preset width and the preset height can be customized.
- the preset width of the total buffer area can be divided equally to obtain multiple sub-widths with the same length.
- the number of divided sub-widths is the same as the number of tracks. For example, if the number of camera devices is 4, the number of tracks is also 4.
- the preset width of the total buffer area is 800 pixels, the preset width can be divided into 4 sub-widths, each of which is 200 pixels.
- the area formed by each sub-width and preset height is determined as a buffer area, that is, the total buffer area includes multiple buffer areas of the same size.
- the width of each buffer area is the sub-width, and the height is the preset height.
- the preset width of the total buffer area is W
- the preset height is H
- there are T1 tracks then the preset width W is equally divided into T1 equal parts
- each sub-width is W/T1 .
- the area formed by each sub-width W/T1 and the preset height H is determined as a buffer area, such as the first buffer area, the second buffer area...the T1 buffer area in the figure.
- the determined buffer area and the track may have a one-to-one correspondence, that is, each buffer area corresponds to a track, and the image data of the track is stored in the buffer area corresponding to the track.
- the step of obtaining the image of the picture to be captured may include the following steps :
- the image data with the image width as the sub-width and the image height as the preset height is obtained; according to the one-to-one correspondence between the buffer area and the track, the acquired image data of each track is respectively stored in The buffer area corresponding to each track; after the image data of each track is stored, the image data stored in each buffer area is combined to obtain the image of the picture to be captured.
- image data with an image width of a sub-width and an image height of a preset height can be obtained.
- the image data can be directly stored in the corresponding buffer area.
- the image data in the track can be scaled first, so that the width and height of the image data after the scaling process are the same as the width and height of the corresponding buffer area. High is consistent.
- VGS Video Graphics Sub-System, video graphics subsystem
- VGS may be used to compress image data of each track respectively, where VGS may perform processing such as scaling, format conversion, and decoding on the image.
- the scaled image data of each track can be stored in the corresponding track of each track according to the one-to-one correspondence between the buffer area and the track. Cache area.
- T1 tracks there are T1 tracks, among which, the first track corresponds to the first buffer area, the second track corresponds to the second buffer area... the T1th track corresponds to the T1th buffer area, then the Store the zoomed image data of one track in the first buffer area, store the zoomed image data of the second track in the second buffer area, and store the zoomed image data of the T1 track in T1 buffer area.
- the entire buffer area will be filled with image data, and the image data in the buffer area can represent a Images.
- the zoomed image data of each track in the buffer area corresponding to each track when storing the zoomed image data of each track in the buffer area corresponding to each track, it can be stored in multiple buffer areas at the same time, or can be stored sequentially in a custom order. For example, in Figure 3(a), storage is performed in the order of identification from small to large, that is, storage is performed for the first buffer area, then for the second buffer area, and finally for the T1th buffer area. After the storage of the buffer area is completed, the storage of the entire total buffer area is completed.
- the combination method may be to directly obtain an image from the image data stored in each buffer area, and the image is the image of the picture to be captured.
- the image of the picture to be captured is a YUV image
- the buffer is divided into three parts Y, U, and V for storage
- a YUV image can be directly obtained at this time, that is, the image of the picture to be captured.
- the combination method can also perform data conversion processing on the image data in each buffer area to obtain image data that meets the requirements of image format and other requirements.
- the image obtained from the image data after the data conversion processing is the image of the picture to be captured. .
- the total buffer area is divided into T1 buffer areas on average, and the divided T1 buffer areas are shown in Figure 3(a). After each buffer area is determined, the head of each buffer area is determined. Address, as shown in Figure 3(b). Two adjacent cache areas are adjacent, that is, the first address of the cache area is continuous with the last address of the previous adjacent cache area. For example, the first address of the second buffer area is the last address of the first buffer area.
- the storage is performed in the order of identification from small to large, that is, first storage is performed in the first buffer area, then the second buffer area is stored, and finally the T1 buffer area is stored.
- image data is stored in the T1 buffer area, it means that the current T1 buffer areas have stored image data.
- the image data stored in each buffer area is combined to obtain the image of the picture to be captured .
- the image acquisition method may further include: after the image data of each track is stored, encoding the stored image data to obtain an image of the to-be-captured picture that meets the preset format .
- the encoding process includes data processing of image data.
- the stored image data can also be scaled so that the width and height of the obtained image are preset width and height. .
- the preset format may be self-defined.
- the preset format may be JPEG (Joint Photographic Experts Group) format, PNG (Portable Network Graphics, portable network graphics) format, etc.
- the preset format can be customized.
- the data packet may carry information in a preset format.
- the preset format information can be obtained, and an encoder for the preset format can be created according to the preset format information, and the encoder is used to convert the image input to the encoder into an image of the preset format .
- the image data of each track is stored, the image data stored in the buffer area is input to the encoder, the image in the preset format is generated by the encoder, and the generated image in the preset format is stored and displayed.
- the data packet carries JPEG format information
- the JPEG format information indicates that the format of the image to be generated is the JPEG format.
- the encoder created based on the JPEG format information is a JPEG encoder. After the image data of each track is stored, the image data stored in the buffer area is input to the JPEG encoder to generate an image in JPEG format.
- the preset format is the RGB format
- TDE Tro Dimensional Engine, two-dimensional data processing tool
- OSD On Screen Display, screen display overlay
- GUI Graphic User Interface, graphical user interface
- the code stream of the preset frame of the camera equipment of each track is transmitted through the preset transmission channel, and the image data corresponding to the code stream of each track is obtained in the preset transmission channel , And then get the image of the screen to be captured.
- the above process is completed in one transmission channel, even if the camera equipment is increased, there is no need to increase the transmission channel, saving transmission channel resources.
- the image data is obtained in one transmission channel, and the image data is correspondingly stored in the buffer area to obtain the image of the picture to be captured, without the need for image splicing processing, which saves image splicing resources.
- an embodiment of the present application also provides an image acquisition device.
- the image acquisition device includes:
- the first acquiring module 410 is configured to acquire the code streams of preset frames of multiple tracks transmitted by a preset transmission channel, wherein each track corresponds to at least one camera device;
- the second acquisition module 420 is configured to acquire image data corresponding to the code streams of each track;
- the storage module 430 is configured to store the acquired image data of each track in the buffer area corresponding to each track according to the corresponding relationship between the track and the buffer area to obtain the image of the picture to be captured.
- the first acquisition module may be specifically used for:
- the image acquisition device may further include:
- the third acquiring module is used to acquire the track quantity of multiple tracks
- the determination module is used to determine the number of buffer areas to be allocated based on the number of tracks;
- the allocation module is used to allocate a corresponding buffer area for each track, where the buffer area is used to store image data of the track corresponding to the buffer area.
- the allocation module is specifically used for:
- the storage module 430 is specifically used for:
- the image data stored in each buffer area is combined to obtain the image of the picture to be captured.
- the image acquisition device may further include:
- the encoding module is used to perform encoding processing on the stored image data after the image data storage of each track is completed to obtain the image of the to-be-captured picture that meets the preset format.
- the code stream of the preset frame of each track is transmitted through the preset transmission channel, and the image data corresponding to the code stream of each track is obtained in the preset transmission channel, and then The image of the screen to be captured.
- the above process is completed in one transmission channel, even if the camera equipment is increased, there is no need to increase the transmission channel, saving transmission channel resources.
- the image data is obtained in one transmission channel, and the image data is correspondingly stored in the buffer area to obtain the image of the picture to be captured, without the need for image splicing processing, which saves image splicing resources.
- an embodiment of the present application also provides an electronic device, as shown in FIG. 5, including a processor 510 and a memory 520, wherein,
- the memory 520 is used to store computer programs
- the processor 510 is configured to execute the computer program stored in the memory 520 to implement the following steps:
- the acquired image data of each track is stored in the buffer area corresponding to each track to obtain the image of the picture to be captured.
- the code stream of the preset frame of each track is transmitted through the preset transmission channel, and the image data corresponding to the code stream of each track is obtained in the preset transmission channel, and then The image of the screen to be captured.
- the above process is completed in one transmission channel, even if the camera equipment is increased, there is no need to increase the transmission channel, saving transmission channel resources.
- the image data is obtained in one transmission channel, and the image data is correspondingly stored in the buffer area to obtain the image of the picture to be captured, without the need for image splicing processing, which saves image splicing resources.
- the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage.
- NVM non-Volatile Memory
- the memory may also be at least one storage device located far away from the foregoing processor.
- the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
- CPU central processing unit
- NP Network Processor
- DSP Digital Signal Processing
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- the embodiment of the present application also provides a machine-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned image acquisition methods is implemented .
- the embodiment of the present application also provides an application program, which is used to execute any of the above-mentioned image acquisition methods at runtime.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
Description
Claims (13)
- 一种图像获取方法,其特征在于,所述方法包括:获取预设传输通道传输的多个轨道的预设帧的码流,其中,每个轨道对应至少一个摄像设备;获取各轨道的码流对应的图像数据;按照轨道与缓存区的对应关系,将所获取的各轨道的图像数据存储至所述各轨道对应的缓存区,得到待抓取画面的图像。
- 根据权利要求1所述的方法,其特征在于,所述获取预设传输通道传输的多个轨道的预设帧的码流的步骤,包括:获取预设传输通道传输的待抓取画面的数据包,其中,所述数据包携带多个轨道的预设帧的码流。
- 根据权利要求1所述的方法,其特征在于,在所述按照轨道与缓存区的对应关系,将所获取的各轨道的图像数据存储至所述各轨道对应的缓存区,得到待抓取画面的图像的步骤之前,所述方法还包括:获取所述多个轨道的轨道数量;基于所述轨道数量,确定所需分配的缓存区的数量;为每一轨道分配对应的缓存区,其中,所述缓存区用于存储该缓存区对应的轨道中的图像数据。
- 根据权利要求3所述的方法,其特征在于,所述为每一轨道分配对应的缓存区的步骤,包括:分配可用存储空间不小于目标数据量、且宽度不小于预设宽度、高度不小于预设高度的总缓存区,其中,所述目标数据量为待抓取画面的图像所需的数据量,所述预设宽度和所述预设高度分别为所述图像所需的宽度和高度;将所述总缓存区的所述预设宽度进行平均划分,得到长度相同的多个子宽度,其中,所述多个子宽度的数量与所述轨道数量相同;将每个子宽度与所述预设高度所形成的区域确定为缓存区,其中,所确 定出的缓存区与轨道为一一对应关系;所述按照轨道与缓存区的对应关系,将所获取的各轨道的图像数据存储至所述各轨道对应的缓存区,得到待抓取画面的图像的步骤,包括:基于所获取的各轨道的图像数据,得到图像宽度为子宽度以及图像高度为所述预设高度的图像数据;按照缓存区与轨道的一一对应关系,将所获取的各轨道的图像数据分别存储至所述各轨道对应的缓存区;在所述各轨道的图像数据存储完成后,将各缓存区中存储的图像数据进行组合,得到待抓取画面的图像。
- 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:在所述各轨道的图像数据存储完成后,对所存储的图像数据进行编码处理,得到满足预设格式的待抓取画面的图像。
- 一种图像获取装置,其特征在于,所述装置包括:第一获取模块,用于获取预设传输通道传输的多个轨道的预设帧的码流,其中,每个轨道对应至少一个摄像设备;第二获取模块,用于获取各轨道的码流对应的图像数据;存储模块,用于按照轨道与缓存区的对应关系,将所获取的各轨道的图像数据存储至所述各轨道对应的缓存区,得到待抓取画面的图像。
- 根据权利要求6所述的装置,其特征在于,所述第一获取模块,具体用于:获取预设传输通道传输的待抓取画面的数据包,其中,所述数据包携带多个轨道的预设帧的码流。
- 根据权利要求6所述的装置,其特征在于,所述装置还包括:第三获取模块,用于获取所述多个轨道的轨道数量;确定模块,用于基于所述轨道数量,确定所需分配的缓存区的数量;分配模块,用于为每一轨道分配对应的缓存区,其中,所述缓存区用于存储该缓存区对应的轨道的图像数据。
- 根据权利要求8所述的装置,其特征在于,所述分配模块,具体用于:分配可用存储空间不小于目标数据量、且宽度不小于预设宽度、高度不小于预设高度的总缓存区,其中,所述目标数据量为待抓取画面的图像所需的数据量,所述预设宽度和所述预设高度分别为所述图像所需的宽度和高度;将所述总缓存区的所述预设宽度进行平均划分,得到长度相同的多个子宽度,其中,所述多个子宽度的数量与所述轨道数量相同;将每个子宽度与所述预设高度所形成的区域确定为缓存区,其中,所确定出的缓存区与轨道为一一对应关系;所述存储模块,具体用于:基于所获取的各轨道的图像数据,得到图像宽度为子宽度以及图像高度为所述预设高度的图像数据;按照缓存区与轨道的一一对应关系,将所获取的各轨道的图像数据分别存储至所述各轨道对应的缓存区;在所述各轨道的图像数据存储完成后,将各缓存区中存储的图像数据进行组合,得到待抓取画面的图像。
- 根据权利要求6-9任一项所述的装置,其特征在于,所述装置还包括:编码模块,用于在所述各轨道的图像数据存储完成后,对所存储的图像数据进行编码处理,得到满足预设格式的待抓取画面的图像。
- 一种电子设备,其特征在于,包括处理器和存储器,其中,所述存储器,用于存放计算机程序;所述处理器,用于执行所述存储器上所存放的计算机程序时,实现权利要求1-5任一项所述的方法。
- 一种机器可读存储介质,其特征在于,所述机器可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-5任一项所 述的方法。
- 一种应用程序,其特征在于,用于在运行时执行:权利要求1-5任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910283294.6A CN111818295B (zh) | 2019-04-10 | 2019-04-10 | 一种图像获取方法及装置 |
| CN201910283294.6 | 2019-04-10 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020207403A1 true WO2020207403A1 (zh) | 2020-10-15 |
Family
ID=72752131
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/083707 Ceased WO2020207403A1 (zh) | 2019-04-10 | 2020-04-08 | 一种图像获取方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN111818295B (zh) |
| WO (1) | WO2020207403A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114928730A (zh) * | 2022-06-23 | 2022-08-19 | 湖南国科微电子股份有限公司 | 图像处理方法和图像处理装置 |
| CN117499601A (zh) * | 2024-01-02 | 2024-02-02 | 上海励驰半导体有限公司 | 用于SoC的调用多摄像头数据的方法 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112565627B (zh) * | 2020-11-30 | 2023-02-03 | 天津津航计算技术研究所 | 一种基于位图叠加的多路视频集中显示设计方法 |
| CN113068024B (zh) * | 2021-03-19 | 2024-04-16 | 瑞芯微电子股份有限公司 | 一种实时抓图分析方法及存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060168350A1 (en) * | 2005-01-25 | 2006-07-27 | Shingo Ishiyama | Image processing apparatus |
| US20080107334A1 (en) * | 2006-10-03 | 2008-05-08 | Quanta Computer Inc. | Image processing apparatus and method |
| CN103260011A (zh) * | 2013-05-16 | 2013-08-21 | 杭州巨峰科技有限公司 | 一种利用网络硬盘录像机实现更多路数的监视系统及方法 |
| CN105306837A (zh) * | 2015-10-27 | 2016-02-03 | 浙江宇视科技有限公司 | 多图像拼接方法及装置 |
| CN109120867A (zh) * | 2018-09-27 | 2019-01-01 | 乐蜜有限公司 | 视频合成方法及装置 |
| CN109429037A (zh) * | 2017-09-01 | 2019-03-05 | 杭州海康威视数字技术股份有限公司 | 一种图像处理方法、装置、设备及系统 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070022215A1 (en) * | 2005-07-19 | 2007-01-25 | Singer David W | Method and apparatus for media data transmission |
| US20070056001A1 (en) * | 2005-08-24 | 2007-03-08 | Hules Frank J | Dual channel video and audio data for DBS receivers |
| WO2008048065A1 (en) * | 2006-10-19 | 2008-04-24 | Lg Electronics Inc. | Encoding method and apparatus and decoding method and apparatus |
| CN102497527B (zh) * | 2011-12-16 | 2013-11-27 | 杭州海康威视数字技术股份有限公司 | 多处理器视频处理系统及其中的视频图像同步传输与显示方法 |
| CN104050092B (zh) * | 2013-03-15 | 2018-05-01 | 上海芯豪微电子有限公司 | 一种数据缓存系统及方法 |
| US10708328B2 (en) * | 2014-03-17 | 2020-07-07 | Intel Corporation | Hardware assisted media playback and capture synchronization |
| KR101560727B1 (ko) * | 2014-04-07 | 2015-10-15 | 네이버 주식회사 | 멀티트랙 비디오 컨텐츠의 제공을 위한 멀티트랙 비디오 컨텐츠 서비스 방법 및 시스템 |
-
2019
- 2019-04-10 CN CN201910283294.6A patent/CN111818295B/zh active Active
-
2020
- 2020-04-08 WO PCT/CN2020/083707 patent/WO2020207403A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060168350A1 (en) * | 2005-01-25 | 2006-07-27 | Shingo Ishiyama | Image processing apparatus |
| US20080107334A1 (en) * | 2006-10-03 | 2008-05-08 | Quanta Computer Inc. | Image processing apparatus and method |
| CN103260011A (zh) * | 2013-05-16 | 2013-08-21 | 杭州巨峰科技有限公司 | 一种利用网络硬盘录像机实现更多路数的监视系统及方法 |
| CN105306837A (zh) * | 2015-10-27 | 2016-02-03 | 浙江宇视科技有限公司 | 多图像拼接方法及装置 |
| CN109429037A (zh) * | 2017-09-01 | 2019-03-05 | 杭州海康威视数字技术股份有限公司 | 一种图像处理方法、装置、设备及系统 |
| CN109120867A (zh) * | 2018-09-27 | 2019-01-01 | 乐蜜有限公司 | 视频合成方法及装置 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114928730A (zh) * | 2022-06-23 | 2022-08-19 | 湖南国科微电子股份有限公司 | 图像处理方法和图像处理装置 |
| CN114928730B (zh) * | 2022-06-23 | 2023-08-22 | 湖南国科微电子股份有限公司 | 图像处理方法和图像处理装置 |
| CN117499601A (zh) * | 2024-01-02 | 2024-02-02 | 上海励驰半导体有限公司 | 用于SoC的调用多摄像头数据的方法 |
| CN117499601B (zh) * | 2024-01-02 | 2024-04-05 | 上海励驰半导体有限公司 | 用于SoC的调用多摄像头数据的方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111818295B (zh) | 2022-02-01 |
| CN111818295A (zh) | 2020-10-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110868600B (zh) | 目标跟踪视频推流方法、显示方法、装置和存储介质 | |
| WO2020207403A1 (zh) | 一种图像获取方法及装置 | |
| CN110784718B (zh) | 视频数据编码方法、装置、设备和存储介质 | |
| US11638066B2 (en) | Method, device and computer program for encapsulating media data into a media file | |
| US12526438B2 (en) | Video transcoding and video display method, apparatus, and electronic device | |
| CN103929657B (zh) | 视频复用设备和方法、复用视频解码设备和方法 | |
| CN109429037B (zh) | 一种图像处理方法、装置、设备及系统 | |
| CN111479162B (zh) | 直播数据传输方法、装置以及计算机可读存储介质 | |
| WO2021147702A1 (zh) | 一种视频处理方法及其装置 | |
| CN107155093B (zh) | 一种视频预览方法、装置及设备 | |
| CN105306837A (zh) | 多图像拼接方法及装置 | |
| CN112511896A (zh) | 一种视频渲染方法及装置 | |
| CN111757121A (zh) | 视频流倒放方法及装置 | |
| CN114830674A (zh) | 发送装置和接收装置 | |
| CN115426501A (zh) | 一种音视频码流时间校准方法及电子设备 | |
| CN115695883A (zh) | 一种视频数据处理方法、装置、设备以及存储介质 | |
| CN112911299B (zh) | 一种视频码率控制方法、装置、电子设备和存储介质 | |
| TW201519641A (zh) | 資料處理裝置、資料處理方法、程式、記錄媒體及資料處理系統 | |
| WO2021114305A1 (zh) | 视频处理方法、装置及计算机可读存储介质 | |
| CN107580228A (zh) | 一种监控视频处理方法、装置及设备 | |
| CN115460369B (zh) | 视频录像设备、离线视频分析方法、电子设备及存储介质 | |
| CN117041685A (zh) | 道路病害展示方法、系统、装置、设备及可读存储介质 | |
| WO2024002264A1 (zh) | 视频处理设备、进度条时间更新方法及装置、电子设备 | |
| CN116781913A (zh) | 点云媒体的编解码方法及相关产品 | |
| CN109495793B (zh) | 一种弹幕写入方法、装置、设备及介质 |
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: 20786765 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20786765 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17/05/2023) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20786765 Country of ref document: EP Kind code of ref document: A1 |