Video image display method and device, electronic equipment and storage medium
By extracting the display object attributes in the video stream and displaying them in real time, the problem of difficulty in extracting key information from the video stream in power grid inspection is solved, the efficiency and accuracy of power grid inspection is improved, and the safety and stability of the power system is ensured.
Patent Information
- Application Number
- CN202410709974.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-08-23
AI Technical Summary
It is difficult to effectively extract key information from the video streams of multiple cameras with existing technology, resulting in low efficiency and accuracy of power grid inspections and potential safety hazards.
By obtaining the current frame image in the video stream, extracting the original attributes of the display object, and determining the display mode and target display attributes based on these attributes, the video stream is displayed in real time and key information is highlighted.
It improves the efficiency and accuracy of power grid inspection, ensures the safe and stable operation of the power system, and meets the needs of power grid inspection.
Smart Images

Figure CN118535763A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of power grid security detection technology, and in particular to a method, device, electronic device and storage medium for displaying video images. Background Art
[0002] Power grid inspection, also known as joint safety and supervision management, is an important link in ensuring the safety of power supply and stable operation of the power grid. It is mainly supervised through cameras from multiple different angles.
[0003] Currently, power grid inspection is achieved by acquiring video streams from multiple cameras and displaying them in real time for staff to view. However, directly displaying video streams from multiple cameras makes it difficult for staff to view key information, and it is easy to miss information with potential safety hazards, which makes it difficult to meet the needs of power grid inspection, resulting in low efficiency and accuracy of power grid inspection, which seriously affects the operation of the power system. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for displaying video images, which realize the real-time display function of video images, can meet the needs of power grid inspection, and thus ensure the safe and stable operation of the power system.
[0005] In a first aspect, an embodiment of the present application provides a method for displaying a video image, the method comprising:
[0006] Get the current frame image from the target video stream;
[0007] Get the original display properties of each display object in the current frame image;
[0008] Determining a display mode of the current frame image and a target display attribute of each display object in the current frame image according to an original display attribute of each display object in the current frame image;
[0009] The target video stream is displayed according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image.
[0010] In the embodiment of the present application, the current frame image can be obtained from the target video stream; the original display attributes of each display object in the current frame image can be obtained; according to the original display attributes of each display object in the current frame image, the display mode of the current frame image and the target display attributes of each display object in the current frame image can be determined; according to the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image, the target video stream can be displayed. In the above technical scheme, the image corresponding to the current moment can be intercepted from the target video stream to obtain the current frame image, and the original display attributes of each display object in the current frame image can be obtained, such as color, shape, size, position and motion state, etc. Then, according to the original display attributes of each display object in the current frame image, the display mode of the current frame image can be determined. For example, if it is necessary to focus on a specific area or display object, a local magnification or highlighting mode can be adopted; and according to the original display attributes of each display object in the current frame image, the target display attributes of each display object in the current frame image can be determined, such as color enhancement, contour highlighting and motion trajectory drawing, etc. Then, according to the display mode of the current frame image and the target display attributes of each display object in the current frame image, the current frame image can be displayed in real time, and then the current frame image can be displayed again. Repeat the above steps to obtain the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image, and display the target video stream in real time according to the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image, thereby realizing the real-time display function of the video image, and determining the display mode of the current frame image and the target display attributes of each display object according to the original display attributes of each display object in the current frame image, and highlighting the key information in the current frame image according to the specific scenario and actual needs, so that the user can more easily and accurately judge whether there are safety hazards in the power system, thereby improving the efficiency and accuracy of power grid inspection, while meeting the needs of power grid inspection, thereby improving the stability of the power system and ensuring the safe and stable operation of the power system.
[0011] In a second aspect, an embodiment of the present application provides a video image display device, the device comprising:
[0012] An image acquisition module is used to acquire the current frame image from the target video stream;
[0013] The attribute acquisition module is used to acquire the original display attribute of each display object in the current frame image;
[0014] A determination module, used to determine the display mode of the current frame image and the target display attributes of each display object in the current frame image according to the original display attributes of each display object in the current frame image;
[0015] The display module is used to display the target video stream according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the video image display method of any embodiment of the present application.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to implement the video image display method of any embodiment of the present application when executed by a processor.
[0021] The description of the second, third and fourth aspects in this application can refer to the detailed description of the first aspect; and the beneficial effects described in the second, third and fourth aspects can refer to the beneficial effect analysis of the first aspect, which will not be repeated here.
[0022] In this application, the name of the above-mentioned video image display device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of the claims of this application and their equivalent technologies.
[0023] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 It is a flow chart of a method for displaying a video image provided by an embodiment of the present application;
[0026] Figure 2 is another flowchart of the method for displaying a video image provided by an embodiment of the present application;
[0027] Figure 3 is a structural schematic diagram of a video image display device provided in an embodiment of the present application;
[0028] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0030] It should be noted that the terms "first", "second", "target", and "original" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having", and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0031] Figure 1 It is a flow chart of the method for displaying video images provided in an embodiment of the present application. This embodiment can be applied to scenarios in power grid inspection where the video stream monitored by the camera needs to be displayed in real time. The method for displaying video images provided in this embodiment can be executed by the video image display device provided in an embodiment of the present application, and the device can be implemented by software and / or hardware. In a specific embodiment, the video image display device can be integrated into an electronic device, for example, the electronic device can be a computer, a smart phone, or a tablet. The execution subject of this method can be an electronic device, see Figure 1 The video image display method of this embodiment includes but is not limited to the following steps:
[0032] S110, obtaining a current frame image from a target video stream.
[0033] The target video stream is the video that needs to be displayed on the display screen of the electronic device; one video stream corresponds to one display window, and different video streams correspond to different display windows. The current frame image is a static picture of the target video stream at the current moment, that is, a frame image corresponding to the current moment; each frame in the target video stream corresponds to an image.
[0034] Specifically, according to the needs of power grid inspection, cameras can be installed in key areas and locations, and their viewing angles, focal lengths and lighting conditions must be appropriate, so that the entire power system can be jointly managed for safety supervision. The video streams of each camera can be pre-connected to electronic equipment, for example, through a network interface or a dedicated video transmission line. The electronic equipment can then process the video streams of each camera and display the video streams in real time for user supervision.
[0035] In this way, the video stream of any camera can be obtained to obtain the target video stream, and the current frame image can be obtained from the target video stream. For example, an appropriate video processing library (such as OpenCv) or specialized video stream processing software can be used to capture the image at the current moment from the target video stream to obtain the current frame image.
[0036] S120: Obtain original display attributes of each display object in the current frame image.
[0037] The display object is an independent visual element that can be identified and processed in the current frame image. For example, the display object may be equipment, lines, and personnel in the power grid, etc. These display objects have specific locations and attributes.
[0038] The original display attributes are original visual characteristics of the display object in the current frame image. For example, the original display attributes may include color, shape, size, position, motion state, and the like.
[0039] Specifically, after obtaining the current frame image, the original display attributes of each display object in the current frame image can be obtained. For example, image processing techniques, such as edge detection, template matching, and deep learning, can be used to parse the current frame image, identify and extract each display object therein, and then the original display attributes of each display object can be extracted separately. These original display attributes may include color, shape, size, position, motion state, etc.
[0040] S130 : Determine the display mode of the current frame image and the target display attributes of the display objects in the current frame image according to the original display attributes of the display objects in the current frame image.
[0041] The display mode refers to the way in which each display object in the current frame image is displayed in the display window.
[0042] The target display attributes are the desired display characteristics determined for the display object according to specific requirements.
[0043] Specifically, after obtaining the original display attributes of each display object in the current frame image, the original display attributes of each display object can be analyzed, and combined with the needs of power grid inspection, the display mode of the current frame image can be determined. For example, if it is necessary to focus on a specific area or display object, a local magnification or highlight display mode can be used; thereafter, based on the original display attributes of each display object and the requirements of power grid inspection, target display attributes can be set for each display object. These target display attributes can include color enhancement, outline highlighting, and motion trajectory drawing, etc., so as to improve the user's ability to recognize and judge key information.
[0044] Optionally, after obtaining the display mode of the current frame image and the target display attributes of each display object in the current frame image, the next frame image can be processed in real time to obtain the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image.
[0045] S140: Display the target video stream according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image.
[0046] Specifically, after obtaining the display mode of the current frame image and the target display attributes of each display object in the current frame image, the current frame image can be displayed in real time according to the display mode of the current frame image and the target display attributes of each display object in the current frame image; then, at the next moment, continue to process the current frame image at the next moment according to steps S110 to S130 to obtain the display mode of the current frame image at the next moment and the target display attributes of each display object in the current frame image, and display the current frame image at the next moment in real time; thereafter, repeat the above steps as time changes, so as to realize the real-time display of the target video stream according to the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image, so as to meet the display requirements of power grid inspectors for real-time viewing by users.
[0047] Optionally, when displaying the target video stream, you can set up monitoring and recording functions, and automatically record and alarm key events or abnormal situations for subsequent analysis and processing.
[0048] Optionally, after displaying the target video stream according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image, the video streams of other cameras can be selected to obtain the target video stream, and steps S110 to S140 are repeated to display the video streams of each camera in real time. It should be noted that the video streams of different cameras are displayed in different display windows.
[0049] Optionally, for video streams from multiple cameras, steps S110 to S140 may be performed in parallel to process the video streams from multiple cameras in parallel and display the video streams from each camera simultaneously. It should be noted that the video streams from different cameras are displayed in different display windows to achieve parallel display of the video streams from different cameras.
[0050] The technical solution of the embodiment of the present application can obtain the current frame image from the target video stream; obtain the original display attributes of each display object in the current frame image; determine the display mode of the current frame image and the target display attributes of each display object in the current frame image according to the original display attributes of each display object in the current frame image; and display the target video stream according to the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image. In the above technical solution, the image corresponding to the current moment can be intercepted from the target video stream to obtain the current frame image, and the original display attributes of each display object in the current frame image, such as color, shape, size, position and motion state, etc., can be obtained. Then, according to the original display attributes of each display object in the current frame image, the display mode of the current frame image can be determined. For example, if it is necessary to focus on a specific area or display object, a local magnification or highlighting mode can be adopted; and according to the original display attributes of each display object in the current frame image, the target display attributes of each display object in the current frame image, such as color enhancement, contour highlighting and motion trajectory drawing, etc., can be determined; then, according to the display mode of the current frame image and the target display attributes of each display object in the current frame image, the current frame image can be displayed in real time, and then the current frame image can be displayed again. Repeat the above steps to obtain the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image, and display the target video stream in real time according to the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image, thereby realizing the real-time display function of the video image, and determining the display mode of the current frame image and the target display attributes of each display object according to the original display attributes of each display object in the current frame image, and highlighting the key information in the current frame image according to the specific scenario and actual needs, so that the user can more easily and accurately judge whether there are safety hazards in the power system, thereby improving the efficiency and accuracy of power grid inspection, while meeting the needs of power grid inspection, thereby improving the stability of the power system and ensuring the safe and stable operation of the power system.
[0051] The following further describes a method for displaying a video image provided by an embodiment of the present application. Figure 2 1 is another flow chart of the method for displaying video images provided in the embodiment of the present application. The embodiment of the present application is optimized on the basis of the above embodiments.
[0052] See also Figure 2The method of this embodiment includes but is not limited to the following steps:
[0053] S201, capturing an original image sequence from a target video stream.
[0054] Among them, the original image sequence is a collection of continuous frame images that have not been processed or modified in any way. They directly reflect the original visual information captured by the camera. The original image sequence retains the real situation of the power grid site and is crucial for subsequent analysis and processing.
[0055] Specifically, when inspecting the power grid, the video stream of any camera can be obtained to obtain the target video stream, and the original image sequence can be intercepted from the target video stream. For example, an appropriate video processing library (such as OpenCv) or a dedicated video stream processing software can be used to capture each frame of the target video stream, and then each captured frame of the image can be saved as an image file (such as JPEG or PNG format) to form an original image sequence.
[0056] S202: Scaling the original image sequence according to display parameters of the display device to obtain a current frame image.
[0057] Among them, the display device is a hardware device for displaying image or video information, such as a computer monitor, a TV screen, and a projector. In the embodiment of the present application, the display device can be an electronic device for real-time display of a video stream captured by a camera or a processed image sequence, so that users can intuitively understand the situation of the power grid site. Display parameters are a series of indicators that describe the performance and characteristics of the display device, including but not limited to resolution, screen size, aspect ratio, and refresh rate, which determine the detail and size of the image that can be displayed on the display device.
[0058] Specifically, after obtaining the original image sequence, the display parameters of the display device can be obtained, such as key parameters such as resolution, screen size, aspect ratio and refresh rate, and then the original image sequence can be scaled according to the display parameters of the display device, and the current frame image can be obtained from the scaled original image sequence. For example, image scaling technology can be used to scale the original image sequence based on the display parameters of the display device so that each frame image in the target video stream can be adapted to the display device for display.
[0059] Further, the original image sequence is scaled according to the display parameters of the display device to obtain the current frame image, including:
[0060] Sa1. Scaling the original image sequence according to the display parameters of the display device to obtain a target image sequence.
[0061] Among them, the target image sequence is a set of images obtained after the original image sequence is scaled; while maintaining key information, the target image sequence is more in line with the characteristics of the display device, thereby improving the viewing experience and analysis accuracy.
[0062] Optionally, a rectangular window may be created in advance, and a weight coefficient may be assigned to each element in the rectangular window, such as an equal weight coefficient for each element, or a central element may have the largest weight coefficient, and the weight coefficient corresponding to an element farther from the central element may be smaller. The size of the rectangular window may be determined according to actual usage requirements, and illustratively, the rectangular window may be a diamond window, and the size of the rectangular window may be 5×5.
[0063] Specifically, the horizontal scaling ratio and the vertical scaling ratio may be determined according to display parameters of the display device, and each image in the original image sequence may be scaled according to the horizontal scaling ratio and the vertical scaling ratio to obtain a target image sequence.
[0064] Specifically, any image in the original image sequence can be obtained as the current image, the current image includes multiple pixels, and any pixel in the current image is selected as the current pixel, the coordinates of the current pixel are set to (x, y), the horizontal scaling rate is kw, and the vertical scaling rate is kd, and the current pixel is scaled using the horizontal scaling rate kw and the vertical scaling rate kd, and the coordinates of the target pixel obtained are (u, v), and then the target pixel (u, v) is inversely transformed to obtain floating-point coordinates (u / kw, v / kd), and the floating-point coordinates are rounded to obtain integer coordinates (x0, y0), at which point the integer coordinates are determined as the coordinates of the current pixel, and the current pixel (x0, y0) is subjected to neighborhood average filtering to obtain a pixel value corresponding to the target pixel; then, other pixels in the current image are selected as the current pixel, and the above process is repeated to obtain pixel values of target pixels corresponding to each pixel in the current image, and each target pixel is combined into a target image to obtain a target image corresponding to the current image. Afterwards, other images in the original image sequence can be selected as the current image, and the above process can be repeated to obtain the target images corresponding to each image in the original image sequence, and each target image can be combined into a target image sequence. Among them, the target image is the image obtained after scaling the current image; the target pixel point is the pixel point obtained after scaling the current pixel point; the pixel value can be a grayscale value or an intensity value of a color channel, etc., depending on the image representation method, which is not limited here.
[0065] Specifically, the process of neighborhood average filtering can be: obtain a pre-created rectangular window, and overlap the central element of the rectangular window with the position of the current pixel (i.e., (x0, y0)), then traverse all the pixels in the rectangular window, multiply the pixel value of each pixel by its corresponding weight coefficient, and add up all the products to obtain the weighted sum, then calculate the sum of all the weight coefficients in the rectangular window, and calculate the ratio of the weighted sum to the sum of all the weight coefficients to obtain the pixel value of the target pixel corresponding to the current pixel.
[0066] Sa2. Encode the target image sequence to obtain the image sequence to be processed.
[0067] The image sequence to be processed is a set of images obtained after encoding the target image sequence.
[0068] Specifically, after obtaining the target image sequence, the target image sequence can be encoded to obtain a sequence of images to be processed. For example, each target image in the target image sequence can be encoded according to the time sequence, that is, a sequence identifier is marked for each target image in the target image sequence according to the time sequence to characterize the order of each target image in the target image sequence. Afterwards, the target images in the target image sequence are sorted in order from small to large according to the size order of the sequence identifiers to obtain the sequence of images to be processed, so as to facilitate processing of the images in sequence.
[0069] Exemplarily, if the target image sequence includes target image 1, target image 2, target image 3 and target image 4, and the electronic device receives target image 1 at 8:10:01, receives target image 2 at 8:10:02, receives target image 3 at 8:10:03, and receives target image 4 at 8:10:04, then the image sequence to be processed is (target image 1, target image 2, target image 3, target image 4).
[0070] Sa3. Extract the current frame image from the image sequence to be processed.
[0071] Specifically, after an image in the image sequence to be processed is displayed in real time, the image can be deleted from the image sequence to be processed. At this time, the first image in the image sequence to be processed is the current frame image. Therefore, the first image in the image sequence to be processed can be obtained to obtain the current frame image.
[0072] In an embodiment of the present application, the original image sequence is scaled according to the display parameters of the display device to obtain a target image sequence, and the target image sequence is encoded to obtain a to-be-processed image sequence, and then the current frame image is extracted from the to-be-processed image sequence, thereby realizing the image scaling function. Through the image scaling process, the size of the original image sequence can be matched with the display parameters of the display device, thereby ensuring the correct display of the image on the display device and avoiding the problem of image stretching, compression or incomplete display due to size mismatch. At the same time, the encoding of the target image sequence can facilitate the sequential processing of images, thereby improving the processing efficiency and thereby improving the rate of real-time video display.
[0073] Optionally, the original display properties of the display object may include display position and / or display area; the display position is the position of the display image in the current frame image; the display area is the size of the pixel area occupied by the display object in the current frame image, which reflects the relative size and importance of the display object in the current frame image.
[0074] S203: Obtain the display position and / or display area of each display object in the current frame image.
[0075] Specifically, after obtaining the current frame image, the current frame image can be analyzed using image processing techniques, such as edge detection, template matching, and deep learning techniques, to identify display objects in the power grid, such as equipment, lines, and people. Afterwards, the positions of each display object in the current frame image can be determined to obtain the display positions of each display object. For example, the bounding box of the display object can be determined, and the upper left corner coordinates or the center point coordinates of the bounding box of the display object can be determined as the display position of the display object, wherein the bounding box contains the minimum rectangular area of the display object in the current frame image; and / or, the display area of each display object in the current frame image can be determined, for example, the pixel area occupied by the display object in the current frame image can be calculated based on the bounding box of the display object, that is, the area of the bounding box is determined as the display area of the corresponding display object.
[0076] S204: Determine the importance of each display object in the current frame image according to the original display attribute of each display object in the current frame image.
[0077] Among them, the importance level is the result obtained by comprehensive evaluation based on the display position and / or display area of each display object in the current frame image. It is used to reflect the attention and priority of the display object in power grid inspection, which is of great significance for guiding subsequent processing and analysis.
[0078] Specifically, after obtaining the original display attributes (ie, display position and / or display area) of each display object in the current frame image, the importance of each display object in the current frame image can be determined according to the display position and / or display area of each display object.
[0079] In one implementation, after obtaining the original display attributes (i.e., display positions) of each display object in the current frame image, the importance of each display object in the current frame image can be determined according to the display positions of each display object. For example, the spatial weight method can be used in advance to assign different weights to different areas of the current frame image. For example, it is determined that the weight of the central area or the prominent area is higher. Then, the display position of each display object in the current frame image is analyzed, and the weight corresponding to the display position is determined according to the area where the display position is located. Then, the weight of the display position is determined as the importance of the corresponding display object, that is, the greater the weight of the display position, the greater the importance of the corresponding display object.
[0080] In another implementation, after obtaining the original display properties (i.e., display area) of each display object in the current frame image, the importance of each display object in the current frame image can be determined based on the display area of each display object in the current frame image. For example, different weights can be assigned to the display areas, i.e., the larger the display area, the larger the weight corresponding to the display area. Then, the weight of the display area is determined as the importance of the corresponding display object, i.e., the larger the weight of the display area, the greater the importance of the corresponding display object, that is, the larger the display area, the greater the importance of the corresponding display object. In other words, the larger the display area, the greater the importance of the corresponding display object.
[0081] In another implementation, after obtaining the original display properties (i.e., display position and display area) of each display object in the current frame image, the importance of each display object in the current frame image can be determined based on the display position and display area of each display object in the current frame image. For example, the sum of the weight of the display position and the weight of the display area can be calculated, and the sum of the weights can be determined as the importance of the corresponding display object.
[0082] Optionally, the display modes may include a peer display mode and a differentiated display mode; the peer display mode is to use the same processing method and visual effects for all display objects in the current frame image on the display device, so as to ensure that all display objects in the current frame image are visually consistent and fair, that is, the area occupied by each display object in the display window is equal; the peer display mode is suitable for scenes that need to highlight the overall situation rather than individual objects; the differentiated display mode is to use different processing methods and visual effects for display according to the original display attributes or importance of the display object, that is, the area occupied by each display object in the display window is of different sizes. For example, important equipment or abnormal situations can be highlighted by highlighting, magnifying or special marking so that users can identify and pay attention to them more quickly.
[0083] Exemplarily, the peer display mode may be a tiled display mode or a spliced display mode, etc.; the differentiated display mode may be a picture-in-picture display mode or an overlay display mode, etc.
[0084] S205: Determine whether the importance of each display object in the current frame image is the same.
[0085] Specifically, after obtaining the importance of each display object in the current frame image, it can be determined whether the importance of each display object in the current frame image is the same; if the importance of each display object in the current frame image is the same, execute S206; otherwise, execute S207.
[0086] S206: If the importance of each display object in the current frame image is the same, determine that the display mode of the current frame image is a peer display mode.
[0087] Specifically, if the importance of each display object in the current frame image is the same, the display mode of the current frame image can be determined as a peer display mode, that is, the area occupied by each display object in the display window is equal in size. Then, S208 can be executed.
[0088] S207: If the importance of each display object in the current frame image is different, determine that the display mode of the current frame image is a differentiated display mode.
[0089] Specifically, if the importance of each display object in the current frame image is different, the display mode of the current frame image can be determined as a differentiated display mode, that is, the area occupied by each display object in the display window is different in size. Specifically, the greater the importance of the display object, the larger the area it occupies in the display window. Afterwards, S208 can be executed.
[0090] Optionally, the target display attributes may include display partitions and / or display transparency; display partitions are areas obtained by dividing the display window, which are used to display different display objects respectively, which helps to organize and manage complex visual information and improve viewing efficiency and comprehension; display transparency is the opacity or transparency of the display object when it is displayed in the window. By adjusting the display transparency, the superposition display of multiple display objects or the creation of a sense of hierarchy can be achieved, thereby enhancing the visual effect and information communication ability of the image.
[0091] S208: Determine the display partition and / or display transparency of each display object in the current frame image according to the original display attribute of each display object in the current frame image.
[0092] Specifically, after obtaining the original display properties (i.e., display position and / or display area) of each display object in the current frame image, the display partition of each display object in the current frame image can be determined according to the display position and / or display area of each display object in the current frame image, that is, the display window can be divided into different display partitions according to the display position and / or display area of the display object, and each display partition is used to display one display object. Specifically, if the display mode of the current frame image is a peer display mode, the display window can be divided equally according to the number of display objects in the current frame image to obtain multiple display partitions of equal area, and a unique partition identifier is assigned to each display partition, wherein the number of display partitions is the number of display objects; if the display mode of the current frame image is a differentiated display mode, the display window can be divided according to the number of display objects in the current frame image and the importance of each display object to obtain multiple display partitions of unequal area, and a unique partition identifier is assigned to each display partition, wherein the number of display partitions is the number of display objects, and the greater the importance of the display object, the larger the area of the corresponding display partition, that is, the more important the display position of the display object is in the current frame image, and / or the larger the display area of the display object, the larger the area of the corresponding display partition.
[0093] And / or, the display transparency of each display object in the current frame image can be determined according to the display position and / or display area of each display object in the current frame image. For example, different display transparency can be set for each display object according to the importance of each display object, that is, the greater the importance of the display object, the lower its corresponding display transparency, that is, the more important the display position of the display object in the current frame image, and / or the larger the display area of the display object, the lower its corresponding display transparency, so as to achieve the creation of hierarchy and visual focus.
[0094] S209 , splitting the corresponding frame image according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image to obtain split images.
[0095] Among them, splitting the image means splitting the current frame image into multiple smaller image segments according to specific splitting rules or conditions. In an embodiment of the present application, splitting the image means splitting the current frame image according to the display object, and one split image includes one display object.
[0096] Specifically, after determining the display mode of the current frame image and the target display attributes of each display object in the current frame image (i.e., display partition and / or display transparency), the current frame image can be split according to the display mode of the current frame image and the display partition and / or display transparency of each display object in the current frame image. That is, the current frame image can be split according to the display object to obtain multiple split images, one of the split images includes a display object, and then the split images can be adjusted according to the display mode of the current frame image and the display partition and / or display transparency of each display object in the current frame image.
[0097] Specifically, if the display mode of the current frame image is a peer display mode, it indicates that the display areas and display transparency of each display object are equal. At this time, the size of each split image can be adjusted according to the area of the display partition, and the display transparency of each split image can be adjusted to a uniform transparency, wherein the value of the display transparency can be adjusted according to actual conditions and there is no restriction on this; if the display mode of the current frame image is a differentiated display mode, it indicates that the display areas and display transparency of each display object are not equal. At this time, the size of the corresponding split image can be adjusted according to the area of the corresponding display partition of the display object, and the display transparency of the corresponding split image can be adjusted according to the corresponding display transparency of the display object.
[0098] Then, at the next moment, continue to process the current frame image at the next moment according to steps S202 to S208 to obtain the display mode of the current frame image at the next moment and the display partitions and / or display transparency of each display object in the current frame image, and split the current frame image at the next moment to obtain the split image corresponding to the current frame image at the next moment; thereafter, repeat the above steps as time changes, so as to split the corresponding frame image according to the display mode of each frame image in the target video stream and the display partitions and / or display transparency of each display object in each frame image, and obtain the split image.
[0099] S210 , marking a display identifier for the split image according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image.
[0100] The display identifier is used to mark or identify the display partition of the split image, so as to facilitate displaying the split image according to the display mode and target display attributes.
[0101] Specifically, after obtaining the split image, the display identifier of the split image can be marked according to the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image, that is, the partition identifier of the display partition corresponding to the display object can be determined as the display identifier of the corresponding split image.
[0102] Exemplarily, if the partition identifier of the display partition corresponding to display object 1 is partition 1, the partition identifier of the display partition corresponding to display object 2 is partition 2, and the partition identifier of the display partition corresponding to display object 3 is partition 3, and display object 1 corresponds to split image 1, display object 2 corresponds to split image 2, and display object 3 corresponds to split image 3, then the display identifier of split image 1 is partition 1, the display identifier of split image 2 is partition 2, and the display identifier of split image 3 is partition 3.
[0103] S211: Display the corresponding split image according to the display identifier.
[0104] Specifically, after marking the display identifier for the split image, the corresponding split image can be displayed according to the display identifier, that is, the split image is displayed in the display partition corresponding to the display identifier, so as to realize real-time display of the target video stream.
[0105] The technical solution of the embodiment of the present application can intercept the original image sequence from the target video stream, and scale the original image sequence according to the display parameters of the display device to obtain the current frame image, thereby realizing the determination function of the current frame image. Through the image scaling process, the size of the original image sequence can be matched with the display parameters of the display device, thereby ensuring the correct display of the image on the display device and avoiding the problem of image stretching, compression or incomplete display due to size mismatch; then, the display position and / or display area of each display object in the current frame image can be obtained, thereby realizing the acquisition function of the original display attributes; and according to the original display attributes of each display object in the current frame image, the importance of each display object in the current frame image can be determined, thereby realizing the determination function of the importance, thereby providing a data basis for the determination of the subsequent display mode; if the importance of each display object in the current frame image is the same, then the display mode of the current frame image is determined to be the equal display mode; if the display objects in the current frame image are If the importance of each image is different, the display mode of the current frame image is determined to be a differentiated display mode, which realizes the function of determining the display mode according to the importance, so that different display modes can be determined according to specific scenes and actual needs, and the differentiated display mode can highlight the key information in the image, thereby improving the efficiency and accuracy of power grid inspection; thereafter, the display partition and / or display transparency of each display object in the current frame image can be determined according to the original display attributes of each display object in the current frame image, and the function of determining the target display attributes is realized, wherein the display partition helps to organize and manage complex visual information, improves the viewing efficiency and comprehension of the image, and display partitions of different areas can highlight the key information in the image, wherein the display transparency can realize the superposition display of multiple display objects or the creation of a sense of hierarchy, enhances the visual effect and information communication ability of the image, and then can highlight the key information in the image, thereby improving the efficiency and accuracy of power grid inspection;Afterwards, the above steps can be repeated to obtain the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image, and the corresponding frame image is split according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image to obtain a split image, and then a display identifier is marked for the split image according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image, and the corresponding split image is displayed according to the display identifier, so as to realize the real-time display function of the video image, split the corresponding frame image, and better organize and manage the visual information, and mark the split image at the same time, so as to improve the display efficiency of the split image, thereby improving the display efficiency of the video image, and improving the correct highlighting of key information, so that the user can more easily and accurately judge whether there is a safety hazard in the power system, thereby improving the efficiency and accuracy of power grid supervision, providing strong support for the safe operation and troubleshooting of the power grid, thereby ensuring the safe and stable operation of the power system. ;
[0106] Figure 3 is a schematic diagram of a structure of a video image display device provided in an embodiment of the present application, referring to Figure 3 , the video image display device may include:
[0107] The image acquisition module 310 is used to acquire the current frame image from the target video stream;
[0108] The attribute acquisition module 320 is used to acquire the original display attribute of each display object in the current frame image;
[0109] A determination module 330, configured to determine a display mode of the current frame image and a target display attribute of each display object in the current frame image according to an original display attribute of each display object in the current frame image;
[0110] The display module 340 is used to display the target video stream according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image.
[0111] In one embodiment, the attribute acquisition module 320 is specifically used to: acquire the display position and / or display area of each display object in the current frame image.
[0112] In one embodiment, the determination module 330 determines the display mode of the current frame image according to the original display attributes of each display object in the current frame image, including: determining the importance of each display object in the current frame image according to the original display attributes of each display object in the current frame image; if the importance of each display object in the current frame image is the same, determining that the display mode of the current frame image is a peer display mode; if the importance of each display object in the current frame image is different, determining that the display mode of the current frame image is a differentiated display mode.
[0113] In one embodiment, the determination module 330 determines the target display attributes of each display object in the current frame image based on the original display attributes of each display object in the current frame image, including: determining the display partition and / or display transparency of each display object in the current frame image based on the original display attributes of each display object in the current frame image.
[0114] In one embodiment, the display module 340 is specifically used to: split the corresponding frame image according to the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image to obtain a split image; mark the split image with a display identifier according to the display mode of each frame image in the target video stream and the target display attributes of each display object in each frame image; and display the corresponding split image according to the display identifier.
[0115] In one embodiment, the image acquisition module 310 is specifically used to: capture an original image sequence from a target video stream; and scale the original image sequence according to display parameters of a display device to obtain a current frame image.
[0116] In one embodiment, the image acquisition module 310 scales the original image sequence according to the display parameters of the display device to obtain the current frame image, including: scaling the original image sequence according to the display parameters of the display device to obtain a target image sequence; encoding the target image sequence to obtain a sequence of images to be processed; and extracting the current frame image from the sequence of images to be processed.
[0117] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0118] The video image display device provided in this embodiment can be applied to the video image display method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0119] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. Figure 4 A block diagram of an exemplary electronic device 11 suitable for implementing the embodiments of the present application is shown. Figure 4 The electronic device 11 shown is only an example and should not bring any limitation to the function and scope of use of the present embodiment.
[0120] like Figure 4As shown, the electronic device 11 is in the form of a general purpose computing electronic device. The components of the electronic device 11 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0121] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0122] The electronic device 11 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 11, including volatile and non-volatile media, removable and non-removable media.
[0123] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 11 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0124] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0125] The electronic device 11 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 11, and / or may communicate with any device that enables the electronic device 11 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the electronic device 11 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20.
[0126] like Figure 4 As shown, the network adapter 20 communicates with other modules of the electronic device 11 via the bus 18. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 11, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0127] The processing unit 16 executes various functional applications and page displays by running the program stored in the system memory 28, for example, implementing a video image display method provided in this embodiment, the method comprising:
[0128] Get the current frame image from the target video stream;
[0129] Get the original display properties of each display object in the current frame image;
[0130] Determining a display mode of the current frame image and a target display attribute of each display object in the current frame image according to an original display attribute of each display object in the current frame image;
[0131] The target video stream is displayed according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image.
[0132] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the video image display method provided in any embodiment of the present application.
[0133] The present application provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a method for displaying a video image provided by the present application is implemented. The method includes:
[0134] Get the current frame image from the target video stream;
[0135] Get the original display properties of each display object in the current frame image;
[0136] Determining a display mode of the current frame image and a target display attribute of each display object in the current frame image according to an original display attribute of each display object in the current frame image;
[0137] The target video stream is displayed according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image.
[0138] The computer storage medium of this embodiment can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.
[0139] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0140] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0141] Computer program code for performing the operation of the present application can be written in one or more programming languages or combinations thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0142] It should be understood by those skilled in the art that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0143] In addition, the acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0144] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the inventive concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method for displaying a video image, characterized in that: include: Get the current frame image from the target video stream; Acquire the original display attribute of each display object in the current frame image; Determining a display mode of the current frame image and a target display attribute of each display object in the current frame image according to an original display attribute of each display object in the current frame image; The target video stream is displayed according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image.
2. The method for displaying a video image according to claim 1, characterized in that: The obtaining of original display attributes of each display object in the current frame image includes: Obtaining a display position and / or a display area of each display object in the current frame image.
3. The method for displaying a video image according to claim 1, characterized in that: Determining the display mode of the current frame image according to the original display attributes of each display object in the current frame image includes: Determining the importance of each display object in the current frame image according to the original display attribute of each display object in the current frame image; If the importance of each display object in the current frame image is the same, determining that the display mode of the current frame image is a peer display mode; If the importance of each display object in the current frame image is different, it is determined that the display mode of the current frame image is a differentiated display mode.
4. The method for displaying a video image according to claim 1, characterized in that: Determining the target display attribute of each display object in the current frame image according to the original display attribute of each display object in the current frame image includes: According to the original display attributes of each display object in the current frame image, the display partition and / or display transparency of each display object in the current frame image is determined.
5. The method for displaying a video image according to claim 1, characterized in that: The step of displaying the target video stream according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image comprises: Splitting the corresponding frame image according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image to obtain split images; Marking a display identifier for the split image according to a display mode of each frame of the target video stream and a target display attribute of each display object in each frame of the target video stream; The corresponding split image is displayed according to the display identifier.
6. The method for displaying a video image according to claim 1, characterized in that: The step of obtaining a current frame image from a target video stream includes: intercepting an original image sequence from the target video stream; The original image sequence is scaled according to display parameters of a display device to obtain the current frame image.
7. The method for displaying a video image according to claim 6, characterized in that: The scaling process is performed on the original image sequence according to the display parameters of the display device to obtain the current frame image, including: Scaling the original image sequence according to the display parameters of the display device to obtain a target image sequence; Encoding the target image sequence to obtain an image sequence to be processed; The current frame image is extracted from the sequence of images to be processed.
8. A video image display device, characterized in that: include: An image acquisition module is used to acquire the current frame image from the target video stream; An attribute acquisition module, used to acquire original display attributes of each display object in the current frame image; a determination module, configured to determine a display mode of the current frame image and a target display attribute of each display object in the current frame image according to an original display attribute of each display object in the current frame image; The display module is used to display the target video stream according to the display mode of each frame image in the target video stream and the target display attribute of each display object in each frame image.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the video image display method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the video image display method described in any one of claims 1 to 7 when executed.
