Method, device and equipment for processing video stream file, vehicle and medium
By blurring the target objects in multiple original video streams and writing them to the target video stream file, the problems of sensitive information in the video stream are solved, and the security and processing efficiency of the video stream files are improved.
Patent Information
- Application Number
- CN202311369801.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-04-22
AI Technical Summary
During the process of acquiring the camera video stream, multiple video streams contain sensitive information, such as license plates and pedestrian faces, resulting in information security issues, and traditional solutions fail to effectively remove these sensitive information.
By blurring the target objects in the original video frames in multiple original video streams, the target video frame is generated and written to the target video stream file, and the processing is performed based on the frame index and the number of executions.
Rapidly generate video stream files including multiple fuzzy video streams, improving the security of video stream files and reducing the resources required to process video stream files.
Smart Images

Figure CN119865563A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure generally relate to the field of video processing, and in particular to a method, an apparatus, a device, a vehicle, and a medium for processing a video stream file. Background Art
[0002] With the development of technology, more and more companies have added assisted driving functions to vehicles to help drivers drive their vehicles. By adding these assisted driving technologies or providing assisted driving information, drivers can operate the vehicle more easily, ensuring that the vehicle is safer during driving and providing a better driving experience.
[0003] In the technology of assisting drivers in driving vehicles, the video technology for providing the vehicle's surrounding environment in real time has been rapidly developed. In this technology, the environmental information of the vehicle's surroundings is provided to the user through the video stream captured by one or more cameras arranged on the vehicle. The driver can make appropriate operations based on the environmental information of the vehicle's surroundings obtained. In addition, the environmental information obtained can also be used for further analysis and processing. However, there are still many problems that need to be solved in the process of obtaining the video stream of the camera. Summary of the invention
[0004] Embodiments of the present disclosure provide a method, apparatus, device, vehicle, and medium for processing a video stream file.
[0005] According to a first aspect of the present disclosure, a method for processing a video stream file is provided. The method includes obtaining an original video stream file, wherein the original video stream file includes multiple original video streams captured by multiple cameras. The method also includes obtaining a target video frame by blurring a target object in an original video frame in the multiple original video streams. The method also includes writing the target video frame into a corresponding target video stream of the target video stream file based on a frame index and an execution count of the target video frame, wherein the execution count is related to the number of processed original video streams in the multiple original video streams.
[0006] According to a second aspect of the present disclosure, a device for processing a video stream file is provided. The device includes an original video stream file acquisition unit, configured to acquire an original video stream file, wherein the original video stream file includes multiple original video streams captured by multiple cameras; a target video frame acquisition unit, configured to acquire a target video frame by blurring a target object in an original video frame in the multiple original video streams; and a target video frame writing unit, configured to write the target video frame into a corresponding target video stream of the target video stream file based on a frame index and an execution count of the target video frame, wherein the execution count is related to the number of processed original video streams in the multiple original video streams.
[0007] According to a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processor; and a memory coupled to the at least one processor and having instructions stored thereon, which, when executed by the at least one processor, causes the device to perform the steps of the method in the first aspect of the present disclosure.
[0008] According to a fourth aspect of the present disclosure, a vehicle is provided, the vehicle including a plurality of cameras and the electronic device in the third aspect of the present disclosure.
[0009] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored on the computer-readable storage medium, wherein the computer-executable instructions are executed by a processor to implement the steps of the method in the first aspect of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present disclosure.
[0011] Figure 1 A schematic diagram illustrating an example environment in which devices and / or methods according to embodiments of the present disclosure may be implemented;
[0012] Figure 2 A schematic diagram illustrating an example process of generating a blurred video stream file according to an embodiment of the present disclosure;
[0013] Figure 3 A schematic diagram illustrating an example of determining a region of a target object according to an embodiment of the present disclosure;
[0014] Figure 4A and 4B A schematic diagram illustrating an example of generating a blurred video frame according to an embodiment of the present disclosure is illustrated;
[0015] Figure 5 A flowchart of a method for processing a video stream file according to an embodiment of the present disclosure is illustrated;
[0016] Figure 6 A schematic diagram illustrating an example process for processing a video stream file according to an embodiment of the present disclosure is illustrated;
[0017] Figure 7 A schematic diagram of a device for processing a video stream file according to an embodiment of the present disclosure is illustrated;
[0018] Figure 8 A schematic block diagram of an example device suitable for implementing embodiments of the present disclosure is illustrated.
[0019] In the various drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0021] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0022] As mentioned above, there are still many problems to be solved in the process of obtaining the video stream of the camera. For example, when the environmental information around the vehicle is obtained through multiple cameras, the multiple video streams obtained by the multiple cameras usually include sensitive information such as the license plates of the surrounding vehicles and the faces of the surrounding pedestrians. Since the multiple video streams include some sensitive information related to information security, the obtained video stream file including the multiple video streams may cause information security problems, and this will also lead to the obtained video stream not complying with the provisions of some laws and regulations. In addition, the traditional solution does not involve a method for removing sensitive information from the multiple video streams in the video stream file.
[0023] At least to solve the above and other potential problems, an embodiment of the present disclosure provides a method for processing a video stream file. In this method, a computing device first obtains an original video stream file including multiple video streams. Then, the computing device generates a corresponding target video frame by blurring the target object in each original video frame in the multiple original video streams. Then, the computing device writes the generated target video frame into the corresponding target video stream of the target video stream file to generate a target video stream file including the blurred video frame. Through this method, a video stream file including multiple blurred video streams can be quickly generated, the security of the video stream file is improved, and the resources required for processing the video stream file are reduced.
[0024] The embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. Figure 1An example environment is shown in which the apparatus and / or method of embodiments of the present disclosure may be implemented.
[0025] like Figure 1 As shown, the example environment 100 includes a vehicle 102. The vehicle 102 is equipped with multiple cameras for acquiring environmental information around the vehicle and generating corresponding multiple video streams. Figure 1 As shown, four cameras are installed on the vehicle 102, which are respectively used to obtain video streams of the front, rear, left and right sides of the vehicle. Figure 1 The vehicle shown as having four cameras is only used to describe the present disclosure, not to specifically limit the present disclosure. Any suitable number of multiple cameras can be set on the vehicle 102. In some embodiments, the cameras arranged on the vehicle 102 constitute a near range camera system (Near Range Camera System, NRCS). Additionally, the camera can be a fisheye camera. In some embodiments, the camera system on the vehicle is a system composed of general cameras. The above examples are only used to describe the present disclosure, not to specifically limit the present disclosure.
[0026] The vehicle 102 may include a computing device 104. The computing device 104 is used to process a video stream file including a video stream acquired by a camera, mainly to process the video stream file acquired from the camera to obtain a video stream file with sensitive information removed. In one example, the computing device 104 may be a whole vehicle computing device. In another example, the computing device 104 may be a domain computing device in a vehicle. In yet another example, the computing device 104 may be implemented by any suitable computing device, including but not limited to a personal computer, a mobile device, a multi-processor system, a consumer electronic product, a small computer, a distributed computing environment including any one of the above systems or devices, and the like.
[0027] like Figure 1 As shown, the computing device 104 processes the original video stream file 106, which is a file formed by a video stream obtained from a camera on a vehicle. The original video stream file includes multiple original video streams 110-1, 110-2, ..., 1103-N, where N is a positive integer. Each of the multiple original video streams in the original video stream file 106 is a video stream captured by one of the multiple cameras. Each original video stream includes multiple original video frames, some of which may include sensitive information, for example, the original video frames obtained include sensitive information such as the license plate of the vehicle and / or the face of the pedestrian.
[0028] like Figure 1As shown, the original video frame 112 in the original video stream 110-1 includes the face of a pedestrian and the license plate of a vehicle. In order to remove sensitive information in the acquired original video stream file 106, the computing device 104 can blur the original video frame in the original video stream file to generate a target video stream file 108. The target video stream file 108 includes multiple target video streams 114-1, 114-2, ..., 114-N corresponding to the multiple original video streams 110-1, 110-2, ..., 1103-N. For example, the face of the pedestrian and the license plate of the vehicle in the original video frame 112 in the original video stream 110-1 are blurred to obtain the target video frame 116. The blurred target video frame is written into the corresponding target video stream in the target video stream file 108.
[0029] Alternatively or additionally, the above functions may be implemented by an anonymization tool provided in the computing device 104. In some embodiments, the plurality of original video streams 110-1, 110-2, ..., 110-N are obtained from a fisheye camera of the NRCS. At this time, distortion may occur near the edge of the video frame. Therefore, the anonymization tool uses a rotation target detection model instead of a normal target detection model to obtain target objects in the video frame, such as license plates and pedestrians' faces.
[0030] In the above manner, blur processing is performed on the video frames of each video stream in the original video stream file, and then the processed video frames are stored again in the newly created target video stream corresponding to the original video stream, so as to quickly generate a video stream file including multiple blurred video streams. Since the target object in each video frame is blurred, the security of the video stream file is improved, and the resources required for processing the video stream file are reduced.
[0031] Combined with the above Figure 1 A block diagram of an example system 100 is depicted in which embodiments of the present disclosure can be implemented. Figure 2 A schematic diagram is provided to describe an example of generating a blurred video stream file according to an embodiment of the present disclosure.
[0032] like Figure 2 As shown, the original video stream file 106 includes multiple original video streams 202 and other information 204 related to the multiple original video streams 202. The multiple original video streams 202 are video streams generated by multiple cameras on the vehicle. The other information 204 includes non-video signals from a controller area network (CAN) bus, such as the speed and driving direction of the vehicle. In an example, the original video stream file 106 can be a measurement data format version 4 (MF4).
[0033] Outside the box 206, the original video frames are read from the multiple original video streams 202 in the original video stream file 106. For example, the original video stream file includes video streams captured by four fisheye cameras, and the video frame format in the video stream is YUV422 12 bits. YUV refers to a pixel format in which the brightness parameter and the chrominance parameter are separately represented, where "Y" represents brightness (Luminance or Luma), that is, grayscale value; and "U" and "V" represent chrominance (Chrominance or Chroma), which is used to describe the color and saturation of the image, and is used to specify the color of the pixel, and each pixel is represented by 12 bits.
[0034] Then at block 208, the computing device converts the original video frame from the YUV422 format to the RGB format. At block 210, the computing device detects sensitive information such as a license plate and / or a pedestrian's face from the converted video frame to generate polygon coordinates including the sensitive information. The process of detecting the polygon coordinates can be as follows: Figure 3 Then, the region containing sensitive information in the original video frame is determined according to the obtained polygon coordinates, and then, at block 212, the region is blurred to form a blurred video stream. At this time, the computing device uses the determined polygon coordinates to find the corresponding region in the original video frame to blur the region. The processing process can be seen below Figure 4A At block 214, the blurred video stream is written to a target video stream file, such as a newly generated MF4 file. At block 216, the other information 204 is appended to the target video stream file. Then, the target video stream file 108 is generated, including the blurred video stream 218 and the appended other information 220.
[0035] By using this method, a video stream file including a plurality of blurred video streams can be quickly generated, thereby improving the security of the video stream file and reducing the resources required for processing the video stream file.
[0036] Combined with the above Figure 2 The following is a schematic diagram of an example of generating a blurred video stream file according to an embodiment of the present disclosure. Figure 3 A schematic diagram describing an example of determining a region of a target object according to an embodiment of the present disclosure.
[0037] like Figure 3As shown, the converted original video frame 112 is input into the video frame processing module 302. The video frame processing module 302 includes a neural network model. In some embodiments, the neural network model is a deformable convolutional neural network (DCNConv) model. In some embodiments, the neural network model can be a recursive neural network model. In some embodiments, the neural network model can be any other suitable neural network model. After the video frame processing module 302 processes the converted original video frame 112, the position of the target object in the converted video frame can be determined. For example, the coordinates of the polygonal area including the license plate and the face.
[0038] Alternatively, the video frames are generated by an NRCS fisheye camera. Unlike ordinary object detection, due to the distortion generated by NRCS, theta (the angle between the long side of the bounding box and the x-axis) is added as a feature to mark the training data. During training, approximately 5000 and 1000 samples are used as training sets and test sets to build the detection model. The accuracy and recall of detecting license plates are 0.91 and 0.85, respectively. For face detection, the accuracy and recall reach 0.945 and 0.952, respectively. The inference result for the input video frame is expressed as [class, center_x, center_y, width, height, theta], where class represents the type of object, center_x, center_y represent the center point coordinates of the determined target area, width represents the width of the quadrilateral including the center point, and height represents the height of the quadrilateral including the center point. Then, based on the coordinate information in the inference result, the area including the target object can be determined from the original video frame before conversion.
[0039] Combined with the above Figure 3 A schematic diagram of an example for determining the area of a target object according to an embodiment of the present disclosure is described. Figure 4A and Figure 4B A schematic diagram describing an example of generating a blurred video frame according to an embodiment of the present disclosure.
[0040] like Figure 3 As shown, for each detected region, the coordinates of each bounding box including each detected region should be recorded. Then, during the mosaic processing, a mosaic is added to the region within the recorded coordinates of the original video frame to blur the target object.
[0041] In some embodiments, Figure 4AAs shown, in example 400A, multiple regions including a person's face and a license plate are determined by detecting the converted original video frame 112. Next, the pixel value of each pixel in each of the multiple regions of the original video frame 112 before conversion is adjusted to the same value. After the pixel value in each region is adjusted to the same value, a target video frame 116 including multiple regions presenting the same color is generated. Alternatively or additionally, the colors of the multiple regions may be the same or different.
[0042] In some embodiments, Figure 4B As shown, in example 400B, multiple regions including a person's face and a license plate are determined by detecting the converted original video frame 112. Next, a high-term blurring process is performed on the pixel values of each of the multiple regions of the original video frame 112 before conversion, thereby generating a target video frame 116 including a blurred face region and a license plate region.
[0043] Combined with the above Figure 4A-4B A schematic diagram of an example of generating a blurred video frame according to an embodiment of the present disclosure is described. Figure 5 A flowchart of a method 500 for processing a video stream file according to an embodiment of the present disclosure is described. The method 500 may be Figure 1 The process is executed at computing device 104 or any suitable computing device or server.
[0044] In block 502, the computing device 104 obtains an original video stream file. The original video stream file includes multiple original video streams captured by multiple cameras. For example, the computing device 104 obtains an original video stream file 106 formed by multiple video streams captured by multiple cameras on the vehicle 102. In addition to the multiple video streams, the original video stream file 106 also includes other non-video stream information obtained from the CAN bus.
[0045] In block 504 , the computing device obtains a target video frame by blurring the target object in the original video frames in the plurality of original video streams. For example, the computing device 104 blurs the target object (eg, the face of a pedestrian) in the original video frame 112 to obtain the blurred target video frame 116 .
[0046] In some embodiments, when blurring a target object in an original video frame in a plurality of original video streams, a computing device first determines a target region in the original video frame, where the target region includes a target object, such as a license plate or a pedestrian's face that needs to be hidden. The target region is represented by coordinates. The computing device then blurs the target region to generate a target video frame having a blurred region.
[0047] In some embodiments, when determining the area including the target object in the original video frame, the computing device needs to convert the original video frame from a first format to a second format, for example, converting the video frame from a YUV format to an RGB format. Then, the computing device needs to identify the target object in the converted original video frame, and then the computing device determines the coordinates of the area including the target object in the original video frame. In one example, the process of determining the coordinates of the area including the target object based on the video frame is implemented by a neural network model. The above examples are only used to describe the present disclosure, and are not specific limitations of the disclosure.
[0048] In some embodiments, when blurring an area to obtain a target video frame, the computing device 104 adjusts the pixel values of the area including the target object to the same pixel values to obtain the target video frame. In some embodiments, when blurring an area to obtain a target video frame, the computing device 104 performs Gaussian blurring on the area including the target object to obtain the target video frame.
[0049] In block 506, the computing device writes the target video frame into the corresponding target video stream of the target video stream file based on the frame index and the execution number of the target video frame. Wherein, the execution number is related to the number of processed original video streams in the plurality of original video streams. For example, the computing device 104 writes the target video frame into the corresponding target video stream of the target video stream file 108 according to the frame index of the target video frame 116 and the execution number, and the execution number is related to the number of processed original video streams in the plurality of original video streams.
[0050] In some embodiments, the original video frame is located in an original video stream among multiple original video streams, and when the target video frame is written into the corresponding target video stream of the target video stream file, the computing device processes frame by frame. First, the computing device obtains the frame index of each target video frame to be written. Then, the computing device determines whether the target video frame corresponds to the starting video frame of the original video stream according to the frame index. For example, the computing device determines whether the frame corresponds to the starting video frame of the original video stream according to whether the frame index of the target video frame is zero. If the target video frame corresponds to the starting video frame of the original video stream, it indicates that the corresponding target video stream has not been created in the target video stream file. At this time, the computing device first creates the target video stream. Then, the target video frame is added to the target video stream. In addition, after the target video stream is newly created, the computing device can also set the video stream information for the target video stream, such as the type of the video stream and the resolution of the video frame in the target video stream. If the target video frame does not correspond to the starting video frame of the original video stream, it indicates that the video frame is not the starting video frame of the target video stream. Therefore, the target video stream has been created, and now it is only necessary to add the target video frame to the target video stream.
[0051] In some embodiments, the computing device also needs to further determine whether the target video frame corresponds to the last video frame in the original video stream. If the target video frame does not correspond to the last video frame in the original video stream, the operation of processing the next frame continues. If the target video frame corresponds to the last video frame in the original video stream, it indicates that the target video stream has been written. At this time, the computing device needs to determine whether all original video streams have been processed. In one example, the computing device obtains the number of executions related to the execution of the video stream. The number of executions is related to the original video stream or the target video stream that has been processed. Further, the computing device first determines whether the number of executions is equal to the threshold number of times, and the threshold number of times is the number of original video streams in the original video stream file. If the number of executions is equal to the threshold number of times, the computing device adds the remaining information in the original video stream file to the target video stream file.
[0052] For example, when writing a blurred video frame corresponding to an original video frame in a first original video stream, the execution times of all blurred video frames corresponding to the first original video stream are all 1. When writing a blurred video frame corresponding to an original video frame in a second original video stream, the execution times of all blurred video frames corresponding to the second original video stream are all 2, and so on. If the original video stream file includes four video streams, the threshold number of times is 4. Each time a video stream is executed, the execution times are compared with the threshold number of times. If the execution times are less than the threshold number of times, it indicates that the original video stream in the original video stream file has not been processed yet, so other video streams are continued to be processed. If the execution times are equal to the threshold number of times, it indicates that the operation has been performed, and other information in the original video stream file is added to the target video stream. Next, the generated target video stream file is managed. In some embodiments, the target video stream and the original video stream correspond to the same camera in multiple cameras.
[0053] By using this method, a video stream file including a plurality of blurred video streams can be quickly generated, thereby improving the security of the video stream file and reducing the resources required for processing the video stream file.
[0054] Combined with the above Figure 5 A flowchart of a method for processing a video stream file according to an embodiment of the present disclosure is described. Figure 6 A schematic diagram describing an example process for processing a video stream file according to an embodiment of the present disclosure.
[0055] like Figure 6As shown, in example 600, an anonymization tool 602 may be included, which is used to anonymize the video stream. At box 604, the video stream information in the original video stream file is obtained. Then, at box 606, it is determined whether the video stream in the original video stream file is an NRCS video stream according to the video stream type in the video stream information. If the video stream in the original video stream file is not an NRCS video stream, then return to 604 to continue processing the following video stream file. If the video stream in the original video stream file is an NRCS video stream, then at box 608, the original video stream in the original video stream file is loaded according to the video stream index in the video stream information. At box 610, the computing device performs frame preprocessing, for example, the format of the original video frame in the original video stream is converted, such as from YUV format to RGB format. Next, at box 612, the converted original video frame is detected and fuzzy. For example, the coordinates of the area where the target object in the converted original video frame is located are detected, and then the corresponding area in the original video frame before conversion is determined using the coordinates. Then, the region in the unconverted original video frame is subjected to a blur operation using a predetermined method. At block 614, the computing device performs a video frame operation, such as generating a blurred target video frame, and determines the index of the target video frame and the corresponding number of executions. Then, at block 616, a write operation of the blurred target video frame is performed. Specifically, block 618 describes in detail the process of writing the blurred target video frame and generating the target video stream file.
[0056] At box 620, the computing device obtains the video stream index, video frame index and execution count for the target video frame. The execution count is related to the number of processed original video streams. If the processed target video frame is in the first original video stream and there is no processed original video stream, the execution count is set to 1; if the processed target video frame is in the second original video stream and there is a processed original video stream, the execution count is adjusted to 2, and so on, to determine the execution count corresponding to the target video frame. Then call and open the Measurement Data Format (MDF) service. At box 622, the computing device determines whether the index of the target video frame is 0. If it is not 0, it indicates that the target video frame does not correspond to the starting video frame of the original video stream, and then directly proceeds to box 628. If it is 0, it indicates that the target video frame corresponds to the starting video frame of the original video stream, so at box 624, the computing device creates a target video stream. At box 626, the computing device also sets the video stream information of the target video stream, such as the type of video stream, the resolution of the video frame, etc. Next, at block 628, the target video frame is acquired.
[0057] At box 630, the target video frame is added to the target video stream. Then, at box 632, it is determined whether the target video frame is the last original video frame corresponding to the original video stream. If not, it is returned to box 628 to continue processing. If it is determined that the target video frame corresponds to the last video frame of the original video stream, it proceeds to box 634, and the computing device further determines whether the number of executions is equal to the threshold number of times. Since the original video stream file includes four original video streams obtained by four fisheye cameras, the threshold number of times is set to 4. If the number of executions is not equal to the threshold number of times, it indicates that the processing of the video stream has not been completed. If the number of executions is equal to the threshold number of times, it indicates that all video streams have been processed. Next, at box 636, numbers in other formats are added to the target video stream file. At box 638, the computing device controls the MDF service to complete the generation of the target video stream file. Then, the MDF service is closed in box 640.
[0058] By using this method, a video stream file including a plurality of blurred video streams can be quickly generated, thereby improving the security of the video stream file and reducing the resources required for processing the video stream file.
[0059] Figure 7 A schematic diagram of an apparatus for processing a video stream file according to an embodiment of the present disclosure is further shown. The apparatus 700 may be applied to a computing device 104, which may include multiple modules for performing the following steps: Figure 5 The corresponding steps in the method 500 discussed in Figure 7 As shown, the device 700 includes an original video stream file acquisition unit 702, which is configured to acquire an original video stream file, wherein the original video stream file includes multiple original video streams captured by multiple cameras; a target video frame acquisition unit 704, which is configured to acquire a target video frame by blurring a target object in an original video frame in the multiple original video streams; and a target video frame writing unit 706, which is configured to write the target video frame into a corresponding target video stream of the target video stream file based on a frame index and an execution count of the target video frame, wherein the execution count is related to the number of processed original video streams in the multiple original video streams.
[0060] In some embodiments, the original video frame is located in an original video stream among multiple original video streams, wherein the target video frame writing unit 706 includes: a starting video frame determining unit, configured to determine whether the target video frame corresponds to the starting video frame of the original video stream based on a frame index; a target video stream creating unit, configured to create a target video stream in response to the target video frame corresponding to the starting video frame of the original video stream; and a first adding unit, configured to add the target video frame to the target video stream.
[0061] In some embodiments, the target video frame writing unit 706 further includes: a target video stream information determination unit configured to determine information describing the target video stream, the information including at least one of the following: the type of the target video stream and the resolution of the video frames in the target video stream.
[0062] In some embodiments, the target video frame writing unit 706 further includes: a second adding unit configured to add the target video frame to the target video stream in response to the target video frame not corresponding to the starting video frame of the original video stream.
[0063] In some embodiments, the device 700 also includes: a last video frame determination unit, configured to determine whether the target video frame corresponds to the last video frame in the original video stream; and a response determination unit, configured to determine whether the number of executions is equal to a threshold number of times in response to the target video frame corresponding to the last video frame in the original video stream; and in response to the number of executions being equal to the threshold number of times, adding the remaining information in the original video stream file to the target video stream file.
[0064] In some embodiments, the target video stream and the original video stream correspond to the same camera among the plurality of cameras.
[0065] In some embodiments, the target video frame acquisition unit 704 includes: a region determination unit configured to determine a region including a target object in the original video frame; and a blurring unit configured to acquire the target video frame by blurring the region.
[0066] In some embodiments, the area determination unit includes: a format conversion unit configured to convert the original video frame from a first format to a second format; a target object identification unit configured to identify the target object in the converted original video frame; and a coordinate determination unit configured to determine the coordinates of the area including the target object in the original video frame.
[0067] In some embodiments, the blurring unit includes at least one of the following: a pixel value adjustment unit configured to adjust the pixel values of the region to the same pixel value; or a Gaussian blur processing unit configured to perform Gaussian blur processing on the region.
[0068] Figure 8 A schematic block diagram of an example device 800 that may be used to implement embodiments of the present disclosure is shown. Figure 1The computing device 104 in the embodiment of the present invention can be implemented by using the device 800. As shown in the figure, the device 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 802 or computer program instructions loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0069] A number of components in the device 800 are connected to the I / O interface 805, which may include, for example: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a memory 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0070] The various processes and processing described above, such as method 500 and processes 200 and 600, may be performed by processing unit 801. For example, in some embodiments, method 500 and processes 200 and 600 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by CPU 801, one or more actions of method 500 and processes 200 and 600 described above may be performed.
[0071] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0072] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (non-exhaustive list) of computer readable storage medium include: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination of the above. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (e.g., a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0073] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0074] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0075] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0076] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0077] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0078] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0079] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for processing a video stream file, comprising: Acquire an original video stream file, wherein the original video stream file includes a plurality of original video streams captured by a plurality of cameras; Obtaining a target video frame by blurring the target object in the original video frames in the multiple original video streams; as well as Based on the frame index and execution times of the target video frame, the target video frame is written into a corresponding target video stream of a target video stream file, wherein the execution times are related to the number of processed original video streams among the multiple original video streams.
2. The method according to claim 1, wherein the original video frame is located in an original video stream among the multiple original video streams, and wherein writing the target video frame into a corresponding target video stream of a target video stream file comprises: Based on the frame index, determining whether the target video frame corresponds to a start video frame of the original video stream; In response to the target video frame corresponding to the starting video frame of the original video stream, creating the target video stream; as well as The target video frame is added to the target video stream.
3. The method according to claim 2, wherein writing the target video frame into the corresponding target video stream of the target video stream file further comprises: Information describing the target video stream is determined, the information comprising at least one of: a type of the target video stream and a resolution of video frames in the target video stream.
4. The method according to claim 2, wherein writing the target video frame into the corresponding target video stream of the target video stream file further comprises: In response to the target video frame not corresponding to the starting video frame of the original video stream, the target video frame is added to the target video stream.
5. The method according to claim 2, further comprising: Determining whether the target video frame corresponds to the last video frame in the original video stream; as well as In response to the target video frame corresponding to the last video frame in the original video stream, Determining whether the execution number is equal to a threshold number; as well as In response to the execution number being equal to the threshold number, the remaining information in the original video stream file is added to the target video stream file. The method of claim 2 , wherein the target video stream and the original video stream correspond to a same camera among the plurality of cameras.
7. The method according to claim 1, wherein obtaining a target video frame by blurring the target object in the original video frames in the plurality of original video streams comprises: Determine a region in the original video frame that includes the target object; as well as The target video frame is acquired by blurring the area.
8. The method according to claim 7, wherein determining the area including the target object in the original video frame comprises: Converting the original video frame from a first format to a second format; Identifying a target object in the converted original video frame; as well as The coordinates of the region including the target object in the original video frame are determined.
9. The method according to claim 7, wherein acquiring the target video frame by blurring the area comprises at least one of the following: Adjust the pixel values of the region to the same pixel value; or Gaussian blur is performed on the region.
10. A device for processing a video stream file, comprising: An original video stream file acquisition unit is configured to acquire an original video stream file, wherein the original video stream file includes a plurality of original video streams captured by a plurality of cameras; a target video frame acquisition unit, configured to acquire a target video frame by blurring a target object in an original video frame in the plurality of original video streams; as well as The target video frame writing unit is configured to write the target video frame into the corresponding target video stream of the target video stream file based on the frame index and execution count of the target video frame, wherein the execution count is related to the number of processed original video streams among the multiple original video streams.
11. An electronic device, comprising: at least one processor; as well as A memory coupled to the at least one processor and having instructions stored thereon, the instructions, when executed by the at least one processor, causing the apparatus to perform the method according to any one of claims 1-9.
12. A vehicle comprising a plurality of cameras and the electronic device according to claim 11.
13. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions are executed by a processor to implement the method according to any one of claims 1 to 9.