CN117676224A - Method and device for coding, electronic equipment and storage medium - Google Patents

Method and device for coding, electronic equipment and storage medium Download PDF

Info

Publication number
CN117676224A
CN117676224A CN202211049454.9A CN202211049454A CN117676224A CN 117676224 A CN117676224 A CN 117676224A CN 202211049454 A CN202211049454 A CN 202211049454A CN 117676224 A CN117676224 A CN 117676224A
Authority
CN
China
Prior art keywords
user
video
data
shielding
mask
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211049454.9A
Other languages
Chinese (zh)
Inventor
刘奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haier Smart Home Co Ltd
Qingdao Haier Multimedia Co Ltd
Original Assignee
Haier Smart Home Co Ltd
Qingdao Haier Multimedia 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 Haier Smart Home Co Ltd, Qingdao Haier Multimedia Co Ltd filed Critical Haier Smart Home Co Ltd
Priority to CN202211049454.9A priority Critical patent/CN117676224A/en
Publication of CN117676224A publication Critical patent/CN117676224A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application relates to the technical field of video playing and discloses a method for coding, which comprises the following steps: acquiring video object data; the video object data is used for representing objects in a video picture being played; acquiring user shielding data; the user mask data is used to characterize the objects that the user wants to mask; coding the video picture being played according to the video object data and the user shielding data. In this way, the video picture being played is coded according to the video object data and the user mask data. The method and the device can shield the objects which the user is unwilling to see under the condition that the user does not skip or close the video picture being played, so that the user can continue watching the video, and the video watching experience of the user is improved. The application also discloses a device for coding, electronic equipment and a storage medium.

Description

Method and device for coding, electronic equipment and storage medium
Technical Field
The present application relates to the field of video playing technologies, for example, to a method and apparatus for coding, an electronic device, and a storage medium.
Background
At present, with the development of scientific technology, people have more and more enriched entertainment life. Viewing video has become one of the ways most people spend time leisure. Such as watching television, variety, or short video before sleeping or while boring. However, in the case of viewing video, the user may see objects that he or she is not willing to see. To mask the object, users typically mask objects that they are not willing to see by fast forwarding or closing the video. This can result in the user not being able to view the video completely, resulting in a poor video viewing experience for the user.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art: the related art generally employs a manner of skipping or closing a video to shield objects that a user is not willing to see, resulting in a failure of the user to contact the viewing video, which makes the user's video viewing experience worse.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview, and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended as a prelude to the more detailed description that follows.
The embodiment of the disclosure provides a method and a device for coding, electronic equipment and a storage medium, so as to improve video viewing experience of a user.
In some embodiments, the method for coding comprises: video object data is acquired. The video object data is used to characterize objects in a video picture being played. User mask data is acquired. The user mask data is used to characterize the objects that the user wants to mask. And coding the video picture being played according to the video object data and the user shielding data.
In some embodiments, the means for coding comprises: and the first acquisition module is configured to acquire the video object data. The video object data is used to characterize objects in a video picture being played. And a second acquisition module configured to acquire the user mask data. The user mask data is used to characterize the objects that the user wants to mask. And the coding module is configured to code the playing video picture according to the video object data and the user shielding data.
In some embodiments, the apparatus for coding includes a processor and a memory storing program instructions, the processor being configured to perform the method for coding described above when the program instructions are executed.
In some embodiments, the electronic device includes the above-mentioned apparatus for coding.
In some embodiments, the storage medium stores program instructions that, when executed, perform the method for coding described above.
The method and device for coding, the electronic equipment and the storage medium provided by the embodiment of the disclosure can realize the following technical effects: the video picture being played is coded according to the video object data and the user mask data by acquiring the video object data for representing the object in the video picture being played and the user mask data for representing the object which the user wants to mask. In this way, the video picture being played is coded according to the video object data and the user mask data. The method and the device can shield the objects which the user is unwilling to see under the condition that the user does not skip or close the video picture being played, so that the user can continue watching the video, and the video watching experience of the user is improved.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which like reference numerals refer to similar elements, and in which:
FIG. 1 is a schematic diagram of a first method for coding provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a second method for coding provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a third method for coding provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a fourth method for coding provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an apparatus for coding provided by an embodiment of the present disclosure;
fig. 6 is a schematic diagram of another apparatus for coding provided by an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and techniques of the disclosed embodiments can be understood in more detail, a more particular description of the embodiments of the disclosure, briefly summarized below, may be had by reference to the appended drawings, which are not intended to be limiting of the embodiments of the disclosure. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may still be practiced without these details. In other instances, well-known structures and devices may be shown simplified in order to simplify the drawing.
The terms first, second and the like in the description and in the claims of the embodiments of the disclosure and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe embodiments of the present disclosure. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
The term "plurality" means two or more, unless otherwise indicated.
In the embodiment of the present disclosure, the character "/" indicates that the front and rear objects are an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes an object, meaning that there may be three relationships. For example, a and/or B, represent: a or B, or, A and B.
The term "corresponding" may refer to an association or binding relationship, and the correspondence between a and B refers to an association or binding relationship between a and B.
The method for coding provided by the embodiment of the disclosure is applied to electronic equipment. The electronic device first obtains video object data characterizing objects in a video picture being played, and then obtains user mask data characterizing objects that the user wants to mask. Coding is performed on the video picture being played according to the video object data and the user shielding data. The playing video picture does not need to be skipped or closed, so that the user can watch the video and the object which the user is unwilling to watch is shielded, and the video watching experience of the user is improved.
Alternatively, the electronic device includes a device capable of watching video using a screen, such as a smart TV (television) or a user terminal. Further, the user terminal comprises a mobile phone, a tablet or a computer. Furthermore, the electronic equipment is developed based on an android system, and the development language is C language. Meanwhile, in development, SQLite (lightweight database) is used to store development languages and user-masked data.
Referring to fig. 1, an embodiment of the present disclosure provides a method for coding, including:
in step S101, the electronic device acquires video object data. Wherein the video object data is used to characterize objects in the video picture being played.
In step S102, the electronic device acquires user mask data. Wherein the user mask data is used to characterize the object that the user wants to mask.
In step S103, the electronic device codes the video frame being played according to the video object data and the user mask data.
By adopting the method for coding provided by the embodiment of the disclosure, the video object data for representing the object in the video picture being played and the user shielding data for representing the object which the user wants to shield are obtained, and then the video picture being played is coded according to the video object data and the user shielding data. In this way, the video picture being played is coded according to the video object data and the user mask data. The method and the device can shield the objects which the user is unwilling to see under the condition that the user does not skip or close the video picture being played, so that the user can continue watching the video, and the video watching experience of the user is improved.
In some embodiments, the objects in the video picture being played include one or more of a person object, an item object, and a scene object in the video picture being played. The objects that the user wants to mask include one or more of person objects, item objects, and scene objects that the user wants to mask.
Optionally, acquiring the video object data includes: and identifying the video picture being played to obtain images corresponding to the objects in the video picture. And determining images corresponding to the objects in the video picture as video object data. In this way, identifying the image contained in the video picture being played can obtain video object data for characterizing the object in the video picture being played. So as to code the video picture being played according to the video object data and the user shielding data. The method and the device can shield the objects which the user is unwilling to see while the user can watch the video, so that the video watching experience of the user is improved.
Further, identifying the video picture being played to obtain images corresponding to the objects in the video picture, including: and capturing the video picture being played. And carrying out image recognition on the picture after screenshot to obtain images corresponding to all objects in the video picture.
In some embodiments, the electronic device captures a video picture being played. And carrying out face recognition on the picture after screenshot to obtain images corresponding to the various humanoid objects in the video picture. And determining images corresponding to the various human objects in the video picture as video object data. That is, the object in the video picture being played is a person object in the video picture being played. The electronic device obtains user mask data. The user mask data is used to characterize the person object that the user wants to mask. And then coding the video picture being played according to the video object data and the user shielding data. Further, the person object that the user wants to mask is a star that the user does not want to see. Because the likes and dislikes of the user are different, the favorite stars of the user and the dislikes of the user can appear in the same video at the same time. In this way, the playing video picture is coded according to the image corresponding to each human object in the video picture and the human object which the user wants to shield, so that the user can watch the carefully liked stars and can not miss the wonderful part of the video while shielding the stars which the user dislikes. Thereby improving the video viewing experience of the user.
In some embodiments, the electronic device captures a video picture being played. And carrying out object identification on the picture after screenshot to obtain images corresponding to the object objects of each object in the video picture. And determining images corresponding to the object objects in the video picture as video object data. That is, the object in the video picture being played is an object of an article in the video picture being played. The electronic device obtains user mask data. The user mask data is used to characterize the object of the item that the user wants to mask. And then coding the video picture being played according to the video object data and the user shielding data. Therefore, the playing video picture is coded according to the images corresponding to the object objects in the video picture and the object objects which the user wants to shield, and the user can watch the video and shield the objects which the user is not willing to watch at the same time, so that the video watching experience of the user is improved.
In some embodiments, the electronic device captures a video picture being played. And carrying out object identification on the picture after screenshot to obtain images corresponding to the object objects of each object in the video picture. And carrying out face recognition on the picture after screenshot to obtain images corresponding to the various humanoid objects in the video picture. And determining images corresponding to the object objects and images corresponding to the person objects in the video picture as video object data. That is, the objects in the video picture being played include an object of an article and an object of a person in the video picture being played. The electronic device obtains user mask data. The user mask data is used to characterize the item objects and character objects that the user wants to mask. And then coding the video picture being played according to the video object data and the user shielding data.
In some embodiments, the electronic device captures a video picture being played. And carrying out picture identification on the picture after screenshot to obtain images corresponding to all scene objects in the video picture. And carrying out picture identification on the picture after screenshot to obtain images corresponding to all scene objects in the video picture. An image corresponding to the scene object. And determining images corresponding to the scene objects in the video picture as video object data. That is, the objects in the video picture being played include scene objects in the video picture being played. The electronic device obtains user mask data. The user mask data is used to characterize scene objects that the user wants to mask. And then coding the video picture being played according to the video object data and the user shielding data. Therefore, the playing video picture is coded according to the images corresponding to the scene objects in the video picture and the scene objects which the user wants to shield, so that the user can watch the video and simultaneously can shield the scenes which the user is unwilling to watch, and the video watching experience of the user is improved.
Further, the user mask data includes dense phobia related scene objects that the user wants to mask. Therefore, the images corresponding to the scenes related to the dense phobia can be shielded, so that the user cannot cause fear vision impact due to shielding of the images corresponding to the scenes related to the dense phobia, and discomfort of the user is reduced.
Further, the user mask data includes scene objects related to the bloody scene that the user wants to mask. Therefore, under the condition that the parents and the children watch the video at the same time, the scenes related to the blood fishy pictures can be shielded, and the watching experience of the parents can not be influenced.
Optionally, obtaining the user mask data includes: a shielding object that the user wants to shield is acquired. And obtaining a shielding image corresponding to the shielding object. The mask image is determined to be user mask data. In this way, by determining the mask image corresponding to the object that the user wants to mask as user mask data, the user mask data is enabled to characterize the object that the user wants to mask. So as to code the video picture being played according to the video object data and the user mask data. The method and the device can shield the objects which the user is unwilling to see while the user can watch the video, thereby improving the video watching experience of the user.
Further, acquiring a shielding object that the user wants to shield includes: and acquiring a shielding object which the user wants to shield from a preset shielding object database. The preset shielding object database stores shielding objects which the user wants to shield.
In some embodiments, the screen interface of the electronic device is provided with a "mask dislike" function menu button. The user inputs a shielding object to be shielded into a preset shielding object database through the function menu button. The mask object database is an XML (Extensible Markup Language ) file. A setup file is then created. The setting file is an XML file of Preference Activity (preference setting page) class. The setting file can be connected with the shielding object database to code the playing video picture according to the video object data and the user shielding data.
Further, obtaining a shielding image corresponding to the shielding object includes: and searching the shielding object through networking, and acquiring a plurality of alternative shielding images corresponding to the searched shielding object. And screening each alternative shielding image to obtain a shielding image corresponding to the shielding object. The alternative shielding images comprise images corresponding to the directly searched shielding objects and/or images corresponding to the searched shielding objects, and the images corresponding to the shielding objects are obtained by screenshot.
In some embodiments, the electronic device searches the shielding object through networking every preset time length, and obtains a plurality of alternative shielding images corresponding to the searched shielding object. And screening each alternative shielding image to obtain a shielding image corresponding to the shielding object. In this way, updating of the user mask data, i.e., the mask image corresponding to the mask object, is achieved. So as to code the video picture being played according to the video object data and the updated user shielding data. The method and the device can shield the objects which the user is unwilling to see while the user can watch the video, and improve the accuracy of coding shielding, thereby improving the video watching experience of the user.
Further, screening each candidate shielding image to obtain a shielding image corresponding to the shielding object, including: and obtaining the uploading time corresponding to each alternative shielding image. And determining the candidate mask image with the latest uploading time as a mask image corresponding to the mask object. Or, obtaining the similarity between every two alternative shielding images. And classifying the alternative shielding images according to the similarity to obtain a plurality of image sets. In the case that there is only one alternative mask image in the image set, the alternative mask image is determined as the mask image corresponding to the mask object. And when a plurality of alternative shielding images exist in the image set, selecting each alternative shielding image in the image set to acquire a shielding image corresponding to the shielding object.
Further, classifying each candidate mask image according to each similarity to obtain a plurality of image sets, including: in the case that the similarity greater than or equal to the first set threshold exists, storing the alternative shielding images corresponding to the similarity into the same image set. In the case that all the similarities corresponding to the alternative mask image are smaller than the similarity of the first set threshold, the alternative mask image is stored separately into one image set.
Further, selecting each candidate mask image in the image set to obtain a mask image corresponding to the mask object includes: and acquiring uploading time corresponding to each alternative shielding image in the image set. And determining the candidate mask image with the latest uploading time as a mask image corresponding to the mask object. Or, randomly selecting an alternative shielding image from the image set as a shielding image corresponding to the shielding object.
In some embodiments, A, B, C, D and E are both alternative mask images. The electronic equipment acquires the similarity between every two alternative shielding images. That is, the similarity between the alternative mask image a and the alternative mask image B, the similarity between the alternative mask image a and the alternative mask image C, the similarity between the alternative mask image a and the alternative mask image D, the similarity between the alternative mask image a and the alternative mask image E, the similarity between the alternative mask image B and the alternative mask image C, the similarity between the alternative mask image B and the alternative mask image D, the similarity between the alternative mask image B and the alternative mask image E, the similarity between the alternative mask image C and the alternative mask image D, the similarity between the alternative mask image C and the alternative mask image E, and the similarity between the alternative mask image D and the alternative mask image E are acquired. The similarity between the alternative mask image a and the alternative mask image B is greater than or equal to the similarity of the first set threshold. The alternative shielding images corresponding to the similarity are an alternative shielding image A and an alternative shielding image B. And then storing the alternative shielding image A and the alternative shielding image B into the same image set to obtain an image set F. The similarity between the alternative shielding image a and the alternative shielding image C, the similarity between the alternative shielding image B and the alternative shielding image C, the similarity between the alternative shielding image C and the alternative shielding image D, and the similarity between the alternative shielding image C and the alternative shielding image E are all smaller than the similarity of the first set threshold value. I.e. all the similarities corresponding to the alternative mask image C are smaller than the first set threshold. The alternative mask image C is stored separately into one image set to obtain the image set G. The similarity between the alternative mask image E and the alternative mask image D is greater than or equal to the similarity of the first set threshold. The alternative shielding images corresponding to the similarity are an alternative shielding image E and an alternative shielding image D. The alternative mask image E and the alternative mask image D are stored in the same image set, resulting in an image set H. There are multiple alternative mask images in both image set F and image set H. The alternative mask image A is randomly selected from the alternative mask image A and the alternative mask image B in the image set F as a mask image corresponding to the mask object. The alternative mask image E is randomly selected from the alternative mask image D and the alternative mask image E in the image set H as a mask image corresponding to the mask object. And only one alternative shielding image C in the image set G is selected, and the alternative shielding image C is determined to be the shielding image corresponding to the shielding object. That is, the alternative mask image a, the alternative mask image C, and the alternative mask image E are mask images corresponding to the mask object.
Optionally, coding the video picture being played according to the video object data and the user mask data includes: judging whether a shielding object which is wanted to be shielded by a user exists in a video picture which is being played according to the video object data and the user shielding data, and obtaining a judging result. And coding the video picture being played according to the judging result. In this way, whether a shielding object which the user wants to shield exists in the video picture being played is judged through the video object data and the user shielding data, and the video picture being played is coded according to the judging result. The method and the device are convenient for shielding the objects which are unwilling to be seen by the user under the condition that the user does not skip or close the video picture being played, so that the user can continue watching the video, and the video watching experience of the user is improved.
Further, judging whether a shielding object which the user wants to shield exists in the video picture being played according to the video object data and the user shielding data to obtain a judging result, including: and sequentially acquiring the similarity between each video object data and each user shielding data. And determining whether the video object data is similar to the user shielding data according to the similarity. In the case where the existing video object data is similar to the user mask data, it is determined that the determination result is that a mask object that the user wants to mask exists in the video picture being played. In the case that the video object data is not dissimilar to the user mask data, it is determined that the determination result is that a mask object which the user wants to mask does not exist in the video picture being played.
Further, determining whether the video object data is similar to the user mask data based on the similarity includes: in the case where the similarity between the video object data and the user mask data is greater than or equal to the second set threshold value, it is determined that there is similarity of the video object data and the user mask data. In the case where the similarity between the video object data and the user mask data is smaller than the second set threshold value, it is determined that there is no dissimilarity between the video object data and the user mask data.
Optionally, coding the video picture being played according to the judging result, including: and coding the video picture according to the video object data when the judgment result is that the shielding object which the user wants to shield exists in the video picture which is being played. Thus, the video picture can be automatically coded as long as the shielding object which the user wants to shield exists in the video picture. The playing video picture does not need to be skipped or closed, and the object which the user is unwilling to see can be shielded while the user can watch the video, so that the video watching experience of the user is improved.
Further, coding the video picture according to the video object data includes: and acquiring a shielding area corresponding to the video object data similar to the user shielding data in the video picture. And blurring the shielding area. The mask area corresponding to the video object data similar to the user mask data is an area where the video object data similar to the user mask data is located in the video picture. In this way, by acquiring the mask area corresponding to the video object data similar to the user mask data and blurring the mask area, the mask object that the user wants to mask can be continuously masked without affecting the display of other contents. Thereby improving the video viewing experience of the user.
As shown in conjunction with fig. 2, an embodiment of the present disclosure provides a method for coding, including:
in step S201, the electronic device identifies the video frame being played, and obtains images corresponding to the objects in the video frame.
In step S202, the electronic device determines an image corresponding to each object in the video frame as video object data.
In step S203, the electronic device acquires a shielding object that the user wants to shield.
In step S204, the electronic device acquires a mask image corresponding to the mask object.
In step S205, the electronic device determines the mask image as user mask data.
In step S206, the electronic device determines whether a shielding object that the user wants to shield exists in the video frame being played according to the video object data and the user shielding data, and obtains a determination result.
In step S207, if the electronic device determines that the screen object that the user wants to screen exists in the video screen being played, the electronic device acquires a screen area corresponding to the video object data similar to the user screen data in the video screen.
In step S208, the electronic device performs blurring processing on the mask area.
By adopting the method for coding provided by the embodiment of the disclosure, the images corresponding to the objects in the video picture are obtained by identifying the video picture being played. And determines the image as video object data. And then acquiring user shielding data according to the shielding object which the user wants to shield, and judging whether the shielding object which the user wants to shield exists in the video picture which is being played according to the video object data and the user shielding data. And processing a mask area corresponding to the video object data similar to the user mask data when the judgment result is that the mask object which the user wants to mask exists in the video picture which is being played. Therefore, under the condition that the shielding object which the user wants to shield exists in the video picture, the object which the user wants to shield can be automatically shielded, the video picture which is being played does not need to be skipped or closed, and the object which the user is unwilling to see can be shielded while the user can watch the video, so that the video watching experience of the user is improved.
Optionally, coding the video picture being played according to the judging result, including: and re-acquiring the video object data and the user shielding data under the condition that the judging result is that the shielding object which the user wants to shield does not exist in the video picture being played, and coding the video picture being played according to the re-acquired video object data and the user shielding data. In this way, in the case where there is no mask object that the user wants to mask in the video picture, the video picture is not coded, but the video object data and the user mask data are newly acquired, and the video picture being played is coded according to the newly acquired video object data and the user mask data. The method and the device can enable the user to watch the video completely, and can shield objects which the user does not want to see, so that video watching experience of the user is improved.
As shown in conjunction with fig. 3, an embodiment of the present disclosure provides a method for coding, including:
in step S301, the electronic device identifies the video frame being played, and obtains images corresponding to the objects in the video frame.
In step S302, the electronic device determines an image corresponding to each object in the video frame as video object data.
In step S303, the electronic device acquires a shielding object that the user wants to shield.
In step S304, the electronic device acquires a mask image corresponding to the mask object.
In step S305, the electronic device determines the mask image as user mask data.
In step S306, the electronic device determines whether a shielding object that the user wants to shield exists in the video picture being played according to the video object data and the user shielding data, and obtains a determination result.
In step S307, the electronic device re-acquires the video object data and the user mask data when the determination result is that the mask object that the user wants to mask does not exist in the video frame being played, and codes the video frame being played according to the re-acquired video object data and the user mask data.
By adopting the method for coding provided by the embodiment of the disclosure, the images corresponding to the objects in the video picture are obtained by identifying the video picture being played. And determines the image as video object data. And then acquiring user shielding data according to the shielding object which the user wants to shield, and judging whether the shielding object which the user wants to shield exists in the video picture which is being played according to the video object data and the user shielding data. When the judgment result is that the shielding object which the user wants to shield does not exist in the video picture being played, the video picture is not coded, the video object data and the user shielding data are acquired again, and the video picture being played is coded according to the acquired video object data and the user shielding data. Therefore, the user can watch the video completely and can shield the objects which the user does not want to see, so that the video watching experience of the user is improved.
As shown in conjunction with fig. 4, an embodiment of the present disclosure provides a method for coding, including:
in step S401, the electronic device identifies the video frame being played, and obtains images corresponding to objects in the video frame. Step S402 is then performed.
In step S402, the electronic device determines an image corresponding to each object in the video frame as video object data. Step S403 is then performed.
In step S403, the electronic device acquires a shielding object that the user wants to shield. Step S404 is then performed.
In step S404, the electronic device acquires a mask image corresponding to the mask object. Step S405 is then performed.
In step S405, the electronic device determines the mask image as user mask data. Step S406 is then performed.
In step S406, the electronic device determines whether a shielding object that the user wants to shield exists in the video frame being played according to the video object data and the user shielding data. If yes, i.e. there is a masking object in the video picture being played, the step S407 is executed. If not, that is, there is no masking object that the user wants to mask in the video picture being played, the process returns to step S401.
In step S407, the electronic device acquires, in the video screen, a mask area corresponding to video object data similar to the user mask data. Step S408 is then performed.
In step S408, the electronic device performs blurring processing on the mask area.
By adopting the method for coding provided by the embodiment of the disclosure, the images corresponding to the objects in the video picture are obtained by identifying the video picture being played. And determines the image as video object data. And then acquiring user shielding data according to the shielding object which the user wants to shield, and judging whether the shielding object which the user wants to shield exists in the video picture which is being played according to the video object data and the user shielding data. And coding the video picture being played according to the judging result. Therefore, the user can watch the video completely and can shield the objects which the user does not want to see, so that the video watching experience of the user is improved.
As shown in fig. 5, an embodiment of the present disclosure provides an apparatus for coding, including a first acquisition module 1, a second acquisition module 2, and a coding module 3. The first acquisition module 1 is configured to acquire video object data. The video object data is used to characterize objects in the video picture being played. The second acquisition module 2 is configured to acquire user mask data. The user mask data is used to characterize the objects that the user wants to mask. The coding module 3 is configured to code the video picture being played according to the video object data and the user mask data.
By adopting the device for coding provided by the embodiment of the disclosure, the video object data for representing the object in the video picture being played and the user shielding data for representing the object which the user wants to shield are obtained, and then the video picture being played is coded according to the video object data and the user shielding data. In this way, the video picture being played is coded according to the video object data and the user mask data. The method and the device can shield the objects which the user is unwilling to see under the condition that the user does not skip or close the video picture being played, so that the user can continue watching the video, and the video watching experience of the user is improved.
The first acquisition module is configured to acquire video object data by: and identifying the video picture being played to obtain images corresponding to the objects in the video picture. And determining images corresponding to the objects in the video picture as video object data.
The second acquisition module is configured to acquire the user mask data by: a shielding object that the user wants to shield is acquired. And obtaining a shielding image corresponding to the shielding object. The mask image is determined to be user mask data.
The coding module is configured to code the video picture being played according to the video object data and the user shielding data by the following method: judging whether a shielding object which is wanted to be shielded by a user exists in a video picture which is being played according to the video object data and the user shielding data, and obtaining a judging result. And coding the video picture being played according to the judging result.
The coding module is configured to code the video picture being played according to the judging result by the following method: and coding the video picture according to the video object data when the judgment result is that the shielding object which the user wants to shield exists in the video picture which is being played.
The coding module is configured to code the video picture being played according to the judging result by the following method: and re-acquiring the video object data and the user shielding data under the condition that the judging result is that the shielding object which the user wants to shield does not exist in the video picture being played, and coding the video picture being played according to the re-acquired video object data and the user shielding data.
As shown in connection with fig. 6, an embodiment of the present disclosure provides an apparatus for coding, including a processor (processor) 4 and a memory (memory) 5. Optionally, the apparatus may further comprise a communication interface (Communication Interface) 6 and a bus 7. The processor 4, the communication interface 6 and the memory 5 can communicate with each other via the bus 7. The communication interface 6 may be used for information transfer. The processor 4 may call logic instructions in the memory 5 to perform the method for coding of the above-described embodiments.
Further, the logic instructions in the memory 5 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product.
The memory 5 is used as a storage medium for storing a software program, a computer executable program, and program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 4 executes the functional applications and data processing by running the program instructions/modules stored in the memory 5, i.e. implements the method for coding in the above-described embodiments.
The memory 5 may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the terminal device, etc. Further, the memory 5 may include a high-speed random access memory, and may also include a nonvolatile memory.
By adopting the device for coding provided by the embodiment of the disclosure, the video object data for representing the object in the video picture being played and the user shielding data for representing the object which the user wants to shield are obtained, and then the video picture being played is coded according to the video object data and the user shielding data. In this way, the video picture being played is coded according to the video object data and the user mask data. The method and the device can shield the objects which the user is unwilling to see under the condition that the user does not skip or close the video picture being played, so that the user can continue watching the video, and the video watching experience of the user is improved.
The embodiment of the disclosure provides an electronic device, which comprises the device for coding.
By adopting the electronic equipment for coding provided by the embodiment of the disclosure, the video object data for representing the object in the video picture being played and the user shielding data for representing the object which the user wants to shield are obtained, and then the video picture being played is coded according to the video object data and the user shielding data. In this way, the video picture being played is coded according to the video object data and the user mask data. The method and the device can shield the objects which the user is unwilling to see under the condition that the user does not skip or close the video picture being played, so that the user can continue watching the video, and the video watching experience of the user is improved.
The disclosed embodiments provide a storage medium storing computer-executable instructions configured to perform the above-described method for coding.
The storage medium may be a transitory computer readable storage medium or a non-transitory computer readable storage medium. A non-transitory storage medium comprising: a plurality of media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or a transitory storage medium.
The above description and the drawings illustrate embodiments of the disclosure sufficiently to enable those skilled in the art to practice them. Other embodiments may involve structural, logical, electrical, process, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in, or substituted for, those of others. Moreover, the terminology used in the present application is for the purpose of describing embodiments only and is not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a," "an," and "the" (the) are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, when used in this application, the terms "comprises," "comprising," and/or "includes," and variations thereof, mean that the stated features, integers, steps, operations, elements, and/or components are present, but that the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof is not precluded. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of other like elements in a process, method or apparatus comprising such elements. In this context, each embodiment may be described with emphasis on the differences from the other embodiments, and the same similar parts between the various embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method sections disclosed in the embodiments, the description of the method sections may be referred to for relevance.
Those of skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. The skilled artisan may use different methods for each particular application to achieve the described functionality, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than that disclosed in the description, and sometimes no specific order exists between different operations or steps. For example, two consecutive operations or steps may actually be performed substantially in parallel, they may sometimes be performed in reverse order, which may be dependent on the functions involved. Each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A method for coding, comprising:
acquiring video object data; the video object data is used for representing objects in a video picture being played;
acquiring user shielding data; the user mask data is used for characterizing objects which a user wants to mask;
and coding the video picture being played according to the video object data and the user shielding data.
2. The method of claim 1, wherein obtaining video object data comprises:
identifying the video picture being played to obtain images corresponding to all objects in the video picture;
and determining the image corresponding to each object in the video picture as video object data.
3. The method of claim 1, wherein obtaining user mask data comprises:
acquiring a shielding object which a user wants to shield;
acquiring a shielding image corresponding to the shielding object;
the mask image is determined as user mask data.
4. The method of claim 1, wherein encoding the playing video picture based on the video object data and the user mask data comprises:
Judging whether a shielding object which is wanted to be shielded by a user exists in a video picture which is being played according to the video object data and the user shielding data, and acquiring a judging result;
and coding the video picture being played according to the judging result.
5. The method of claim 4, wherein coding the video picture being played according to the determination result comprises:
and coding the video picture according to the video object data under the condition that the judgment result is that the shielding object which the user wants to shield exists in the video picture which is being played.
6. The method of claim 4, wherein coding the video picture being played according to the determination result comprises:
and re-acquiring the video object data and the user shielding data under the condition that the judging result is that the shielding object which the user wants to shield does not exist in the video picture being played, and coding the video picture being played according to the re-acquired video object data and the user shielding data.
7. An apparatus for coding, comprising:
A first acquisition module configured to acquire video object data; the video object data is used for representing objects in a video picture being played;
a second acquisition module configured to acquire user mask data; the user mask data is used for characterizing objects which a user wants to mask;
and the coding module is configured to code the playing video picture according to the video object data and the user shielding data.
8. An apparatus for coding comprising a processor and a memory storing program instructions, wherein the processor is configured to perform the method for coding of any of claims 1 to 6 when the program instructions are run.
9. An electronic device comprising the apparatus for coding of claim 8.
10. A storage medium storing program instructions which, when executed, perform the method for coding of any one of claims 1 to 6.
CN202211049454.9A 2022-08-30 2022-08-30 Method and device for coding, electronic equipment and storage medium Pending CN117676224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211049454.9A CN117676224A (en) 2022-08-30 2022-08-30 Method and device for coding, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211049454.9A CN117676224A (en) 2022-08-30 2022-08-30 Method and device for coding, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117676224A true CN117676224A (en) 2024-03-08

Family

ID=90068621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211049454.9A Pending CN117676224A (en) 2022-08-30 2022-08-30 Method and device for coding, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117676224A (en)

Similar Documents

Publication Publication Date Title
CN110309795B (en) Video detection method, device, electronic equipment and storage medium
CN106331778B (en) Video recommendation method and device
CN106326391B (en) Multimedia resource recommendation method and device
US20100067867A1 (en) System and method for searching video scenes
US20130148898A1 (en) Clustering objects detected in video
CN113542777B (en) Live video editing method and device and computer equipment
CN110889379B (en) Expression package generation method and device and terminal equipment
CN103905904A (en) Method and device for playing multimedia file
CN107480265B (en) Data recommendation method, device, equipment and storage medium
CN112182299B (en) Method, device, equipment and medium for acquiring highlight in video
CN112004117B (en) Video playing method and device
CN112291634B (en) Video processing method and device
CN111314732A (en) Method for determining video label, server and storage medium
US9432730B2 (en) Multimedia file playback method and apparatus
US9549162B2 (en) Image processing apparatus, image processing method, and program
CN108958592B (en) Video processing method and related product
CN107547922B (en) Information processing method, device, system and computer readable storage medium
CN111432274A (en) Video processing method and device
CN111654748A (en) Limit level picture detection method and device, display equipment and readable storage medium
US20200092444A1 (en) Playback method, playback device and computer-readable storage medium
CN111444822B (en) Object recognition method and device, storage medium and electronic device
CN117459662A (en) Video playing method, video identifying method, video playing device, video playing equipment and storage medium
US20170139933A1 (en) Electronic Device, And Computer-Readable Storage Medium For Quickly Searching Video Segments
CN117676224A (en) Method and device for coding, electronic equipment and storage medium
CN109040848B (en) Bullet screen reverse-playing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication