[go: up one dir, main page]

CN114401365B - Target person identification method, video switching method and device - Google Patents

Target person identification method, video switching method and device Download PDF

Info

Publication number
CN114401365B
CN114401365B CN202111680000.7A CN202111680000A CN114401365B CN 114401365 B CN114401365 B CN 114401365B CN 202111680000 A CN202111680000 A CN 202111680000A CN 114401365 B CN114401365 B CN 114401365B
Authority
CN
China
Prior art keywords
target
area
human body
preset
target detection
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.)
Active
Application number
CN202111680000.7A
Other languages
Chinese (zh)
Other versions
CN114401365A (en
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.)
Guangdong Institute of Education
Ava Electronic Technology Co Ltd
Original Assignee
Guangdong Institute of Education
Ava Electronic 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 Guangdong Institute of Education, Ava Electronic Technology Co Ltd filed Critical Guangdong Institute of Education
Priority to CN202111680000.7A priority Critical patent/CN114401365B/en
Publication of CN114401365A publication Critical patent/CN114401365A/en
Application granted granted Critical
Publication of CN114401365B publication Critical patent/CN114401365B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a target person identification method, a video switching method and a device. The target person identification method comprises the following steps: acquiring a current image frame of a target video stream, wherein the current image frame comprises: candidate human body target detection areas; selecting a current human body target detection area from the candidate human body target detection areas; extracting a target color area in a preset color range in a current human body target detection area; and when the target color domain meets the preset condition, judging that the target video stream contains the target person. Compared with the traditional method for searching the target person through the face recognition technology, the method has the advantages that the problem of poor effect of a small face recognition model is avoided, and meanwhile, the cost of hardware computing resources is reduced. Compared with the traditional method for tracking the color of the surface of the pure target, the method can reduce the cost of hardware computing resources and the interference of the surrounding environment on the color.

Description

Target person identification method, video switching method and device
Technical Field
The present invention relates to the field of artificial intelligence visual recognition, and more particularly, to a target person recognition method, a video switching method, a device, equipment, and a storage medium.
Background
The range of the existing teaching sites is continuously expanded, taking military teaching as an example, on the same lesson, a teacher may first perform fight teaching in a first site, then perform shooting teaching in a second site, and then perform theoretical teaching in a third site. Along with the popularization of online teaching, a teacher performs on-site recording and broadcasting or live broadcasting of teaching videos while performing on-site teaching, and when the teacher changes places, a lens is also switched to the corresponding place.
At present, a camera is generally configured on each field to shoot and output video streams to a host, the host performs face recognition on the received video streams, and when a instructor is identified, the video stream of the instructor is output, so that the switching of lenses is realized. However, since a large number of students are present in the shooting site in addition to the instructor, a large amount of calculation effort is required for face recognition, and thus the requirement for equipment is very high. In addition, the target tracking method based on face recognition needs to prepare a small face recognition model and a face detection model which are suitable for the natural scene and have high precision, and the small face recognition model suitable for the natural scene has poor effect.
Disclosure of Invention
In order to overcome at least one defect in the prior art, the invention provides a target person identification method, a video switching method, a device, equipment and a storage medium. In order to solve the technical problems, the technical scheme adopted by the invention is as follows.
In a first aspect, the present invention provides a target person recognition method, including the steps of:
Acquiring a current image frame of a target video stream, wherein the current image frame comprises: candidate human body target detection areas;
selecting a current human body target detection area from the candidate human body target detection areas;
extracting a target color area in a preset color range in a current human body target detection area;
and when the target color domain meets the preset condition, judging that the target video stream contains the target person.
In one embodiment, the process of the target color area meeting the preset condition includes the steps of:
acquiring a target color area with the largest area in a current human body target detection area;
and when the target color area with the largest area is larger than a threshold value, judging that the target color area meets a preset condition.
In one embodiment, the process of the target color area meeting the preset condition includes the steps of:
acquiring a target color area with the largest area in a current human body target detection area;
And when the target color area with the largest area is larger than a threshold value and is in a preset shape, judging that the target color area meets a preset condition.
In one embodiment, the method further comprises the step of:
when the target color area meets the preset condition, calculating basic information of a human body target detection area;
Wherein the basic information includes a duty ratio of a current human body target detection area in a current image frame.
In one embodiment, the basic information further includes position information of the current human target detection area in the current image frame.
In a second aspect, the present invention provides a video switching method, which is characterized by comprising the steps of:
Receiving multiple paths of video streams;
Processing the multiple paths of video streams by using the target person identification method in any embodiment to obtain a target person judgment result of each path of video stream;
and outputting the corresponding video stream according to the judging result.
In one embodiment, the target person determination result is obtained by the target person recognition method of any one of the above embodiments;
the video switching method further comprises the steps of:
acquiring basic information of human body target detection areas of all paths of video streams;
and outputting one path of video stream according to the basic information based on a preset rule when the multiple paths of video streams contain target characters.
In a third aspect, the present invention provides a target person recognition apparatus comprising:
an acquisition module, configured to acquire a current image frame of a target video stream, where the current image frame includes: candidate human body target detection areas;
the selecting module is used for selecting a current human body target detection area from the candidate human body target detection areas;
the extraction module is used for extracting a target color area in a preset color range in the current human body target detection area;
and the judging module is used for judging that the target video stream contains the target person when the target color domain meets the preset condition.
In a fourth aspect, the present invention provides a video switching apparatus, comprising:
the receiving module is used for receiving the multipath video streams;
The processing module is used for processing the multiple paths of video streams by using the target person identification device of the embodiment to obtain target person judgment results of all paths of video streams;
And the output module is used for outputting the corresponding video stream according to the judging result.
In a fifth aspect, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the above embodiments when executing the program.
In a sixth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor implements the method of any of the above embodiments.
The invention is suitable for recorded broadcast or live broadcast scenes with multiple characters on multiple sites and special color accessories worn on tracking targets, and is particularly suitable for teaching scenes on multiple sites. The invention judges whether the target video stream contains the target person or not by extracting the target color area from the human target detection area and judging whether the target color area meets the preset condition. Compared with the traditional method for searching the target person through the face recognition technology, the method has the advantages that the problem of poor effect of a small face recognition model is avoided, and meanwhile, the cost of hardware computing resources is reduced. Compared with the traditional method for tracking the color of the surface of the pure target, the method can reduce the cost of hardware computing resources and the interference of the surrounding environment on the color.
Drawings
Fig. 1 is a schematic flow chart of a first embodiment of the present invention.
Fig. 2 is a schematic flow chart of a second embodiment of the present invention.
Fig. 3 is a schematic overall structure of a third embodiment of the present invention.
Fig. 4 is a schematic overall structure of a fourth embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that, the term "first\second\ … …" related to the embodiment of the present invention is merely to distinguish similar objects, and does not represent a specific order for the objects, it is to be understood that "first\second\ … …" may interchange a specific order or sequence where allowed. It is to be understood that the objects identified by the "first\second\ … …" are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or otherwise described herein.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of a target person identification method according to a first embodiment of the present invention, where the method includes: step S110, step S120, step S130, and step S140. It should be noted that, step S110, step S120, step S130 and step S140 are merely reference numerals for clearly explaining the correspondence between the embodiments and fig. 1, and do not represent the sequential limitation of the steps of the method in this embodiment.
Step S110, acquiring a current image frame of a target video stream, where the current image frame includes: candidate human target detection areas.
The method is suitable for recorded broadcast or live broadcast scenes with multiple characters in multiple places and special color accessories worn on tracking targets, and is particularly suitable for teaching scenes in multiple places, so that the method is described below by taking the teaching scenes as an example. The teaching recording and broadcasting site generally comprises a master, such as a teacher, a teacher or an engineer of the master, and also comprises a listener, such as a student. In the step, the video streams of the recording and playing sites are obtained, and single-frame picture data of the detected video streams are intercepted in the video streams to serve as current image frames. Of course, the single frame picture data may be preprocessed, for example, after size scaling, numerical normalization, etc., and the processed single frame picture may be used as the current image frame. Then, the current image frames are all sent into a human body target detection model, and the center point coordinates and the width and the height of the minimum external matrix of the human body are output from the picture through repeated downsampling of a convolutional neural network and feature fusion of different sizes, wherein the external matrix is the human body target detection area, and therefore the acquired current image frames all comprise the external matrix.
Specifically, the human body target detection method currently uses a target detection algorithm based on a convolutional neural network. Target detection algorithms based on convolutional neural networks can be divided into two main categories according to the processing procedure: two-stage (Two stage) target detection algorithm and One-stage (One stage) target detection algorithm.
The two-stage target detection algorithm divides the detection process into two stages; firstly, extracting features after an input image, extracting regions with local region features similar to target class features, and generating candidate regions (region proposal, RP) to be processed in the second stage; and in the second stage, extracting the characteristics of the candidate region, performing classification and regression operations, and outputting the confidence coefficient of the candidate region category and the position information of the corrected candidate frame. The two-stage target detection algorithms commonly used are: FASTER RCNN series, FPN, R-FCN, CASCADE RCNN, and the like.
The single-stage target detection algorithm takes the target detection problem as a regression problem, directly performs feature extraction processing on the whole graph, predicts the category confidence of the target and the position information of the target through the extracted features, has advantages in terms of processing speed compared with the two-stage target detection algorithm, but cannot avoid introducing background interference due to the whole graph processing operation, so that the detection accuracy is lower than that of the two-stage detection algorithm. The usual one-stage target detection algorithm is: YOLOv5 series, RETINANET, CENTERNET, etc.
Typically, the teaching scene is a multi-person scene, and the current image frame includes a plurality of candidate human target detection areas.
Step S120, selecting a current human target detection area from the candidate human target detection areas.
Since there are a plurality of candidate human body target detection areas, one of them is selected as the current human body target detection area in this step. Because each human body target detection area needs to be detected to judge whether a target person exists or not in the invention, the human body target detection area which is not detected is selected as the current human body target detection area in the step.
Step S130, extracting a target color area within a preset color range in the current human target detection area.
If in the field of job teaching, a master engineer will generally wear a helmet with a color different from that of a student, or in the middle and primary schools of military training, a teacher will wear camouflage clothing and a student will wear school wear uniform, or in teaching, a teacher will wear a cuff mark with a specific color. At this time, the engineer/instructor/teacher who is the main speaker has a color accessory different from that of the student, and the person can be judged as the main speaker as long as the person having the color accessory is found. In the teaching video, the presenter is generally a target person. This step is based on the above-described principle. The human target detection area selected in step S120 may be regarded as a human target area, and the person corresponding to the human target area may be regarded as the target person as long as the specified color is found in the human target area.
Since the color in the video is affected by the brightness and other factors, the color in the video is not necessarily the original color of the accessory, so that a color range is preset based on the original color of the accessory, and the colors in the color range are considered to be the colors of the target accessory. Preferably, the RGB data of the target accessory color may be converted to an HSV color gamut, its color gamut H value and saturation S value are calculated under the HSV color gamut, and a color gamut threshold range [ H1, H2] and saturation threshold range [ S1, S2] are set accordingly. Correspondingly, the RGB data of the human body target detection area is converted into the HSV color gamut, and the areas among [ h1, h2] and [ s1, s2] therein are found. Preferably, after the regions in [ h1, h2] and [ s1, s2] are found, the contour of the object, which is the target color region, can be obtained by processing such as binarization processing, an expansion algorithm, and an edge extraction algorithm. In the human body target detection area, there is a possibility that more than one area in [ h1, h2] and [ s1, s2], so that it is possible to extract a plurality of target color areas in this step.
Compared with a pure target surface color tracking method, the method does not need to process the whole image pixels, can save calculation force and reduce the requirement on calculation resources of hardware. Meanwhile, the detection range is reduced to be within the human body target detection area, and the interference of the surrounding environment on the color can be reduced only by detecting the human body target detection area.
Step S140, when the target color area satisfies the preset condition, it is determined that the target video stream contains the target person.
In step S130, one or more target color areas are extracted, and in this step, it is determined whether the target color areas satisfy a preset condition, for example, whether the area of the target color area exceeds an area threshold, whether the shape of the target color area satisfies a preset shape, or the like. As long as one of the target color region areas satisfies the preset condition, the target person can be considered to be in the current human target detection region, i.e., the target video stream contains the target person.
Here, when the target color area cannot be extracted or no target color area satisfies the preset condition, it is indicated that the target person is not in the current human target detection area, and the remaining human target detection areas that have not been detected are detected until all the human target detection areas are detected, which is also the reason why the human target detection area that has not been detected is selected as the current human target detection area in step S120.
The method is suitable for recorded broadcast or live broadcast scenes with multiple characters in multiple places and special color accessories worn on tracking targets, and is particularly suitable for teaching scenes in multiple places. The method judges whether the target video stream contains a target person or not by extracting a target color area from a human target detection area and judging whether the target color area meets preset conditions. Compared with the traditional method for searching the target person through the face recognition technology, the method has the advantages that the problem of poor effect of a small face recognition model is avoided, and meanwhile, the cost of hardware computing resources is reduced. Compared with the traditional method for tracking the color of the surface of the pure target, the method can reduce the cost of hardware computing resources and the interference of the surrounding environment on the color.
In one embodiment, the process in which the target color area satisfies the preset condition includes step S210 and step S220.
Step S210, a target color area with the largest area in the current human body target detection area is acquired.
Step S220, when the target color area with the largest area is larger than a threshold value, judging that the target color area meets a preset condition.
The present embodiment is a detailed description of preset conditions. As described above, it is possible to extract a plurality of target color areas, and it is necessary to determine which target color area is the actual accessory of the specific color. Generally, the person other than the target person can be determined by earlier work that the person does not have the specific color, so that it can be determined that the area where the specific color is the same is the surrounding environment area, but since there are few positions in the human target detection area where the environment can be captured, the area of the surrounding environment area in the human target detection area is not too large, and therefore the target color area with the largest inferred area is the area of the accessory of the specific color. Therefore, in step S210, the target color region with the largest area is taken as the fitting region of the most likely potential specific color.
As described above, since the area of the surrounding environment area in the human body target detection area is not too large, a threshold value can be preset, and it is considered that the environment area is not an environment area as long as the area is larger than the threshold value, and the accessory of a specific color is formed. Therefore, when the target color area with the largest area is larger than the threshold value, the fitting with the specific color is obtained in the human body target detection area, and the target color area is judged to meet the preset condition.
In one embodiment, the process in which the target color area satisfies the preset condition includes step S310 and step S320.
Step S310, a target color area with the largest area in the current human body target detection area is obtained.
Step S320, when the target color area with the largest area is greater than a threshold and is in a preset shape, determining that the target color area meets a preset condition.
This embodiment is basically similar to the previous embodiment, except that a judgment condition for the shape is also added at the time of judgment. Since the fitting of the specific color has its own shape, the present embodiment further confirms whether the target color region is the fitting of the specific color by the shape.
In one embodiment, the target person recognition method further includes step S150.
Step S150, when the target color area meets the preset condition, basic information of a human body target detection area is calculated; wherein the basic information includes a duty ratio of a current human body target detection area in a current image frame.
After the target video stream is judged to contain the target person, the basic information about the human body target detection area is correspondingly output for the subsequent judgment of the shooting condition of the target person in the video. In this embodiment, the duty ratio of the current human body target detection area in the current image frame is basically included. In general, a photographed target person having a relatively high duty ratio is more clear.
In one embodiment, the basic information further includes position information of the current human target detection area in the current image frame.
In addition to the duty cycle, location information is also important information. When watching, the person can have better watching feeling at the center of the image than at the edge.
Example two
The present invention also provides a video switching method based on the first embodiment, please refer to fig. 2, fig. 2 is a flow chart of a target person identification method provided in the second embodiment of the present invention, the method includes: step S410, step S420, and step S430. It should be noted that, step S410, step S420 and step S430 are only reference numerals for clearly explaining the correspondence between the embodiments and fig. 2, and do not represent the sequential limitation of the steps of the method in this embodiment.
Step S410, receiving multiple paths of video streams;
step S420, processing the multiple paths of video streams by using any implementation manner of the target person identification method in the first embodiment to obtain a target person determination result of each path of video stream;
step S430, outputting the corresponding video stream according to the judging result.
In multi-site teaching, as course content goes deep, the teaching process is transferred to different scenes for carrying out. In general, a plurality of cameras are erected in different rooms, each camera records a path of video stream, the video streams shot by each camera are transmitted to a recording and broadcasting host, and the recording and broadcasting host outputs the video stream with a target object after receiving each path of video stream. Therefore, the method is suitable for the record-playing host. After receiving multiple paths of video streams, the method processes each path of video stream by the method of the first embodiment to obtain a target person judging result of each path of video stream. After the judgment result is obtained, the user can know where the target person is contained in the video stream, and then the user can convert and output the video stream to the corresponding video stream according to the judgment result.
Here, the output may be to switch the screen to be output when only one screen is played, or to switch the main screen to be output when a plurality of screens are played.
It should be noted here that if no target person is found in each video stream, it is possible to choose not to switch the current picture or to switch the picture to a specific picture.
In one embodiment, the video switching method further includes step S440 and step S450.
Step S440, obtaining basic information of human body target detection areas of all paths of video streams;
Step S450, when the multi-path video stream contains the target person, outputting one path of video stream according to the basic information based on the preset rule.
In some cases, the shooting ranges between the cameras are intersected, so that the target person may appear in two video streams at the same time. In this case, it is necessary to take the choice of which video stream to switch to. In some implementations of the first embodiment, basic information of the human target detection area is also calculated, and according to these information, a determination can be made relatively well based on a preset rule, and to which video stream the human target detection area is switched. Specifically, if the basic information only includes the duty ratio of the current human body target detection area in the current image frame, a higher priority that occupies a larger area may be preset; if the basic information includes the duty ratio and the position information, a picture with higher priority can be obtained based on the weight of the duty ratio and the position information.
The method is suitable for video fast switching of recorded broadcast or live broadcast scenes with multiple characters in multiple sites and special color accessories worn on tracking targets, and is particularly suitable for teaching scenes in multiple sites. The method judges whether the target video stream contains a target person or not by extracting a target color area from a human target detection area and judging whether the target color area meets preset conditions. Compared with the traditional method for searching the target person through the face recognition technology, the method has the advantages that the problem of poor effect of a small face recognition model is avoided, and meanwhile, the cost of hardware computing resources is reduced. Compared with the traditional method for tracking the color of the surface of the pure target, the method can reduce the cost of hardware computing resources and the interference of the surrounding environment on the color.
Example III
Corresponding to the target person identification method of the first embodiment, as shown in fig. 3, the present invention also provides a target person identification apparatus 3, including: an acquisition module 301, a selection module 302, an extraction module 303 and a determination module 304.
An obtaining module 301, configured to obtain a current image frame of a target video stream, where the current image frame includes: a human body target detection area;
A selecting module 302, configured to select a current human body target detection area from the human body target detection areas;
an extracting module 303, configured to extract a target color area within a preset color range in a current human target detection area;
And the judging module 304 is configured to judge that the target video stream contains the target person when the target color domain meets the preset condition.
The device is suitable for recorded broadcast or live broadcast scenes with multiple characters in multiple places and special color accessories worn on tracking targets, and is particularly suitable for teaching scenes in multiple places. The device judges whether the target video stream contains the target person or not by extracting the target color area from the human target detection area and judging whether the target color area meets the preset condition. Compared with the traditional method for searching the target person through the face recognition technology, the method has the advantages that the problem of poor effect of a small face recognition model is avoided, and meanwhile, the cost of hardware computing resources is reduced. Compared with the traditional method for tracking the color of the surface of the pure target, the method can reduce the cost of hardware computing resources and the interference of the surrounding environment on the color.
In one embodiment, the determining module includes the steps of:
acquiring a target color area with the largest area in a current human body target detection area;
and when the target color area with the largest area is larger than a threshold value, judging that the target color area meets a preset condition.
In one embodiment, the determining module includes the steps of:
acquiring a target color area with the largest area in a current human body target detection area;
And when the target color area with the largest area is larger than a threshold value and is in a preset shape, judging that the target color area meets a preset condition.
In one embodiment, the target person identification apparatus further comprises a generation module.
The generation module is used for calculating basic information of a human body target detection area when the target color area meets preset conditions; wherein the basic information includes a duty ratio of a current human body target detection area in a current image frame.
In one embodiment, the basic information further includes position information of the current human target detection area in the current image frame.
Example IV
Corresponding to the video switching method of the second embodiment, as shown in fig. 4, the present invention further provides a video switching apparatus 4, including: a receiving module 401, a processing module 402 and an output module 403.
A receiving module 401, configured to receive multiple video streams;
A processing module 402, configured to process the multiple paths of video streams by using any implementation manner of the target person identifying apparatus in the third embodiment, to obtain a target person determination result of each path of video stream;
and the output module 403 is configured to output a corresponding video stream according to the determination result.
In one embodiment, the video switching apparatus further includes a step acquisition module;
the acquisition module is used for acquiring basic information of human body target detection areas of all paths of video streams;
The judging module is also used for outputting one path of video stream according to the basic information based on a preset rule when the multipath video stream contains the target person.
The device is suitable for video fast switching of recorded broadcast or live broadcast scenes with multiple characters in multiple places and special color accessories worn on tracking targets, and is particularly suitable for teaching scenes in multiple places. The device judges whether the target video stream contains the target person or not by extracting the target color area from the human target detection area and judging whether the target color area meets the preset condition. Compared with the traditional method for searching the target person through the face recognition technology, the method has the advantages that the problem of poor effect of a small face recognition model is avoided, and meanwhile, the cost of hardware computing resources is reduced. Compared with the traditional method for tracking the color of the surface of the pure target, the method can reduce the cost of hardware computing resources and the interference of the surrounding environment on the color.
Example five
The embodiment of the invention also provides a storage medium, on which computer instructions are stored, which when executed by a processor, implement the target person identification method and the video switching method of any of the above embodiments.
Those skilled in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a random access Memory (RAM, random Access Memory), a Read-Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Or the above-described integrated units of the invention may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the embodiments of the present invention may be essentially or part contributing to the related art, and the computer software product may be stored in a storage medium, and include several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program code, such as a removable storage device, RAM, ROM, magnetic or optical disk.
Corresponding to the above-mentioned computer storage medium, in one embodiment, there is also provided a computer device including a memory, an encoder, and a computer program stored on the memory and executable on the encoder, wherein the encoder implements any one of the target person recognition method and the video switching method of the above-mentioned embodiments when executing the program.
The computer equipment is suitable for recording and broadcasting or live broadcasting scenes with multiple characters in multiple places and special color accessories worn on tracking targets, and is particularly suitable for teaching scenes in multiple places. The computer device judges whether the target video stream contains the target person by extracting the target color region from the human target detection region and judging whether the target color region meets the preset condition. Compared with the traditional method for searching the target person through the face recognition technology, the method has the advantages that the problem of poor effect of a small face recognition model is avoided, and meanwhile, the cost of hardware computing resources is reduced. Compared with the traditional method for tracking the color of the surface of the pure target, the method can reduce the cost of hardware computing resources and the interference of the surrounding environment on the color.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
It is to be understood that the above examples of the present invention are provided by way of illustration only and not by way of limitation of the embodiments of the present invention. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the invention are desired to be protected by the following claims.

Claims (4)

1. A video switching method, comprising the steps of:
Receiving multiple paths of video streams;
Processing the multi-path video stream by using a preset target person identification method to obtain target person judgment results and basic information of human body target detection areas of all paths of video streams;
Outputting a corresponding video stream according to the judging result;
The video switching method further comprises the following steps:
When the multipath video stream contains a target person, outputting one path of video stream according to the basic information based on a preset rule, wherein the preset rule is a rule for obtaining a picture with higher priority according to the basic information;
The preset target person identification method comprises the following steps:
Acquiring a current image frame of a target video stream, wherein the current image frame comprises: candidate human body target detection areas;
selecting a current human body target detection area from the candidate human body target detection areas;
extracting all areas in a preset color range in a current human body target detection area, and defining the extracted all areas as target color areas;
Judging whether a target color area meeting a preset condition exists or not;
when a target color area meeting the preset condition exists, judging that the target video stream contains a target person;
The process for judging whether the target color area meeting the preset condition exists or not comprises the following steps:
acquiring a target color region with the largest area among all target color regions in the current human body target detection region;
judging whether the area of the target color area with the largest area is larger than a threshold value or not;
judging whether the shape of the target color area with the largest area is a preset shape or not;
when the area of the target color area with the largest area is larger than a threshold value and the shape of the target color area with the largest area is a preset shape, judging that the target color area meets a preset condition;
The target person identification method further comprises the following steps:
When the target color area meets the preset condition, calculating basic information of a human body target detection area; the basic information comprises the duty ratio of the current human body target detection area in the current image frame and the position information of the current human body target detection area in the current image frame.
2. A video switching apparatus, comprising:
the receiving module is used for receiving the multipath video streams;
The processing module is used for processing the multiple paths of video streams by using a preset target person identification device to obtain target person judging results of all paths of video streams;
the output module is used for outputting a corresponding video stream according to the judging result;
the acquisition module is used for acquiring basic information of human body target detection areas of all paths of video streams;
The processing module is further configured to output a path of video stream according to the basic information based on a preset rule when the multiple paths of video streams include the target person, where the preset rule is a rule for obtaining a picture with a higher priority according to the basic information;
the preset target person identification device comprises:
an acquisition module, configured to acquire a current image frame of a target video stream, where the current image frame includes: candidate human body target detection areas;
The selecting module is used for selecting a current human body target detection area from the candidate human body target detection areas; the extraction module is used for extracting all the areas in the current human body target detection area within a preset color range, and defining all the extracted areas as target color areas;
The judging module is used for judging whether a target color area meeting the preset condition exists or not, and judging that the target video stream contains a target person when the target color area meeting the preset condition exists;
The generation module is used for calculating basic information of a human body target detection area when the target color area meets preset conditions; the basic information comprises the duty ratio of the current human body target detection area in the current image frame and the position information of the current human body target detection area in the current image frame;
the judging module executes the process of judging whether the target color area meeting the preset condition exists or not, and the judging module comprises the following steps:
acquiring a target color region with the largest area among all target color regions in the current human body target detection region;
judging whether the area of the target color area with the largest area is larger than a threshold value or not;
judging whether the shape of the target color area with the largest area is a preset shape or not;
And when the area of the target color area with the largest area is larger than a threshold value and the shape of the target color area with the largest area is a preset shape, judging that the target color area meets a preset condition.
3. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of claim 1 when executing the program.
4. A computer readable storage medium, on which a computer program is stored, which program, when being executed by a processor, implements the method according to claim 1.
CN202111680000.7A 2021-12-31 2021-12-31 Target person identification method, video switching method and device Active CN114401365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111680000.7A CN114401365B (en) 2021-12-31 2021-12-31 Target person identification method, video switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111680000.7A CN114401365B (en) 2021-12-31 2021-12-31 Target person identification method, video switching method and device

Publications (2)

Publication Number Publication Date
CN114401365A CN114401365A (en) 2022-04-26
CN114401365B true CN114401365B (en) 2024-05-14

Family

ID=81228709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111680000.7A Active CN114401365B (en) 2021-12-31 2021-12-31 Target person identification method, video switching method and device

Country Status (1)

Country Link
CN (1) CN114401365B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1452995A2 (en) * 2003-02-28 2004-09-01 Eastman Kodak Company Method for detecting color objects in digital images
JP2005202938A (en) * 2003-12-19 2005-07-28 Matsushita Electric Ind Co Ltd Video search device and video search method
JP2010257451A (en) * 2009-03-31 2010-11-11 Sogo Keibi Hosho Co Ltd Person search device, person search method, and person search program
CN102881032A (en) * 2012-09-14 2013-01-16 北京理工大学 Picture splicing method based on improved algorithm
CN103034852A (en) * 2012-12-28 2013-04-10 上海交通大学 Specific color pedestrian detecting method in static video camera scene
CN104036575A (en) * 2014-07-01 2014-09-10 江苏省南京市公路管理处公路科学研究所 Safety helmet wearing condition monitoring method on construction site
CN104573111A (en) * 2015-02-03 2015-04-29 中国人民解放军国防科学技术大学 Method for structured storage and pre-retrieval of pedestrian data in surveillance videos
CN104732220A (en) * 2015-04-03 2015-06-24 中国人民解放军国防科学技术大学 Specific color human body detection method oriented to surveillance videos
CN105069466A (en) * 2015-07-24 2015-11-18 成都市高博汇科信息科技有限公司 Pedestrian clothing color identification method based on digital image processing
CN105741324A (en) * 2016-03-11 2016-07-06 江苏物联网研究发展中心 Moving object detection identification and tracking method on moving platform
CN106791715A (en) * 2017-02-24 2017-05-31 深圳英飞拓科技股份有限公司 Classification joint control intelligent control method and system
CN106791485A (en) * 2016-11-16 2017-05-31 深圳市异度信息产业有限公司 The changing method and device of video
CN107370948A (en) * 2017-07-29 2017-11-21 安徽博威康信息技术有限公司 A kind of studio video intelligent switch method
CN110049345A (en) * 2019-03-11 2019-07-23 北京河马能量体育科技有限公司 A kind of multiple video strems director method and instructor in broadcasting's processing system
CN112347887A (en) * 2020-10-28 2021-02-09 深圳市优必选科技股份有限公司 Object detection method, object detection device and electronic equipment
CN113705510A (en) * 2021-09-02 2021-11-26 广州市奥威亚电子科技有限公司 Target identification tracking method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140098959A (en) * 2013-01-31 2014-08-11 한국전자통신연구원 Apparatus and method for evidence video generation

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1452995A2 (en) * 2003-02-28 2004-09-01 Eastman Kodak Company Method for detecting color objects in digital images
JP2005202938A (en) * 2003-12-19 2005-07-28 Matsushita Electric Ind Co Ltd Video search device and video search method
JP2010257451A (en) * 2009-03-31 2010-11-11 Sogo Keibi Hosho Co Ltd Person search device, person search method, and person search program
CN102881032A (en) * 2012-09-14 2013-01-16 北京理工大学 Picture splicing method based on improved algorithm
CN103034852A (en) * 2012-12-28 2013-04-10 上海交通大学 Specific color pedestrian detecting method in static video camera scene
CN104036575A (en) * 2014-07-01 2014-09-10 江苏省南京市公路管理处公路科学研究所 Safety helmet wearing condition monitoring method on construction site
CN104573111A (en) * 2015-02-03 2015-04-29 中国人民解放军国防科学技术大学 Method for structured storage and pre-retrieval of pedestrian data in surveillance videos
CN104732220A (en) * 2015-04-03 2015-06-24 中国人民解放军国防科学技术大学 Specific color human body detection method oriented to surveillance videos
CN105069466A (en) * 2015-07-24 2015-11-18 成都市高博汇科信息科技有限公司 Pedestrian clothing color identification method based on digital image processing
CN105741324A (en) * 2016-03-11 2016-07-06 江苏物联网研究发展中心 Moving object detection identification and tracking method on moving platform
CN106791485A (en) * 2016-11-16 2017-05-31 深圳市异度信息产业有限公司 The changing method and device of video
CN106791715A (en) * 2017-02-24 2017-05-31 深圳英飞拓科技股份有限公司 Classification joint control intelligent control method and system
CN107370948A (en) * 2017-07-29 2017-11-21 安徽博威康信息技术有限公司 A kind of studio video intelligent switch method
CN110049345A (en) * 2019-03-11 2019-07-23 北京河马能量体育科技有限公司 A kind of multiple video strems director method and instructor in broadcasting's processing system
CN112347887A (en) * 2020-10-28 2021-02-09 深圳市优必选科技股份有限公司 Object detection method, object detection device and electronic equipment
CN113705510A (en) * 2021-09-02 2021-11-26 广州市奥威亚电子科技有限公司 Target identification tracking method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种仿人足球机器人目标定位与追踪算法;许家铭;解仑;王志良;于国晨;;华中科技大学学报(自然科学版);20111115(S2);全文 *

Also Published As

Publication number Publication date
CN114401365A (en) 2022-04-26

Similar Documents

Publication Publication Date Title
CN102567727B (en) Method and device for replacing background target
CN101604325A (en) Method for classifying sports video based on key frame of main scene lens
US20110150280A1 (en) Subject tracking apparatus, subject region extraction apparatus, and control methods therefor
US20020097893A1 (en) Apparatus and method for generating object-labeled image in video sequence
US8866900B2 (en) Information processing apparatus and method of controlling same
GB2333590A (en) Detecting a face-like region
CN109074652A (en) Pattern recognition device, mobile body device and image recognition program
CN113688820B (en) Method, device and electronic device for identifying stroboscopic stripe information
KR101303877B1 (en) Method and apparatus for serving prefer color conversion of skin color applying face detection and skin area detection
CN113705510A (en) Target identification tracking method, device, equipment and storage medium
CN113706402B (en) Neural network training method, device and electronic equipment
CN107454437A (en) A kind of video labeling method and its device, server
CN107622273B (en) Target detection and identification method and device
JP4165615B2 (en) Image display device, image display method, program, and recording medium
CN112637573A (en) Multi-lens switching display method and system, intelligent terminal and storage medium
CN119653032A (en) Image matting model training method, image matting method, device, equipment and medium
CN113762058B (en) Video synthesis method, device, computer equipment and storage medium
CN114401365B (en) Target person identification method, video switching method and device
JP3197633B2 (en) Automatic tracking device for moving objects
CN109788311B (en) Character replacement method, electronic device, and storage medium
CN110996173A (en) Image data processing method and device and storage medium
CN113873144B (en) Image capturing method, image capturing apparatus, and computer-readable storage medium
CN114004734A (en) Method and device for replacing background image
RU2526049C2 (en) Method and apparatus for detecting game incidents in field sports in video sequences
CN108737814B (en) Video shot detection method based on dynamic mode decomposition

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
GR01 Patent grant
GR01 Patent grant