Hybrid conference scene synthesis method, system, equipment and medium
Through deep learning network and 3D camera technology, it identifies and processes portraits and backgrounds, solving the limitations of online conference matting technology, achieving more realistic and natural video synthesis, and improving the conference effect.
Patent Information
- Application Number
- CN202310435103.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2024-10-29
AI Technical Summary
Existing online conference matting technology has limitations in matting range, effect, and cost, and there is a lack of connection between multiple frames of images during video processing, resulting in an unnatural and unrealistic video effect after synthesis.
Use the deep learning network to perform portrait recognition on RGB images, combine the depth image to obtain the range of the portrait, use the alpha image to process the background, and use the background material library collected by the 3D camera to adjust the position and proportion of the portrait and the background to achieve more realistic and natural video synthesis.
It improves the sense of ritual and identity of online meetings, enhances the effect of the meeting, and makes the synthesized video more consistent with real-world scenes and meets human visual requirements.
Smart Images

Figure CN118869907A_ABST
Abstract
Description
Background Art
[0002] With the development of technology, more and more meetings are held online. However, the current meeting mode is still in the form of simple point-to-point video, which lacks the sense of immersion in the meeting and cannot achieve the sense of ceremony and identity display of offline meetings.
[0003] The realization of online conference scenes relies on image synthesis technology. The research on video cutout has a long history. There are two traditional cutout methods: green screen cutout and AI portrait cutout.
[0004] Green screen cutouts are limited by the scene and the real-time cutout effect, especially when the foreground has a similar color to the green screen background, the cutout quality will have obvious problems. At the same time, high-quality green screen cutouts have higher hardware requirements, such as professional lighting equipment and cutout equipment, and the cost is relatively high.
[0005] As for AI portrait cutout, the target of cutout is also limited to people. For some scenes with both people and objects, such as people waving objects in their hands, the cutout effect is unstable. The application scenarios of this cutout solution are also relatively limited, and the application effect is poor.
[0006] In summary, the existing cutout solutions have limitations in cutout range, effect and cost.
[0007] Furthermore, in the process of video processing, there is a lack of connection between multiple frames of images, so that in addition to the problems existing in a single image, the video after a single image is replaced is also prone to problems such as unreasonable continuous motion and sudden position changes.
[0008] The disclosure of the above background technology content is only used to assist in understanding the inventive concept and technical solution of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the invention
[0009] To this end, the present invention obtains a first frame image in the video, performs portrait recognition on the first RGB image through a deep learning network to obtain a first portrait range, then obtains a second portrait range on the first depth image, obtains an alpha image through recognition of the first portrait range and the second portrait range, obtains a background image, and processes the portrait and background information to make the synthesized video more realistic and natural. Multiple portraits are placed at meeting positions in combination with the background, and the organization of the meeting better presents the unique sense of ceremony and identity recognition of the meeting, which is conducive to improving the meeting effect.
[0010] In a first aspect, the present invention provides a method for synthesizing a hybrid conference scene, characterized in that it comprises the following steps:
[0011] Step S1: Acquire a first frame image from a plurality of videos; wherein the first frame image includes a first RGB image and a first depth image;
[0012] Step S2: using a first deep learning network to perform portrait recognition on the first RGB image to obtain a first portrait range;
[0013] Step S3: obtaining a second portrait range on the first depth image using a preset distance parameter;
[0014] Step S4: superimposing the first portrait range and the second portrait range, and then using a second deep learning network to perform target recognition to obtain an alpha image of the target object;
[0015] Step S5: obtaining a background from a background material library, wherein a plurality of meeting positions are preset in the background, and placing the plurality of portraits at the meeting positions; wherein the background in the background material library is acquired by a 3D camera;
[0016] Step S6: using the 3D information of the portrait and the 3D information of the background, adjusting the appropriate position relationship and image ratio between the portrait and the background.
[0017] Optionally, the hybrid conference scene synthesis method is characterized in that step S2 comprises:
[0018] Step S21: using a first deep learning network to perform portrait recognition on the first RGB image to obtain an initial portrait range;
[0019] Step S22: expanding n pixels outward from the edge of the initial portrait range to obtain a first portrait range; n is a positive integer and is related to the brightness difference between the edge pixel point and the adjacent background pixel point.
[0020] Optionally, the method for mixing close-up and portrait images is characterized in that step S3 comprises:
[0021] Step S31: obtaining an image area corresponding to the first portrait range on the first depth image, and calculating an average depth value corresponding to the image area;
[0022] Step S32: adding the average depth value to a first preset value to obtain a first distance value;
[0023] Step S33: on the first depth image, obtain all pixel points whose depth values are less than the first distance value to obtain a second portrait range.
[0024] Optionally, the method for mixing close-up and portrait images is characterized in that step S3 comprises:
[0025] Step S34: performing target recognition on the first portrait range to obtain a partial portrait range that meets preset conditions;
[0026] Step S35: obtaining an image area corresponding to the partial portrait range on the first depth image, and calculating a maximum depth value corresponding to the image area;
[0027] Step S36: adding the maximum depth value to a second preset value to obtain a second distance value;
[0028] Step S37: on the first depth image, obtain all pixel points whose depth values are less than the first distance value to obtain a second portrait range.
[0029] Optionally, the method for mixing close-up and portrait images is characterized in that step S4 comprises:
[0030] Step S41: superimposing the first portrait range and the second portrait range to obtain a first trimap image;
[0031] Step S42: combining the previous or next frame image information of the first frame image, performing smoothing filtering on the first trimap image to obtain a second trimap image;
[0032] Step S43: Use a second deep learning network to perform target recognition on the second trimap image to obtain an alpha image.
[0033] Optionally, the hybrid conference scene synthesis method is characterized in that step S5 comprises:
[0034] Step S51: selecting a background from the background material library; wherein the background has a plurality of meeting locations preset;
[0035] Step S52: intercepting the portrait range according to the background to obtain the portrait range of the participants;
[0036] Step S53: placing the participant portrait range at the meeting location.
[0037] Optionally, the hybrid conference scene synthesis method is characterized in that step S6 comprises:
[0038] Step S61: adjusting the 3D position and deformation angle of the portrait according to the 3D information of the portrait and the 3D information of the background in the camera coordinate system;
[0039] Step S62: adjusting the size of the portrait according to the 3D information of the portrait and the 3D information of the background in the camera coordinate system.
[0040] In a second aspect, the present invention provides a hybrid conference scene synthesis system, which is used to implement any of the hybrid conference scene synthesis methods described above, and is characterized by comprising:
[0041] A frame acquisition module, used to acquire a first frame image from a plurality of videos; wherein the first frame image includes a first RGB image and a first depth image;
[0042] A first portrait module, configured to perform portrait recognition on the first RGB image using a first deep learning network to obtain a first portrait range;
[0043] A second portrait module, used to obtain a second portrait range on the first depth image using a preset distance parameter;
[0044] A recognition module, used for superimposing the first portrait range and the second portrait range, and then performing target recognition to obtain an alpha image of the target object;
[0045] A synthesis module is used to obtain a background from a background material library, wherein a plurality of meeting positions are preset in the background, and a plurality of the portraits are placed in the meeting positions; wherein the background in the background material library is acquired by a 3D camera;
[0046] The adjustment module is used to adjust the appropriate position relationship and image ratio of the portrait and the background by using the 3D information of the portrait and the 3D information of the background.
[0047] In a third aspect, the present invention provides a hybrid conference scene synthesis device, characterized in that it includes:
[0048] processor;
[0049] a memory storing executable instructions of the processor;
[0050] Wherein, the processor is configured to perform any one of the steps of the above-mentioned hybrid conference scene synthesis method by executing the executable instructions.
[0051] In a fourth aspect, the present invention provides a computer-readable storage medium for storing a program, characterized in that when the program is executed, the steps of any one of the aforementioned hybrid conference scene synthesis methods are implemented.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] The present invention uses a 3D camera and a 3D image to process the image, and adds depth information to the synthesized image, which is more in line with human vision and has a more realistic effect.
[0054] The present invention uses portrait recognition and distance parameters to obtain the first trimap image, which can achieve better results than using only portrait recognition or distance parameters, especially a more accurate recognition effect when the human body interacts with other objects.
[0055] The present invention adopts a background material library collected by a 3D camera. Compared with the 3D information obtained on a 2D image through an algorithm, the 3D information in the background is more accurate and real. At the same time, the background image in the background material library can be better synthesized in the camera coordinate system, has better consistency, and can obtain a better synthesized image.
[0056] The present invention adjusts the image ratio and position relationship of the portrait and the background, and processes the transparency of the portrait edge, so that the size, position and fusion effect of the foreground and background are more realistic, consistent with the scene in the real world, and meet the visual requirements of the human eye.
[0057] The present invention realizes background information that is more in line with the theme of the conference by arranging a multi-person conference scene. At the same time, the arrangement of multiple people in the same conference room is conducive to improving the conference effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings in the following descriptions are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work. By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, purposes and advantages of the present invention will become more obvious:
[0059] Figure 1 A flow chart of the steps of a hybrid conference scene synthesis method according to an embodiment of the present invention;
[0060] Figure 2 A portrait range diagram in an embodiment of the present invention;
[0061] Figure 3 This is a flow chart of steps for obtaining a first portrait range in an embodiment of the present invention;
[0062] Figure 4 is a flow chart of steps for obtaining a second portrait range in an embodiment of the present invention;
[0063] Figure 5is another flow chart of steps for obtaining a second portrait range in an embodiment of the present invention;
[0064] Figure 6 This is a flow chart of steps for obtaining an alpha image in an embodiment of the present invention;
[0065] Figure 7 A flowchart of the steps of obtaining a background and placing it at a conference location in an embodiment of the present invention;
[0066] Figure 8 This is a schematic diagram of a conference background in an embodiment of the present invention;
[0067] Fig. 9 A flowchart of the steps of adjusting the appropriate position relationship and image ratio between the portrait and the background in an embodiment of the present invention;
[0068] Fig.10 This is a schematic diagram of the structure of a hybrid conference scene synthesis system in an embodiment of the present invention;
[0069] Fig.11 is a structural schematic diagram of a hybrid conference scene synthesis device in an embodiment of the present invention; and
[0070] Fig.12 Schematic diagram of the structure of a computer-readable storage medium in an embodiment of the present invention. DETAILED DESCRIPTION
[0071] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0072] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein, for example, can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0073] An embodiment of the present invention provides a hybrid conference scene synthesis method, which aims to solve the problems existing in the prior art.
[0074] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0075] The present invention obtains a first frame image in a video, performs portrait recognition on the first RGB image through a deep learning network to obtain a first portrait range, then obtains a second portrait range on the first depth image, obtains an alpha image through recognition of the first portrait range and the second portrait range, obtains a background image, processes the portrait and background information, and makes the synthesized video more realistic and natural, and then places multiple portraits at meeting positions in combination with the background, and through the organizational form of the meeting, the meeting can better present a unique sense of ceremony and identity recognition, which is conducive to improving the meeting effect.
[0076] Figure 1 FIG. 1 is a flow chart of steps of a method for synthesizing a hybrid conference scene according to an embodiment of the present invention. Figure 1 As shown, a hybrid conference scene synthesis method in an embodiment of the present invention includes:
[0077] Step S1: Acquire the first frame image in multiple videos.
[0078] In this step, the first frame image includes a first RGB image and a first depth image. The video is obtained by a 3D camera. The first RGB image and the first depth image obtained by the 3D camera are pixel-level aligned. Since the first RGB image and the first depth image need to be processed separately in subsequent steps, the first RGB image and the first depth image are obtained separately in this step. The first RGB image is a two-dimensional image obtained by the RGB camera.
[0079] Step S2: Use a first deep learning network to perform portrait recognition on the first RGB image to obtain a first portrait range.
[0080] In this step, the first deep learning network is a portrait recognition neural network model, which can be a portrait recognition model in the prior art. Those skilled in the art can use various specific portrait recognition models to process the first RGB image. The first portrait range is an area containing all the details of the human body, such as the face, clothes, hands, hair, etc. Figure 2 As shown in a, the first deep learning network can identify the range of the portrait.
[0081] Step S3: obtaining a second portrait range on the first depth image using a preset distance parameter.
[0082] In this step, different pixels on the first depth image have unique depth values. The depth values of all pixels are compared with the preset distance parameter to obtain all pixels whose depth values are less than the preset distance parameter, i.e., the second portrait range. The preset distance parameter can be a preset fixed value or a value that changes according to the environment to achieve adaptation to the target object. For example, the preset distance parameter can be 1.5m. At this time, the set of all pixels on the first depth image whose depth values are less than 1.5m constitutes the second portrait range. Figure 2 As shown in b, the preset distance parameter is used to obtain the object range within a certain depth range.
[0083] Step S4: superimpose the first portrait range and the second portrait range, and then use the second deep learning network to perform target recognition to obtain an alpha image of the target object.
[0084] In this step, the first portrait range and the second portrait range are subjected to an “OR” operation to obtain a set of the first portrait range and the second portrait range. Figure 2 As shown in c, the superimposed area is the set of the first portrait range and the second portrait range, which has a larger range. The second deep learning network is a neural network different from the first deep learning network. The recognition object of the second deep learning network can also be different from that of the first deep learning network. For example, the first deep learning network recognizes only the portrait, while the second deep learning network can recognize the portrait and the items that interact with it, such as pens, mobile phones, keys, etc. The first deep learning network recognizes the main body of the person. The second deep learning network recognizes the entire person, and can also simultaneously recognize the information of items that interact with the human body, to achieve more comprehensive, true and accurate object recognition.
[0085] Step S5: obtaining a background from a background material library, wherein a plurality of meeting locations are preset in the background, and placing the plurality of portraits at the meeting locations.
[0086] In this step, the background in the background material library is acquired by a 3D camera. A preset background image is acquired at a preset position using a 3D camera. There are multiple preset background images for obtaining various types of background materials. For the same scene, multiple background images at different angles can be obtained. The background image is a 3D image. In the background material library, it can be stored separately in the form of RGB images and depth images, or in the form of RGBD images. In this embodiment, the background is a conference scene. The background image is classified and stored in the background material library, such as a large conference room, a medium-sized conference room, a small conference room, a starry sky conference room, an outdoor meeting, etc. The 3D camera can be the same as the 3D camera in step S1, or it can be different. The parameters of different 3D cameras can be different, such as the FOV, resolution, effective measurement distance, etc. of the camera. The background can be an image directly captured by a 3D camera or a processed image. For example, for a captured conference room, replacing the top of the conference room with the starry sky can form a starry sky conference room; replacing the wall of the conference room with the ocean can form an ocean conference room.
[0087] There are multiple meeting positions in the conference room. Each meeting position is a seat, which is used to display the information of a person's portrait, so as to achieve the effect of a person in the conference room. There are many forms of conference rooms, and participants also have many identities. The positions of participants can be arranged according to different identities. For example, the host, the top leader, ordinary employees, etc. By arranging the positions of participants and matching them with the conference room scene, the theme of the meeting is more prominent, the attendance of participants is more clear at a glance, and the efficiency of the meeting is improved.
[0088] Since everyone has different habits and postures, the postures of the portraits obtained are also different. In this step, the portraits need to be adjusted accordingly so that the portraits can be placed in the meeting position. For example, the overall size of the portraits can be scaled, the position can be shifted, and so on.
[0089] Step S6: using the 3D information of the portrait and the 3D information of the background, adjusting the appropriate position relationship and image ratio between the portrait and the background.
[0090] In this step, the positional relationship is the orientation relationship of the portrait relative to the background, for example, the portrait is located in the center, left side, right side, top, middle or bottom of the background image. The image ratio is the size of the portrait relative to the background. When adjusting the image ratio, it is adjusted according to the change in the depth value of the portrait. For example, the depth value of the portrait obtained in step S2 is 150, and after adjusting the position of the portrait in the background, its depth value is 300. Then, according to the change of the portrait in the camera coordinate system, its change is calculated to obtain the enlarged or reduced size of the portrait area. This step can make the position and ratio of the portrait and the background more scientific and reasonable, and avoid abruptness.
[0091] Figure 3 FIG. 1 is a flow chart of steps for obtaining a first portrait range in an embodiment of the present invention. Figure 3 As shown, in an embodiment of the present invention, a step of obtaining a first portrait range includes:
[0092] Step S21: Use a first deep learning network to perform portrait recognition on the first RGB image to obtain an initial portrait range.
[0093] In this step, the first deep learning network can identify the complete hair during recognition. The human body recognized by the deep learning network includes the whole of all parts of the human body, including the hanging hair, the torso, etc., but the texture inside the human body is not displayed, but only the area where the human body is located is displayed. The portrait range obtained in this step includes the hair area. The hair area recognized in this step can be recognized by a separate deep learning network, or it can be learned by the same deep learning network as the portrait range.
[0094] Step S22: expanding n pixels outward from the edge of the initial portrait range to obtain a first portrait range.
[0095] In this step, the edge of the first portrait range can be determined in a variety of ways, such as obtained by the rate of change of the depth value, obtained by the size of the depth value, determined by the speed of color change in the RGB image, etc. Any method that can obtain the first portrait range is acceptable. Taking the edge as the starting boundary, expand n pixels inward or outward to obtain the second portrait range. n is a positive integer and is related to the brightness difference between the edge pixel point and the adjacent background pixel point, that is, the inward or outward amplitude of different edge positions may be different. The higher the brightness of the edge pixel point and the adjacent background pixel point, the larger the n value; the lower the brightness of the edge pixel point and the adjacent background pixel point, the smaller the n value. In some embodiments, the size of n is also related to the distance d between the edge point in the normal direction of the first portrait range and another edge point. The larger the distance d, the larger n; the smaller the distance d, the smaller n.
[0096] This embodiment obtains an initial portrait range through a first deep learning network, and obtains the edge of the portrait and its surrounding information by expanding the edge, so as to obtain more comprehensive portrait information.
[0097] Figure 4 FIG. 1 is a flow chart of steps for obtaining a second portrait range in an embodiment of the present invention. Figure 4 As shown, in an embodiment of the present invention, a step of obtaining a second portrait range includes:
[0098] Step S31: obtaining an image area corresponding to the first portrait range on the first depth image, and calculating an average depth value corresponding to the image area.
[0099] In this step, since the first portrait range is obtained on the first RGB image, the first RGB image and the first depth image are aligned at the pixel level, the image area corresponding to the first portrait range on the first depth image can be directly obtained. Since the depth value of each pixel is known, the average depth value in the image area can be calculated. Since the human body is an irregular shape and is affected by the shooting angle, the average depth value is only the average of the surface of the human body facing the camera. Since the first portrait range is mainly a portrait, the average depth value is the depth value located inside the human body.
[0100] Step S32: Add the average depth value and a first preset value to obtain a first distance value.
[0101] In this step, the first preset value is a constant. The first preset value is added to the average depth value to obtain a first distance value. The first preset value is greater than the thickness of the human body, for example, the first preset value is greater than 10 cm, 11 cm, 12 cm or other values. The first distance value can completely cover the depth value of the portrait.
[0102] Step S33: on the first depth image, obtain all pixel points whose depth values are less than the first distance value to obtain a second portrait range.
[0103] In this step, since the first distance value includes all the portraits, the pixel points obtained in this step include all the portraits, that is, the second portrait range includes all the portraits.
[0104] In this embodiment, the average depth value of the first portrait range is used as a reference, and is added to the first preset value to obtain a first distance value, so that all pixels on the first depth image whose depth values are less than the first distance value can be obtained. By identifying the first portrait range, all objects on the first depth image that are within the expected range are obtained, thereby realizing adaptive adjustment of the portrait and the depth value.
[0105] Figure 5 FIG. 1 is another flow chart of steps for obtaining the second portrait range in an embodiment of the present invention. Figure 5 As shown, Figure 5 Another step of obtaining a second portrait range in an embodiment of the present invention includes:
[0106] Step S34: performing target recognition on the first portrait range to obtain a partial portrait range that meets preset conditions.
[0107] In this step, the first portrait range is identified to obtain the area of each human object. For example, when there are 3 people in the first portrait range, the part of each person is obtained. The preset condition can be a comparison of multiple people, or a comparison with the first portrait range. When the preset condition is a comparison of multiple people, the preset condition can be one or two people with the largest or smallest area among the multiple people. When the preset condition is a comparison with the first portrait range, the preset condition can be an object that occupies more or less than a fixed proportion of the first portrait range. For example, there are 3 people A, B, and C in the first portrait range, accounting for 51%, 24%, and 25% respectively. The preset condition is that the area accounts for more than 50%, and A is identified as a partial portrait range.
[0108] Step S35: obtaining an image area corresponding to the partial portrait range on the first depth image, and calculating a maximum depth value corresponding to the image area.
[0109] In this step, since the first RGB image and the first depth image are aligned at the pixel level, the image area corresponding to the partial portrait range determined in step S34 can be obtained, thereby obtaining its maximum depth value.
[0110] Step S36: Add the maximum depth value and the second preset value to obtain a second distance value.
[0111] In this step, the second preset value is a constant, which can be a fixed number or a number related to the maximum depth value. For example, when the maximum depth value is different, the measurement error corresponding to the depth is different. At this time, a value related to the measurement error can be used. When the measurement error is large, the second preset value is large, and when the measurement error is small, the second preset value is small.
[0112] Step S37: on the first depth image, obtain all pixel points whose depth values are less than the first distance value to obtain a second portrait range.
[0113] This step is the same as step S33 and will not be repeated here.
[0114] In this embodiment, the maximum depth value of the partial image in the first portrait range is used as a reference, and is added to the second preset value to obtain the second distance value, thereby obtaining all pixels on the first depth image whose depth values are less than the first distance value. All objects on the first depth image within the expected range are obtained through the identified first portrait range, thereby realizing adaptive adjustment of the portrait and the depth value.
[0115] Figure 6 FIG. 1 is a flow chart of steps for obtaining an alpha image in an embodiment of the present invention. Figure 6 As shown, a step of obtaining an alpha image in an embodiment of the present invention includes:
[0116] Step S41: superimposing the first portrait range and the second portrait range to obtain a first trimap image.
[0117] In this step, the first portrait range and the second portrait range are ORed to obtain a first trimap image. The first trimap image includes both the range identified by the first deep learning network and objects whose depth values are less than a specific value.
[0118] Step S42: Combining the previous or next frame image information of the first frame image, performing smoothing filtering on the first trimap image to obtain a second trimap image.
[0119] In this step, the preceding or following frame image information is at least two frames of image information. When the first frame image is the first frame image of the video, image information and the corresponding reference Trimap image are obtained backward. When the first frame image is the last frame image of the video, image information and the corresponding reference Trimap image are obtained forward. In other cases, image information of equal number of frames are obtained forward and backward at the same time, and the corresponding reference Trimap image is obtained.
[0120] The reference trimap image and the first trimap image are arranged in chronological order, and the first trimap image is smoothed to obtain the second trimap image. When the first trimap image is smoothed, a weight can be assigned according to the time interval between images. The longer the time interval, the smaller the weight.
[0121] Step S43: Use a second deep learning network to perform target recognition on the second trimap image to obtain an alpha image.
[0122] In this step, the second deep learning network is different from the first deep learning network. The second depth image only performs target recognition on the second Trimap image, and recognizes the RGB image and the depth image at the same time, which can obtain more accurate results. When the second deep learning network is trained, the second Trimap image is used as input and the alpha image is used as output. After multiple rounds of iterations, when the error value is less than the preset value, the model training is completed. The second deep learning network is a model specially trained for the second Trimap. It has very high accuracy and can accurately identify various target objects. Especially when the human body interacts with other objects, the accuracy is more obvious than the existing technology.
[0123] This embodiment superimposes the first portrait range and the second portrait range, and then uses the previous or next frame image information to perform smoothing filtering on the first trimap image to obtain a second trimap image, and then performs target recognition to obtain a high-quality and high-resolution alpha image, which effectively improves the quality of the obtained image and has high robustness.
[0124] Figure 7 FIG. 1 is a flowchart of the steps of obtaining a background and placing it at a conference location in an embodiment of the present invention. Figure 7 As shown, in an embodiment of the present invention, a step of obtaining a background and placing it at a conference location includes:
[0125] Step S51: Select a background from the background material library.
[0126] In this step, multiple meeting locations are preset in the background. Backgrounds are selected according to different types. After obtaining the background image, its type and other related information are also obtained. The size of the conference room is selected according to the number of participants. The appropriate conference room background is selected according to the conference theme. Figure 8 As shown, the ceiling, walls, floor and tabletop of the conference room can all be processed with special effects, making the theme of the meeting more prominent, which is conducive to driving participants to quickly enter the meeting state and improve the meeting effect.
[0127] Step S52: intercepting the portrait range according to the background to obtain the portrait range of the participants.
[0128] In this step, the portrait range is cut off so that the excessively displayed part is not displayed in the conference room. For example, when a participant stands in front of a 3D camera, the 3D camera will obtain most of the information of the portrait, but the conference room may be blocked by a table, and only the part above the chest can be displayed. Therefore, the part below the chest needs to be cut off, and only the part above the chest is displayed in the conference room. At this time, the part above the chest is the portrait range of the participant.
[0129] Step S53: placing the participant portrait range at the meeting location.
[0130] In this step, the portrait range of the participants is placed at the meeting position. For example, the portrait is placed above the chest at the meeting position to get the effect of the person sitting at the meeting table. Each background has multiple meeting positions preset. This step places multiple people at the meeting position without duplication. This step also considers the identity of the participants and arranges the participants to different meeting positions.
[0131] This embodiment selects a background, captures the portrait range, and then places the portrait range of the participants at the meeting position, so that the portraits in different postures can be displayed in the meeting room in a better posture, achieving coordination between the personnel and the meeting room, and improving the meeting atmosphere and effect.
[0132] Fig. 9 FIG. 1 is a flowchart of a step of adjusting the appropriate position relationship and image ratio of the portrait and the background in an embodiment of the present invention. Fig. 9 As shown, in an embodiment of the present invention, a step of adjusting a proper position relationship and image ratio between the portrait and the background includes:
[0133] Step S61: adjusting the 3D position and deformation angle of the portrait according to the 3D information of the portrait and the 3D information of the background in the camera coordinate system.
[0134] In this step, the position and deformation angle of the portrait are adjusted in the camera coordinate system. Since the 3D information of the portrait and the background image are obtained by the 3D camera, the adjustment in the camera coordinate system is the quickest and most efficient way. Since the portrait and background information are information in two images taken at different times and time and space, there may be overlap or partial overlap. Therefore, according to the overlap, the 3D position of the portrait is adjusted to make the adjusted image more reasonable. At the same time, since the orientation of the portrait is not always reasonable in the background image, such as toward the wall, toward an inappropriate object (including animals and people, etc.), the orientation of the portrait needs to be adjusted, so the deformation angle also needs to be adjusted accordingly.
[0135] Step S62: adjusting the size of the portrait according to the 3D information of the portrait and the 3D information of the background in the camera coordinate system.
[0136] In this step, due to the adjustment of the portrait position and deformation angle, the size of the portrait and the background will also be inconsistent. This is due to the principle of large near and small far when the camera is shooting. When the portrait is adjusted, its depth value changes, such as from 150 to 300, and the proportion of the portrait in the image will decrease accordingly. Since the camera shooting adopts the pinhole imaging principle, the size change of the portrait is not linearly related to the change of the depth value, but presents a tangent function correlation.
[0137] This embodiment adjusts the 3D position, deformation angle and size of the portrait according to the matching relationship between the portrait and the background and the background characteristics, so that the synthesized image is more realistic, conforms to the characteristics of the three-dimensional world, and has a better synthesis effect.
[0138] Fig.10 FIG. 1 is a schematic diagram of the structure of a hybrid conference scene synthesis system in an embodiment of the present invention. Fig.10 As shown, a hybrid conference scene synthesis system in an embodiment of the present invention includes:
[0139] A frame acquisition module, used to acquire a first frame image from a plurality of videos; wherein the first frame image includes a first RGB image and a first depth image;
[0140] A first portrait module, configured to perform portrait recognition on the first RGB image using a first deep learning network to obtain a first portrait range;
[0141] A second portrait module, used to obtain a second portrait range on the first depth image using a preset distance parameter;
[0142] A recognition module, used for superimposing the first portrait range and the second portrait range, and then performing target recognition to obtain an alpha image of the target object;
[0143] A synthesis module is used to obtain a background from a background material library, wherein a plurality of meeting positions are preset in the background, and a plurality of the portraits are placed in the meeting positions; wherein the background in the background material library is acquired by a 3D camera;
[0144] The adjustment module is used to adjust the appropriate position relationship and image ratio of the portrait and the background by using the 3D information of the portrait and the 3D information of the background.
[0145] Specifically, the frame acquisition module obtains images from multiple videos, so that the processing of single-frame images can be realized. The frame acquisition module obtains multiple frames of images at the same time, and processes different frames in chronological order. The first portrait module uses RGB images to perform portrait recognition to obtain the first portrait range, which can be recognized using existing models to improve application efficiency. The second portrait module uses preset distance parameters to obtain the second portrait range, which can better obtain information about objects that interact with the portrait. The recognition module superimposes the first portrait range with the second portrait range, and then recognizes the alpha image of the target object, which can obtain a more comprehensive and accurate recognition effect. The synthesis module obtains the background and meeting location information, places the portrait at the meeting location, and realizes the adaptation of the meeting theme and the portrait. The adjustment module adjusts the positional relationship and image ratio of the portrait and the background to improve the fusion effect of the portrait and the background.
[0146] This embodiment obtains a first frame image in a video, performs portrait recognition on the first RGB image through a deep learning network to obtain a first portrait range, then obtains a second portrait range on the first depth image, obtains an alpha image through recognition of the first portrait range and the second portrait range, obtains a background image, and processes the portrait and background information to make the synthesized video more realistic and natural. Multiple portraits are placed in meeting positions in combination with the background, and the organization of the meeting better presents the unique sense of ceremony and identity recognition of the meeting, which is conducive to improving the meeting effect.
[0147] The embodiment of the present invention further provides a hybrid conference scene synthesis device, comprising a processor and a memory, wherein executable instructions of the processor are stored, wherein the processor is configured to execute the steps of a hybrid conference scene synthesis method by executing the executable instructions.
[0148] As mentioned above, this embodiment obtains the first frame image in the video, performs portrait recognition on the first RGB image through a deep learning network to obtain a first portrait range, and then obtains a second portrait range on the first depth image. An alpha image is obtained by recognizing the first portrait range and the second portrait range, and a background image is obtained. The portrait and background information are processed to make the synthesized video more realistic and natural. Multiple portraits are placed in meeting positions in combination with the background. Through the organization of the meeting, the unique sense of ceremony and identity recognition of the meeting are better presented in the meeting, which is conducive to improving the meeting effect.
[0149] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".
[0150] Fig.11 This is a schematic diagram of the structure of a hybrid conference scene synthesis device in an embodiment of the present invention. Fig.11 The electronic device 600 according to this embodiment of the present invention is described. Fig.11 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0151] like Fig.11 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0152] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments of the present invention described in the above-mentioned hybrid conference scene synthesis method of this specification. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .
[0153] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0154] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0155] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0156] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 through the bus 630. It should be understood that although Fig.11 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0157] In an embodiment of the present invention, a computer-readable storage medium is also provided for storing a program, and the steps of a hybrid conference scene synthesis method are implemented when the program is executed. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the above-mentioned hybrid conference scene synthesis method section of this specification.
[0158] As shown above, this embodiment obtains the first frame image in the video, performs portrait recognition on the first RGB image through a deep learning network to obtain a first portrait range, and then obtains the second portrait range on the first depth image. The alpha image is obtained by recognizing the first portrait range and the second portrait range, and the background image is obtained. The portrait and background information are processed to make the synthesized video more realistic and natural. Multiple portraits are placed in meeting positions in combination with the background. Through the organization of the meeting, the unique sense of ceremony and identity recognition of the meeting are better presented in the meeting, which is conducive to improving the meeting effect.
[0159] Fig.12 Schematic diagram of the structure of a computer-readable storage medium in an embodiment of the present invention. Fig.12 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0160] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0161] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0162] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0163] This embodiment obtains a first frame image in a video, performs portrait recognition on the first RGB image through a deep learning network to obtain a first portrait range, then obtains a second portrait range on the first depth image, obtains an alpha image through recognition of the first portrait range and the second portrait range, obtains a background image, and processes the portrait and background information to make the synthesized video more realistic and natural. Multiple portraits are placed in meeting positions in combination with the background, and the organization of the meeting better presents the unique sense of ceremony and identity recognition of the meeting, which is conducive to improving the meeting effect.
[0164] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. The above description of the disclosed embodiments enables professionals and technicians in this field to implement or use the present invention. Various modifications to these embodiments will be obvious to professionals and technicians in this field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown in this article, but will comply with the widest range consistent with the principles and novel features disclosed herein.
[0165] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. A hybrid conference scene synthesis method, characterized in that: The steps include: Step S1: Acquire a first frame image from a plurality of videos; wherein the first frame image includes a first RGB image and a first depth image; Step S2: using a first deep learning network to perform portrait recognition on the first RGB image to obtain a first portrait range; Step S3: obtaining a second portrait range on the first depth image using a preset distance parameter; Step S4: superimposing the first portrait range and the second portrait range, and then using a second deep learning network to perform target recognition to obtain an alpha image of the target object; Step S5: obtaining a background from a background material library, wherein a plurality of meeting positions are preset in the background, and placing the plurality of portraits at the meeting positions; wherein the background in the background material library is acquired by a 3D camera; Step S6: using the 3D information of the portrait and the 3D information of the background, adjusting the appropriate position relationship and image ratio between the portrait and the background.
2. A hybrid conference scene synthesis method according to claim 1, characterized in that: Step S2 includes: Step S21: using a first deep learning network to perform portrait recognition on the first RGB image to obtain an initial portrait range; Step S22: expanding n pixels outward from the edge of the initial portrait range to obtain a first portrait range; n is a positive integer and is related to the brightness difference between the edge pixel point and the adjacent background pixel point.
3. A method for mixing close-up and portrait images according to claim 1, characterized in that: Step S3 includes: Step S31: obtaining an image area corresponding to the first portrait range on the first depth image, and calculating an average depth value corresponding to the image area; Step S32: adding the average depth value to a first preset value to obtain a first distance value; Step S33: on the first depth image, obtain all pixel points whose depth values are less than the first distance value to obtain a second portrait range.
4. A method for mixing close-up and portrait images according to claim 1, characterized in that: Step S3 includes: Step S34: performing target recognition on the first portrait range to obtain a partial portrait range that meets preset conditions; Step S35: obtaining an image area corresponding to the partial portrait range on the first depth image, and calculating a maximum depth value corresponding to the image area; Step S36: adding the maximum depth value to a second preset value to obtain a second distance value; Step S37: on the first depth image, obtain all pixel points whose depth values are less than the first distance value to obtain a second portrait range.
5. A method for mixing close-up and portrait images according to claim 1, characterized in that: Step S4 includes: Step S41: superimposing the first portrait range and the second portrait range to obtain a first trimap image; Step S42: combining the image information of the previous or next frame of the first frame of image, performing smoothing filtering on the first trimap image to obtain a second trimap image; Step S43: Use a second deep learning network to perform target recognition on the second trimap image to obtain an alpha image.
6. A hybrid conference scene synthesis method according to claim 1, characterized in that: Step S5 includes: Step S51: selecting a background from the background material library; wherein the background has a plurality of meeting locations preset; Step S52: intercepting the portrait range according to the background to obtain the portrait range of the participants; Step S53: placing the participant portrait range at the meeting location.
7. A hybrid conference scene synthesis method according to claim 1, characterized in that: Step S6 includes: Step S61: adjusting the 3D position and deformation angle of the portrait according to the 3D information of the portrait and the 3D information of the background in the camera coordinate system; Step S62: adjusting the size of the portrait according to the 3D information of the portrait and the 3D information of the background in the camera coordinate system.
8. A hybrid conference scene synthesis system, used to implement the hybrid conference scene synthesis method according to any one of claims 1 to 7, characterized in that: include: A frame acquisition module, used to acquire a first frame image from a plurality of videos; wherein the first frame image includes a first RGB image and a first depth image; A first portrait module, configured to perform portrait recognition on the first RGB image using a first deep learning network to obtain a first portrait range; A second portrait module, used to obtain a second portrait range on the first depth image using a preset distance parameter; A recognition module, used for superimposing the first portrait range and the second portrait range, and then performing target recognition to obtain an alpha image of the target object; A synthesis module is used to obtain a background from a background material library, wherein a plurality of meeting positions are preset in the background, and a plurality of the portraits are placed in the meeting positions; wherein the background in the background material library is acquired by a 3D camera; The adjustment module is used to adjust the appropriate position relationship and image ratio of the portrait and the background by using the 3D information of the portrait and the 3D information of the background.
9. A hybrid conference scene synthesis device, characterized in that: include: processor; a memory storing executable instructions of the processor; Wherein, the processor is configured to perform the steps of the hybrid conference scene synthesis method described in any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed, the steps of the hybrid conference scene synthesis method described in any one of claims 1 to 7 are implemented.
