Film viewing limiting method for identifying cartoon image based on contrast

文档序号:1601732 发布日期:2020-01-07 浏览:6次 中文

阅读说明:本技术 基于对比度识别动漫图像的观影限制方法 (Film viewing limiting method for identifying cartoon image based on contrast ) 是由 卢文 于 2019-09-23 设计创作,主要内容包括:本发明公开了基于对比度识别动漫图像的观影限制方法,通过动漫影视作品画面鲜艳对比度远远高于普通影视作品的特征,通过计算画面的对比度实现对动漫影视的识别,从而达到精确控制动漫视频播放时间的目的。(The invention discloses a film viewing limitation method for identifying cartoon images based on contrast, which realizes identification of cartoon videos by calculating the contrast of pictures through the characteristic that the bright contrast of the pictures of cartoon video works is far higher than that of common video works, thereby achieving the purpose of accurately controlling the playing time of cartoon videos.)

1. The film viewing limitation method for identifying the cartoon image based on the contrast is characterized by comprising the following steps of:

step 1, a manager of the television sets the total allowable length of the cartoon video every day;

step 2, extracting 1 frame of picture from the current playing picture of the television every 1 second, and sending the picture into a program based on image contrast identification;

step 3, the image contrast identification program extracts the contrast of the picture:

the formula used to calculate the image contrast is:

Figure FDA0002211671320000011

wherein delta (i, j)2I-j, i.e. gray scale between adjacent pixelsA difference; p δ (i, j) is a pixel distribution probability that a gray difference between adjacent pixels is δ;

step 4, comparing the Current content Metric extracted in the step 3 with a Threshold content Metric of a common video, and if the CCM is higher than a TCM value set by a system, judging that the movie content watched by the user currently is an animation video;

and 5, if the animation video is watched currently, starting to reduce the total allowable length of the animation video every day, and stopping playing the current video if the total length returns to zero, so that the intelligent identification of the animation video is realized, and the watching limitation of the video is accurately carried out.

2. The method as claimed in claim 1, wherein in the step 3, the value of δ is different according to the device performance and the calculation method, and the common calculation method is "four-neighbor" and "eight-neighbor", so that the pixel division probability of δ is 50% or 100%, and the value is selected according to the following rule:

(1) when the method is used for operation on equipment with sensitive equal energy consumption or low calculation performance, the calculation method should select 'four-approach' calculation, the pixel division probability value of delta is set to be 50%, and the energy consumption and the recognition effect are balanced;

(2) when the calculation is carried out on equipment with high energy consumption and calculation performance not considered, the calculation method selects eight-nearest neighbor calculation, the pixel division probability value of delta is set to be 100%, and the optimal recognition effect is achieved.

Technical Field

The invention relates to the technical field of image recognition, in particular to a film watching limiting method for recognizing cartoon images based on contrast.

Background

With the development of the animation industry, the total playing length of the video storage capacity of the animation video is comparable to that of the video storage capacity of the common video, the animation video is bright in picture color and high in picture contrast ratio and is popular among children and teenagers, but the self-control ability of the children and the teenagers is often inferior to that of adults, so that the eyesight of the children and the teenagers watching the animation video for a long time cannot be effectively protected, the myopia rate of the children and the teenagers in recent years tends to rise year by year, and the watching behavior duration of the animation video liked by the children and the teenagers can be limited by ensuring that the eyes of the children and the teenagers in the high myopia development period can have enough rest, and the myopia incidence probability of the children and the teenagers can be reduced.

OpenCV is a cross-platform computer vision library based on open-source licensing and can run on Linux, Windows, Android, and MacOS operating systems. The method is light and efficient, is composed of a series of C functions and a small number of C + + classes, provides interfaces of languages such as Python, Ruby, MATLAB and the like, realizes a plurality of general algorithms in the aspects of image processing and computer vision, and can easily realize extraction and calculation of image contrast.

Disclosure of Invention

With the prosperity of various remote video courses, children and teenagers are more and more popularized in remote education, but the current film watching limitation is to limit the film watching time by limiting the film watching time or the total film watching time by the user identity, and only the film watching time is limited, so that the situation that the course cannot be watched is caused by the fact that the film watching time is exhausted or the film watching time is not enough after the children and the teenagers watch the remote education videos.

Because the picture color of the cartoon video is bright and the picture contrast is high, the invention judges the video type by taking the picture contrast as the basis of judging the video type as the judgment basis of the control method.

The invention realizes the purpose through the following technical scheme:

the film viewing limiting method for identifying the cartoon image based on the contrast comprises the following steps:

the film viewing limitation method for identifying the cartoon image based on the contrast is characterized by comprising the following steps of:

step 1, a manager of the television sets the total allowable length of the cartoon video every day;

step 2, extracting 1 frame of picture from the current playing picture of the television every 1 second, and sending the picture into a program based on image contrast identification;

step 3, the image contrast identification program extracts the contrast of the picture:

the formula used to calculate the image contrast is:

wherein delta (i, j)2I-j, i.e. the difference in gray level between adjacent pixels; p δ (i, j) is a pixel distribution probability that a gray difference between adjacent pixels is δ; the value of δ is different according to different equipment performances and calculation modes, and a common calculation method is four-adjacent and eight-adjacent, so that the pixel division probability of δ is 50% or 100%, and the value is selected according to the following rules:

(1) when the method is used for computing on equipment with sensitive energy consumption or low computing performance (such as a smart phone, a tablet personal computer and an intelligent video player), the computing method should select 'four-adjacent-point' computing, the pixel division probability value of delta is set to be 50%, and the energy consumption and the recognition effect are balanced.

(2) When the calculation is carried out on equipment with high energy consumption and high calculation performance (such as an intelligent television, a desktop computer and a notebook computer), the calculation method selects eight-nearest-neighbor calculation, and the pixel division probability value of delta is set to be 100%, so that the optimal recognition effect is realized.

Step 4, comparing the Current Contrast Metric (Current Contrast characteristic, hereinafter abbreviated as CCM) extracted in the step 3 with a Contrast characteristic Threshold (Contrast Threshold, hereinafter abbreviated as TCM) of a common video, and if the CCM is higher than the TCM value set by the system, determining that the movie content currently watched by the user is an animation video;

and 5, if the animation video is watched currently, starting to reduce the total allowable length of the animation video every day, and stopping playing the current video if the total length returns to zero, so that the intelligent identification of the animation video is realized, and the watching limitation of the video is accurately carried out.

The invention has the beneficial effects that:

according to the method for limiting the viewing of the animation image based on the contrast, the animation movie and television are identified by calculating the contrast of the picture through the characteristic that the bright-colored contrast of the picture of the animation movie and television is far higher than that of the common movie and television, so that the aim of accurately controlling the playing time of the animation video is fulfilled.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the embodiments or the drawings needed to be practical in the prior art description, and obviously, the drawings in the following description are only some embodiments of the embodiments, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

FIG. 1 is a general flow diagram of the animation image recognition limiting viewing of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.

In any embodiment, as shown in fig. 1, the method for limiting the appearance of an animation image based on contrast recognition according to the present invention specifically includes the following steps:

(1) system setting

The TCM setting is empirically set to 75 and the animation video play duration limit is set to 10 seconds.

(2) Capturing images

The picture is captured from the cartoon video 'xi yang he tai lang' being played by the television.

(3) Calculating contrast of an image

By formulas for calculating contrast of images

Figure BDA0002211671330000041

The captured picture is calculated by the OpenCV image contrast program to give a CCM value of 86.

(4) Comparison of the calculated results

And comparing the CCM calculation result 86 with the TCM set value 75, wherein the CCM is more than the TCM, and the user can obtain the conclusion that the user is watching the cartoon video at present.

(5) Film viewing behavior control

The recognition result of every second is used as the basis for reducing the movie watching time length of the cartoon video, and when the set playing time length is reduced to 0 second and the recognition result is the cartoon video, the playing of the video is stopped, so that the effect of limiting the playing of the cartoon video is achieved.

The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims. It should be noted that the various technical features described in the above embodiments can be combined in any suitable manner without contradiction, and the invention is not described in any way for the possible combinations in order to avoid unnecessary repetition. In addition, any combination of the various embodiments of the present invention is also possible, and the same should be considered as the disclosure of the present invention as long as it does not depart from the spirit of the present invention.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频播放方法、装置和计算机可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类