CN113891040A - Video processing method, video processing device, computer equipment and storage medium - Google Patents

Video processing method, video processing device, computer equipment and storage medium Download PDF

Info

Publication number
CN113891040A
CN113891040A CN202111120702.XA CN202111120702A CN113891040A CN 113891040 A CN113891040 A CN 113891040A CN 202111120702 A CN202111120702 A CN 202111120702A CN 113891040 A CN113891040 A CN 113891040A
Authority
CN
China
Prior art keywords
video stream
target
size information
target area
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111120702.XA
Other languages
Chinese (zh)
Inventor
张艳玲
孔亚军
毕军辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202111120702.XA priority Critical patent/CN113891040A/en
Publication of CN113891040A publication Critical patent/CN113891040A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application relates to a video processing method, a video processing device, a computer device and a storage medium. The method comprises the following steps: acquiring a video stream to be processed; according to the video stream, identifying a target object contained in the video stream; determining the magnification factor aiming at the target area according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area; and displaying the video stream in the current displayable region by taking the target region as the center according to the magnification. By adopting the method, the display effect of the shot video on different display screens can be improved, and the effectiveness of video monitoring is further ensured.

Description

Video processing method, video processing device, computer equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a video processing method and apparatus, a computer device, and a storage medium.
Background
With the development of video monitoring technology, the application of video monitoring systems is also more and more extensive. The user can set a video monitoring system in the monitoring area so as to monitor the monitoring area. In the current technical solution, a user displays a picture obtained by shooting a video monitoring system by setting a display screen, however, various display screens exist in the market, and the display effect of the picture is different because different display screens have a certain difference. Therefore, how to improve the display effect of the shot video on different display screens and further ensure the effectiveness of video monitoring becomes a technical problem to be solved urgently.
Disclosure of Invention
In view of the foregoing, there is a need to provide a video processing method, an apparatus, a computer device and a storage medium, which can provide display effects of captured videos on different display screens, thereby ensuring effectiveness of video monitoring.
A method of video processing, the method comprising:
acquiring a video stream to be processed;
according to the video stream, identifying a target object contained in the video stream;
determining the magnification factor aiming at the target area according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area;
and displaying the video stream in the current displayable region by taking the target region as the center according to the magnification.
Optionally, identifying a target object included in the video stream according to the video stream includes: and inputting the video stream into a pre-trained target recognition model so that the target recognition model recognizes a target object contained in the video stream.
Optionally, the size information includes a width and a length; determining a magnification factor for the target area according to the size information of the target area where the target object is located, the size information of the image frame of the video stream, and the size information of the current displayable area, including: determining a first ratio of the width of the target area to the width of an image picture of the video stream according to the width of the target area where the target object is located and the width of the image picture; determining a second ratio of the length of the target area to the length of the image picture according to the length of the target area where the target object is located and the length of the image picture; determining a magnification factor for the target area based on the first and second ratios and size information of a currently displayable area.
Optionally, determining a magnification factor for the target area based on the first ratio, the second ratio and the size information of the current displayable area includes: acquiring a first weight corresponding to the first proportion, a second weight corresponding to the second proportion and a third weight corresponding to the size information of the current displayable area; and performing weighting and processing according to the first proportion, the second proportion, the size information of the current displayable area, the first weight, the second weight and the third weight, and determining the magnification factor aiming at the target area.
Optionally, the number of the target objects is at least two; determining a magnification factor for the target area according to the size information of the target area where the target object is located, the size information of the image frame of the video stream, and the size information of the current displayable area, including: determining a target area containing at least two of the target objects; and determining the magnification aiming at the target area according to the size information of the target area, the size information of the image picture of the video stream and the size information of the current displayable area.
Optionally, displaying the video stream in the currently displayable region with the target region as a center according to the magnification factor includes: amplifying the target area according to the amplification factor; displaying the video stream in the currently displayable region centering on the enlarged target region.
Optionally, displaying the video stream in the current displayable region with the target region as a center according to the magnification factor, including: zooming an image acquisition device for acquiring the video stream according to the magnification factor so as to amplify the target area; and receiving the zoomed video stream sent by the image acquisition device, and displaying the zoomed video stream by taking the target area as the center in the current displayable area.
A video processing device, the device comprising:
the acquisition module is used for acquiring a video stream to be processed;
the identification module is used for identifying a target object contained in the video stream according to the video stream;
the determining module is used for determining the magnification factor aiming at the target area according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area;
and the display module is used for displaying the video stream in the current displayable area by taking the target area as the center according to the magnification.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a video stream to be processed;
according to the video stream, identifying a target object contained in the video stream;
determining the magnification factor aiming at the target area according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area;
and displaying the video stream in the current displayable region by taking the target region as the center according to the magnification.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a video stream to be processed;
according to the video stream, identifying a target object contained in the video stream;
determining the magnification factor aiming at the target area according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area;
and displaying the video stream in the current displayable region by taking the target region as the center according to the magnification.
One of the above technical solutions has the following advantages and beneficial effects:
according to the video processing method, the video processing device, the computer equipment and the storage medium, the target object contained in the video stream is identified by acquiring the video stream to be processed, the magnification factor aiming at the target area is determined according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area, and the video stream is displayed in the current displayable area by taking the target area as the center according to the magnification factor.
Drawings
Fig. 1 is an application environment diagram of a video processing method in the embodiment of the present application.
Fig. 2 is a schematic flowchart of a video processing method in an embodiment of the present application.
Fig. 3 is a flowchart illustrating step S230 in the video processing method of fig. 2 according to an embodiment of the present disclosure.
Fig. 4 is a flowchart illustrating step S330 in the video processing method of fig. 3 according to an embodiment of the present disclosure.
Fig. 5 is a flowchart illustrating step S230 in the video processing method of fig. 2 according to an embodiment of the present application.
Fig. 6 is a flowchart illustrating step S240 in the video processing method of fig. 2 according to an embodiment of the present application.
Fig. 7 is a flowchart illustrating step S240 in the video processing method of fig. 2 according to an embodiment of the present application.
Fig. 8 is a block diagram of a video processing apparatus according to an embodiment of the present application.
Fig. 9 is an internal structural diagram of a computer device in the embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The video processing method provided by the application can be applied to the application environment shown in fig. 1. Wherein, the image acquisition device 110 communicates with the processing terminal 120 through a network. The image capturing device 110 may be a camera installed in a target location where video monitoring is required, for example, the target location may be a school, a farm, a mall, a shop, or the like. The image acquisition device may be a terminal device having an image acquisition function, such as a drive recorder, a wearable device (smart watch, smart glasses, or the like), or a smartphone.
The processing terminal 120 may be a terminal device with a video display function, for example, the processing terminal 120 may include, but is not limited to, a personal computer, a notebook computer, a smart phone, a tablet computer, a portable wearable device, and the like.
In a specific application scenario of the present application, the image obtaining apparatus 110 may monitor a target location, and send a video stream obtained by monitoring to the processing terminal 120 through a network, the processing terminal 120 may obtain a video stream to be processed, identify a target object included in the video stream according to the video stream, determine an amplification factor for the target area according to size information of a target area where the target object is located, size information of an image frame of the video stream, and size information of a currently displayable area, and display the video stream in the currently displayable area with the target area as a center according to the amplification factor.
In one embodiment, as shown in fig. 2, a video processing method is provided, which is described by taking the method as an example applied to the processing terminal 120 in fig. 1, and includes the following steps:
in step S210, a video stream to be processed is acquired.
The video stream may be monitoring video data obtained by video monitoring of a target location by an image acquisition device.
In an exemplary embodiment of the present application, the processing terminal may receive the video stream transmitted by the image capturing device in real time and display the video stream in a display interface of the processing terminal. In another example, the processing terminal may also store the received to-be-processed video stream locally, and when the user needs to view the video stream, the processing terminal may obtain the video stream locally and display the video stream. The present application is not particularly limited thereto.
In step S220, a target object included in the video stream is identified according to the video stream.
The target object may be an object of interest to a user in the video stream, such as a person, a vehicle, an animal, or an item included in the video stream.
In an exemplary embodiment of the present application, after receiving a video stream, a processing terminal may identify a target object included in the video stream according to picture content of the video stream. In an example, when the processing terminal displays the video stream, a user may determine, through an input device (e.g., a mouse, a touch display screen, or the like) configured by the processing terminal, an object of interest, i.e., a target object, in the screen content corresponding to the video stream, for example, the user may determine the object by clicking or by frame selection. The processing terminal may receive selection information of the user to determine the target object.
In another example, the processing terminal may also perform image recognition on the picture content of the video stream to determine the target object contained in the video stream. Specifically, the user may set in advance the type of object of interest, such as a person, a vehicle, or an animal. The processing terminal may identify from the picture content of the video stream whether there is an object of interest to the user, and if so, determine the object as the target object. For example, if the user sets the type of the object of interest as a vehicle, the processing terminal may recognize whether the content of the video stream includes a vehicle, and if so, recognize the vehicle as the target object.
It should be noted that, one or more target objects included in the picture content of the video stream may be provided, and the plurality is two or more than two arbitrary numbers in the present application, which is not particularly limited in the present application.
In step S230, a magnification factor for the target area is determined according to the size information of the target area where the target object is located, the size information of the image frame of the video stream, and the size information of the currently displayable area.
Wherein the target area may be a position where the target object is located in the picture content of the video stream. In an example, the size of the target area may be an area that fits the target object itself, for example, if the target object is a vehicle, the shape of the target area is the shape of the vehicle, and the like; in another example, the target area may be an area including the target object and having a size with a margin with respect to the target object, for example, the target object is a vehicle, and the target area may be a rectangular area including the vehicle, and the size of the rectangular area may be slightly larger than the vehicle, so as to completely include the vehicle in the target area.
It should be understood that, according to previous experience, a person skilled in the art may preset the size of the corresponding margin value, for example, the margin value may be 1 pixel, 5 pixels, and so on. The above numbers are merely exemplary, and the present application is not limited thereto. When determining the target area in which the target object is located, the processing terminal may determine based on the position information of the target object and a preset margin value. For example, if the margin value is 5 pixels, the processing terminal may obtain a rectangular target area by using positions 5 pixels away from the leftmost, rightmost, uppermost, and lowermost sides of the target object as boundaries of the target area.
In an exemplary embodiment of the present application, after the processing terminal determines the target area where the target object is located, the size information of the target area and the size information of the image frame of the video stream may be correspondingly obtained. In one example, the size information may include a width and a length, and the processing terminal may determine the width and the length of the target area, and the width and the length of the image frame of the video stream. For example, taking the unit as a pixel, the processing terminal may determine that the width and length of the target area are several pixels, respectively, determine that the width and length of the image screen of the video stream are several pixels, respectively, and so on.
In addition, the magnification factor may be a magnification factor that needs to be adjusted when the target area is displayed, and it should be understood that the target area can be highlighted by magnifying the target area, so that the target object is effectively displayed, and the situation that the display screen is large, the target object in the image content is small, and the target object is not easy to observe is avoided.
In an exemplary embodiment of the present application, the processing terminal may acquire size information of a currently displayable region. It should be understood that the currently displayable area may be a display area for playing the video stream, for example, if the video stream is played in a partial area in the display screen of the processing terminal, the size information of the currently displayable area is the size information of the partial area, and if the video stream is played in a full screen in the display screen of the processing terminal, the size information of the currently displayable area is the size information of the display screen.
The processing terminal may determine the magnification for the target area based on a preset magnification determination rule and the size information after acquiring the size information of the target area, the size information of the image screen of the video stream, and the size information of the current displayable area. It should be understood that the magnification factor should be increased if the ratio of the size information of the target area to the image frame size information of the video stream or the size information of the currently displayable area is smaller, and vice versa. Those skilled in the art can set the corresponding magnification determination rule according to previous experience, and the present application is not limited to this.
With continued reference to fig. 2, in step S240, the video stream is displayed in the currently displayable region with the target region as the center according to the magnification.
In an exemplary embodiment of the present application, the processing terminal may correspondingly amplify the picture content of the target area based on the amplification factor, for example, if the amplification factor is 2, the processing terminal amplifies the picture content of the target area by two times, and so on. And playing and displaying the video stream by taking the amplified target area as the center in the current displayable area.
In the embodiment shown in fig. 2, the magnification for the target area is determined based on the size information of the target area, the size information of the image screen of the video stream, and the size information of the current displayable area, whereby the enlarged target area can be made to fit the current displayable area. The display effect of the target area can be ensured even if the display is performed on screens of different sizes. In addition, the video stream is played and displayed in the current displayable area by taking the amplified target area as the center, and the target area can be highlighted, so that a user can observe a target object conveniently, and the effectiveness of video monitoring is improved.
Based on the embodiment shown in fig. 2, in an exemplary embodiment of the present application, identifying a target object included in the video stream according to the video stream includes:
and inputting the video stream into a pre-trained target recognition model so that the target recognition model recognizes a target object contained in the video stream.
In this embodiment, the processing terminal may obtain a pre-trained target recognition model in a pre-stored or invoked manner, where the target recognition model may be a machine learning model for recognizing a target object included in the video stream. The processing terminal may take the video stream as an input of a target recognition model, so that the target recognition model outputs a target object contained in the video stream. In an example, the target recognition model may frame in the picture content of the video stream to determine the target object. In another example, the target recognition model may also output position information of the target object relative to the picture content of the video stream to determine the target object, which is not particularly limited in this application.
A person skilled in the art may train the target recognition model in advance, and train the target recognition model through a large amount of training data, so that the target recognition model can accurately output the target object included in each piece of training data. It should be noted that, for different types of target objects, training data corresponding to the type may be set, for example, if the target object is a person, the training data may be video stream data including the person, and if the target object is a vehicle, the training data may be video stream data including the vehicle, and so on. Therefore, the target recognition model is trained in a targeted mode, and the accuracy of the output result of the target recognition model can be guaranteed.
In the embodiment, the target object is identified through the pre-trained target identification model, so that the accuracy and efficiency of target object identification can be improved, and the effectiveness of monitoring is further ensured.
Based on the embodiment shown in fig. 2, fig. 3 is a flowchart illustrating step S230 in the video processing method of fig. 2 according to an embodiment of the present application. Referring to fig. 3, if the size information includes a width and a length, step S230 at least includes steps S310 to S320, which are described in detail as follows:
in step S310, a first ratio of the width of the target area to the width of the image frame of the video stream is determined according to the width of the target area where the target object is located and the width of the image frame.
In this embodiment, the processing terminal may divide the width of the target area by the width of the image picture of the video stream to obtain the first ratio, for example, the width of the target area is 5 pixels, the width of the image picture of the video stream is 50, the first ratio is 5/50, i.e., 1/10, and so on.
In step S320, a second ratio of the length of the target area to the length of the image frame is determined according to the length of the target area where the target object is located and the length of the image frame.
In this embodiment, according to the foregoing method for determining the first ratio, the processing terminal may correspondingly determine a second ratio of the length of the target area relative to the length of the image frame, which is not described herein again.
In step S330, a magnification for the target area is determined based on the first ratio, the second ratio, and size information of the currently displayable area.
In this embodiment, the processing terminal may determine the magnification for the target area based on a magnification determination rule set in advance based on the first and second ratios and the size information of the currently displayable area. Therefore, the magnification of the target area is determined based on the first and second ratios and the size information of the current displayable area, the accuracy of the determined magnification can be ensured, and the display effect of the target area is further ensured.
Based on the embodiments shown in fig. 2 and fig. 3, fig. 4 is a schematic flowchart of the flow of step S330 in the video processing method of fig. 3 in this embodiment, and as shown in fig. 4, step S330 at least includes step S410 to step S420, which are described in detail as follows:
in step S410, a first weight corresponding to the first ratio, a second weight corresponding to the second ratio, and a third weight corresponding to the size information of the currently displayable area are obtained.
In an exemplary embodiment of the present application, a person skilled in the art may set a first weight corresponding to the first ratio, a second weight corresponding to the second ratio, and a third weight corresponding to the size information of the currently displayable region according to previous experience. And the weight information is pre-stored in the processing terminal for subsequent acquisition.
It should be noted that, a person skilled in the art may determine, for different types of target objects, the first weight, the second weight, and the third weight corresponding to the different types of target objects, respectively, so that the effectiveness of setting the weight information may be ensured, and it is avoided that all types of target objects use the same weight information, thereby affecting subsequent display effects.
In step S420, weighting and processing are performed according to the first ratio, the second ratio, the size information of the current displayable region, the first weight, the second weight, and the third weight, and a magnification factor for the target region is determined.
In an exemplary embodiment of the application, after obtaining the weight information, the processing terminal may perform weighting and calculation based on the first proportion, the second proportion, and the size information of the currently displayable area, and the corresponding first weight value, the second weight value, and the third weight value, so as to determine the magnification factor for the target area.
It should be understood that, in this embodiment, by setting the corresponding weight value information and performing weighting and calculation based on the above information, various factors having an influence on the display effect of the target region can be sufficiently considered, ensuring the effectiveness of the determined magnification.
Based on the embodiment shown in fig. 2, fig. 5 is a schematic flowchart of step S230 in the video processing method of fig. 2 in the embodiment of the present application. Referring to fig. 5, if the number of the target objects is at least two, step S230 at least includes step S510 to step S520, which are described in detail as follows:
in step S510, a target area containing at least two of the target objects is determined.
In an exemplary embodiment of the present application, if the number of the target objects is at least two, that is, two or more than two, the processing terminal determines the target area in the screen content of the video stream based on that the determined target area can simultaneously contain the at least two target objects.
In step S520, a magnification factor for the target area is determined according to the size information of the target area, the size information of the image screen of the video stream, and the size information of the currently displayable area.
Thus, in the embodiment shown in fig. 5, when the number of target objects is at least two, the processing terminal may identify an area containing the at least two target objects at the same time as a target area. Therefore, when in subsequent display, the at least two target objects can be highlighted simultaneously, the target objects are prevented from being lost, and the effectiveness of video monitoring is further ensured.
Based on the embodiment shown in fig. 2, fig. 6 is a schematic flowchart of step S240 in the video processing method of fig. 2 in this embodiment. Referring to fig. 6, step S240 at least includes steps S610 to S620, which are described in detail as follows:
in step S610, the target area is enlarged according to the magnification.
In an exemplary embodiment of the present application, after determining the magnification factor for the target area, the processing terminal may magnify the target area according to the magnification factor, so as to highlight the target object included in the target area.
In step S620, the video stream is displayed in the currently displayable region with the enlarged target region as a center.
In an exemplary embodiment of the present application, after the processing terminal enlarges the target area, the processing terminal may move the enlarged target area to the center of the currently displayable area, and play the video stream. Therefore, the display effect of the target area is guaranteed, and the effectiveness of video monitoring is further guaranteed.
Based on the embodiment shown in fig. 2, fig. 7 is a schematic flowchart of step S240 in the video processing method of fig. 2 in this embodiment. Referring to fig. 7, step S240 at least includes steps S710 to S720, which are described in detail as follows:
in step S710, zooming the image capturing device for capturing the video stream according to the magnification factor to magnify the target area.
In an exemplary embodiment of the present application, after determining the magnification, the processing terminal may send a zoom instruction to an image capturing device that captures the video stream, and after receiving the zoom instruction, the image capturing device may adjust its own shooting parameters correspondingly, so as to perform zoom-in shooting on the target area.
In another example, the processing terminal may also send a shooting angle adjustment instruction to the image acquisition device based on the position information of the target area in the image screen of the video stream, so as to correspondingly adjust the shooting angle of the image acquisition device, so that the image acquisition device is directly facing the target area.
In step S720, the zoomed video stream transmitted by the image capturing device is received, and the zoomed video stream is displayed in the current displayable region centering on the target region.
In an exemplary embodiment of the present application, after zooming, the image capturing apparatus may continue to transmit the captured video stream data to the processing terminal. After receiving the zoomed video stream data, the processing terminal can display the zoomed video stream in the current displayable area by taking the target area as the center without processing the zoomed video stream, thereby ensuring the effectiveness of video monitoring.
It should be understood that although the various steps in the flow charts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided a video processing apparatus including:
an obtaining module 810, configured to obtain a video stream to be processed;
an identifying module 820, configured to identify a target object included in the video stream according to the video stream;
a determining module 830, configured to determine, according to size information of a target area where the target object is located, size information of an image frame of the video stream, and size information of a current displayable area, a magnification factor for the target area;
a display module 840, configured to display the video stream in the currently displayable region with the target region as a center according to the magnification.
In one embodiment, the identification module 820 is configured to: and inputting the video stream into a pre-trained target recognition model so that the target recognition model recognizes a target object contained in the video stream.
In one embodiment, the size information includes a width and a length; the determination module 830 is configured to: determining a first ratio of the width of the target area to the width of an image picture of the video stream according to the width of the target area where the target object is located and the width of the image picture; determining a second ratio of the length of the target area to the length of the image picture according to the length of the target area where the target object is located and the length of the image picture; determining a magnification factor for the target area based on the first and second ratios and size information of a currently displayable area.
In one embodiment, the determination module 830 is configured to: acquiring a first weight corresponding to the first proportion, a second weight corresponding to the second proportion and a third weight corresponding to the size information of the current displayable area; and performing weighting and processing according to the first proportion, the second proportion, the size information of the current displayable area, the first weight, the second weight and the third weight, and determining the magnification factor aiming at the target area.
In one embodiment, the number of target objects is at least two, and the determining module 830 is configured to: determining a target area containing at least two of the target objects; and determining the magnification aiming at the target area according to the size information of the target area, the size information of the image picture of the video stream and the size information of the current displayable area.
In one embodiment, the display module 840 is configured to: amplifying the target area according to the amplification factor; displaying the video stream in the currently displayable region centering on the enlarged target region.
In one embodiment, the display module 840 is configured to: zooming an image acquisition device for acquiring the video stream according to the magnification factor so as to amplify the target area; and receiving the zoomed video stream sent by the image acquisition device, and displaying the zoomed video stream by taking the target area as the center in the current displayable area.
For specific limitations of the video processing apparatus, reference may be made to the above limitations of the video processing method, which is not described herein again. The various modules in the video processing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a video processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a video stream to be processed;
according to the video stream, identifying a target object contained in the video stream;
determining the magnification factor aiming at the target area according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area;
and displaying the video stream in the current displayable region by taking the target region as the center according to the magnification.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and inputting the video stream into a pre-trained target recognition model so that the target recognition model recognizes a target object contained in the video stream.
In one embodiment, the size information comprises a width and a length, and the processor when executing the computer program further performs the steps of:
determining a first ratio of the width of the target area to the width of an image picture of the video stream according to the width of the target area where the target object is located and the width of the image picture; determining a second ratio of the length of the target area to the length of the image picture according to the length of the target area where the target object is located and the length of the image picture; determining a magnification factor for the target area based on the first and second ratios and size information of a currently displayable area.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring a first weight corresponding to the first proportion, a second weight corresponding to the second proportion and a third weight corresponding to the size information of the current displayable area; and performing weighting and processing according to the first proportion, the second proportion, the size information of the current displayable area, the first weight, the second weight and the third weight, and determining the magnification factor aiming at the target area.
In one embodiment, the number of the target objects is at least two, and the processor executes the computer program to further implement the following steps:
determining a target area containing at least two of the target objects; and determining the magnification aiming at the target area according to the size information of the target area, the size information of the image picture of the video stream and the size information of the current displayable area.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
amplifying the target area according to the amplification factor; displaying the video stream in the currently displayable region centering on the enlarged target region.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
zooming an image acquisition device for acquiring the video stream according to the magnification factor so as to amplify the target area; and receiving the zoomed video stream sent by the image acquisition device, and displaying the zoomed video stream by taking the target area as the center in the current displayable area.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a video stream to be processed;
according to the video stream, identifying a target object contained in the video stream;
determining the magnification factor aiming at the target area according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area;
and displaying the video stream in the current displayable region by taking the target region as the center according to the magnification.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and inputting the video stream into a pre-trained target recognition model so that the target recognition model recognizes a target object contained in the video stream.
In an embodiment, the size information comprises a width and a length, the computer program when executed by the processor further performing the steps of:
determining a first ratio of the width of the target area to the width of an image picture of the video stream according to the width of the target area where the target object is located and the width of the image picture; determining a second ratio of the length of the target area to the length of the image picture according to the length of the target area where the target object is located and the length of the image picture; determining a magnification factor for the target area based on the first and second ratios and size information of a currently displayable area.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a first weight corresponding to the first proportion, a second weight corresponding to the second proportion and a third weight corresponding to the size information of the current displayable area; and performing weighting and processing according to the first proportion, the second proportion, the size information of the current displayable area, the first weight, the second weight and the third weight, and determining the magnification factor aiming at the target area.
In an embodiment, the number of target objects is at least two, the computer program when executed by the processor further performing the steps of:
determining a target area containing at least two of the target objects; and determining the magnification aiming at the target area according to the size information of the target area, the size information of the image picture of the video stream and the size information of the current displayable area.
In one embodiment, the computer program when executed by the processor further performs the steps of:
amplifying the target area according to the amplification factor; displaying the video stream in the currently displayable region centering on the enlarged target region.
In one embodiment, the computer program when executed by the processor further performs the steps of:
zooming an image acquisition device for acquiring the video stream according to the magnification factor so as to amplify the target area; and receiving the zoomed video stream sent by the image acquisition device, and displaying the zoomed video stream by taking the target area as the center in the current displayable area.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A video processing method, comprising the steps of:
acquiring a video stream to be processed;
according to the video stream, identifying a target object contained in the video stream;
determining the magnification factor aiming at the target area according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area;
and displaying the video stream in the current displayable region by taking the target region as the center according to the magnification.
2. The video processing method according to claim 1, wherein identifying the target object contained in the video stream based on the video stream comprises:
and inputting the video stream into a pre-trained target recognition model so that the target recognition model recognizes a target object contained in the video stream.
3. The video processing method of claim 1, wherein the size information comprises a width and a length;
determining a magnification factor for the target area according to the size information of the target area where the target object is located, the size information of the image frame of the video stream, and the size information of the current displayable area, including:
determining a first ratio of the width of the target area to the width of an image picture of the video stream according to the width of the target area where the target object is located and the width of the image picture;
determining a second ratio of the length of the target area to the length of the image picture according to the length of the target area where the target object is located and the length of the image picture;
determining a magnification factor for the target area based on the first and second ratios and size information of a currently displayable area.
4. The video processing method according to claim 3, wherein determining the magnification factor for the target area based on the first ratio, the second ratio, and the size information of the currently displayable area comprises:
acquiring a first weight corresponding to the first proportion, a second weight corresponding to the second proportion and a third weight corresponding to the size information of the current displayable area;
and performing weighting and processing according to the first proportion, the second proportion, the size information of the current displayable area, the first weight, the second weight and the third weight, and determining the magnification factor aiming at the target area.
5. The video processing method according to claim 1, wherein the number of the target objects is at least two;
determining a magnification factor for the target area according to the size information of the target area where the target object is located, the size information of the image frame of the video stream, and the size information of the current displayable area, including:
determining a target area containing at least two of the target objects;
and determining the magnification aiming at the target area according to the size information of the target area, the size information of the image picture of the video stream and the size information of the current displayable area.
6. The video processing method according to claim 1, wherein displaying the video stream centered on the target area in the currently displayable area according to the magnification comprises:
amplifying the target area according to the amplification factor;
displaying the video stream in the currently displayable region centering on the enlarged target region.
7. The video processing method according to claim 1, wherein displaying the video stream in the currently displayable region centered on the target region according to the magnification includes:
zooming an image acquisition device for acquiring the video stream according to the magnification factor so as to amplify the target area;
and receiving the zoomed video stream sent by the image acquisition device, and displaying the zoomed video stream by taking the target area as the center in the current displayable area.
8. A video processing apparatus, comprising:
the acquisition module is used for acquiring a video stream to be processed;
the identification module is used for identifying a target object contained in the video stream according to the video stream;
the determining module is used for determining the magnification factor aiming at the target area according to the size information of the target area where the target object is located, the size information of the image picture of the video stream and the size information of the current displayable area;
and the display module is used for displaying the video stream in the current displayable area by taking the target area as the center according to the magnification.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111120702.XA 2021-09-24 2021-09-24 Video processing method, video processing device, computer equipment and storage medium Pending CN113891040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111120702.XA CN113891040A (en) 2021-09-24 2021-09-24 Video processing method, video processing device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111120702.XA CN113891040A (en) 2021-09-24 2021-09-24 Video processing method, video processing device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113891040A true CN113891040A (en) 2022-01-04

Family

ID=79006390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111120702.XA Pending CN113891040A (en) 2021-09-24 2021-09-24 Video processing method, video processing device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113891040A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115941861A (en) * 2022-12-14 2023-04-07 上海山源电子科技股份有限公司 Pane picture playing method and device, electronic equipment and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140125875A1 (en) * 2012-11-05 2014-05-08 Kabushiki Kaisha Toshiba Video display device and video display system
US20140267723A1 (en) * 2013-01-30 2014-09-18 Insitu, Inc. Augmented video system providing enhanced situational awareness
US20160012609A1 (en) * 2014-07-07 2016-01-14 Google Inc. Method and System for Cluster-Based Video Monitoring and Event Categorization
WO2017125027A1 (en) * 2016-01-20 2017-07-27 腾讯科技(深圳)有限公司 Method and device for displaying information, and computer storage medium
WO2020038167A1 (en) * 2018-08-22 2020-02-27 Oppo广东移动通信有限公司 Video image recognition method and apparatus, terminal and storage medium
CN111083568A (en) * 2019-12-13 2020-04-28 维沃移动通信有限公司 Video data processing method and electronic equipment
CN111210472A (en) * 2019-12-31 2020-05-29 山东信通电子股份有限公司 3D positioning method, device, equipment and medium for video picture
CN111385525A (en) * 2018-12-28 2020-07-07 杭州海康机器人技术有限公司 Video monitoring method, device, terminal and system
CN112115804A (en) * 2020-08-26 2020-12-22 北京博睿维讯科技有限公司 Key area monitoring video control method and system, intelligent terminal and storage medium
CN112367559A (en) * 2020-10-30 2021-02-12 北京达佳互联信息技术有限公司 Video display method and device, electronic equipment, server and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140125875A1 (en) * 2012-11-05 2014-05-08 Kabushiki Kaisha Toshiba Video display device and video display system
US20140267723A1 (en) * 2013-01-30 2014-09-18 Insitu, Inc. Augmented video system providing enhanced situational awareness
US20160012609A1 (en) * 2014-07-07 2016-01-14 Google Inc. Method and System for Cluster-Based Video Monitoring and Event Categorization
US20160041724A1 (en) * 2014-07-07 2016-02-11 Google Inc. Method and System for Performing Client-Side Zooming of a Remote Video Feed
WO2017125027A1 (en) * 2016-01-20 2017-07-27 腾讯科技(深圳)有限公司 Method and device for displaying information, and computer storage medium
WO2020038167A1 (en) * 2018-08-22 2020-02-27 Oppo广东移动通信有限公司 Video image recognition method and apparatus, terminal and storage medium
CN111385525A (en) * 2018-12-28 2020-07-07 杭州海康机器人技术有限公司 Video monitoring method, device, terminal and system
CN111083568A (en) * 2019-12-13 2020-04-28 维沃移动通信有限公司 Video data processing method and electronic equipment
CN111210472A (en) * 2019-12-31 2020-05-29 山东信通电子股份有限公司 3D positioning method, device, equipment and medium for video picture
CN112115804A (en) * 2020-08-26 2020-12-22 北京博睿维讯科技有限公司 Key area monitoring video control method and system, intelligent terminal and storage medium
CN112367559A (en) * 2020-10-30 2021-02-12 北京达佳互联信息技术有限公司 Video display method and device, electronic equipment, server and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115941861A (en) * 2022-12-14 2023-04-07 上海山源电子科技股份有限公司 Pane picture playing method and device, electronic equipment and medium
CN115941861B (en) * 2022-12-14 2023-09-26 上海山源电子科技股份有限公司 Pane playing method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN111698553B (en) Video processing method and device, electronic equipment and readable storage medium
CN110049310B (en) Video image acquisition method and device, video quality detection method and device
JP5460793B2 (en) Display device, display method, television receiver, and display control device
CN110111241B (en) Method and apparatus for generating dynamic image
CN110751149A (en) Target object labeling method and device, computer equipment and storage medium
CN111667504B (en) Face tracking method, device and equipment
US20150010236A1 (en) Automatic image refocusing method
CN111832561B (en) Character sequence recognition method, device, equipment and medium based on computer vision
CN111080571A (en) Camera shielding state detection method and device, terminal and storage medium
CN104915109A (en) Image display apparatus and image display method
CN113891040A (en) Video processing method, video processing device, computer equipment and storage medium
US20160350622A1 (en) Augmented reality and object recognition device
WO2024093763A1 (en) Panoramic image processing method and apparatus, computer device, medium and program product
CN111582024B (en) Video stream processing method, device, computer equipment and storage medium
CN109993067B (en) Face key point extraction method and device, computer equipment and storage medium
CN111583329A (en) Augmented reality glasses display method and device, electronic equipment and storage medium
CN110659376A (en) Picture searching method and device, computer equipment and storage medium
CN113079342A (en) Target tracking method and system based on high-resolution image device
CN114998102A (en) Image processing method and device and electronic equipment
CN114785957A (en) Shooting method and device thereof
CN114390197A (en) Shooting method and device, electronic equipment and readable storage medium
CN113473012A (en) Virtualization processing method and device and electronic equipment
CN105808180B (en) Picture adjusting method and system
CN114125226A (en) Image shooting method and device, electronic equipment and readable storage medium
CN112911130A (en) Auxiliary view finding method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination